ng-miam 6.3.2 → 6.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/bundles/ng-miam.umd.js +410 -273
  2. package/bundles/ng-miam.umd.js.map +1 -1
  3. package/bundles/ng-miam.umd.min.js +1 -1
  4. package/bundles/ng-miam.umd.min.js.map +1 -1
  5. package/esm2015/lib/_components/meals-planner-link/meals-planner-link.component.js +6 -19
  6. package/esm2015/lib/_services/analytics.service.js +2 -1
  7. package/esm2015/lib/_services/groceries-lists.service.js +2 -2
  8. package/esm2015/lib/_services/interceptor.service.js +2 -2
  9. package/esm2015/lib/_web-components/meals-planner/meals-planner-basket-confirmation/meals-planner-basket-confirmation.component.js +14 -7
  10. package/esm2015/lib/_web-components/meals-planner/meals-planner-basket-preview/meals-planner-basket-preview.component.js +83 -54
  11. package/esm2015/lib/_web-components/meals-planner/meals-planner-catalog/meals-planner-catalog.component.js +21 -10
  12. package/esm2015/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.js +84 -62
  13. package/esm2015/lib/_web-components/meals-planner/meals-planner-result/meals-planner-result.component.js +18 -10
  14. package/esm2015/lib/_web-components/meals-planner/meals-planner.component.js +77 -31
  15. package/esm2015/lib/_web-components/recipe-cards/suggestion-card/suggestion-card.component.js +5 -7
  16. package/esm2015/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.js +31 -19
  17. package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +3 -3
  18. package/fesm2015/ng-miam.js +322 -206
  19. package/fesm2015/ng-miam.js.map +1 -1
  20. package/lib/_components/meals-planner-link/meals-planner-link.component.d.ts +2 -4
  21. package/lib/_services/analytics.service.d.ts +7 -0
  22. package/lib/_web-components/meals-planner/meals-planner-basket-confirmation/meals-planner-basket-confirmation.component.d.ts +8 -4
  23. package/lib/_web-components/meals-planner/meals-planner-basket-preview/meals-planner-basket-preview.component.d.ts +12 -6
  24. package/lib/_web-components/meals-planner/meals-planner-catalog/meals-planner-catalog.component.d.ts +8 -4
  25. package/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.d.ts +8 -4
  26. package/lib/_web-components/meals-planner/meals-planner-result/meals-planner-result.component.d.ts +8 -4
  27. package/lib/_web-components/meals-planner/meals-planner.component.d.ts +9 -1
  28. package/lib/_web-components/recipe-cards/suggestion-card/suggestion-card.component.d.ts +1 -0
  29. package/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.d.ts +2 -1
  30. package/package.json +1 -1
@@ -679,6 +679,7 @@
679
679
  this.EVENT_PAYMENT_STARTED = 'payment.started';
680
680
  this.EVENT_PAYMENT_CONFIRMED = 'payment.confirmed';
681
681
  this.EVENT_BASKET_CONFIRMED = 'basket.confirmed';
682
+ this.EVENT_MEALS_PLANNER_CONFIRMED = 'planner.confirmed';
682
683
  this.ready$ = new rxjs.BehaviorSubject(false);
683
684
  this.eventEmitter = new i0.EventEmitter();
684
685
  }
@@ -854,7 +855,7 @@
854
855
  if (openBasket === void 0) { openBasket = false; }
855
856
  return this.takeFirstList().pipe(operators.switchMap(function (list) {
856
857
  recipes.forEach(function (recipe) {
857
- _this.addOrUpdateRecipeInList(list, recipe, eventTrace);
858
+ _this.addOrUpdateRecipeInList(list, recipe, { originPath: eventTrace.originPath, props: { recipe_id: recipe === null || recipe === void 0 ? void 0 : recipe.id } });
858
859
  });
859
860
  return _this.saveList(list, openBasket);
860
861
  }));
@@ -12179,29 +12180,17 @@
12179
12180
  var templateObject_1$a;
12180
12181
 
12181
12182
  var MealsPlannerLink = /** @class */ (function () {
12182
- function MealsPlannerLink(context, userService, posService) {
12183
+ function MealsPlannerLink(context) {
12183
12184
  this.context = context;
12184
- this.userService = userService;
12185
- this.posService = posService;
12186
12185
  this.icon = exports.Icon;
12187
12186
  this.subscriptions = [];
12188
12187
  }
12189
12188
  MealsPlannerLink.prototype.openMealsPlanner = function () {
12190
- var _this = this;
12191
- this.subscriptions.push(rxjs.forkJoin([
12192
- this.userService.isLogged$.asObservable().pipe(operators.take(1)),
12193
- this.posService.isPosValid().pipe(operators.take(1))
12194
- ])
12195
- .subscribe(function (res) {
12196
- var isHookOk = _this.context.hookCallback(res[0], res[1]);
12197
- if (isHookOk) {
12198
- window.location.href = _this.context.mealsPlannerUrl;
12199
- }
12200
- }));
12189
+ window.location.href = this.context.mealsPlannerUrl;
12201
12190
  };
12202
12191
  return MealsPlannerLink;
12203
12192
  }());
12204
- MealsPlannerLink.ɵfac = function MealsPlannerLink_Factory(t) { return new (t || MealsPlannerLink)(i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
12193
+ MealsPlannerLink.ɵfac = function MealsPlannerLink_Factory(t) { return new (t || MealsPlannerLink)(i0.ɵɵdirectiveInject(ContextService)); };
12205
12194
  MealsPlannerLink.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerLink, selectors: [["ng-miam-meals-planner-link"]], decls: 14, vars: 1, consts: function () {
12206
12195
  var i18n_0;
12207
12196
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
@@ -12269,7 +12258,7 @@
12269
12258
  encapsulation: i0.ViewEncapsulation.None,
12270
12259
  styleUrls: ['./meals-planner-link.component.scss']
12271
12260
  }]
12272
- }], function () { return [{ type: ContextService }, { type: UserService }, { type: PointOfSalesService }]; }, null);
12261
+ }], function () { return [{ type: ContextService }]; }, null);
12273
12262
  })();
12274
12263
  var templateObject_1$b, templateObject_2$7, templateObject_3$4;
12275
12264
 
@@ -19611,7 +19600,7 @@
19611
19600
  })();
19612
19601
  var templateObject_1$t, templateObject_2$m, templateObject_3$h, templateObject_4$c, templateObject_5$8, templateObject_6$7, templateObject_7$6, templateObject_8$5, templateObject_9$5, templateObject_10$2;
19613
19602
 
19614
- var _c;
19603
+ var _a;
19615
19604
  var _c0$s = ["recipeCard"];
19616
19605
  function SuggestionCardComponent_ng_miam_recipe_card_0_Template(rf, ctx) {
19617
19606
  if (rf & 1) {
@@ -19626,13 +19615,13 @@
19626
19615
  }
19627
19616
  }
19628
19617
  var recipeIncludes$2 = ['recipe-provider', 'sponsors'];
19629
- var recipeSparseFields$2 = (_c = {
19618
+ var recipeSparseFields$2 = (_a = {
19630
19619
  recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
19631
19620
  'resting-time'], recipeIncludes$2),
19632
19621
  sponsors: ['logo-url']
19633
19622
  },
19634
- _c['recipe-provider'] = ['name'],
19635
- _c);
19623
+ _a['recipe-provider'] = ['name'],
19624
+ _a);
19636
19625
  /**
19637
19626
  * This is an angular component design to be a web component
19638
19627
  * that's why we use onPushStrategie with the changeDetetectorRef
@@ -19661,6 +19650,10 @@
19661
19650
  this.loadRecipe();
19662
19651
  }
19663
19652
  };
19653
+ // Only send show event if the recipe has changed while the card was in viewport
19654
+ SuggestionCardComponent.prototype.sendShowEvent = function () {
19655
+ return false;
19656
+ };
19664
19657
  // If recipe already in basket, update the number of guests so that the pricing gets updated as well
19665
19658
  // (display = false so that the recipe details don't show up)
19666
19659
  SuggestionCardComponent.prototype.guestsChanged = function () {
@@ -19695,10 +19688,8 @@
19695
19688
  // Otherwise, will show default number of guests for the recipe
19696
19689
  SuggestionCardComponent.prototype.processResults = function (recipes) {
19697
19690
  var _this = this;
19698
- var _a, _b;
19699
19691
  this.isEmpty = (!recipes || recipes.length === 0);
19700
19692
  if (!this.isEmpty) {
19701
- var recipeChanged = ((_a = this.recipe) === null || _a === void 0 ? void 0 : _a.id) !== ((_b = recipes[0]) === null || _b === void 0 ? void 0 : _b.id);
19702
19693
  // get the first recipe and shallow copy it to permit to send event and do not disturb any other component
19703
19694
  // if ressource is cached without copy another load will get the attributes
19704
19695
  this.recipe = recipes[0].shallowCopyWithEvents(this.recipeEventsService.ORIGIN_SUGGESTION, this.eventsGroupId);
@@ -19710,10 +19701,6 @@
19710
19701
  }
19711
19702
  }));
19712
19703
  this.recipeCard.cdr.markForCheck();
19713
- if (recipeChanged) {
19714
- this.analyticsEventSent = false;
19715
- this.sendShowEvent();
19716
- }
19717
19704
  }
19718
19705
  else {
19719
19706
  this.hide.emit();
@@ -19993,7 +19980,7 @@
19993
19980
  })();
19994
19981
  var templateObject_1$v;
19995
19982
 
19996
- var _c$1;
19983
+ var _c;
19997
19984
  var _c0$t = ["categoryContent"];
19998
19985
  var _c1$c = ["categoryCards"];
19999
19986
  function CatalogCategoryComponent_div_0_div_15_Template(rf, ctx) {
@@ -20118,13 +20105,13 @@
20118
20105
  var SPACE_BETWEEN_CARD = 16;
20119
20106
  var SLIDER_WIDTH = 48;
20120
20107
  var recipeIncludes$3 = ['recipe-provider', 'sponsors'];
20121
- var recipeSparseFields$3 = (_c$1 = {
20108
+ var recipeSparseFields$3 = (_c = {
20122
20109
  recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
20123
20110
  'resting-time'], recipeIncludes$3),
20124
20111
  sponsors: ['logo-url']
20125
20112
  },
20126
- _c$1['recipe-provider'] = ['name'],
20127
- _c$1);
20113
+ _c['recipe-provider'] = ['name'],
20114
+ _c);
20128
20115
  var CatalogCategoryComponent = /** @class */ (function (_super) {
20129
20116
  __extends(CatalogCategoryComponent, _super);
20130
20117
  function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService) {
@@ -20931,12 +20918,12 @@
20931
20918
  return RecipeFilters;
20932
20919
  }());
20933
20920
 
20934
- var _c$2;
20921
+ var _c$1;
20935
20922
  function CatalogListComponent_div_1_div_2_div_4_Template(rf, ctx) {
20936
20923
  if (rf & 1) {
20937
- i0.ɵɵelementStart(0, "div");
20924
+ i0.ɵɵelementStart(0, "div", 17);
20938
20925
  i0.ɵɵelementStart(1, "span");
20939
- i0.ɵɵi18n(2, 17);
20926
+ i0.ɵɵi18n(2, 18);
20940
20927
  i0.ɵɵelementEnd();
20941
20928
  i0.ɵɵelementStart(3, "span");
20942
20929
  i0.ɵɵtext(4);
@@ -20959,7 +20946,9 @@
20959
20946
  i0.ɵɵtemplate(4, CatalogListComponent_div_1_div_2_div_4_Template, 5, 1, "div", 14);
20960
20947
  i0.ɵɵelementEnd();
20961
20948
  i0.ɵɵelementStart(5, "div", 15);
20962
- i0.ɵɵi18n(6, 16);
20949
+ i0.ɵɵelementStart(6, "span");
20950
+ i0.ɵɵi18n(7, 16);
20951
+ i0.ɵɵelementEnd();
20963
20952
  i0.ɵɵelementEnd();
20964
20953
  i0.ɵɵelementEnd();
20965
20954
  }
@@ -20972,15 +20961,17 @@
20972
20961
  function CatalogListComponent_div_1_ng_template_3_div_0_Template(rf, ctx) {
20973
20962
  if (rf & 1) {
20974
20963
  i0.ɵɵelementStart(0, "div");
20975
- i0.ɵɵelementStart(1, "span", 12);
20976
- i0.ɵɵi18n(2, 18);
20964
+ i0.ɵɵelementStart(1, "div", 19);
20965
+ i0.ɵɵelementStart(2, "span");
20966
+ i0.ɵɵi18n(3, 20);
20967
+ i0.ɵɵelementEnd();
20977
20968
  i0.ɵɵelementEnd();
20978
20969
  i0.ɵɵelementEnd();
20979
20970
  }
20980
20971
  }
20981
20972
  function CatalogListComponent_div_1_ng_template_3_Template(rf, ctx) {
20982
20973
  if (rf & 1) {
20983
- i0.ɵɵtemplate(0, CatalogListComponent_div_1_ng_template_3_div_0_Template, 3, 0, "div", 9);
20974
+ i0.ɵɵtemplate(0, CatalogListComponent_div_1_ng_template_3_div_0_Template, 4, 0, "div", 9);
20984
20975
  i0.ɵɵpipe(1, "async");
20985
20976
  }
20986
20977
  if (rf & 2) {
@@ -20992,8 +20983,10 @@
20992
20983
  }
20993
20984
  function CatalogListComponent_div_1_ng_template_5_Template(rf, ctx) {
20994
20985
  if (rf & 1) {
20995
- i0.ɵɵelementStart(0, "span", 12);
20996
- i0.ɵɵi18n(1, 19);
20986
+ i0.ɵɵelementStart(0, "div", 21);
20987
+ i0.ɵɵelementStart(1, "span");
20988
+ i0.ɵɵi18n(2, 22);
20989
+ i0.ɵɵelementEnd();
20997
20990
  i0.ɵɵelementEnd();
20998
20991
  }
20999
20992
  }
@@ -21001,9 +20994,9 @@
21001
20994
  if (rf & 1) {
21002
20995
  i0.ɵɵelementStart(0, "div", 7);
21003
20996
  i0.ɵɵelement(1, "ng-miam-icon", 8);
21004
- i0.ɵɵtemplate(2, CatalogListComponent_div_1_div_2_Template, 7, 1, "div", 9);
20997
+ i0.ɵɵtemplate(2, CatalogListComponent_div_1_div_2_Template, 8, 1, "div", 9);
21005
20998
  i0.ɵɵtemplate(3, CatalogListComponent_div_1_ng_template_3_Template, 2, 4, "ng-template", null, 10, i0.ɵɵtemplateRefExtractor);
21006
- i0.ɵɵtemplate(5, CatalogListComponent_div_1_ng_template_5_Template, 2, 0, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
20999
+ i0.ɵɵtemplate(5, CatalogListComponent_div_1_ng_template_5_Template, 3, 0, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
21007
21000
  i0.ɵɵelementEnd();
21008
21001
  }
21009
21002
  if (rf & 2) {
@@ -21018,7 +21011,7 @@
21018
21011
  function CatalogListComponent_ng_miam_card_create_recipe_3_Template(rf, ctx) {
21019
21012
  if (rf & 1) {
21020
21013
  var _r13_1 = i0.ɵɵgetCurrentView();
21021
- i0.ɵɵelementStart(0, "ng-miam-card-create-recipe", 20);
21014
+ i0.ɵɵelementStart(0, "ng-miam-card-create-recipe", 23);
21022
21015
  i0.ɵɵlistener("clicked", function CatalogListComponent_ng_miam_card_create_recipe_3_Template_ng_miam_card_create_recipe_clicked_0_listener() { i0.ɵɵrestoreView(_r13_1); var ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.recipeActionTriggered.emit({ action: "CREATE", recipe: null }); });
21023
21016
  i0.ɵɵelementEnd();
21024
21017
  }
@@ -21026,7 +21019,7 @@
21026
21019
  function CatalogListComponent_ng_miam_catalog_recipe_card_4_Template(rf, ctx) {
21027
21020
  if (rf & 1) {
21028
21021
  var _r16_1 = i0.ɵɵgetCurrentView();
21029
- i0.ɵɵelementStart(0, "ng-miam-catalog-recipe-card", 21);
21022
+ i0.ɵɵelementStart(0, "ng-miam-catalog-recipe-card", 24);
21030
21023
  i0.ɵɵlistener("addToMealsPlanner", function CatalogListComponent_ng_miam_catalog_recipe_card_4_Template_ng_miam_catalog_recipe_card_addToMealsPlanner_0_listener($event) { i0.ɵɵrestoreView(_r16_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.addToMealsPlanner.emit($event); })("actionTriggered", function CatalogListComponent_ng_miam_catalog_recipe_card_4_Template_ng_miam_catalog_recipe_card_actionTriggered_0_listener($event) { i0.ɵɵrestoreView(_r16_1); var recipe_r14 = ctx.$implicit; var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.recipeActionTriggered.emit({ action: $event, recipe: recipe_r14 }); });
21031
21024
  i0.ɵɵelementEnd();
21032
21025
  }
@@ -21038,7 +21031,7 @@
21038
21031
  }
21039
21032
  function CatalogListComponent_ng_miam_catalog_article_card_5_Template(rf, ctx) {
21040
21033
  if (rf & 1) {
21041
- i0.ɵɵelement(0, "ng-miam-catalog-article-card", 22);
21034
+ i0.ɵɵelement(0, "ng-miam-catalog-article-card", 25);
21042
21035
  }
21043
21036
  if (rf & 2) {
21044
21037
  var article_r18 = ctx.$implicit;
@@ -21047,22 +21040,22 @@
21047
21040
  }
21048
21041
  function CatalogListComponent_div_6_Template(rf, ctx) {
21049
21042
  if (rf & 1) {
21050
- i0.ɵɵelementStart(0, "div", 23);
21043
+ i0.ɵɵelementStart(0, "div", 26);
21051
21044
  i0.ɵɵelement(1, "ng-miam-loader");
21052
21045
  i0.ɵɵelementStart(2, "div");
21053
- i0.ɵɵi18n(3, 24);
21046
+ i0.ɵɵi18n(3, 27);
21054
21047
  i0.ɵɵelementEnd();
21055
21048
  i0.ɵɵelementEnd();
21056
21049
  }
21057
21050
  }
21058
21051
  var recipeIncludes$4 = ['recipe-provider', 'sponsors'];
21059
- var recipeSparseFields$4 = (_c$2 = {
21052
+ var recipeSparseFields$4 = (_c$1 = {
21060
21053
  recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
21061
21054
  'resting-time', 'computed-cost'], recipeIncludes$4),
21062
21055
  sponsors: ['logo-url']
21063
21056
  },
21064
- _c$2['recipe-provider'] = ['name'],
21065
- _c$2);
21057
+ _c$1['recipe-provider'] = ['name'],
21058
+ _c$1);
21066
21059
  var CatalogListComponent = /** @class */ (function (_super) {
21067
21060
  __extends(CatalogListComponent, _super);
21068
21061
  function CatalogListComponent(recipesService, recipeLikesService, articlesService, userService, context, cdr, analyticsService) {
@@ -21078,6 +21071,7 @@
21078
21071
  _this.randomMode = false;
21079
21072
  _this.displayGuests = true;
21080
21073
  _this.addRecipeMode = false;
21074
+ _this.excludedRecipesIds = [];
21081
21075
  _this.addToMealsPlanner = new i0.EventEmitter();
21082
21076
  _this.filterRemoved = new i0.EventEmitter();
21083
21077
  _this.recipeActionTriggered = new i0.EventEmitter();
@@ -21176,6 +21170,9 @@
21176
21170
  var _this = this;
21177
21171
  // Because Filter is a type, attributes are always in the same order, so stringify won't be false for objects with same attributes
21178
21172
  if (JSON.stringify(requestFilters) === JSON.stringify(this.filters)) {
21173
+ if (this.excludedRecipesIds.length > 0) {
21174
+ results = results.filter(function (recipe) { return !_this.excludedRecipesIds.includes(recipe.id); });
21175
+ }
21179
21176
  // if you spam click on filters, multiple requests with page == 1 could be sent for the same filters -> only keep the last result
21180
21177
  this.currentRecipes = page === 1 ? results : __spread(this.currentRecipes, results);
21181
21178
  this.currentRecipes.forEach(function (r) {
@@ -21307,7 +21304,7 @@
21307
21304
  var _t;
21308
21305
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCards = _t);
21309
21306
  }
21310
- }, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing", displayGuests: "displayGuests", addRecipeMode: "addRecipeMode" }, outputs: { addToMealsPlanner: "addToMealsPlanner", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 9, vars: 9, consts: function () {
21307
+ }, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing", displayGuests: "displayGuests", addRecipeMode: "addRecipeMode", excludedRecipesIds: "excludedRecipesIds" }, outputs: { addToMealsPlanner: "addToMealsPlanner", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 9, vars: 9, consts: function () {
21311
21308
  var i18n_0;
21312
21309
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
21313
21310
  var MSG_EXTERNAL_2565683500171826824$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_LIST_CATALOG_LIST_COMPONENT_TS___1 = goog.getMsg("D\u00E9sol\u00E9, aucune proposition trouv\u00E9e");
@@ -21356,7 +21353,7 @@
21356
21353
  else {
21357
21354
  i18n_10 = $localize(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject([":\u241F834498e5698b366d53cba7a7f98b06a12967862c\u241F1875448131572248295: Chargement des r\u00E9sultats... "], [":\u241F834498e5698b366d53cba7a7f98b06a12967862c\u241F1875448131572248295: Chargement des r\u00E9sultats... "])));
21358
21355
  }
21359
- return [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "addToMealsPlanner", "actionTriggered", 4, "ngFor", "ngForOf"], [3, "article", 4, "ngFor", "ngForOf"], ["class", "miam-catalog-list__loader", 4, "ngIf"], ["id", "miam-catalog-list__anchor"], [1, "miam-catalog-list__notFound"], [1, "miam-catalog-list__notFound__icon", 3, "width", "height", "iconName"], [4, "ngIf", "ngIfElse"], ["notFiltering", ""], ["notLogged", ""], [1, "miam-catalog-list__notFound__title1"], i18n_0, [4, "ngIf"], [1, "miam-catalog-list__notFound__title2"], i18n_2, i18n_4, i18n_6, i18n_8, [1, "miam-catalog-list__card", 3, "clicked"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "addToMealsPlanner", "actionTriggered"], [3, "article"], [1, "miam-catalog-list__loader"], i18n_10];
21356
+ return [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "addToMealsPlanner", "actionTriggered", 4, "ngFor", "ngForOf"], [3, "article", 4, "ngFor", "ngForOf"], ["class", "miam-catalog-list__loader", 4, "ngIf"], ["id", "miam-catalog-list__anchor"], [1, "miam-catalog-list__notFound"], [1, "miam-catalog-list__notFound__icon", 3, "width", "height", "iconName"], [4, "ngIf", "ngIfElse"], ["notFiltering", ""], ["notLogged", ""], [1, "miam-catalog-list__notFound__title1", "filtering"], i18n_0, ["class", "miam-catalog-list__notFound__searching", 4, "ngIf"], [1, "miam-catalog-list__notFound__title2"], i18n_2, [1, "miam-catalog-list__notFound__searching"], i18n_4, [1, "miam-catalog-list__notFound__title1", "not-filtering"], i18n_6, [1, "miam-catalog-list__notFound__title1", "not-logged"], i18n_8, [1, "miam-catalog-list__card", 3, "clicked"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "addToMealsPlanner", "actionTriggered"], [3, "article"], [1, "miam-catalog-list__loader"], i18n_10];
21360
21357
  }, template: function CatalogListComponent_Template(rf, ctx) {
21361
21358
  if (rf & 1) {
21362
21359
  i0.ɵɵelementStart(0, "div", 0);
@@ -21382,7 +21379,7 @@
21382
21379
  i0.ɵɵadvance(1);
21383
21380
  i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(7, 7, ctx.loading));
21384
21381
  }
21385
- }, directives: [i2$1.NgIf, i2$1.NgForOf, IconComponent, CardCreateRecipeComponent, CatalogRecipeCardComponent, CatalogArticleCardComponent, LoaderComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-catalog-list__cards{display:flex;flex-flow:row wrap;justify-content:center;margin:calc(0px - var(--m-catalog-cards-spacing)/2);position:relative;right:0;top:0;width:calc(100% + var(--m-catalog-cards-spacing))}.miam-catalog-list__cards .miam-catalog-list__notFound{display:flex;flex-direction:column;justify-content:center;padding:36px 0 0;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1{color:var(--m-color-primary);font-size:24px;font-weight:700;margin-top:36px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title2{color:var(--m-color-grey-text);font-size:22px}.miam-catalog-list__cards .miam-catalog-list__loader{color:var(--m-color-grey-text);font-size:20px;font-weight:700;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__loader .miam-loader{height:80px;margin-bottom:16px;margin-left:calc(50% - 40px);margin-top:80px;width:80px}.miam-catalog-list__cards #miam-catalog-list__anchor{bottom:0;height:600px;margin-top:-600px;position:relative}"], encapsulation: 2, changeDetection: 0 });
21382
+ }, directives: [i2$1.NgIf, i2$1.NgForOf, IconComponent, CardCreateRecipeComponent, CatalogRecipeCardComponent, CatalogArticleCardComponent, LoaderComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-catalog-list__cards{display:flex;flex-flow:row wrap;justify-content:center;margin:calc(0px - var(--m-catalog-cards-spacing)/2);position:relative;right:0;top:0;width:calc(100% + var(--m-catalog-cards-spacing))}.miam-catalog-list__cards .miam-catalog-list__notFound{display:flex;flex-direction:column;justify-content:center;padding:36px 0 0;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1{color:var(--m-color-primary);font-size:24px;font-weight:700;margin-top:36px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering{display:flex;justify-content:center}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering .miam-catalog-list__notFound__searching span{margin-left:5px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title2{color:var(--m-color-grey-text);font-size:22px}.miam-catalog-list__cards .miam-catalog-list__loader{color:var(--m-color-grey-text);font-size:20px;font-weight:700;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__loader .miam-loader{height:80px;margin-bottom:16px;margin-left:calc(50% - 40px);margin-top:80px;width:80px}.miam-catalog-list__cards #miam-catalog-list__anchor{bottom:0;height:600px;margin-top:-600px;position:relative}"], encapsulation: 2, changeDetection: 0 });
21386
21383
  /*@__PURE__*/ (function () {
21387
21384
  i0.ɵsetClassMetadata(CatalogListComponent, [{
21388
21385
  type: i0.Component,
@@ -21407,6 +21404,8 @@
21407
21404
  type: i0.Input
21408
21405
  }], addRecipeMode: [{
21409
21406
  type: i0.Input
21407
+ }], excludedRecipesIds: [{
21408
+ type: i0.Input
21410
21409
  }], addToMealsPlanner: [{
21411
21410
  type: i0.Output
21412
21411
  }], filterRemoved: [{
@@ -23674,7 +23673,7 @@
23674
23673
  RecipeCatalogComponent.prototype.setPriceFilters = function (cost) {
23675
23674
  var filters = Object.assign(this.filters, {
23676
23675
  additionalFilters: {
23677
- filters: { computed_cost: cost[0] + ',gt,' + cost[1] + ',lt', recipe_type_id: '1' },
23676
+ filters: { computed_cost: cost[0] + ',gt,' + cost[1] + ',lt', recipe_type_id: 'main-dish' },
23678
23677
  title: "Recettes \u00E0 moins de " + cost[1] + "\u20AC"
23679
23678
  }
23680
23679
  });
@@ -23903,7 +23902,7 @@
23903
23902
  i0.ɵɵadvance(2);
23904
23903
  i0.ɵɵproperty("ngIf", !ctx.creatingRecipe && ctx.catalogSettingHasLoaded)("ngIfElse", _r2);
23905
23904
  }
23906
- }, directives: [i2$1.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2$1.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, MealsPlannerLink, RecipeStepperComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon{cursor:pointer;margin-right:20px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;padding:48px 24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-end;display:flex;flex-direction:row;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 22px 40px 0}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:48px 0 48px 24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-start;flex-direction:column}.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{margin:0 24px 24px 0;width:calc(100% - 24px)}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{padding:24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;color:var(--miam-color-primary);cursor:pointer;display:flex;padding:4px 8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{align-items:center;background:var(--m-color-primary);border-radius:0 0 20px 20px;cursor:pointer;display:flex;height:50px;justify-content:space-around;left:unset;position:absolute;right:50px;width:200px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{color:var(--m-color-white);font-weight:700}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{border-radius:20px 20px 0 0;bottom:0;left:8px;position:fixed;right:8px;width:auto;z-index:2}}"], encapsulation: 2, changeDetection: 0 });
23905
+ }, directives: [i2$1.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2$1.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, MealsPlannerLink, RecipeStepperComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon{cursor:pointer;margin-right:20px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title span:last-child{margin-left:6px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;padding:48px 24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-end;display:flex;flex-direction:row;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 22px 40px 0}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:48px 0 48px 24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-start;flex-direction:column}.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{margin:0 24px 24px 0;width:calc(100% - 24px)}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{padding:24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;color:var(--miam-color-primary);cursor:pointer;display:flex;padding:4px 8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{align-items:center;background:var(--m-color-primary);border-radius:0 0 20px 20px;cursor:pointer;display:flex;height:50px;justify-content:space-around;left:unset;position:absolute;right:50px;width:200px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{color:var(--m-color-white);font-weight:700}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{border-radius:20px 20px 0 0;bottom:0;left:8px;position:fixed;right:8px;width:auto;z-index:2}}"], encapsulation: 2, changeDetection: 0 });
23907
23906
  /*@__PURE__*/ (function () {
23908
23907
  i0.ɵsetClassMetadata(RecipeCatalogComponent, [{
23909
23908
  type: i0.Component,
@@ -25472,9 +25471,9 @@
25472
25471
 
25473
25472
  function MealsPlannerFormComponent_ng_miam_counter_input_28_Template(rf, ctx) {
25474
25473
  if (rf & 1) {
25475
- var _r8_1 = i0.ɵɵgetCurrentView();
25476
- i0.ɵɵelementStart(0, "ng-miam-counter-input", 32);
25477
- i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_28_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.updateGuests($event); });
25474
+ var _r11_1 = i0.ɵɵgetCurrentView();
25475
+ i0.ɵɵelementStart(0, "ng-miam-counter-input", 34);
25476
+ i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_28_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(_r11_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.updateGuests($event); });
25478
25477
  i0.ɵɵelementEnd();
25479
25478
  }
25480
25479
  if (rf & 2) {
@@ -25484,27 +25483,27 @@
25484
25483
  }
25485
25484
  function MealsPlannerFormComponent_ng_template_29_option_3_Template(rf, ctx) {
25486
25485
  if (rf & 1) {
25487
- i0.ɵɵelementStart(0, "option", 36);
25486
+ i0.ɵɵelementStart(0, "option", 38);
25488
25487
  i0.ɵɵtext(1);
25489
25488
  i0.ɵɵelementEnd();
25490
25489
  }
25491
25490
  if (rf & 2) {
25492
- var number_r10 = ctx.$implicit;
25493
- i0.ɵɵproperty("ngValue", number_r10);
25491
+ var number_r13 = ctx.$implicit;
25492
+ i0.ɵɵproperty("ngValue", number_r13);
25494
25493
  i0.ɵɵadvance(1);
25495
- i0.ɵɵtextInterpolate(number_r10);
25494
+ i0.ɵɵtextInterpolate(number_r13);
25496
25495
  }
25497
25496
  }
25498
25497
  var _c12$1 = function () { return [1, 2, 3, 4, 5, 6, 7, 8, 9]; };
25499
25498
  function MealsPlannerFormComponent_ng_template_29_Template(rf, ctx) {
25500
25499
  if (rf & 1) {
25501
- var _r12_1 = i0.ɵɵgetCurrentView();
25502
- i0.ɵɵelementStart(0, "select", 33);
25503
- i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_29_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.updateView(); });
25504
- i0.ɵɵelementStart(1, "option", 34);
25500
+ var _r15_1 = i0.ɵɵgetCurrentView();
25501
+ i0.ɵɵelementStart(0, "select", 35);
25502
+ i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_29_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.updateView(); });
25503
+ i0.ɵɵelementStart(1, "option", 36);
25505
25504
  i0.ɵɵtext(2);
25506
25505
  i0.ɵɵelementEnd();
25507
- i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_29_option_3_Template, 2, 2, "option", 35);
25506
+ i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_29_option_3_Template, 2, 2, "option", 37);
25508
25507
  i0.ɵɵelementEnd();
25509
25508
  }
25510
25509
  if (rf & 2) {
@@ -25519,9 +25518,9 @@
25519
25518
  }
25520
25519
  function MealsPlannerFormComponent_ng_miam_counter_input_39_Template(rf, ctx) {
25521
25520
  if (rf & 1) {
25522
- var _r14_1 = i0.ɵɵgetCurrentView();
25523
- i0.ɵɵelementStart(0, "ng-miam-counter-input", 32);
25524
- i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_39_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(_r14_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.updateRecipesCount($event); });
25521
+ var _r17_1 = i0.ɵɵgetCurrentView();
25522
+ i0.ɵɵelementStart(0, "ng-miam-counter-input", 34);
25523
+ i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_39_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(_r17_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.updateRecipesCount($event); });
25525
25524
  i0.ɵɵelementEnd();
25526
25525
  }
25527
25526
  if (rf & 2) {
@@ -25531,26 +25530,26 @@
25531
25530
  }
25532
25531
  function MealsPlannerFormComponent_ng_template_40_option_3_Template(rf, ctx) {
25533
25532
  if (rf & 1) {
25534
- i0.ɵɵelementStart(0, "option", 36);
25533
+ i0.ɵɵelementStart(0, "option", 38);
25535
25534
  i0.ɵɵtext(1);
25536
25535
  i0.ɵɵelementEnd();
25537
25536
  }
25538
25537
  if (rf & 2) {
25539
- var option_r16 = ctx.$implicit;
25540
- i0.ɵɵproperty("ngValue", option_r16);
25538
+ var option_r19 = ctx.$implicit;
25539
+ i0.ɵɵproperty("ngValue", option_r19);
25541
25540
  i0.ɵɵadvance(1);
25542
- i0.ɵɵtextInterpolate(option_r16);
25541
+ i0.ɵɵtextInterpolate(option_r19);
25543
25542
  }
25544
25543
  }
25545
25544
  function MealsPlannerFormComponent_ng_template_40_Template(rf, ctx) {
25546
25545
  if (rf & 1) {
25547
- var _r18_1 = i0.ɵɵgetCurrentView();
25548
- i0.ɵɵelementStart(0, "select", 37);
25549
- i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_40_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(_r18_1); var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.updateView(); });
25550
- i0.ɵɵelementStart(1, "option", 38);
25546
+ var _r21_1 = i0.ɵɵgetCurrentView();
25547
+ i0.ɵɵelementStart(0, "select", 39);
25548
+ i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_40_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(_r21_1); var ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.updateView(); });
25549
+ i0.ɵɵelementStart(1, "option", 40);
25551
25550
  i0.ɵɵtext(2, "S\u00E9lectionner");
25552
25551
  i0.ɵɵelementEnd();
25553
- i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_40_option_3_Template, 2, 2, "option", 35);
25552
+ i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_40_option_3_Template, 2, 2, "option", 37);
25554
25553
  i0.ɵɵelementEnd();
25555
25554
  }
25556
25555
  if (rf & 2) {
@@ -25562,28 +25561,42 @@
25562
25561
  i0.ɵɵproperty("ngForOf", ctx_r5.recipesNumbers);
25563
25562
  }
25564
25563
  }
25565
- function MealsPlannerFormComponent_div_52_Template(rf, ctx) {
25564
+ function MealsPlannerFormComponent_ng_miam_icon_44_Template(rf, ctx) {
25566
25565
  if (rf & 1) {
25567
- i0.ɵɵelementStart(0, "div", 39);
25568
- i0.ɵɵelementStart(1, "div", 40);
25566
+ i0.ɵɵelement(0, "ng-miam-icon", 32);
25567
+ }
25568
+ if (rf & 2) {
25569
+ var ctx_r6 = i0.ɵɵnextContext();
25570
+ i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r6.icon.Search);
25571
+ }
25572
+ }
25573
+ function MealsPlannerFormComponent_ng_template_45_Template(rf, ctx) {
25574
+ if (rf & 1) {
25575
+ i0.ɵɵelement(0, "ng-miam-loader");
25576
+ }
25577
+ }
25578
+ function MealsPlannerFormComponent_div_55_Template(rf, ctx) {
25579
+ if (rf & 1) {
25580
+ i0.ɵɵelementStart(0, "div", 41);
25581
+ i0.ɵɵelementStart(1, "div", 42);
25569
25582
  i0.ɵɵelementStart(2, "span");
25570
- i0.ɵɵi18n(3, 41);
25583
+ i0.ɵɵi18n(3, 43);
25571
25584
  i0.ɵɵelementEnd();
25572
25585
  i0.ɵɵelementEnd();
25573
- i0.ɵɵelementStart(4, "div", 42);
25574
- i0.ɵɵelementStart(5, "a", 43);
25586
+ i0.ɵɵelementStart(4, "div", 44);
25587
+ i0.ɵɵelementStart(5, "a", 45);
25575
25588
  i0.ɵɵelementStart(6, "span");
25576
- i0.ɵɵi18n(7, 44);
25589
+ i0.ɵɵi18n(7, 46);
25577
25590
  i0.ɵɵelementEnd();
25578
25591
  i0.ɵɵelementEnd();
25579
- i0.ɵɵelementStart(8, "a", 45);
25592
+ i0.ɵɵelementStart(8, "a", 47);
25580
25593
  i0.ɵɵelementStart(9, "span");
25581
- i0.ɵɵi18n(10, 46);
25594
+ i0.ɵɵi18n(10, 48);
25582
25595
  i0.ɵɵelementEnd();
25583
25596
  i0.ɵɵelementEnd();
25584
- i0.ɵɵelementStart(11, "a", 47);
25597
+ i0.ɵɵelementStart(11, "a", 49);
25585
25598
  i0.ɵɵelementStart(12, "span");
25586
- i0.ɵɵi18n(13, 48);
25599
+ i0.ɵɵi18n(13, 50);
25587
25600
  i0.ɵɵelementEnd();
25588
25601
  i0.ɵɵelement(14, "ng-miam-icon", 4);
25589
25602
  i0.ɵɵelementEnd();
@@ -25591,30 +25604,35 @@
25591
25604
  i0.ɵɵelementEnd();
25592
25605
  }
25593
25606
  if (rf & 2) {
25594
- var ctx_r6 = i0.ɵɵnextContext();
25607
+ var ctx_r9 = i0.ɵɵnextContext();
25595
25608
  i0.ɵɵadvance(5);
25596
- i0.ɵɵproperty("href", ctx_r6.context.catalogUrl + "?cost=0,3", i0.ɵɵsanitizeUrl);
25609
+ i0.ɵɵproperty("href", ctx_r9.context.catalogUrl + "?cost=0,3", i0.ɵɵsanitizeUrl);
25597
25610
  i0.ɵɵadvance(3);
25598
- i0.ɵɵproperty("href", ctx_r6.context.catalogUrl + "?cost=0,5", i0.ɵɵsanitizeUrl);
25611
+ i0.ɵɵproperty("href", ctx_r9.context.catalogUrl + "?cost=0,5", i0.ɵɵsanitizeUrl);
25599
25612
  i0.ɵɵadvance(3);
25600
- i0.ɵɵproperty("href", ctx_r6.context.catalogUrl, i0.ɵɵsanitizeUrl);
25613
+ i0.ɵɵproperty("href", ctx_r9.context.catalogUrl, i0.ɵɵsanitizeUrl);
25601
25614
  i0.ɵɵadvance(3);
25602
- i0.ɵɵproperty("iconName", ctx_r6.icon.ChevronDown);
25615
+ i0.ɵɵproperty("iconName", ctx_r9.icon.ChevronDown);
25603
25616
  }
25604
25617
  }
25605
25618
  var _c21 = function (a0) { return { "reduced": a0 }; };
25606
- var MealsPlannerFormComponent = /** @class */ (function () {
25607
- function MealsPlannerFormComponent(cdr, context, userService, recipesService, posService) {
25608
- this.cdr = cdr;
25609
- this.context = context;
25610
- this.userService = userService;
25611
- this.recipesService = recipesService;
25612
- this.posService = posService;
25613
- this.reduced = false;
25614
- this.submitted = new i0.EventEmitter();
25615
- this.icon = exports.Icon;
25616
- this.recipesNumbers = [];
25617
- this.subscriptions = [];
25619
+ var MealsPlannerFormComponent = /** @class */ (function (_super) {
25620
+ __extends(MealsPlannerFormComponent, _super);
25621
+ function MealsPlannerFormComponent(cdr, context, userService, recipesService, posService, analyticsService) {
25622
+ var _this = _super.call(this, analyticsService) || this;
25623
+ _this.cdr = cdr;
25624
+ _this.context = context;
25625
+ _this.userService = userService;
25626
+ _this.recipesService = recipesService;
25627
+ _this.posService = posService;
25628
+ _this.analyticsService = analyticsService;
25629
+ _this.reduced = false;
25630
+ _this.loading = false;
25631
+ _this.submitted = new i0.EventEmitter();
25632
+ _this.icon = exports.Icon;
25633
+ _this.recipesNumbers = [];
25634
+ _this.subscriptions = [];
25635
+ return _this;
25618
25636
  }
25619
25637
  MealsPlannerFormComponent.prototype.ngOnInit = function () {
25620
25638
  var _this = this;
@@ -25626,6 +25644,7 @@
25626
25644
  MealsPlannerFormComponent.prototype.ngOnDestroy = function () {
25627
25645
  this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
25628
25646
  };
25647
+ MealsPlannerFormComponent.prototype.currentPath = function () { return ''; };
25629
25648
  MealsPlannerFormComponent.prototype.fetchRecipesNumbers = function () {
25630
25649
  var _this = this;
25631
25650
  if (!this.form.value.guestsCount || !this.form.value.budget) {
@@ -25674,9 +25693,9 @@
25674
25693
  window.history.back();
25675
25694
  };
25676
25695
  return MealsPlannerFormComponent;
25677
- }());
25678
- MealsPlannerFormComponent.ɵfac = function MealsPlannerFormComponent_Factory(t) { return new (t || MealsPlannerFormComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
25679
- MealsPlannerFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerFormComponent, selectors: [["ng-miam-meals-planner-form"]], inputs: { form: "form", reduced: "reduced" }, outputs: { submitted: "submitted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 53, vars: 25, consts: function () {
25696
+ }(EventTracerComponent));
25697
+ MealsPlannerFormComponent.ɵfac = function MealsPlannerFormComponent_Factory(t) { return new (t || MealsPlannerFormComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PointOfSalesService), i0.ɵɵdirectiveInject(AnalyticsService)); };
25698
+ MealsPlannerFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerFormComponent, selectors: [["ng-miam-meals-planner-form"]], inputs: { form: "form", reduced: "reduced", loading: "loading" }, outputs: { submitted: "submitted" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 56, vars: 27, consts: function () {
25680
25699
  var i18n_0;
25681
25700
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
25682
25701
  var MSG_EXTERNAL_5479681205645032650$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_FORM_MEALS_PLANNER_FORM_COMPONENT_TS_1 = goog.getMsg("Je d\u00E9finis mes crit\u00E8res");
@@ -25757,7 +25776,7 @@
25757
25776
  else {
25758
25777
  i18n_19 = $localize(templateObject_10$5 || (templateObject_10$5 = __makeTemplateObject([":\u241Ff05cda5fdcd3e6bcc1ddec3f588db62823e96504\u241F4881881106969851436:Voir plus"], [":\u241Ff05cda5fdcd3e6bcc1ddec3f588db62823e96504\u241F4881881106969851436:Voir plus"])));
25759
25778
  }
25760
- return [[1, "miam-meals-planner-form", 3, "ngClass"], [1, "miam-meals-planner-form__left"], [1, "miam-meals-planner-form__right", 3, "formGroup"], [1, "miam-meals-planner-form__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-form__form"], [1, "miam-meals-planner-form__inputs"], [1, "miam-meals-planner-form__input", "budget"], [1, "miam-meals-planner-form__input__label"], i18n_2, [1, "miam-meals-planner-form__input__label__mandatory"], [1, "miam-meals-planner-form__input__budget"], [1, "miam-meals-planner-form__input__small-label"], ["type", "number", "formControlName", "budget", 3, "min", "max", "placeholder", "ngModelChange"], [1, "miam-meals-planner-form__input", "guests"], i18n_4, ["primaryColor", "var(--m-color-grey06)", 3, "width", "height", "iconName"], ["class", "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange", 4, "ngIf", "ngIfElse"], ["selectGuests", ""], [1, "miam-meals-planner-form__input", "meals"], i18n_6, ["selectMeals", ""], [1, "miam-meals-planner-form__cta"], [1, "m-button-primary", "plan", 3, "disabled", "click"], i18n_8, [1, "m-button-primary", "reverse", "swap", 3, "disabled", "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Swap.svg"], i18n_10, [1, "m-button-primary", "validate", 3, "disabled", "click"], ["primaryColor", "var(--m-color-white)", 3, "width", "height", "iconName"], ["class", "miam-meals-planner-form__anti-inflation", 4, "ngIf"], [1, "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange"], ["formControlName", "guestsCount", 3, "ngModelChange"], ["selected", "", "disabled", "", "hidden", "", 3, "value"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["formControlName", "recipesCount", 3, "ngModelChange"], ["value", "0", "disabled", "", 3, "selected"], [1, "miam-meals-planner-form__anti-inflation"], [1, "miam-meals-planner-form__anti-inflation__title"], i18n_13, [1, "miam-meals-planner-form__anti-inflation__links"], [1, "miam-meals-planner-form__anti-inflation__link", "cheaper", 3, "href"], i18n_15, [1, "miam-meals-planner-form__anti-inflation__link", "cheap", 3, "href"], i18n_17, [1, "miam-meals-planner-form__anti-inflation__link", "see-more", 3, "href"], i18n_19];
25779
+ return [[1, "miam-meals-planner-form", 3, "ngClass"], [1, "miam-meals-planner-form__left"], [1, "miam-meals-planner-form__right", 3, "formGroup"], [1, "miam-meals-planner-form__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-form__form"], [1, "miam-meals-planner-form__inputs"], [1, "miam-meals-planner-form__input", "budget"], [1, "miam-meals-planner-form__input__label"], i18n_2, [1, "miam-meals-planner-form__input__label__mandatory"], [1, "miam-meals-planner-form__input__budget"], [1, "miam-meals-planner-form__input__small-label"], ["type", "number", "formControlName", "budget", 3, "min", "max", "placeholder", "ngModelChange"], [1, "miam-meals-planner-form__input", "guests"], i18n_4, ["primaryColor", "var(--m-color-grey06)", 3, "width", "height", "iconName"], ["class", "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange", 4, "ngIf", "ngIfElse"], ["selectGuests", ""], [1, "miam-meals-planner-form__input", "meals"], i18n_6, ["selectMeals", ""], [1, "miam-meals-planner-form__cta"], [1, "m-button-primary", "plan", 3, "disabled", "click"], ["primaryColor", "var(--m-color-white)", 3, "width", "height", "iconName", 4, "ngIf", "ngIfElse"], ["isLoading", ""], i18n_8, [1, "m-button-primary", "reverse", "swap", 3, "disabled", "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Swap.svg"], i18n_10, [1, "m-button-primary", "validate", 3, "disabled", "click"], ["primaryColor", "var(--m-color-white)", 3, "width", "height", "iconName"], ["class", "miam-meals-planner-form__anti-inflation", 4, "ngIf"], [1, "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange"], ["formControlName", "guestsCount", 3, "ngModelChange"], ["selected", "", "disabled", "", "hidden", "", 3, "value"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["formControlName", "recipesCount", 3, "ngModelChange"], ["value", "0", "disabled", "", 3, "selected"], [1, "miam-meals-planner-form__anti-inflation"], [1, "miam-meals-planner-form__anti-inflation__title"], i18n_13, [1, "miam-meals-planner-form__anti-inflation__links"], [1, "miam-meals-planner-form__anti-inflation__link", "cheaper", 3, "href"], i18n_15, [1, "miam-meals-planner-form__anti-inflation__link", "cheap", 3, "href"], i18n_17, [1, "miam-meals-planner-form__anti-inflation__link", "see-more", 3, "href"], i18n_19];
25761
25780
  }, template: function MealsPlannerFormComponent_Template(rf, ctx) {
25762
25781
  if (rf & 1) {
25763
25782
  i0.ɵɵelementStart(0, "div", 0);
@@ -25826,31 +25845,34 @@
25826
25845
  i0.ɵɵelementStart(42, "div", 23);
25827
25846
  i0.ɵɵelementStart(43, "button", 24);
25828
25847
  i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_43_listener() { return ctx.submit(); });
25829
- i0.ɵɵelementStart(44, "span");
25830
- i0.ɵɵi18n(45, 25);
25848
+ i0.ɵɵtemplate(44, MealsPlannerFormComponent_ng_miam_icon_44_Template, 1, 3, "ng-miam-icon", 25);
25849
+ i0.ɵɵtemplate(45, MealsPlannerFormComponent_ng_template_45_Template, 1, 0, "ng-template", null, 26, i0.ɵɵtemplateRefExtractor);
25850
+ i0.ɵɵelementStart(47, "span");
25851
+ i0.ɵɵi18n(48, 27);
25831
25852
  i0.ɵɵelementEnd();
25832
25853
  i0.ɵɵelementEnd();
25833
- i0.ɵɵelementStart(46, "button", 26);
25834
- i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_46_listener() { return ctx.submit(); });
25835
- i0.ɵɵelement(47, "img", 27);
25836
- i0.ɵɵelementStart(48, "span");
25837
- i0.ɵɵi18n(49, 28);
25854
+ i0.ɵɵelementStart(49, "button", 28);
25855
+ i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_49_listener() { return ctx.submit(); });
25856
+ i0.ɵɵelement(50, "img", 29);
25857
+ i0.ɵɵelementStart(51, "span");
25858
+ i0.ɵɵi18n(52, 30);
25838
25859
  i0.ɵɵelementEnd();
25839
25860
  i0.ɵɵelementEnd();
25840
- i0.ɵɵelementStart(50, "button", 29);
25841
- i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_50_listener() { return ctx.submit(); });
25842
- i0.ɵɵelement(51, "ng-miam-icon", 30);
25861
+ i0.ɵɵelementStart(53, "button", 31);
25862
+ i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_53_listener() { return ctx.submit(); });
25863
+ i0.ɵɵelement(54, "ng-miam-icon", 32);
25843
25864
  i0.ɵɵelementEnd();
25844
25865
  i0.ɵɵelementEnd();
25845
25866
  i0.ɵɵelementEnd();
25846
- i0.ɵɵtemplate(52, MealsPlannerFormComponent_div_52_Template, 15, 4, "div", 31);
25867
+ i0.ɵɵtemplate(55, MealsPlannerFormComponent_div_55_Template, 15, 4, "div", 33);
25847
25868
  i0.ɵɵelementEnd();
25848
25869
  i0.ɵɵelementEnd();
25849
25870
  }
25850
25871
  if (rf & 2) {
25851
25872
  var _r1 = i0.ɵɵreference(30);
25852
25873
  var _r4 = i0.ɵɵreference(41);
25853
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c21, ctx.reduced));
25874
+ var _r7 = i0.ɵɵreference(46);
25875
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c21, ctx.reduced));
25854
25876
  i0.ɵɵadvance(2);
25855
25877
  i0.ɵɵproperty("formGroup", ctx.form);
25856
25878
  i0.ɵɵadvance(2);
@@ -25867,7 +25889,9 @@
25867
25889
  i0.ɵɵproperty("ngIf", !ctx.context.antiInflation)("ngIfElse", _r4);
25868
25890
  i0.ɵɵadvance(4);
25869
25891
  i0.ɵɵproperty("disabled", ctx.form.invalid);
25870
- i0.ɵɵadvance(3);
25892
+ i0.ɵɵadvance(1);
25893
+ i0.ɵɵproperty("ngIf", !ctx.loading)("ngIfElse", _r7);
25894
+ i0.ɵɵadvance(5);
25871
25895
  i0.ɵɵproperty("disabled", ctx.form.invalid);
25872
25896
  i0.ɵɵadvance(4);
25873
25897
  i0.ɵɵproperty("disabled", ctx.form.invalid);
@@ -25876,7 +25900,7 @@
25876
25900
  i0.ɵɵadvance(1);
25877
25901
  i0.ɵɵproperty("ngIf", !ctx.reduced && ctx.context.antiInflation);
25878
25902
  }
25879
- }, directives: [i2$1.NgClass, i3.NgControlStatusGroup, i3.FormGroupDirective, IconComponent, i3.NumberValueAccessor, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlName, i2$1.NgIf, CounterInputComponent, i3.SelectControlValueAccessor, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i2$1.NgForOf], styles: [".miam-meals-planner-form{display:flex;min-height:90vh;width:100%}.miam-meals-planner-form .miam-meals-planner-form__left{background-image:url(https://storage.googleapis.com/assets.miam.tech/generic/meals-planner/background-meals-planner-link.jpeg);background-position:50%;background-size:cover;display:flex;flex:1}.miam-meals-planner-form .miam-meals-planner-form__right{display:flex;flex:1;flex-direction:column;padding:32px 16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex;flex-direction:row;font-size:24px;font-weight:900;line-height:120%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon{transform:rotate(90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title span{margin-left:16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs{display:flex;flex-direction:column;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{display:flex;flex-direction:column;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{font-size:14px;font-weight:700;line-height:16px;margin-bottom:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label .miam-meals-planner-form__input__label__mandatory{color:var(--m-color-danger);margin-left:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{border:1px solid var(--m-color-grey06);border-radius:6px 0 0 6px;border-right:unset;box-sizing:border-box;display:none;font-size:14px;line-height:24px;padding:12px 8px;text-align:center;width:48px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget{display:inline-flex;flex-direction:row;flex-wrap:nowrap;position:relative;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget input[type=number]{border:1px solid var(--m-color-grey06);border-radius:0 6px 6px 0;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-grey06);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input{border:1px solid var(--m-color-primary);border-radius:6px;justify-content:space-between;padding:12px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__icon{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{background-color:transparent;border:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus ng-miam-icon .icon-container svg path,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus ng-miam-icon .icon-container svg path{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__count{border:none!important;font-size:16px;font-weight:900;line-height:150%;outline:none!important;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{background-color:#fff;border:1px solid var(--m-color-primary);border-radius:6px;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-primary);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{align-items:center;display:flex;justify-content:center;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .validate{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta img{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-top:60px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__title{font-size:20px;font-weight:600;line-height:28px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link{color:var(--m-color-primary);font-size:16px;font-weight:400;line-height:24px;margin:10px 29px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheaper{text-decoration:underline}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more{display:flex;text-decoration:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more span{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon{transform:rotate(-90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form.reduced .miam-meals-planner-form__left{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:0 16px 24px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.meals .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan{display:none}@media (max-width:1023px){.miam-meals-planner-form .miam-meals-planner-form__left{display:none}.miam-meals-planner-form .miam-meals-planner-form__right{padding:20px 16px}.miam-meals-planner-form.reduced{min-height:unset}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:24px 16px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{flex-direction:row}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 8px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{border:1px solid var(--m-color-grey06);border-bottom-left-radius:0;border-top-left-radius:0;outline-color:var(--m-color-grey06)}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary{border-radius:6px;padding:12px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.swap{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.validate{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary ng-miam-icon{margin:0}}@media (max-width:375px){.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 4px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:4px}}"], encapsulation: 2, changeDetection: 0 });
25903
+ }, directives: [i2$1.NgClass, i3.NgControlStatusGroup, i3.FormGroupDirective, IconComponent, i3.NumberValueAccessor, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlName, i2$1.NgIf, CounterInputComponent, i3.SelectControlValueAccessor, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i2$1.NgForOf, LoaderComponent], styles: [".miam-meals-planner-form{display:flex;min-height:90vh;width:100%}.miam-meals-planner-form .miam-meals-planner-form__left{background-image:url(https://storage.googleapis.com/assets.miam.tech/generic/meals-planner/background-meals-planner-link.jpeg);background-position:50%;background-size:cover;display:flex;flex:1}.miam-meals-planner-form .miam-meals-planner-form__right{display:flex;flex:1;flex-direction:column;padding:32px 16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex;flex-direction:row;font-size:24px;font-weight:900;line-height:120%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon{transform:rotate(90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title span{margin-left:16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs{display:flex;flex-direction:column;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{display:flex;flex-direction:column;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{font-size:14px;font-weight:700;line-height:16px;margin-bottom:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label .miam-meals-planner-form__input__label__mandatory{color:var(--m-color-danger);margin-left:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{border:1px solid var(--m-color-grey06);border-radius:6px 0 0 6px;border-right:unset;box-sizing:border-box;display:none;font-size:14px;line-height:24px;padding:12px 8px;text-align:center;width:48px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget{display:inline-flex;flex-direction:row;flex-wrap:nowrap;position:relative;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget input[type=number]{border:1px solid var(--m-color-grey06);border-radius:0 6px 6px 0;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-grey06);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input{border:1px solid var(--m-color-primary);border-radius:6px;justify-content:space-between;padding:12px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__icon{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{background-color:transparent;border:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus ng-miam-icon .icon-container svg path,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus ng-miam-icon .icon-container svg path{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__count{border:none!important;font-size:16px;font-weight:900;line-height:150%;outline:none!important;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{background-color:#fff;border:1px solid var(--m-color-primary);border-radius:6px;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-primary);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{align-items:center;display:flex;justify-content:center;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan ng-miam-icon{display:none;margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan .miam-loader{border:4px solid var(--m-color-grey);border-top:4px solid var(--m-color-grey);border-top-color:var(--m-color-primary);height:28px;margin-right:8px;width:28px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .validate{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta img{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-top:60px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__title{font-size:20px;font-weight:600;line-height:28px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link{color:var(--m-color-primary);font-size:16px;font-weight:400;line-height:24px;margin:10px 29px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheaper{text-decoration:underline}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more{display:flex;text-decoration:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more span{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon{transform:rotate(-90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form.reduced .miam-meals-planner-form__left{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:0 16px 24px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.meals .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan{display:none}@media (max-width:1023px){.miam-meals-planner-form .miam-meals-planner-form__left{display:none}.miam-meals-planner-form .miam-meals-planner-form__right{padding:20px 16px}.miam-meals-planner-form.reduced{min-height:unset}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:24px 16px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{flex-direction:row}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 8px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{border:1px solid var(--m-color-grey06);border-bottom-left-radius:0;border-top-left-radius:0;outline-color:var(--m-color-grey06)}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary{border-radius:6px;padding:12px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.swap{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.validate{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary ng-miam-icon{margin:0}}@media (max-width:375px){.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 4px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:4px}}"], encapsulation: 2, changeDetection: 0 });
25880
25904
  /*@__PURE__*/ (function () {
25881
25905
  i0.ɵsetClassMetadata(MealsPlannerFormComponent, [{
25882
25906
  type: i0.Component,
@@ -25887,10 +25911,12 @@
25887
25911
  encapsulation: i0.ViewEncapsulation.None,
25888
25912
  changeDetection: i0.ChangeDetectionStrategy.OnPush
25889
25913
  }]
25890
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: RecipesService }, { type: PointOfSalesService }]; }, { form: [{
25914
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: RecipesService }, { type: PointOfSalesService }, { type: AnalyticsService }]; }, { form: [{
25891
25915
  type: i0.Input
25892
25916
  }], reduced: [{
25893
25917
  type: i0.Input
25918
+ }], loading: [{
25919
+ type: i0.Input
25894
25920
  }], submitted: [{
25895
25921
  type: i0.Output
25896
25922
  }] });
@@ -25908,8 +25934,9 @@
25908
25934
  }
25909
25935
  if (rf & 2) {
25910
25936
  var recipe_r8 = i0.ɵɵnextContext().$implicit;
25937
+ var ctx_r10 = i0.ɵɵnextContext(2);
25911
25938
  i0.ɵɵadvance(1);
25912
- i0.ɵɵproperty("recipe", recipe_r8)("displayPricing", true)("displayGuests", false)("previewAllowed", false)("replaceMode", true);
25939
+ i0.ɵɵproperty("recipe", recipe_r8)("originTrace", ctx_r10.eventTrace())("displayPricing", true)("displayGuests", false)("previewAllowed", false)("replaceMode", true);
25913
25940
  }
25914
25941
  }
25915
25942
  function MealsPlannerResultComponent_div_6_div_1_ng_template_2_Template(rf, ctx) {
@@ -25923,7 +25950,7 @@
25923
25950
  function MealsPlannerResultComponent_div_6_div_1_Template(rf, ctx) {
25924
25951
  if (rf & 1) {
25925
25952
  i0.ɵɵelementStart(0, "div", 12);
25926
- i0.ɵɵtemplate(1, MealsPlannerResultComponent_div_6_div_1_div_1_Template, 2, 5, "div", 13);
25953
+ i0.ɵɵtemplate(1, MealsPlannerResultComponent_div_6_div_1_div_1_Template, 2, 6, "div", 13);
25927
25954
  i0.ɵɵtemplate(2, MealsPlannerResultComponent_div_6_div_1_ng_template_2_Template, 1, 0, "ng-template", null, 14, i0.ɵɵtemplateRefExtractor);
25928
25955
  i0.ɵɵelementEnd();
25929
25956
  }
@@ -25974,21 +26001,25 @@
25974
26001
  i0.ɵɵelement(0, "ng-miam-loader");
25975
26002
  }
25976
26003
  }
25977
- var MealsPlannerResultComponent = /** @class */ (function () {
25978
- function MealsPlannerResultComponent(cdr, context, userService, posService) {
25979
- this.cdr = cdr;
25980
- this.context = context;
25981
- this.userService = userService;
25982
- this.posService = posService;
25983
- this.recipes = [];
25984
- this.usedBudget = 0;
25985
- this.maxBudget = 0;
25986
- this.loading = false;
25987
- this.confirmed = new i0.EventEmitter();
25988
- this.recipeRemoval = new i0.EventEmitter();
25989
- this.openCatalog = new i0.EventEmitter();
25990
- this.icon = exports.Icon;
25991
- this.subscriptions = [];
26004
+ var MealsPlannerResultComponent = /** @class */ (function (_super) {
26005
+ __extends(MealsPlannerResultComponent, _super);
26006
+ function MealsPlannerResultComponent(cdr, context, userService, posService, analyticsService) {
26007
+ var _this = _super.call(this, analyticsService) || this;
26008
+ _this.cdr = cdr;
26009
+ _this.context = context;
26010
+ _this.userService = userService;
26011
+ _this.posService = posService;
26012
+ _this.analyticsService = analyticsService;
26013
+ _this.recipes = [];
26014
+ _this.usedBudget = 0;
26015
+ _this.maxBudget = 0;
26016
+ _this.loading = false;
26017
+ _this.confirmed = new i0.EventEmitter();
26018
+ _this.recipeRemoval = new i0.EventEmitter();
26019
+ _this.openCatalog = new i0.EventEmitter();
26020
+ _this.icon = exports.Icon;
26021
+ _this.subscriptions = [];
26022
+ return _this;
25992
26023
  }
25993
26024
  MealsPlannerResultComponent.prototype.submit = function () {
25994
26025
  var _this = this;
@@ -26003,21 +26034,25 @@
26003
26034
  }
26004
26035
  }));
26005
26036
  };
26037
+ MealsPlannerResultComponent.prototype.ngOnInit = function () {
26038
+ this.pageview();
26039
+ };
26006
26040
  MealsPlannerResultComponent.prototype.ngOnChanges = function () {
26007
26041
  this.cdr.detectChanges();
26008
26042
  };
26009
26043
  MealsPlannerResultComponent.prototype.ngOnDestroy = function () {
26010
26044
  this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
26011
26045
  };
26046
+ MealsPlannerResultComponent.prototype.currentPath = function () { return 'results'; };
26012
26047
  MealsPlannerResultComponent.prototype.removeRecipe = function (index) {
26013
26048
  this.recipes[index] = undefined;
26014
26049
  this.recipeRemoval.emit(index);
26015
26050
  this.cdr.detectChanges();
26016
26051
  };
26017
26052
  return MealsPlannerResultComponent;
26018
- }());
26019
- MealsPlannerResultComponent.ɵfac = function MealsPlannerResultComponent_Factory(t) { return new (t || MealsPlannerResultComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
26020
- MealsPlannerResultComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerResultComponent, selectors: [["ng-miam-meals-planner-result"]], inputs: { recipes: "recipes", usedBudget: "usedBudget", maxBudget: "maxBudget", loading: "loading" }, outputs: { confirmed: "confirmed", recipeRemoval: "recipeRemoval", openCatalog: "openCatalog" }, features: [i0.ɵɵNgOnChangesFeature], decls: 17, vars: 7, consts: function () {
26053
+ }(EventTracerComponent));
26054
+ MealsPlannerResultComponent.ɵfac = function MealsPlannerResultComponent_Factory(t) { return new (t || MealsPlannerResultComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(PointOfSalesService), i0.ɵɵdirectiveInject(AnalyticsService)); };
26055
+ MealsPlannerResultComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerResultComponent, selectors: [["ng-miam-meals-planner-result"]], inputs: { recipes: "recipes", usedBudget: "usedBudget", maxBudget: "maxBudget", loading: "loading" }, outputs: { confirmed: "confirmed", recipeRemoval: "recipeRemoval", openCatalog: "openCatalog" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 17, vars: 7, consts: function () {
26021
26056
  var i18n_0;
26022
26057
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26023
26058
  var MSG_EXTERNAL_4657629567820612951$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_RESULT_MEALS_PLANNER_RESULT_COMPONENT_TS_1 = goog.getMsg(" id\u00E9es repas pour vous");
@@ -26034,7 +26069,7 @@
26034
26069
  else {
26035
26070
  i18n_2 = $localize(templateObject_2$A || (templateObject_2$A = __makeTemplateObject([":\u241Fcbd8320aa840fa217e5711e1e1a23bbc04cddacb\u241F1290005437956785602:Ajouter tous les ingr\u00E9dients"], [":\u241Fcbd8320aa840fa217e5711e1e1a23bbc04cddacb\u241F1290005437956785602:Ajouter tous les ingr\u00E9dients"])));
26036
26071
  }
26037
- return [[1, "miam-meals-planner-result"], [1, "miam-meals-planner-result__header"], i18n_0, ["class", "miam-meals-planner-result__recipes", 4, "ngIf", "ngIfElse"], ["isLoading", ""], [1, "miam-meals-planner-result__cta"], ["class", "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], [1, "m-button-primary", 3, "disabled", "click"], ["width", "24", "height", "24", 3, "iconName", 4, "ngIf", "ngIfElse"], i18n_2, [1, "miam-meals-planner-result__recipes"], ["class", "miam-meals-planner-result__recipe", 4, "ngFor", "ngForOf"], [1, "miam-meals-planner-result__recipe"], [4, "ngIf", "ngIfElse"], ["addRecipeTemplate", ""], [3, "recipe", "displayPricing", "displayGuests", "previewAllowed", "replaceMode", "openCatalog", "removeFromMealsPlanner"], [3, "addRecipe"], [1, "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max"], ["width", "24", "height", "24", 3, "iconName"]];
26072
+ return [[1, "miam-meals-planner-result"], [1, "miam-meals-planner-result__header"], i18n_0, ["class", "miam-meals-planner-result__recipes", 4, "ngIf", "ngIfElse"], ["isLoading", ""], [1, "miam-meals-planner-result__cta"], ["class", "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], [1, "m-button-primary", 3, "disabled", "click"], ["width", "24", "height", "24", 3, "iconName", 4, "ngIf", "ngIfElse"], i18n_2, [1, "miam-meals-planner-result__recipes"], ["class", "miam-meals-planner-result__recipe", 4, "ngFor", "ngForOf"], [1, "miam-meals-planner-result__recipe"], [4, "ngIf", "ngIfElse"], ["addRecipeTemplate", ""], [3, "recipe", "originTrace", "displayPricing", "displayGuests", "previewAllowed", "replaceMode", "openCatalog", "removeFromMealsPlanner"], [3, "addRecipe"], [1, "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max"], ["width", "24", "height", "24", 3, "iconName"]];
26038
26073
  }, template: function MealsPlannerResultComponent_Template(rf, ctx) {
26039
26074
  if (rf & 1) {
26040
26075
  i0.ɵɵelementStart(0, "div", 0);
@@ -26085,7 +26120,7 @@
26085
26120
  encapsulation: i0.ViewEncapsulation.None,
26086
26121
  changeDetection: i0.ChangeDetectionStrategy.OnPush
26087
26122
  }]
26088
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: PointOfSalesService }]; }, { recipes: [{
26123
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: PointOfSalesService }, { type: AnalyticsService }]; }, { recipes: [{
26089
26124
  type: i0.Input
26090
26125
  }], usedBudget: [{
26091
26126
  type: i0.Input
@@ -26103,53 +26138,64 @@
26103
26138
  })();
26104
26139
  var templateObject_1$K, templateObject_2$A;
26105
26140
 
26106
- function MealsPlannerBasketPreviewComponent_div_0_ng_miam_progress_tracker_9_Template(rf, ctx) {
26141
+ function MealsPlannerBasketPreviewComponent_div_0_div_7_Template(rf, ctx) {
26142
+ if (rf & 1) {
26143
+ i0.ɵɵelementStart(0, "div", 13);
26144
+ i0.ɵɵelementStart(1, "div", 14);
26145
+ i0.ɵɵelementStart(2, "span");
26146
+ i0.ɵɵi18n(3, 15);
26147
+ i0.ɵɵelementEnd();
26148
+ i0.ɵɵelementEnd();
26149
+ i0.ɵɵelementEnd();
26150
+ }
26151
+ }
26152
+ function MealsPlannerBasketPreviewComponent_div_0_ng_miam_progress_tracker_10_Template(rf, ctx) {
26107
26153
  if (rf & 1) {
26108
- i0.ɵɵelement(0, "ng-miam-progress-tracker", 12);
26154
+ i0.ɵɵelement(0, "ng-miam-progress-tracker", 16);
26109
26155
  }
26110
26156
  if (rf & 2) {
26111
- var ctx_r1 = i0.ɵɵnextContext(2);
26112
- i0.ɵɵproperty("unit", "\u20AC")("value", ctx_r1.usedBudget)("max", ctx_r1.maxBudget);
26157
+ var ctx_r2 = i0.ɵɵnextContext(2);
26158
+ i0.ɵɵproperty("unit", "\u20AC")("value", ctx_r2.usedBudget)("max", ctx_r2.maxBudget);
26113
26159
  }
26114
26160
  }
26115
- function MealsPlannerBasketPreviewComponent_div_0_button_10_Template(rf, ctx) {
26161
+ function MealsPlannerBasketPreviewComponent_div_0_button_11_Template(rf, ctx) {
26116
26162
  if (rf & 1) {
26117
- i0.ɵɵelementStart(0, "button", 13);
26118
- i0.ɵɵelementStart(1, "a", 14);
26119
- i0.ɵɵelementStart(2, "div", 15);
26163
+ i0.ɵɵelementStart(0, "button", 17);
26164
+ i0.ɵɵelementStart(1, "a", 18);
26165
+ i0.ɵɵelementStart(2, "div", 19);
26120
26166
  i0.ɵɵelementStart(3, "span");
26121
- i0.ɵɵi18n(4, 16);
26167
+ i0.ɵɵi18n(4, 20);
26122
26168
  i0.ɵɵelementEnd();
26123
26169
  i0.ɵɵelementEnd();
26124
26170
  i0.ɵɵelementEnd();
26125
26171
  i0.ɵɵelementEnd();
26126
26172
  }
26127
26173
  if (rf & 2) {
26128
- var ctx_r2 = i0.ɵɵnextContext(2);
26129
- i0.ɵɵproperty("disabled", ctx_r2.ctasDisabled);
26174
+ var ctx_r3 = i0.ɵɵnextContext(2);
26175
+ i0.ɵɵproperty("disabled", ctx_r3.ctasDisabled);
26130
26176
  i0.ɵɵadvance(1);
26131
- i0.ɵɵproperty("href", ctx_r2.context.retailerCartUrl, i0.ɵɵsanitizeUrl);
26177
+ i0.ɵɵproperty("href", ctx_r3.context.retailerCartUrl, i0.ɵɵsanitizeUrl);
26132
26178
  }
26133
26179
  }
26134
- function MealsPlannerBasketPreviewComponent_div_0_a_12_Template(rf, ctx) {
26180
+ function MealsPlannerBasketPreviewComponent_div_0_a_13_Template(rf, ctx) {
26135
26181
  if (rf & 1) {
26136
- i0.ɵɵelementStart(0, "a", 17);
26137
- i0.ɵɵelementStart(1, "div", 15);
26182
+ i0.ɵɵelementStart(0, "a", 21);
26183
+ i0.ɵɵelementStart(1, "div", 19);
26138
26184
  i0.ɵɵelementStart(2, "span");
26139
- i0.ɵɵi18n(3, 18);
26185
+ i0.ɵɵi18n(3, 22);
26140
26186
  i0.ɵɵelementEnd();
26141
26187
  i0.ɵɵelementEnd();
26142
26188
  i0.ɵɵelementEnd();
26143
26189
  }
26144
26190
  }
26145
- function MealsPlannerBasketPreviewComponent_div_0_ng_template_13_Template(rf, ctx) {
26191
+ function MealsPlannerBasketPreviewComponent_div_0_ng_template_14_Template(rf, ctx) {
26146
26192
  if (rf & 1) {
26147
- var _r7_1 = i0.ɵɵgetCurrentView();
26148
- i0.ɵɵelementStart(0, "a", 19);
26149
- i0.ɵɵlistener("click", function MealsPlannerBasketPreviewComponent_div_0_ng_template_13_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r7_1); var ctx_r6 = i0.ɵɵnextContext(2); return ctx_r6.ctasDisabled ? {} : ctx_r6.closed.emit(); });
26150
- i0.ɵɵelementStart(1, "div", 15);
26193
+ var _r8_1 = i0.ɵɵgetCurrentView();
26194
+ i0.ɵɵelementStart(0, "a", 23);
26195
+ i0.ɵɵlistener("click", function MealsPlannerBasketPreviewComponent_div_0_ng_template_14_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(2); return ctx_r7.ctasDisabled ? {} : ctx_r7.closed.emit(); });
26196
+ i0.ɵɵelementStart(1, "div", 19);
26151
26197
  i0.ɵɵelementStart(2, "span");
26152
- i0.ɵɵi18n(3, 20);
26198
+ i0.ɵɵi18n(3, 24);
26153
26199
  i0.ɵɵelementEnd();
26154
26200
  i0.ɵɵelementEnd();
26155
26201
  i0.ɵɵelementEnd();
@@ -26157,7 +26203,7 @@
26157
26203
  }
26158
26204
  function MealsPlannerBasketPreviewComponent_div_0_Template(rf, ctx) {
26159
26205
  if (rf & 1) {
26160
- var _r9_1 = i0.ɵɵgetCurrentView();
26206
+ var _r10_1 = i0.ɵɵgetCurrentView();
26161
26207
  i0.ɵɵelementStart(0, "div", 1);
26162
26208
  i0.ɵɵelementStart(1, "div", 2);
26163
26209
  i0.ɵɵelementStart(2, "div", 3);
@@ -26168,27 +26214,30 @@
26168
26214
  i0.ɵɵi18n(6, 4);
26169
26215
  i0.ɵɵelementEnd();
26170
26216
  i0.ɵɵelementEnd();
26171
- i0.ɵɵelementStart(7, "ng-miam-basket-preview-block", 5);
26172
- i0.ɵɵlistener("loading", function MealsPlannerBasketPreviewComponent_div_0_Template_ng_miam_basket_preview_block_loading_7_listener($event) { i0.ɵɵrestoreView(_r9_1); var ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.setCtasDisabled($event); });
26217
+ i0.ɵɵtemplate(7, MealsPlannerBasketPreviewComponent_div_0_div_7_Template, 4, 0, "div", 5);
26218
+ i0.ɵɵelementStart(8, "ng-miam-basket-preview-block", 6);
26219
+ i0.ɵɵlistener("loading", function MealsPlannerBasketPreviewComponent_div_0_Template_ng_miam_basket_preview_block_loading_8_listener($event) { i0.ɵɵrestoreView(_r10_1); var ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.setCtasDisabled($event); });
26173
26220
  i0.ɵɵelementEnd();
26174
26221
  i0.ɵɵelementEnd();
26175
- i0.ɵɵelementStart(8, "div", 6);
26176
- i0.ɵɵtemplate(9, MealsPlannerBasketPreviewComponent_div_0_ng_miam_progress_tracker_9_Template, 1, 3, "ng-miam-progress-tracker", 7);
26177
- i0.ɵɵtemplate(10, MealsPlannerBasketPreviewComponent_div_0_button_10_Template, 5, 2, "button", 8);
26178
- i0.ɵɵelementStart(11, "button", 9);
26179
- i0.ɵɵtemplate(12, MealsPlannerBasketPreviewComponent_div_0_a_12_Template, 4, 0, "a", 10);
26180
- i0.ɵɵtemplate(13, MealsPlannerBasketPreviewComponent_div_0_ng_template_13_Template, 4, 0, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
26222
+ i0.ɵɵelementStart(9, "div", 7);
26223
+ i0.ɵɵtemplate(10, MealsPlannerBasketPreviewComponent_div_0_ng_miam_progress_tracker_10_Template, 1, 3, "ng-miam-progress-tracker", 8);
26224
+ i0.ɵɵtemplate(11, MealsPlannerBasketPreviewComponent_div_0_button_11_Template, 5, 2, "button", 9);
26225
+ i0.ɵɵelementStart(12, "button", 10);
26226
+ i0.ɵɵtemplate(13, MealsPlannerBasketPreviewComponent_div_0_a_13_Template, 4, 0, "a", 11);
26227
+ i0.ɵɵtemplate(14, MealsPlannerBasketPreviewComponent_div_0_ng_template_14_Template, 4, 0, "ng-template", null, 12, i0.ɵɵtemplateRefExtractor);
26181
26228
  i0.ɵɵelementEnd();
26182
26229
  i0.ɵɵelementEnd();
26183
26230
  i0.ɵɵelementEnd();
26184
26231
  }
26185
26232
  if (rf & 2) {
26186
- var _r4 = i0.ɵɵreference(14);
26233
+ var _r5 = i0.ɵɵreference(15);
26187
26234
  var ctx_r0 = i0.ɵɵnextContext();
26188
26235
  i0.ɵɵadvance(4);
26189
26236
  i0.ɵɵtextInterpolate(ctx_r0.recipesIds.length);
26190
26237
  i0.ɵɵadvance(3);
26191
- i0.ɵɵproperty("originTrace", ctx_r0.eventTrace)("recipesIds", ctx_r0.recipesIds)("displayItemsUnitaryPrice", true);
26238
+ i0.ɵɵproperty("ngIf", ctx_r0.ingredientsRegrouped);
26239
+ i0.ɵɵadvance(1);
26240
+ i0.ɵɵproperty("originTrace", ctx_r0.eventTrace())("recipesIds", ctx_r0.recipesIds)("displayItemsUnitaryPrice", true);
26192
26241
  i0.ɵɵadvance(2);
26193
26242
  i0.ɵɵproperty("ngIf", ctx_r0.context.antiInflation);
26194
26243
  i0.ɵɵadvance(1);
@@ -26196,27 +26245,36 @@
26196
26245
  i0.ɵɵadvance(1);
26197
26246
  i0.ɵɵproperty("disabled", ctx_r0.ctasDisabled);
26198
26247
  i0.ɵɵadvance(1);
26199
- i0.ɵɵproperty("ngIf", !ctx_r0.context.antiInflation)("ngIfElse", _r4);
26248
+ i0.ɵɵproperty("ngIf", !ctx_r0.context.antiInflation)("ngIfElse", _r5);
26200
26249
  }
26201
26250
  }
26202
- var MealsPlannerBasketPreviewComponent = /** @class */ (function () {
26203
- function MealsPlannerBasketPreviewComponent(cdr, context) {
26204
- this.cdr = cdr;
26205
- this.context = context;
26206
- this.recipesIds = [];
26207
- this.usedBudget = 0;
26208
- this.maxBudget = 0;
26209
- this.closed = new i0.EventEmitter();
26210
- this.ctasDisabled = true;
26211
- this.eventTrace = { originPath: '', props: {} };
26212
- this.subscriptions = [];
26251
+ var MealsPlannerBasketPreviewComponent = /** @class */ (function (_super) {
26252
+ __extends(MealsPlannerBasketPreviewComponent, _super);
26253
+ function MealsPlannerBasketPreviewComponent(cdr, context, analyticsService) {
26254
+ var _this = _super.call(this, analyticsService) || this;
26255
+ _this.cdr = cdr;
26256
+ _this.context = context;
26257
+ _this.analyticsService = analyticsService;
26258
+ _this.recipesIds = [];
26259
+ _this.usedBudget = 0;
26260
+ _this.maxBudget = 0;
26261
+ _this.ingredientsRegrouped = false;
26262
+ _this.closed = new i0.EventEmitter();
26263
+ _this.icon = exports.Icon;
26264
+ _this.ctasDisabled = true;
26265
+ _this.subscriptions = [];
26266
+ return _this;
26213
26267
  }
26268
+ MealsPlannerBasketPreviewComponent.prototype.ngOnInit = function () {
26269
+ this.pageview();
26270
+ };
26214
26271
  MealsPlannerBasketPreviewComponent.prototype.ngOnDestroy = function () {
26215
26272
  this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
26216
26273
  };
26217
26274
  MealsPlannerBasketPreviewComponent.prototype.ngOnChanges = function () {
26218
26275
  this.cdr.detectChanges();
26219
26276
  };
26277
+ MealsPlannerBasketPreviewComponent.prototype.currentPath = function () { return 'basket-preview'; };
26220
26278
  /**
26221
26279
  * If the preview is opened and loading, block the user from closing the modal
26222
26280
  */
@@ -26225,9 +26283,9 @@
26225
26283
  this.cdr.detectChanges();
26226
26284
  };
26227
26285
  return MealsPlannerBasketPreviewComponent;
26228
- }());
26229
- MealsPlannerBasketPreviewComponent.ɵfac = function MealsPlannerBasketPreviewComponent_Factory(t) { return new (t || MealsPlannerBasketPreviewComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService)); };
26230
- MealsPlannerBasketPreviewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketPreviewComponent, selectors: [["ng-miam-meals-planner-basket-preview"]], inputs: { recipesIds: "recipesIds", usedBudget: "usedBudget", maxBudget: "maxBudget" }, outputs: { closed: "closed" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: function () {
26286
+ }(EventTracerComponent));
26287
+ MealsPlannerBasketPreviewComponent.ɵfac = function MealsPlannerBasketPreviewComponent_Factory(t) { return new (t || MealsPlannerBasketPreviewComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(AnalyticsService)); };
26288
+ MealsPlannerBasketPreviewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketPreviewComponent, selectors: [["ng-miam-meals-planner-basket-preview"]], inputs: { recipesIds: "recipesIds", usedBudget: "usedBudget", maxBudget: "maxBudget", ingredientsRegrouped: "ingredientsRegrouped" }, outputs: { closed: "closed" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: function () {
26231
26289
  var i18n_0;
26232
26290
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26233
26291
  var MSG_EXTERNAL_2700281655709788634$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS__1 = goog.getMsg("repas ajout\u00E9s \u00E0 votre panier");
@@ -26238,37 +26296,45 @@
26238
26296
  }
26239
26297
  var i18n_2;
26240
26298
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26241
- var MSG_EXTERNAL_2597486146640590065$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___3 = goog.getMsg("Aller \u00E0 mon panier");
26242
- i18n_2 = MSG_EXTERNAL_2597486146640590065$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___3;
26299
+ var MSG_EXTERNAL_349368051595787077$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___3 = goog.getMsg("Les ingr\u00E9dients partageant plusieurs recettes ont \u00E9t\u00E9 regroup\u00E9s");
26300
+ i18n_2 = MSG_EXTERNAL_349368051595787077$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___3;
26243
26301
  }
26244
26302
  else {
26245
- i18n_2 = $localize(templateObject_2$B || (templateObject_2$B = __makeTemplateObject([":\u241F36b57ca9ce912938699424cf85d5cac2a6bfa738\u241F2597486146640590065:Aller \u00E0 mon panier"], [":\u241F36b57ca9ce912938699424cf85d5cac2a6bfa738\u241F2597486146640590065:Aller \u00E0 mon panier"])));
26303
+ i18n_2 = $localize(templateObject_2$B || (templateObject_2$B = __makeTemplateObject([":\u241Fa0d1fe7eaa09916660fc5082c77b25044a39a100\u241F349368051595787077:Les ingr\u00E9dients partageant plusieurs recettes ont \u00E9t\u00E9 regroup\u00E9s"], [":\u241Fa0d1fe7eaa09916660fc5082c77b25044a39a100\u241F349368051595787077:Les ingr\u00E9dients partageant plusieurs recettes ont \u00E9t\u00E9 regroup\u00E9s"])));
26246
26304
  }
26247
26305
  var i18n_4;
26248
26306
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26249
- var MSG_EXTERNAL_4645762297074474087$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___5 = goog.getMsg("Continuer mes achats");
26250
- i18n_4 = MSG_EXTERNAL_4645762297074474087$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___5;
26307
+ var MSG_EXTERNAL_2597486146640590065$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___5 = goog.getMsg("Aller \u00E0 mon panier");
26308
+ i18n_4 = MSG_EXTERNAL_2597486146640590065$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___5;
26251
26309
  }
26252
26310
  else {
26253
- i18n_4 = $localize(templateObject_3$t || (templateObject_3$t = __makeTemplateObject([":\u241Fd8ccc910c8536280f86357456fb751e967f3041f\u241F4645762297074474087:Continuer mes achats"], [":\u241Fd8ccc910c8536280f86357456fb751e967f3041f\u241F4645762297074474087:Continuer mes achats"])));
26311
+ i18n_4 = $localize(templateObject_3$t || (templateObject_3$t = __makeTemplateObject([":\u241F36b57ca9ce912938699424cf85d5cac2a6bfa738\u241F2597486146640590065:Aller \u00E0 mon panier"], [":\u241F36b57ca9ce912938699424cf85d5cac2a6bfa738\u241F2597486146640590065:Aller \u00E0 mon panier"])));
26254
26312
  }
26255
26313
  var i18n_6;
26256
26314
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26257
- var MSG_EXTERNAL_3503734824800029552$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___7 = goog.getMsg("Finaliser");
26258
- i18n_6 = MSG_EXTERNAL_3503734824800029552$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___7;
26315
+ var MSG_EXTERNAL_4645762297074474087$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___7 = goog.getMsg("Continuer mes achats");
26316
+ i18n_6 = MSG_EXTERNAL_4645762297074474087$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___7;
26259
26317
  }
26260
26318
  else {
26261
- i18n_6 = $localize(templateObject_4$n || (templateObject_4$n = __makeTemplateObject([":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"], [":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"])));
26319
+ i18n_6 = $localize(templateObject_4$n || (templateObject_4$n = __makeTemplateObject([":\u241Fd8ccc910c8536280f86357456fb751e967f3041f\u241F4645762297074474087:Continuer mes achats"], [":\u241Fd8ccc910c8536280f86357456fb751e967f3041f\u241F4645762297074474087:Continuer mes achats"])));
26262
26320
  }
26263
- return [["class", "miam-meals-planner-basket-preview", 4, "ngIf"], [1, "miam-meals-planner-basket-preview"], [1, "miam-meals-planner-basket-preview__content"], [1, "miam-meals-planner-basket-preview__title"], i18n_0, [3, "originTrace", "recipesIds", "displayItemsUnitaryPrice", "loading"], [1, "miam-meals-planner-basket-preview__actions"], ["class", "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], ["class", "m-button-primary reverse", 3, "disabled", 4, "ngIf"], [1, "m-button-primary", 3, "disabled"], ["href", "/", 4, "ngIf", "ngIfElse"], ["antiInflation", ""], [1, "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max"], [1, "m-button-primary", "reverse", 3, "disabled"], [3, "href"], [1, "miam-meals-planner-basket-preview__button-text"], i18n_2, ["href", "/"], i18n_4, [3, "click"], i18n_6];
26321
+ var i18n_8;
26322
+ if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26323
+ var MSG_EXTERNAL_3503734824800029552$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___9 = goog.getMsg("Finaliser");
26324
+ i18n_8 = MSG_EXTERNAL_3503734824800029552$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___9;
26325
+ }
26326
+ else {
26327
+ i18n_8 = $localize(templateObject_5$h || (templateObject_5$h = __makeTemplateObject([":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"], [":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"])));
26328
+ }
26329
+ return [["class", "miam-meals-planner-basket-preview", 4, "ngIf"], [1, "miam-meals-planner-basket-preview"], [1, "miam-meals-planner-basket-preview__content"], [1, "miam-meals-planner-basket-preview__title"], i18n_0, ["class", "miam-meals-planner-basket-preview__ingredients-regrouped", 4, "ngIf"], [3, "originTrace", "recipesIds", "displayItemsUnitaryPrice", "loading"], [1, "miam-meals-planner-basket-preview__actions"], ["class", "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], ["class", "m-button-primary reverse", 3, "disabled", 4, "ngIf"], [1, "m-button-primary", 3, "disabled"], ["href", "/", 4, "ngIf", "ngIfElse"], ["antiInflation", ""], [1, "miam-meals-planner-basket-preview__ingredients-regrouped"], [1, "miam-meals-planner-basket-preview__ingredients-regrouped__title"], i18n_2, [1, "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max"], [1, "m-button-primary", "reverse", 3, "disabled"], [3, "href"], [1, "miam-meals-planner-basket-preview__button-text"], i18n_4, ["href", "/"], i18n_6, [3, "click"], i18n_8];
26264
26330
  }, template: function MealsPlannerBasketPreviewComponent_Template(rf, ctx) {
26265
26331
  if (rf & 1) {
26266
- i0.ɵɵtemplate(0, MealsPlannerBasketPreviewComponent_div_0_Template, 15, 9, "div", 0);
26332
+ i0.ɵɵtemplate(0, MealsPlannerBasketPreviewComponent_div_0_Template, 16, 10, "div", 0);
26267
26333
  }
26268
26334
  if (rf & 2) {
26269
26335
  i0.ɵɵproperty("ngIf", ctx.recipesIds.length > 0);
26270
26336
  }
26271
- }, directives: [i2$1.NgIf, BasketPreviewBlockComponent, ProgressTrackerComponent], styles: [".miam-meals-planner-basket-preview{display:flex;flex-direction:column;height:100%;min-height:90vh;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{height:100%;padding:32px 340px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title{font-size:24px;font-style:normal;font-weight:900;line-height:120%;margin-bottom:24px;text-align:center}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title span:last-child{margin-left:8px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{align-items:center;background:#fff;border-top:1px solid #d9dde1;bottom:0;display:flex;justify-content:space-evenly;left:0;padding:16px;position:fixed;right:0;z-index:2}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .miam-meals-planner-basket-preview__progress-bar{max-width:300px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{padding:unset}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a{border-radius:var(--m-button-radius)}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a .miam-meals-planner-basket-preview__button-text{border-radius:var(--m-button-radius);padding:var(--m-button-padding)}@media (max-width:1023px){.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{padding:16px 0}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{flex-direction:column-reverse}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary.reverse{margin-left:0;margin-top:12px}}"], encapsulation: 2, changeDetection: 0 });
26337
+ }, directives: [i2$1.NgIf, BasketPreviewBlockComponent, ProgressTrackerComponent], styles: [".miam-meals-planner-basket-preview{display:flex;flex-direction:column;height:100%;min-height:90vh;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{height:100%;padding:32px 340px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title{font-size:24px;font-style:normal;font-weight:900;line-height:120%;margin-bottom:24px;text-align:center}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title span:last-child{margin-left:8px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__ingredients-regrouped{align-items:center;background-color:var(--m-color-success);border-radius:4px;color:var(--m-color-success-text);display:flex;display:none;margin-bottom:6px;padding:12px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__ingredients-regrouped .miam-meals-planner-basket-preview__ingredients-regrouped__title{font-size:16px;line-height:24px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{align-items:center;background:#fff;border-top:1px solid #d9dde1;bottom:0;display:flex;justify-content:space-evenly;left:0;padding:16px;position:fixed;right:0;z-index:2}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .miam-meals-planner-basket-preview__progress-bar{max-width:300px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{padding:unset}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a{border-radius:var(--m-button-radius)}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a .miam-meals-planner-basket-preview__button-text{border-radius:var(--m-button-radius);padding:var(--m-button-padding)}@media (max-width:1023px){.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{padding:16px 0}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{flex-direction:column-reverse}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary.reverse{margin-left:0;margin-top:12px}}"], encapsulation: 2, changeDetection: 0 });
26272
26338
  /*@__PURE__*/ (function () {
26273
26339
  i0.ɵsetClassMetadata(MealsPlannerBasketPreviewComponent, [{
26274
26340
  type: i0.Component,
@@ -26279,17 +26345,19 @@
26279
26345
  encapsulation: i0.ViewEncapsulation.None,
26280
26346
  changeDetection: i0.ChangeDetectionStrategy.OnPush
26281
26347
  }]
26282
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }]; }, { recipesIds: [{
26348
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: AnalyticsService }]; }, { recipesIds: [{
26283
26349
  type: i0.Input
26284
26350
  }], usedBudget: [{
26285
26351
  type: i0.Input
26286
26352
  }], maxBudget: [{
26287
26353
  type: i0.Input
26354
+ }], ingredientsRegrouped: [{
26355
+ type: i0.Input
26288
26356
  }], closed: [{
26289
26357
  type: i0.Output
26290
26358
  }] });
26291
26359
  })();
26292
- var templateObject_1$L, templateObject_2$B, templateObject_3$t, templateObject_4$n;
26360
+ var templateObject_1$L, templateObject_2$B, templateObject_3$t, templateObject_4$n, templateObject_5$h;
26293
26361
 
26294
26362
  function MealsPlannerCatalogComponent_div_14_Template(rf, ctx) {
26295
26363
  if (rf & 1) {
@@ -26303,20 +26371,27 @@
26303
26371
  i0.ɵɵtextInterpolate1(" ", ctx_r0.filterBadgeCount, " ");
26304
26372
  }
26305
26373
  }
26306
- var MealsPlannerCatalogComponent = /** @class */ (function () {
26307
- function MealsPlannerCatalogComponent(cdr, recipesService) {
26308
- this.cdr = cdr;
26309
- this.recipesService = recipesService;
26310
- this.canceled = new i0.EventEmitter();
26311
- this.editRecipe = new i0.EventEmitter();
26312
- this.icon = exports.Icon;
26313
- this.searchString = '';
26314
- this.filterBadgeCount = 0;
26315
- this.isFilterCollapsed = true;
26374
+ var MealsPlannerCatalogComponent = /** @class */ (function (_super) {
26375
+ __extends(MealsPlannerCatalogComponent, _super);
26376
+ function MealsPlannerCatalogComponent(cdr, recipesService, analyticsService) {
26377
+ var _this = _super.call(this, analyticsService) || this;
26378
+ _this.cdr = cdr;
26379
+ _this.recipesService = recipesService;
26380
+ _this.analyticsService = analyticsService;
26381
+ _this.excludedRecipesIds = [];
26382
+ _this.canceled = new i0.EventEmitter();
26383
+ _this.editRecipe = new i0.EventEmitter();
26384
+ _this.icon = exports.Icon;
26385
+ _this.searchString = '';
26386
+ _this.filterBadgeCount = 0;
26387
+ _this.isFilterCollapsed = true;
26388
+ return _this;
26316
26389
  }
26317
26390
  MealsPlannerCatalogComponent.prototype.ngOnInit = function () {
26318
26391
  this.initFilters();
26392
+ this.pageview();
26319
26393
  };
26394
+ MealsPlannerCatalogComponent.prototype.currentPath = function () { return 'catalog'; };
26320
26395
  // Used on load to build the filters attribute, and on click on the link to reset the filters
26321
26396
  MealsPlannerCatalogComponent.prototype.initFilters = function () {
26322
26397
  this.filters = new RecipeFilters({
@@ -26333,7 +26408,7 @@
26333
26408
  this.filters.search = '';
26334
26409
  this.filters.additionalFilters = {
26335
26410
  filters: {
26336
- recipe_type_id: '1',
26411
+ recipe_type_id: 'main-dish',
26337
26412
  computed_cost: "0,gt," + this.maxCost + ",lt"
26338
26413
  },
26339
26414
  title: ''
@@ -26346,6 +26421,9 @@
26346
26421
  this.cdr.detectChanges();
26347
26422
  };
26348
26423
  MealsPlannerCatalogComponent.prototype.updateSearchString = function () {
26424
+ if (this.filters.search === this.searchString) {
26425
+ return;
26426
+ }
26349
26427
  this.filters.search = this.searchString;
26350
26428
  this.updateFilters(this.filters);
26351
26429
  };
@@ -26361,9 +26439,9 @@
26361
26439
  configurable: true
26362
26440
  });
26363
26441
  return MealsPlannerCatalogComponent;
26364
- }());
26365
- MealsPlannerCatalogComponent.ɵfac = function MealsPlannerCatalogComponent_Factory(t) { return new (t || MealsPlannerCatalogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService)); };
26366
- MealsPlannerCatalogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerCatalogComponent, selectors: [["ng-miam-meals-planner-catalog"]], inputs: { modifiedGuests: "modifiedGuests", remainingBudget: "remainingBudget", remainingRecipesNumber: "remainingRecipesNumber" }, outputs: { canceled: "canceled", editRecipe: "editRecipe" }, decls: 17, vars: 13, consts: function () {
26442
+ }(EventTracerComponent));
26443
+ MealsPlannerCatalogComponent.ɵfac = function MealsPlannerCatalogComponent_Factory(t) { return new (t || MealsPlannerCatalogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(AnalyticsService)); };
26444
+ MealsPlannerCatalogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerCatalogComponent, selectors: [["ng-miam-meals-planner-catalog"]], inputs: { modifiedGuests: "modifiedGuests", remainingBudget: "remainingBudget", remainingRecipesNumber: "remainingRecipesNumber", excludedRecipesIds: "excludedRecipesIds" }, outputs: { canceled: "canceled", editRecipe: "editRecipe" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 17, vars: 15, consts: function () {
26367
26445
  var i18n_0;
26368
26446
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26369
26447
  var MSG_EXTERNAL_2741573127118604046$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_CATALOG_MEALS_PLANNER_CATALOG_COMPONENT_TS_1 = goog.getMsg("Notre catalogue");
@@ -26380,7 +26458,7 @@
26380
26458
  else {
26381
26459
  i18n_2 = $localize(templateObject_2$C || (templateObject_2$C = __makeTemplateObject([":\u241F43a5be6775550e305fdcc873e3fe93fe756b2340\u241F673430564078029527:Filtrer"], [":\u241F43a5be6775550e305fdcc873e3fe93fe756b2340\u241F673430564078029527:Filtrer"])));
26382
26460
  }
26383
- return [[1, "miam-meals-planner-catalog"], [1, "miam-meals-planner-catalog__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-catalog__search-and-filters"], [1, "miam-meals-planner-catalog__searchbar"], ["type", "text", "placeholder", "Chercher un ingr\u00E9dient ou un repas", 1, "miam-meals-planner-catalog__searchbar__input", 3, "ngModel", "ngModelChange", "keydown.enter", "blur"], [1, "miam-meals-planner-catalog__searchbar__button", "m-button-primary"], ["width", "20", "height", "20", 3, "iconName", "click"], [1, "miam-meals-planner-catalog__controls__filter", "m-button-primary", 3, "click"], ["width", "18", "height", "18", 3, "iconName"], i18n_2, ["class", "miam-meals-planner-catalog__controls__filter-badge", 4, "ngIf"], [3, "filters", "isFilterCollapsed", "position", "filterChanged", "filterCollapsed"], [3, "displayPricing", "addRecipeMode", "modifiedGuests", "filters", "displayGuests", "addToMealsPlanner"], [1, "miam-meals-planner-catalog__controls__filter-badge"]];
26461
+ return [[1, "miam-meals-planner-catalog"], [1, "miam-meals-planner-catalog__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-catalog__search-and-filters"], [1, "miam-meals-planner-catalog__searchbar"], ["type", "text", "placeholder", "Chercher un ingr\u00E9dient ou un repas", 1, "miam-meals-planner-catalog__searchbar__input", 3, "ngModel", "ngModelChange", "keydown.enter", "blur"], [1, "miam-meals-planner-catalog__searchbar__button", "m-button-primary"], ["width", "20", "height", "20", 3, "iconName", "click"], [1, "miam-meals-planner-catalog__controls__filter", "m-button-primary", 3, "click"], ["width", "18", "height", "18", 3, "iconName"], i18n_2, ["class", "miam-meals-planner-catalog__controls__filter-badge", 4, "ngIf"], [3, "filters", "isFilterCollapsed", "position", "filterChanged", "filterCollapsed"], [3, "displayPricing", "addRecipeMode", "modifiedGuests", "originTrace", "filters", "displayGuests", "excludedRecipesIds", "addToMealsPlanner"], [1, "miam-meals-planner-catalog__controls__filter-badge"]];
26384
26462
  }, template: function MealsPlannerCatalogComponent_Template(rf, ctx) {
26385
26463
  if (rf & 1) {
26386
26464
  i0.ɵɵelementStart(0, "div", 0);
@@ -26433,7 +26511,7 @@
26433
26511
  i0.ɵɵadvance(1);
26434
26512
  i0.ɵɵproperty("filters", ctx.filters)("isFilterCollapsed", ctx.isFilterCollapsed)("position", "right");
26435
26513
  i0.ɵɵadvance(1);
26436
- i0.ɵɵproperty("displayPricing", true)("addRecipeMode", true)("modifiedGuests", ctx.modifiedGuests)("filters", ctx.filters)("displayGuests", false);
26514
+ i0.ɵɵproperty("displayPricing", true)("addRecipeMode", true)("modifiedGuests", ctx.modifiedGuests)("originTrace", ctx.eventTrace())("filters", ctx.filters)("displayGuests", false)("excludedRecipesIds", ctx.excludedRecipesIds);
26437
26515
  }
26438
26516
  }, directives: [IconComponent, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i2$1.NgIf, RecipeFiltersComponent, CatalogListComponent], styles: [".miam-meals-planner-catalog .miam-meals-planner-catalog__title{display:flex;flex-direction:row;font-size:24px;font-weight:900;line-height:120%;margin-bottom:24px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-meals-planner-catalog .miam-meals-planner-catalog__title ng-miam-icon{cursor:pointer;transform:rotate(90deg)}.miam-meals-planner-catalog .miam-meals-planner-catalog__title ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-catalog .miam-meals-planner-catalog__title span{cursor:pointer;margin-left:16px}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px;width:100%}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar{align-items:center;background:var(--m-color-white);border:1px solid #ddd;border-radius:var(--m-border-radius-pill);display:flex;font-size:14px;height:45px;margin-right:8px;padding:0 2px 0 20px;width:400px}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar .miam-meals-planner-catalog__searchbar__input{background:transparent;border:transparent;flex:1;outline:none!important}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar .miam-meals-planner-catalog__searchbar__button{padding:10px}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar .miam-meals-planner-catalog__searchbar__button:hover{border-color:transparent}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__controls__filter{border-color:transparent;font-weight:700;position:relative}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__controls__filter .miam-meals-planner-catalog__controls__filter-badge{align-items:center;background-color:var(--m-catalog-redpoint-color);border-radius:var(--m-border-radius-circle);color:var(--m-catalog-redpoint-text-color);display:flex;font-size:12px;height:18px;justify-content:center;line-height:18px;position:absolute;right:-4px;top:-4px;width:18px}@media (max-width:1023px){.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar{width:300px}.miam-meals-planner-catalog .miam-meals-planner-catalog__controls__filter{border-radius:var(--m-border-radius-circle);padding:10px}.miam-meals-planner-catalog .miam-meals-planner-catalog__controls__filter span{display:none}.miam-meals-planner-catalog .miam-meals-planner-catalog__controls__filter ng-miam-icon{margin-right:0!important}}@media (max-width:607px){.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters{justify-content:center}}"], encapsulation: 2, changeDetection: 0 });
26439
26517
  /*@__PURE__*/ (function () {
@@ -26446,12 +26524,14 @@
26446
26524
  encapsulation: i0.ViewEncapsulation.None,
26447
26525
  changeDetection: i0.ChangeDetectionStrategy.OnPush
26448
26526
  }]
26449
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }]; }, { modifiedGuests: [{
26527
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: AnalyticsService }]; }, { modifiedGuests: [{
26450
26528
  type: i0.Input
26451
26529
  }], remainingBudget: [{
26452
26530
  type: i0.Input
26453
26531
  }], remainingRecipesNumber: [{
26454
26532
  type: i0.Input
26533
+ }], excludedRecipesIds: [{
26534
+ type: i0.Input
26455
26535
  }], canceled: [{
26456
26536
  type: i0.Output
26457
26537
  }], editRecipe: [{
@@ -26460,13 +26540,21 @@
26460
26540
  })();
26461
26541
  var templateObject_1$M, templateObject_2$C;
26462
26542
 
26463
- var MealsPlannerBasketConfirmationComponent = /** @class */ (function () {
26464
- function MealsPlannerBasketConfirmationComponent(cdr, context) {
26465
- this.cdr = cdr;
26466
- this.context = context;
26467
- this.recipesIds = [];
26468
- this.budget = 0;
26543
+ var MealsPlannerBasketConfirmationComponent = /** @class */ (function (_super) {
26544
+ __extends(MealsPlannerBasketConfirmationComponent, _super);
26545
+ function MealsPlannerBasketConfirmationComponent(cdr, context, analyticsService) {
26546
+ var _this = _super.call(this, analyticsService) || this;
26547
+ _this.cdr = cdr;
26548
+ _this.context = context;
26549
+ _this.analyticsService = analyticsService;
26550
+ _this.recipesIds = [];
26551
+ _this.budget = 0;
26552
+ return _this;
26469
26553
  }
26554
+ MealsPlannerBasketConfirmationComponent.prototype.ngOnInit = function () {
26555
+ this.pageview();
26556
+ };
26557
+ MealsPlannerBasketConfirmationComponent.prototype.currentPath = function () { return 'confirmation'; };
26470
26558
  Object.defineProperty(MealsPlannerBasketConfirmationComponent.prototype, "roundedBudget", {
26471
26559
  get: function () {
26472
26560
  return (Math.round(this.budget * 100) / 100).toFixed(2).replace('.', ',');
@@ -26475,9 +26563,9 @@
26475
26563
  configurable: true
26476
26564
  });
26477
26565
  return MealsPlannerBasketConfirmationComponent;
26478
- }());
26479
- MealsPlannerBasketConfirmationComponent.ɵfac = function MealsPlannerBasketConfirmationComponent_Factory(t) { return new (t || MealsPlannerBasketConfirmationComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService)); };
26480
- MealsPlannerBasketConfirmationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketConfirmationComponent, selectors: [["ng-miam-meals-planner-basket-confirmation"]], inputs: { recipesIds: "recipesIds", budget: "budget" }, decls: 24, vars: 3, consts: function () {
26566
+ }(EventTracerComponent));
26567
+ MealsPlannerBasketConfirmationComponent.ɵfac = function MealsPlannerBasketConfirmationComponent_Factory(t) { return new (t || MealsPlannerBasketConfirmationComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(AnalyticsService)); };
26568
+ MealsPlannerBasketConfirmationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketConfirmationComponent, selectors: [["ng-miam-meals-planner-basket-confirmation"]], inputs: { recipesIds: "recipesIds", budget: "budget" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 24, vars: 3, consts: function () {
26481
26569
  var i18n_0;
26482
26570
  if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
26483
26571
  var MSG_EXTERNAL_978176854081714634$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_CONFIRMATION_MEALS_PLANNER_BASKET_CONFIRMATION_COMPONENT_TS_1 = goog.getMsg("Les produits associ\u00E9s ont bien \u00E9t\u00E9 ajout\u00E9s au panier.");
@@ -26575,7 +26663,7 @@
26575
26663
  encapsulation: i0.ViewEncapsulation.None,
26576
26664
  changeDetection: i0.ChangeDetectionStrategy.OnPush
26577
26665
  }]
26578
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }]; }, { recipesIds: [{
26666
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: AnalyticsService }]; }, { recipesIds: [{
26579
26667
  type: i0.Input
26580
26668
  }], budget: [{
26581
26669
  type: i0.Input
@@ -26583,7 +26671,7 @@
26583
26671
  })();
26584
26672
  var templateObject_1$N, templateObject_2$D, templateObject_3$u, templateObject_4$o;
26585
26673
 
26586
- var _a;
26674
+ var _b$1;
26587
26675
  var _c0$w = ["miamMealsPlannerTopAnchor"];
26588
26676
  var _c5$1 = function (a0) { return { "reduced": a0 }; };
26589
26677
  function MealsPlannerComponent_div_15_ng_miam_meals_planner_form_1_Template(rf, ctx) {
@@ -26595,7 +26683,7 @@
26595
26683
  }
26596
26684
  if (rf & 2) {
26597
26685
  var ctx_r2 = i0.ɵɵnextContext(2);
26598
- i0.ɵɵproperty("reduced", ctx_r2.budgettedRecipes.length > 0)("form", ctx_r2.form)("ngClass", i0.ɵɵpureFunction1(3, _c5$1, ctx_r2.budgettedRecipes.length > 0));
26686
+ i0.ɵɵproperty("originTrace", ctx_r2.eventTrace())("reduced", ctx_r2.budgettedRecipes.length > 0)("form", ctx_r2.form)("loading", ctx_r2.loading)("ngClass", i0.ɵɵpureFunction1(5, _c5$1, ctx_r2.budgettedRecipes.length > 0));
26599
26687
  }
26600
26688
  }
26601
26689
  function MealsPlannerComponent_div_15_ng_miam_meals_planner_result_2_Template(rf, ctx) {
@@ -26607,7 +26695,7 @@
26607
26695
  }
26608
26696
  if (rf & 2) {
26609
26697
  var ctx_r3 = i0.ɵɵnextContext(2);
26610
- i0.ɵɵproperty("recipes", ctx_r3.budgettedRecipes)("usedBudget", ctx_r3.usedBudget)("maxBudget", ctx_r3.maxBudget)("loading", ctx_r3.loading);
26698
+ i0.ɵɵproperty("originTrace", ctx_r3.eventTrace())("recipes", ctx_r3.budgettedRecipes)("usedBudget", ctx_r3.usedBudget)("maxBudget", ctx_r3.maxBudget)("loading", ctx_r3.loading);
26611
26699
  }
26612
26700
  }
26613
26701
  function MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_preview_3_Template(rf, ctx) {
@@ -26619,7 +26707,7 @@
26619
26707
  }
26620
26708
  if (rf & 2) {
26621
26709
  var ctx_r4 = i0.ɵɵnextContext(2);
26622
- i0.ɵɵproperty("recipesIds", ctx_r4.addedRecipesIds)("usedBudget", ctx_r4.usedBudget)("maxBudget", ctx_r4.maxBudget)("ngClass", i0.ɵɵpureFunction1(4, _c5$1, ctx_r4.addedRecipesIds.length === 0 && !ctx_r4.catalogMode && !ctx_r4.basketConfirmed));
26710
+ i0.ɵɵproperty("recipesIds", ctx_r4.addedRecipesIds)("usedBudget", ctx_r4.usedBudget)("maxBudget", ctx_r4.maxBudget)("ingredientsRegrouped", ctx_r4.ingredientsRegrouped)("originTrace", ctx_r4.eventTrace())("ngClass", i0.ɵɵpureFunction1(6, _c5$1, ctx_r4.addedRecipesIds.length === 0 && !ctx_r4.catalogMode && !ctx_r4.basketConfirmed));
26623
26711
  }
26624
26712
  }
26625
26713
  function MealsPlannerComponent_div_15_ng_miam_meals_planner_catalog_4_Template(rf, ctx) {
@@ -26631,7 +26719,7 @@
26631
26719
  }
26632
26720
  if (rf & 2) {
26633
26721
  var ctx_r5 = i0.ɵɵnextContext(2);
26634
- i0.ɵɵproperty("modifiedGuests", ctx_r5.form.value.guestsCount)("remainingBudget", ctx_r5.remainingBudget)("remainingRecipesNumber", ctx_r5.remainingRecipesNumber);
26722
+ i0.ɵɵproperty("modifiedGuests", ctx_r5.form.value.guestsCount)("originTrace", ctx_r5.eventTrace())("remainingBudget", ctx_r5.remainingBudget)("remainingRecipesNumber", ctx_r5.remainingRecipesNumber)("excludedRecipesIds", ctx_r5.excludedRecipesIds);
26635
26723
  }
26636
26724
  }
26637
26725
  function MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_confirmation_5_Template(rf, ctx) {
@@ -26640,17 +26728,17 @@
26640
26728
  }
26641
26729
  if (rf & 2) {
26642
26730
  var ctx_r6 = i0.ɵɵnextContext(2);
26643
- i0.ɵɵproperty("recipesIds", ctx_r6.addedRecipesIds)("budget", ctx_r6.usedBudget);
26731
+ i0.ɵɵproperty("recipesIds", ctx_r6.addedRecipesIds)("originTrace", ctx_r6.eventTrace())("budget", ctx_r6.usedBudget);
26644
26732
  }
26645
26733
  }
26646
26734
  function MealsPlannerComponent_div_15_Template(rf, ctx) {
26647
26735
  if (rf & 1) {
26648
26736
  i0.ɵɵelementStart(0, "div", 13);
26649
- i0.ɵɵtemplate(1, MealsPlannerComponent_div_15_ng_miam_meals_planner_form_1_Template, 1, 5, "ng-miam-meals-planner-form", 14);
26650
- i0.ɵɵtemplate(2, MealsPlannerComponent_div_15_ng_miam_meals_planner_result_2_Template, 1, 4, "ng-miam-meals-planner-result", 15);
26651
- i0.ɵɵtemplate(3, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_preview_3_Template, 1, 6, "ng-miam-meals-planner-basket-preview", 16);
26652
- i0.ɵɵtemplate(4, MealsPlannerComponent_div_15_ng_miam_meals_planner_catalog_4_Template, 1, 3, "ng-miam-meals-planner-catalog", 17);
26653
- i0.ɵɵtemplate(5, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_confirmation_5_Template, 1, 2, "ng-miam-meals-planner-basket-confirmation", 18);
26737
+ i0.ɵɵtemplate(1, MealsPlannerComponent_div_15_ng_miam_meals_planner_form_1_Template, 1, 7, "ng-miam-meals-planner-form", 14);
26738
+ i0.ɵɵtemplate(2, MealsPlannerComponent_div_15_ng_miam_meals_planner_result_2_Template, 1, 5, "ng-miam-meals-planner-result", 15);
26739
+ i0.ɵɵtemplate(3, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_preview_3_Template, 1, 8, "ng-miam-meals-planner-basket-preview", 16);
26740
+ i0.ɵɵtemplate(4, MealsPlannerComponent_div_15_ng_miam_meals_planner_catalog_4_Template, 1, 5, "ng-miam-meals-planner-catalog", 17);
26741
+ i0.ɵɵtemplate(5, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_confirmation_5_Template, 1, 3, "ng-miam-meals-planner-basket-confirmation", 18);
26654
26742
  i0.ɵɵelementEnd();
26655
26743
  }
26656
26744
  if (rf & 2) {
@@ -26660,7 +26748,7 @@
26660
26748
  i0.ɵɵadvance(1);
26661
26749
  i0.ɵɵproperty("ngIf", ctx_r1.budgettedRecipes.length > 0 && ctx_r1.addedRecipesIds.length === 0 && !ctx_r1.catalogMode && !ctx_r1.basketConfirmed);
26662
26750
  i0.ɵɵadvance(1);
26663
- i0.ɵɵproperty("ngIf", !ctx_r1.basketConfirmed);
26751
+ i0.ɵɵproperty("ngIf", ctx_r1.addedRecipesIds.length > 0 && !ctx_r1.catalogMode && !ctx_r1.basketConfirmed);
26664
26752
  i0.ɵɵadvance(1);
26665
26753
  i0.ɵɵproperty("ngIf", ctx_r1.catalogMode && !ctx_r1.basketConfirmed);
26666
26754
  i0.ɵɵadvance(1);
@@ -26669,13 +26757,13 @@
26669
26757
  }
26670
26758
  var _c6$4 = function (a0) { return { "hidden": a0 }; };
26671
26759
  var recipeIncludes$5 = ['recipe-provider', 'sponsors'];
26672
- var recipeSparseFields$5 = (_a = {
26760
+ var recipeSparseFields$5 = (_b$1 = {
26673
26761
  recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
26674
- 'resting-time', 'computed-cost'], recipeIncludes$5),
26762
+ 'resting-time'], recipeIncludes$5),
26675
26763
  sponsors: ['logo-url']
26676
26764
  },
26677
- _a['recipe-provider'] = ['name'],
26678
- _a);
26765
+ _b$1['recipe-provider'] = ['name'],
26766
+ _b$1);
26679
26767
  var MealsPlannerComponent = /** @class */ (function (_super) {
26680
26768
  __extends(MealsPlannerComponent, _super);
26681
26769
  function MealsPlannerComponent(fb, cdr, analyticsService, contextService, groceriesListsService, recipesService, basketsService, posService) {
@@ -26689,11 +26777,14 @@
26689
26777
  _this.basketsService = basketsService;
26690
26778
  _this.posService = posService;
26691
26779
  _this.budgettedRecipes = [];
26780
+ _this.budgettedRecipesPrices = {};
26692
26781
  _this.addedRecipesIds = [];
26693
26782
  _this.icon = exports.Icon;
26694
26783
  _this.catalogMode = false;
26695
26784
  _this.basketConfirmed = false;
26696
26785
  _this.loading = false;
26786
+ _this.ingredientsRegrouped = false;
26787
+ _this.timeOnStart = Date.now();
26697
26788
  // Progress bar
26698
26789
  _this.usedBudget = 0;
26699
26790
  _this.maxBudget = 0;
@@ -26702,6 +26793,7 @@
26702
26793
  }
26703
26794
  MealsPlannerComponent.prototype.ngOnInit = function () {
26704
26795
  this.initForm();
26796
+ this.pageview();
26705
26797
  this.subscriptions.push(this.initRecipesPricing());
26706
26798
  };
26707
26799
  MealsPlannerComponent.prototype.ngOnChanges = function () {
@@ -26727,7 +26819,10 @@
26727
26819
  this.recipesService.plan(inputs.budget, inputs.guestsCount, inputs.recipesCount, recipeIncludes$5, recipeSparseFields$5).pipe(operators.switchMap(function (recipes) {
26728
26820
  _this.budgettedRecipes = []; // Refresh the result view
26729
26821
  _this.cdr.detectChanges();
26730
- _this.budgettedRecipes = recipes;
26822
+ _this.budgettedRecipes = recipes.map(function (r) {
26823
+ r.modifiedGuests = inputs.guestsCount;
26824
+ return r;
26825
+ });
26731
26826
  _this.loading = false;
26732
26827
  _this.cdr.detectChanges();
26733
26828
  return _this.fetchRecipesPricing();
@@ -26742,24 +26837,38 @@
26742
26837
  MealsPlannerComponent.prototype.ngOnDestroy = function () {
26743
26838
  this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
26744
26839
  };
26745
- MealsPlannerComponent.prototype.currentPath = function () { return 'miam/meals-planner'; };
26840
+ MealsPlannerComponent.prototype.currentPath = function () { return 'miam/recipes/meals-planner'; };
26746
26841
  MealsPlannerComponent.prototype.addRecipes = function () {
26747
26842
  var _this = this;
26748
26843
  this.loading = true;
26749
26844
  this.cdr.detectChanges();
26845
+ var previousUsedBudget = this.usedBudget;
26846
+ var basketInitialized = false;
26750
26847
  this.subscriptions.push(this.groceriesListsService.appendRecipesToList(this.budgettedRecipes.filter(function (r) { return r === null || r === void 0 ? void 0 : r.id; }).map(function (r) { return ({ id: r.id, guests: r.modifiedGuests }); }), // remove empty recipes
26751
26848
  this.eventTrace()).pipe(operators.take(1), operators.switchMap(function () {
26752
26849
  _this.addedRecipesIds = _this.budgettedRecipes.filter(function (r) { return r === null || r === void 0 ? void 0 : r.id; }).map(function (r) { return r.id; });
26850
+ return _this.basketsService.basketPreview$.pipe(operators.take(2));
26851
+ }), operators.switchMap(function (basketPreviewLines) {
26852
+ if (basketInitialized) {
26853
+ _this.fetchBasketPreviewPricing(basketPreviewLines);
26854
+ _this.ingredientsRegrouped = previousUsedBudget !== _this.usedBudget;
26855
+ return _this.basketsService.basketPreview$;
26856
+ }
26857
+ basketInitialized = true;
26858
+ return rxjs.of(null);
26859
+ }), operators.switchMap(function (basketPreviewLines) {
26860
+ if (basketPreviewLines !== null) {
26861
+ if (!_this.containsSomeAddedRecipe(basketPreviewLines)) {
26862
+ return _this.fetchBudgetValues();
26863
+ }
26864
+ return rxjs.of(_this.fetchBasketPreviewPricing(basketPreviewLines));
26865
+ }
26866
+ return rxjs.of(null);
26867
+ })).subscribe(function () {
26753
26868
  _this.scrollToTop();
26754
26869
  _this.loading = false;
26755
26870
  _this.cdr.detectChanges();
26756
- return _this.basketsService.basketPreview$;
26757
- }), operators.switchMap(function (basketPreviewLines) {
26758
- if (!_this.containsSomeAddedRecipe(basketPreviewLines)) {
26759
- return _this.fetchBudgetValues();
26760
- }
26761
- return rxjs.of(_this.fetchBasketPreviewPricing(basketPreviewLines));
26762
- })).subscribe());
26871
+ }));
26763
26872
  };
26764
26873
  MealsPlannerComponent.prototype.containsSomeAddedRecipe = function (basketPreviewLines) {
26765
26874
  var containsSomeAddedRecipeId = false;
@@ -26779,6 +26888,7 @@
26779
26888
  _this.usedBudget += +basketPreviewLine.price;
26780
26889
  }
26781
26890
  });
26891
+ this.usedBudget = Math.round(this.usedBudget * 100) / 100;
26782
26892
  this.cdr.detectChanges();
26783
26893
  };
26784
26894
  MealsPlannerComponent.prototype.initRecipesPricing = function () {
@@ -26794,9 +26904,10 @@
26794
26904
  return rxjs.of([]);
26795
26905
  }
26796
26906
  var requests = [];
26907
+ this.budgettedRecipesPrices = {};
26797
26908
  this.budgettedRecipes.forEach(function (recipe) {
26798
26909
  if (recipe) {
26799
- requests.push(_this.recipesService.getPricing(recipe.id, _this.pos.id, _this.pricebookKey, _this.form.value.guestsCount).pipe(operators.skipWhile(function (result) { return !(result === null || result === void 0 ? void 0 : result.price); })));
26910
+ requests.push(_this.recipesService.getPricing(recipe.id, _this.pos.id, _this.pricebookKey, _this.form.value.guestsCount).pipe(operators.skipWhile(function (result) { return !(result === null || result === void 0 ? void 0 : result.price); }), operators.tap(function (pricing) { return _this.budgettedRecipesPrices[recipe.id] = pricing.price; })));
26800
26911
  }
26801
26912
  });
26802
26913
  return requests.length > 0 ? rxjs.forkJoin(requests) : rxjs.of([]);
@@ -26833,9 +26944,26 @@
26833
26944
  MealsPlannerComponent.prototype.openBasketConfirmation = function () {
26834
26945
  this.recipeToChangeIndex = null;
26835
26946
  this.basketConfirmed = true;
26947
+ this.sendConfirmationEvent();
26836
26948
  this.scrollToTop();
26837
26949
  this.cdr.detectChanges();
26838
26950
  };
26951
+ MealsPlannerComponent.prototype.sendConfirmationEvent = function () {
26952
+ this.analyticsService.sendEventWhenReady(this.analyticsService.EVENT_MEALS_PLANNER_CONFIRMED, this.path(), {
26953
+ budget_user: this.form.get('budget').value,
26954
+ budget_planner: this.usedBudget,
26955
+ recipes_count: this.form.get('recipesCount').value,
26956
+ guests: this.form.get('guestsCount').value,
26957
+ uses_count: this.updateUsesCount(),
26958
+ time_passed: (Date.now() - this.timeOnStart) / 1000
26959
+ });
26960
+ };
26961
+ MealsPlannerComponent.prototype.updateUsesCount = function () {
26962
+ var oldCount = parseInt(localStorage.getItem('miam-meals-planner-uses-count'));
26963
+ var newCount = Number.isNaN(oldCount) ? 1 : oldCount + 1;
26964
+ localStorage.setItem('miam-meals-planner-uses-count', newCount.toString());
26965
+ return newCount;
26966
+ };
26839
26967
  MealsPlannerComponent.prototype.scrollToTop = function () {
26840
26968
  if (this.topAnchor) {
26841
26969
  this.topAnchor.nativeElement.scrollIntoView();
@@ -26843,14 +26971,16 @@
26843
26971
  };
26844
26972
  Object.defineProperty(MealsPlannerComponent.prototype, "remainingBudget", {
26845
26973
  get: function () {
26846
- var _this = this;
26847
- return this.budgettedRecipes.reduce(function (acc, recipe, i) {
26848
- // Don't count null recipes and currently replacing recipe
26849
- if (recipe && i !== _this.recipeToChangeIndex) {
26850
- return acc - recipe.attributes['computed-cost'] * _this.form.value.guestsCount;
26851
- }
26852
- return acc;
26853
- }, this.form.value.budget);
26974
+ var _a;
26975
+ var recipeToChangeId = (_a = this.budgettedRecipes[this.recipeToChangeIndex]) === null || _a === void 0 ? void 0 : _a.id;
26976
+ var remainingBudget = this.maxBudget - this.usedBudget;
26977
+ if (recipeToChangeId) {
26978
+ remainingBudget += this.budgettedRecipesPrices[recipeToChangeId];
26979
+ }
26980
+ if (remainingBudget > 0) {
26981
+ return remainingBudget;
26982
+ }
26983
+ return 0;
26854
26984
  },
26855
26985
  enumerable: false,
26856
26986
  configurable: true
@@ -26866,6 +26996,13 @@
26866
26996
  enumerable: false,
26867
26997
  configurable: true
26868
26998
  });
26999
+ Object.defineProperty(MealsPlannerComponent.prototype, "excludedRecipesIds", {
27000
+ get: function () {
27001
+ return this.budgettedRecipes.filter(function (recipe) { return recipe; }).map(function (recipe) { return recipe.id; });
27002
+ },
27003
+ enumerable: false,
27004
+ configurable: true
27005
+ });
26869
27006
  return MealsPlannerComponent;
26870
27007
  }(EventTracerComponent));
26871
27008
  MealsPlannerComponent.ɵfac = function MealsPlannerComponent_Factory(t) { return new (t || MealsPlannerComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(AnalyticsService), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(BasketsService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
@@ -26894,7 +27031,7 @@
26894
27031
  else {
26895
27032
  i18n_3 = $localize(templateObject_2$E || (templateObject_2$E = __makeTemplateObject([":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"], [":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"])));
26896
27033
  }
26897
- return [[1, "miam-meals-planner-anchor"], ["miamMealsPlannerTopAnchor", ""], [1, "miam-meals-planner"], [1, "miam-meals-planner__header"], [1, "miam-meals-planner__header__breadcrumb", 3, "ngClass"], ["href", "/"], ["width", "18", "height", "18", "primaryColor", "#1F3543", 3, "iconName"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], [1, "inactive", 3, "href"], i18n_1, ["href", "javascript:void(0)", 1, "active"], i18n_3, ["class", "miam-meals-planner__content", 4, "ngIf"], [1, "miam-meals-planner__content"], [3, "reduced", "form", "ngClass", "submitted", 4, "ngIf"], [3, "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog", 4, "ngIf"], [3, "recipesIds", "usedBudget", "maxBudget", "ngClass", "closed", 4, "ngIf"], [3, "modifiedGuests", "remainingBudget", "remainingRecipesNumber", "editRecipe", "canceled", 4, "ngIf"], [3, "recipesIds", "budget", 4, "ngIf"], [3, "reduced", "form", "ngClass", "submitted"], [3, "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog"], [3, "recipesIds", "usedBudget", "maxBudget", "ngClass", "closed"], [3, "modifiedGuests", "remainingBudget", "remainingRecipesNumber", "editRecipe", "canceled"], [3, "recipesIds", "budget"]];
27034
+ return [[1, "miam-meals-planner-anchor"], ["miamMealsPlannerTopAnchor", ""], [1, "miam-meals-planner"], [1, "miam-meals-planner__header"], [1, "miam-meals-planner__header__breadcrumb", 3, "ngClass"], ["href", "/"], ["width", "18", "height", "18", "primaryColor", "#1F3543", 3, "iconName"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], [1, "inactive", 3, "href"], i18n_1, ["href", "javascript:void(0)", 1, "active"], i18n_3, ["class", "miam-meals-planner__content", 4, "ngIf"], [1, "miam-meals-planner__content"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted", 4, "ngIf"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog", 4, "ngIf"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed", 4, "ngIf"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled", 4, "ngIf"], [3, "recipesIds", "originTrace", "budget", 4, "ngIf"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled"], [3, "recipesIds", "originTrace", "budget"]];
26898
27035
  }, template: function MealsPlannerComponent_Template(rf, ctx) {
26899
27036
  if (rf & 1) {
26900
27037
  i0.ɵɵelement(0, "div", 0, 1);
@@ -27208,7 +27345,7 @@
27208
27345
  request = request.clone({
27209
27346
  setHeaders: {
27210
27347
  'miam-origin': context.origin,
27211
- 'miam-front-version': '6.3.1',
27348
+ 'miam-front-version': '6.3.4',
27212
27349
  'miam-front-type': 'web',
27213
27350
  'miam-api-version': '4.7.0'
27214
27351
  }