ng-miam 4.3.4 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/bundles/ng-miam.umd.js +1025 -914
  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/recipe-pricing/recipe-pricing.component.js +32 -19
  6. package/esm2015/lib/_services/ingredients.service.js +17 -8
  7. package/esm2015/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.js +3 -2
  8. package/esm2015/lib/_web-components/catalog-category/catalog-category.component.js +7 -4
  9. package/esm2015/lib/_web-components/catalog-list/catalog-list.component.js +7 -4
  10. package/esm2015/lib/_web-components/catalog-recipe-card/catalog-recipe-card.component.js +79 -86
  11. package/esm2015/lib/_web-components/recipe-card/recipe-card.component.js +2 -2
  12. package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +11 -7
  13. package/esm2015/lib/_web-components/recipe-details/recipe-details-infos/recipe-details-infos.component.js +85 -53
  14. package/esm2015/lib/_web-components/recipe-details/recipe-details-ingredients/recipe-details-ingredients.component.js +27 -20
  15. package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +146 -110
  16. package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +15 -12
  17. package/fesm2015/ng-miam.js +799 -697
  18. package/fesm2015/ng-miam.js.map +1 -1
  19. package/lib/_components/recipe-pricing/recipe-pricing.component.d.ts +1 -0
  20. package/lib/_services/ingredients.service.d.ts +3 -1
  21. package/lib/_web-components/catalog-category/catalog-category.component.d.ts +2 -1
  22. package/lib/_web-components/catalog-list/catalog-list.component.d.ts +2 -1
  23. package/lib/_web-components/recipe-catalog/recipe-catalog.component.d.ts +2 -1
  24. package/lib/_web-components/recipe-details/recipe-details-infos/recipe-details-infos.component.d.ts +2 -1
  25. package/lib/_web-components/recipe-details/recipe-details.component.d.ts +5 -1
  26. package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts +4 -3
  27. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('ngx-jsonapi'), require('@angular/common/http'), require('uuid'), require('lodash-es'), require('duration-fns'), require('lodash-es/pullAt'), require('@angular/cdk/layout'), require('@angular/cdk/drag-drop'), require('@angular/forms'), require('@angular/cdk/text-field'), require('@angular/platform-browser'), require('date-fns/isWithinInterval'), require('date-fns/startOfWeek'), require('date-fns/endOfWeek'), require('date-fns/subDays'), require('@angular/youtube-player'), require('angular-calendar'), require('angular-calendar/date-adapters/date-fns'), require('@angular/elements'), require('lodash-es/remove'), require('lodash-es/pick'), require('angular-draggable-droppable'), require('lodash-es/groupBy'), require('angular-resizable-element'), require('@angular/platform-browser/animations'), require('@angular/common/locales/fr')) :
3
3
  typeof define === 'function' && define.amd ? define('ng-miam', ['exports', '@angular/core', '@angular/common', 'rxjs', 'rxjs/operators', 'ngx-jsonapi', '@angular/common/http', 'uuid', 'lodash-es', 'duration-fns', 'lodash-es/pullAt', '@angular/cdk/layout', '@angular/cdk/drag-drop', '@angular/forms', '@angular/cdk/text-field', '@angular/platform-browser', 'date-fns/isWithinInterval', 'date-fns/startOfWeek', 'date-fns/endOfWeek', 'date-fns/subDays', '@angular/youtube-player', 'angular-calendar', 'angular-calendar/date-adapters/date-fns', '@angular/elements', 'lodash-es/remove', 'lodash-es/pick', 'angular-draggable-droppable', 'lodash-es/groupBy', 'angular-resizable-element', '@angular/platform-browser/animations', '@angular/common/locales/fr'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ng-miam'] = {}, global.ng.core, global.ng.common, global.rxjs, global.rxjs.operators, global['ngx-jsonapi'], global.ng.common.http, global.uuid, global.lodashEs, global.durationFns, global.pullAt, global.ng.cdk.layout, global.ng.cdk.dragDrop, global.ng.forms, global.ng.cdk.textField, global.ng.platformBrowser, global.isWithinInterval, global.startOfWeek, global.endOfWeek, global.subDays, global.ng.youtubePlayer, global.i1$4, global.dateFns, global.ng.elements, global.remove, global.pick, global.i38, global.groupBy, global.i39, global.ng.platformBrowser.animations, global.ng.common.locales.fr));
5
- }(this, (function (exports, i0, i3, rxjs, operators, i1, i1$1, uuid, lodashEs, durationFns, pullAt, i1$2, i5, i15, i4, i1$3, isWithinInterval, startOfWeek, endOfWeek, subDays, i8, i1$4, dateFns, elements, remove, pick, i38, groupBy, i39, animations, localeFr) { 'use strict';
5
+ }(this, (function (exports, i0, i3, rxjs, operators, i1, i1$1, uuid, lodashEs, durationFns, pullAt, i1$2, i5, i15, i4, i1$3, isWithinInterval, startOfWeek, endOfWeek, subDays, i7, i1$4, dateFns, elements, remove, pick, i38, groupBy, i39, animations, localeFr) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -2697,510 +2697,51 @@
2697
2697
  return Ingredient;
2698
2698
  }(i1.Resource));
2699
2699
 
2700
- var MIAM_API_HOST = environment.miamAPI + "/api/v1/";
2701
- var IngredientsService = /** @class */ (function (_super) {
2702
- __extends(IngredientsService, _super);
2703
- function IngredientsService(http) {
2704
- var _this = _super.call(this) || this;
2705
- _this.http = http;
2706
- _this.resource = Ingredient;
2707
- _this.type = 'ingredients';
2708
- _this.register();
2709
- // if you are using this service you will need this, prefetch it
2710
- _this.fetchReviewedNames();
2711
- _this.fetchReviewedUnits();
2712
- return _this;
2713
- }
2714
- IngredientsService.prototype.getReviewedNames = function () {
2715
- if (!this.reviewedNames) {
2716
- this.fetchReviewedNames();
2717
- }
2718
- return this.reviewedNames;
2719
- };
2720
- IngredientsService.prototype.getReviewedUnits = function () {
2721
- if (!this.reviewedUnits) {
2722
- this.fetchReviewedUnits();
2723
- }
2724
- return this.reviewedUnits;
2725
- };
2726
- IngredientsService.prototype.fetchReviewedNames = function () {
2727
- var _this = this;
2728
- return this.http.get(MIAM_API_HOST + "ingredients-definitions/reviewed_names").subscribe(function (reviewedNames) {
2729
- _this.reviewedNames = reviewedNames;
2730
- });
2731
- };
2732
- IngredientsService.prototype.fetchReviewedUnits = function () {
2733
- var _this = this;
2734
- return this.http.get(MIAM_API_HOST + "quantity-units/reviewed_names").subscribe(function (reviewedUnits) {
2735
- _this.reviewedUnits = __spread(reviewedUnits.map(function (unitObject) { return unitObject['name']; }));
2736
- });
2737
- };
2738
- /**
2739
- * Check if ingredient is already known in backend
2740
- * @param ingredientDef exemple : 'steak'
2741
- */
2742
- IngredientsService.prototype.isReviewedName = function (ingredientDef) {
2743
- var _this = this;
2744
- if (!this.reviewedNames) {
2745
- // get all knowed ingredient in backend
2746
- return this.http.get(MIAM_API_HOST + "ingredients-definitions/reviewed_names").pipe(operators.switchMap(function (reviewedNames) {
2747
- _this.reviewedNames = reviewedNames;
2748
- // check if ingredientDef is in the list
2749
- return rxjs.of(_this.reviewedNames.some(function (el) { return el === ingredientDef; }));
2750
- }));
2751
- }
2752
- return rxjs.of(this.reviewedNames.some(function (el) { return el === ingredientDef; }));
2753
- };
2754
- /**
2755
- * Check if unit is already known in backend
2756
- * @param unit exemple : 'c. à c.'
2757
- */
2758
- IngredientsService.prototype.isReviewedUnit = function (unit) {
2759
- var _this = this;
2760
- if (!this.reviewedUnits) {
2761
- // get all knowed units in backend
2762
- return this.http.get(MIAM_API_HOST + "quantity-units/reviewed_names").pipe(operators.switchMap(function (reviewedUnits) {
2763
- _this.reviewedUnits = __spread(reviewedUnits.map(function (unitObject) { return unitObject['name']; }));
2764
- // check if unit is in the list
2765
- // rem: the case is not always lowered for all units
2766
- return rxjs.of(_this.reviewedUnits.some(function (el) { return el.toLowerCase() === unit.toLowerCase(); }));
2767
- }));
2768
- }
2769
- return rxjs.of(this.reviewedUnits.some(function (el) { return el.toLowerCase() === unit.toLowerCase(); }));
2770
- };
2771
- IngredientsService.prototype.formatIngredients = function (listIngredient) {
2772
- var _this = this;
2773
- return rxjs.forkJoin(listIngredient.map(function (el) { return _this.get("from_s?ingredient_str=" + el); }));
2774
- };
2775
- /**
2776
- * Merge Recipe Ingredients list with output of recipe forms ingredient list
2777
- * it's link with RecipeFormComponent
2778
- * @param recipe to update
2779
- * @param ingredients list of ingredients
2780
- */
2781
- IngredientsService.prototype.createOrUpdateIngredients = function (recipe, ingredients) {
2782
- var _this = this;
2783
- var oldIngredients = __spread(recipe.relationships["ingredients"].data);
2784
- var ingredientsToSave = [];
2785
- ingredients.forEach(function (ing) {
2786
- if (ing.id) {
2787
- var oldIndex = oldIngredients.findIndex(function (el) { return el.id === ing.id; });
2788
- var oldIngredientAttribute = oldIngredients[oldIndex].attributes;
2789
- var hasChange = oldIngredientAttribute.name !== ing.attributes.name ||
2790
- oldIngredientAttribute.unit !== ing.attributes.unit ||
2791
- oldIngredientAttribute.quantity !== ing.attributes.quantity;
2792
- if (hasChange) {
2793
- oldIngredients[oldIndex].attributes = Object.assign(Object.assign({}, oldIngredients[oldIndex].attributes), { name: ing.attributes.name, unit: ing.attributes.unit, quantity: ing.attributes.quantity, 'picture-url': ing.attributes['picture-url'] });
2794
- ingredientsToSave.push(oldIngredients[oldIndex]);
2795
- }
2796
- }
2797
- else {
2798
- var newIng = _this.new();
2799
- delete newIng.id;
2800
- newIng.attributes = Object.assign(Object.assign({}, newIng.attributes), { name: ing.attributes.name, unit: ing.attributes.unit, quantity: '' + ing.attributes.quantity, 'picture-url': ing.attributes['picture-url'] });
2801
- newIng.addRelationship(recipe, 'recipe');
2802
- ingredientsToSave.push(newIng);
2803
- }
2804
- });
2805
- return ingredientsToSave;
2806
- };
2807
- /**
2808
- * Create or update a list Of Ingredient
2809
- * it'll create if Ingredient id is null otherwise update it
2810
- * it's perform in parallel , Observable'll complet when all ingredents have been upserted
2811
- * @param ingredients array of Ingredient
2812
- */
2813
- IngredientsService.prototype.upsertIngredientList = function (ingredients) {
2814
- return rxjs.forkJoin(ingredients.map(function (ingredient) {
2815
- return ingredient.save();
2816
- }));
2817
- };
2818
- IngredientsService.prototype.deleteIngredientList = function (ingredientIds) {
2819
- var _this = this;
2820
- return rxjs.forkJoin(ingredientIds.map(function (ingredientId) { return _this.delete(ingredientId); }));
2821
- };
2822
- return IngredientsService;
2823
- }(i1.Service));
2824
- IngredientsService.ɵfac = function IngredientsService_Factory(t) { return new (t || IngredientsService)(i0.ɵɵinject(i1$1.HttpClient)); };
2825
- IngredientsService.ɵprov = i0.ɵɵdefineInjectable({ token: IngredientsService, factory: IngredientsService.ɵfac, providedIn: 'root' });
2826
- /*@__PURE__*/ (function () {
2827
- i0.ɵsetClassMetadata(IngredientsService, [{
2828
- type: i0.Injectable,
2829
- args: [{
2830
- providedIn: 'root'
2831
- }]
2832
- }], function () { return [{ type: i1$1.HttpClient }]; }, null);
2833
- })();
2834
-
2835
- var RecipeStep = /** @class */ (function (_super) {
2836
- __extends(RecipeStep, _super);
2837
- function RecipeStep() {
2838
- var _this = _super.apply(this, __spread(arguments)) || this;
2839
- _this.attributes = {
2840
- 'step-number': 0,
2841
- 'title': '',
2842
- 'description': '',
2843
- 'media-url': null
2844
- };
2845
- _this.relationships = {
2846
- recipe: new i1.DocumentResource()
2847
- };
2848
- return _this;
2849
- }
2850
- return RecipeStep;
2851
- }(i1.Resource));
2852
-
2853
- var RecipeStepsService = /** @class */ (function (_super) {
2854
- __extends(RecipeStepsService, _super);
2855
- function RecipeStepsService() {
2856
- var _this = _super.call(this) || this;
2857
- _this.resource = RecipeStep;
2858
- _this.type = 'recipe-steps';
2859
- _this.register();
2860
- return _this;
2861
- }
2862
- /**
2863
- * Merge Recipe steps list with output of recipe forms Step list
2864
- * it's link with RecipeFormComponent
2865
- * @param recipe to update
2866
- * @param stepsForm list of step output of RecipeFormComponent form
2867
- */
2868
- RecipeStepsService.prototype.formToStepsMapper = function (recipe, stepsForm) {
2869
- var _this = this;
2870
- var oldRecipeSteps = __spread(recipe.relationships['recipe-steps'].data);
2871
- var newRecipeSteps = [];
2872
- stepsForm.forEach(function (step, index) {
2873
- var _a;
2874
- if (step.id) {
2875
- var oldIndex = oldRecipeSteps.findIndex(function (el) { return el.id === step.id; });
2876
- oldRecipeSteps[oldIndex].attributes = Object.assign(Object.assign({}, oldRecipeSteps[oldIndex].attributes), (_a = {}, _a['step-number'] = index, _a.description = step.attributes.description, _a));
2877
- newRecipeSteps.push(pullAt__default['default'](oldRecipeSteps, [oldIndex])[0]);
2878
- }
2879
- else {
2880
- newRecipeSteps.push(_this.newStep(step, recipe, index));
2881
- }
2882
- });
2883
- return newRecipeSteps;
2884
- };
2885
- RecipeStepsService.prototype.newStep = function (step, recipe, index) {
2886
- var _a;
2887
- var newStep = this.new();
2888
- newStep.addRelationship(recipe, 'recipe');
2889
- newStep.attributes = Object.assign(Object.assign({}, newStep.attributes), (_a = {}, _a['step-number'] = index, _a.description = step.attributes.description, _a));
2890
- delete newStep.id;
2891
- return newStep;
2892
- };
2893
- RecipeStepsService.prototype.createOrUpdateRelatedSteps = function (recipeSteps) {
2894
- return rxjs.forkJoin(recipeSteps.map(function (step) {
2895
- return step.save();
2896
- }));
2897
- };
2898
- RecipeStepsService.prototype.deleteStepList = function (stepIds) {
2899
- var _this = this;
2900
- return rxjs.forkJoin(stepIds.map(function (stepId) {
2901
- return _this.delete(stepId);
2902
- }));
2903
- };
2904
- return RecipeStepsService;
2905
- }(i1.Service));
2906
- RecipeStepsService.ɵfac = function RecipeStepsService_Factory(t) { return new (t || RecipeStepsService)(); };
2907
- RecipeStepsService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeStepsService, factory: RecipeStepsService.ɵfac, providedIn: 'root' });
2908
- /*@__PURE__*/ (function () {
2909
- i0.ɵsetClassMetadata(RecipeStepsService, [{
2910
- type: i0.Injectable,
2911
- args: [{
2912
- providedIn: 'root'
2913
- }]
2914
- }], function () { return []; }, null);
2915
- })();
2916
-
2917
- var RecipeEventsService = /** @class */ (function () {
2918
- function RecipeEventsService(http) {
2919
- this.http = http;
2920
- this.suggestion_url = environment.miamAPI + "/api/events/recipes";
2921
- this.ORIGIN_SUGGESTION = 'suggestion';
2922
- this.ORIGIN_CATALOG = 'catalog';
2923
- this.ACTION_PROPOSED = 'proposed';
2924
- this.ACTION_SHOWN = 'shown';
2925
- this.ACTION_DISPLAYED = 'displayed';
2926
- this.ACTION_ADDED = 'added';
2927
- this.ACTION_PUSHED = 'pushed';
2928
- this.eventQueue = [];
2929
- this.willAlreadyProcess = false;
2930
- this.QUEUE_REFRESH_TIME_MS = 2000;
2931
- }
2932
- RecipeEventsService.prototype.enqueueEvent = function (recipe, action) {
2933
- var _this = this;
2934
- if (!recipe.eventOrigin) {
2935
- return;
2936
- }
2937
- var eventHash = {
2938
- "recipe_id": recipe.id,
2939
- "origin": recipe.eventOrigin,
2940
- "action": action,
2941
- "group_id": recipe.eventsGroupId
2942
- };
2943
- this.eventQueue.push(eventHash);
2944
- if (this.willAlreadyProcess)
2945
- return;
2946
- this.willAlreadyProcess = true;
2947
- setTimeout(function () { _this.processQueue(); }, this.QUEUE_REFRESH_TIME_MS);
2948
- };
2949
- RecipeEventsService.prototype.processQueue = function () {
2950
- this.willAlreadyProcess = false;
2951
- var eventsToProcess = this.eventQueue.splice(0, this.eventQueue.length);
2952
- var url = this.suggestion_url + "/batch";
2953
- this.http.post(url, { 'batch': eventsToProcess }).subscribe();
2954
- };
2955
- RecipeEventsService.prototype.sendEvent = function (recipe, action) {
2956
- if (!recipe.eventOrigin) {
2957
- return;
2958
- }
2959
- var url = this.suggestion_url + "/" + recipe.id + "/" + recipe.eventOrigin + "/" + action;
2960
- if (recipe.eventsGroupId) {
2961
- url += "?group_id=" + recipe.eventsGroupId;
2962
- }
2963
- this.http.post(url, {}).subscribe();
2964
- };
2965
- return RecipeEventsService;
2966
- }());
2967
- RecipeEventsService.ɵfac = function RecipeEventsService_Factory(t) { return new (t || RecipeEventsService)(i0.ɵɵinject(i1$1.HttpClient)); };
2968
- RecipeEventsService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeEventsService, factory: RecipeEventsService.ɵfac, providedIn: 'root' });
2969
- /*@__PURE__*/ (function () {
2970
- i0.ɵsetClassMetadata(RecipeEventsService, [{
2971
- type: i0.Injectable,
2972
- args: [{
2973
- providedIn: 'root'
2974
- }]
2975
- }], function () { return [{ type: i1$1.HttpClient }]; }, null);
2976
- })();
2977
-
2978
- var Sponsor = /** @class */ (function (_super) {
2979
- __extends(Sponsor, _super);
2980
- function Sponsor() {
2981
- var _this = _super.apply(this, __spread(arguments)) || this;
2982
- _this.attributes = {
2983
- name: '',
2984
- 'logo-url': ''
2985
- };
2986
- return _this;
2987
- }
2988
- return Sponsor;
2989
- }(i1.Resource));
2990
-
2991
- var SponsorService = /** @class */ (function (_super) {
2992
- __extends(SponsorService, _super);
2993
- function SponsorService() {
2994
- var _this = _super.call(this) || this;
2995
- _this.resource = Sponsor;
2996
- _this.type = 'sponsors';
2997
- _this.register();
2998
- return _this;
2999
- }
3000
- return SponsorService;
3001
- }(i1.Service));
3002
- SponsorService.ɵfac = function SponsorService_Factory(t) { return new (t || SponsorService)(); };
3003
- SponsorService.ɵprov = i0.ɵɵdefineInjectable({ token: SponsorService, factory: SponsorService.ɵfac, providedIn: 'root' });
3004
- /*@__PURE__*/ (function () {
3005
- i0.ɵsetClassMetadata(SponsorService, [{
3006
- type: i0.Injectable,
3007
- args: [{
3008
- providedIn: 'root'
3009
- }]
3010
- }], function () { return []; }, null);
3011
- })();
3012
-
3013
- var Package = /** @class */ (function (_super) {
3014
- __extends(Package, _super);
3015
- function Package() {
3016
- var _this = _super.apply(this, __spread(arguments)) || this;
3017
- _this.attributes = {
3018
- title: '',
3019
- 'author-id': '',
3020
- // system: '',
3021
- editable: false,
3022
- shared: false,
3023
- 'catalog-category': false,
3024
- 'catalog-position': '',
3025
- 'recipes-count': '',
3026
- settings: {}
3027
- };
3028
- _this.relationships = {
3029
- provider: new i1.DocumentResource(),
3030
- status: new i1.DocumentResource(),
3031
- recipes: new i1.DocumentCollection(),
3032
- 'shared-suppliers': new i1.DocumentCollection()
3033
- };
3034
- return _this;
3035
- }
3036
- Object.defineProperty(Package.prototype, "title", {
3037
- get: function () {
3038
- return this.attributes.title;
3039
- },
3040
- enumerable: false,
3041
- configurable: true
3042
- });
3043
- Object.defineProperty(Package.prototype, "status", {
3044
- get: function () {
3045
- return this.relationships && this.relationships.status && this.relationships.status.data;
3046
- },
3047
- enumerable: false,
3048
- configurable: true
3049
- });
3050
- Object.defineProperty(Package.prototype, "subtitle", {
3051
- get: function () {
3052
- return this.attributes.settings['subtitle'];
3053
- },
3054
- enumerable: false,
3055
- configurable: true
3056
- });
3057
- return Package;
3058
- }(i1.Resource));
3059
-
3060
- var MIAM_API_HOST$1 = environment.miamAPI + "/api/v1/";
3061
- var PackageService = /** @class */ (function (_super) {
3062
- __extends(PackageService, _super);
3063
- function PackageService(http, providerService, statusService) {
3064
- var _this = _super.call(this) || this;
3065
- _this.http = http;
3066
- _this.providerService = providerService;
3067
- _this.statusService = statusService;
3068
- _this.resource = Package;
3069
- _this.type = 'packages';
3070
- _this.register();
3071
- return _this;
3072
- }
3073
- PackageService.prototype.categories_for = function (suppliersIds) {
3074
- var _this = this;
3075
- return this.statusService.active.pipe(operators.switchMap(function (activeStatus) { return _this.all({
3076
- remotefilter: {
3077
- category_for: suppliersIds.join(','),
3078
- status: activeStatus.id,
3079
- user_preferences: true
3080
- },
3081
- sort: ['catalog_position']
3082
- }); }));
3083
- };
3084
- PackageService.prototype.unshareWithSupplier = function (pack, supplier) {
3085
- return this.http.delete(MIAM_API_HOST$1 + ("packages/" + pack.id + "/suppliers/" + supplier.id));
3086
- };
3087
- PackageService.prototype.shareWithSupplierOrUpdate = function (pack, supplier, category, catalog_position, edit_content) {
3088
- // Only send params if they are passed
3089
- var body = Object.assign(Object.assign(Object.assign({}, category !== null ? { category: category } : {}), catalog_position !== null ? { catalog_position: catalog_position } : {}), edit_content !== null ? { edit_content: edit_content } : {});
3090
- var url = MIAM_API_HOST$1 + ("packages/" + pack.id + "/suppliers/" + supplier.id);
3091
- if (pack.attributes.shared) {
3092
- return this.http.patch(url, body);
3093
- }
3094
- else {
3095
- return this.http.post(url, body);
3096
- }
3097
- };
3098
- PackageService.prototype.removeRecipeFromPackage = function (pack, recipe) {
3099
- return this.http.delete(MIAM_API_HOST$1 + ("packages/" + pack.id + "/recipes/" + recipe.id));
3100
- };
3101
- PackageService.prototype.addRecipeToPackage = function (pack, recipe) {
3102
- return this.http.post(MIAM_API_HOST$1 + ("packages/" + pack.id + "/recipes/" + recipe.id), {});
3103
- };
3104
- return PackageService;
3105
- }(i1.Service));
3106
- PackageService.ɵfac = function PackageService_Factory(t) { return new (t || PackageService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(RecipeProviderService), i0.ɵɵinject(RecipeStatusService)); };
3107
- PackageService.ɵprov = i0.ɵɵdefineInjectable({ token: PackageService, factory: PackageService.ɵfac, providedIn: 'root' });
3108
- /*@__PURE__*/ (function () {
3109
- i0.ɵsetClassMetadata(PackageService, [{
3110
- type: i0.Injectable,
3111
- args: [{
3112
- providedIn: 'root'
3113
- }]
3114
- }], function () { return [{ type: i1$1.HttpClient }, { type: RecipeProviderService }, { type: RecipeStatusService }]; }, null);
3115
- })();
3116
-
3117
- var Tag = /** @class */ (function (_super) {
3118
- __extends(Tag, _super);
3119
- function Tag() {
2700
+ var Package = /** @class */ (function (_super) {
2701
+ __extends(Package, _super);
2702
+ function Package() {
3120
2703
  var _this = _super.apply(this, __spread(arguments)) || this;
3121
2704
  _this.attributes = {
3122
- 'tag-type-id': '',
3123
- name: '',
3124
- 'icon-url': '',
3125
- 'picture-url': ''
2705
+ title: '',
2706
+ 'author-id': '',
2707
+ // system: '',
2708
+ editable: false,
2709
+ shared: false,
2710
+ 'catalog-category': false,
2711
+ 'catalog-position': '',
2712
+ 'recipes-count': '',
2713
+ settings: {}
3126
2714
  };
3127
2715
  _this.relationships = {
3128
- recipe: new i1.DocumentResource()
2716
+ provider: new i1.DocumentResource(),
2717
+ status: new i1.DocumentResource(),
2718
+ recipes: new i1.DocumentCollection(),
2719
+ 'shared-suppliers': new i1.DocumentCollection()
3129
2720
  };
3130
2721
  return _this;
3131
2722
  }
3132
- Object.defineProperty(Tag.prototype, "tagType", {
2723
+ Object.defineProperty(Package.prototype, "title", {
3133
2724
  get: function () {
3134
- return this.attributes['tag-type-id'];
2725
+ return this.attributes.title;
3135
2726
  },
3136
2727
  enumerable: false,
3137
2728
  configurable: true
3138
2729
  });
3139
- Object.defineProperty(Tag.prototype, "name", {
2730
+ Object.defineProperty(Package.prototype, "status", {
3140
2731
  get: function () {
3141
- return this.attributes.name;
2732
+ return this.relationships && this.relationships.status && this.relationships.status.data;
3142
2733
  },
3143
2734
  enumerable: false,
3144
2735
  configurable: true
3145
2736
  });
3146
- return Tag;
3147
- }(i1.Resource));
3148
-
3149
- var MIAM_API_HOST$2 = environment.miamAPI + "/api/v1/";
3150
- var TagsService = /** @class */ (function (_super) {
3151
- __extends(TagsService, _super);
3152
- function TagsService(http) {
3153
- var _this = _super.call(this) || this;
3154
- _this.http = http;
3155
- _this.resource = Tag;
3156
- _this.type = 'tags';
3157
- _this.register();
3158
- return _this;
3159
- }
3160
- TagsService.prototype.autocomplete = function (searchStr) {
3161
- return this.http.get(MIAM_API_HOST$2 + ("tags/autocomplete/" + searchStr));
3162
- };
3163
- return TagsService;
3164
- }(i1.Service));
3165
- TagsService.ɵfac = function TagsService_Factory(t) { return new (t || TagsService)(i0.ɵɵinject(i1$1.HttpClient)); };
3166
- TagsService.ɵprov = i0.ɵɵdefineInjectable({ token: TagsService, factory: TagsService.ɵfac, providedIn: 'root' });
3167
- /*@__PURE__*/ (function () {
3168
- i0.ɵsetClassMetadata(TagsService, [{
3169
- type: i0.Injectable,
3170
- args: [{
3171
- providedIn: 'root'
3172
- }]
3173
- }], function () { return [{ type: i1$1.HttpClient }]; }, null);
3174
- })();
3175
-
3176
- var RecipeLike = /** @class */ (function (_super) {
3177
- __extends(RecipeLike, _super);
3178
- function RecipeLike() {
3179
- var _this = _super.apply(this, __spread(arguments)) || this;
3180
- _this.attributes = {
3181
- 'user-id': '',
3182
- 'is-past': true,
3183
- 'recipe-id': ''
3184
- };
3185
- _this.relationships = {
3186
- recipe: new i1.DocumentResource()
3187
- };
3188
- return _this;
3189
- }
3190
- Object.defineProperty(RecipeLike.prototype, "isPast", {
2737
+ Object.defineProperty(Package.prototype, "subtitle", {
3191
2738
  get: function () {
3192
- return this.attributes['is-past'];
3193
- },
3194
- set: function (value) {
3195
- this.attributes['is-past'] = value;
2739
+ return this.attributes.settings['subtitle'];
3196
2740
  },
3197
2741
  enumerable: false,
3198
2742
  configurable: true
3199
2743
  });
3200
- RecipeLike.prototype.toggle = function () {
3201
- this.isPast = !this.isPast;
3202
- };
3203
- return RecipeLike;
2744
+ return Package;
3204
2745
  }(i1.Resource));
3205
2746
 
3206
2747
  var QuantityUnit = /** @class */ (function (_super) {
@@ -3242,6 +2783,56 @@
3242
2783
  return RecipeShare;
3243
2784
  }(i1.Resource));
3244
2785
 
2786
+ var RecipeStep = /** @class */ (function (_super) {
2787
+ __extends(RecipeStep, _super);
2788
+ function RecipeStep() {
2789
+ var _this = _super.apply(this, __spread(arguments)) || this;
2790
+ _this.attributes = {
2791
+ 'step-number': 0,
2792
+ 'title': '',
2793
+ 'description': '',
2794
+ 'media-url': null
2795
+ };
2796
+ _this.relationships = {
2797
+ recipe: new i1.DocumentResource()
2798
+ };
2799
+ return _this;
2800
+ }
2801
+ return RecipeStep;
2802
+ }(i1.Resource));
2803
+
2804
+ var Tag = /** @class */ (function (_super) {
2805
+ __extends(Tag, _super);
2806
+ function Tag() {
2807
+ var _this = _super.apply(this, __spread(arguments)) || this;
2808
+ _this.attributes = {
2809
+ 'tag-type-id': '',
2810
+ name: '',
2811
+ 'icon-url': '',
2812
+ 'picture-url': ''
2813
+ };
2814
+ _this.relationships = {
2815
+ recipe: new i1.DocumentResource()
2816
+ };
2817
+ return _this;
2818
+ }
2819
+ Object.defineProperty(Tag.prototype, "tagType", {
2820
+ get: function () {
2821
+ return this.attributes['tag-type-id'];
2822
+ },
2823
+ enumerable: false,
2824
+ configurable: true
2825
+ });
2826
+ Object.defineProperty(Tag.prototype, "name", {
2827
+ get: function () {
2828
+ return this.attributes.name;
2829
+ },
2830
+ enumerable: false,
2831
+ configurable: true
2832
+ });
2833
+ return Tag;
2834
+ }(i1.Resource));
2835
+
3245
2836
  var BasketEntriesItem = /** @class */ (function () {
3246
2837
  function BasketEntriesItem(attrs) {
3247
2838
  if (attrs === void 0) { attrs = {}; }
@@ -3252,6 +2843,19 @@
3252
2843
  return BasketEntriesItem;
3253
2844
  }());
3254
2845
 
2846
+ var Sponsor = /** @class */ (function (_super) {
2847
+ __extends(Sponsor, _super);
2848
+ function Sponsor() {
2849
+ var _this = _super.apply(this, __spread(arguments)) || this;
2850
+ _this.attributes = {
2851
+ name: '',
2852
+ 'logo-url': ''
2853
+ };
2854
+ return _this;
2855
+ }
2856
+ return Sponsor;
2857
+ }(i1.Resource));
2858
+
3255
2859
  var Article = /** @class */ (function (_super) {
3256
2860
  __extends(Article, _super);
3257
2861
  function Article() {
@@ -3310,37 +2914,274 @@
3310
2914
  });
3311
2915
  Object.defineProperty(Article.prototype, "hiddenCssClasses", {
3312
2916
  get: function () {
3313
- return this.attributes['hidden-css-classes'].toString().split(',');
2917
+ return this.attributes['hidden-css-classes'].toString().split(',');
2918
+ },
2919
+ set: function (classes) {
2920
+ this.attributes['hidden-css-classes'] = classes.join(',');
2921
+ },
2922
+ enumerable: false,
2923
+ configurable: true
2924
+ });
2925
+ return Article;
2926
+ }(i1.Resource));
2927
+
2928
+ var User = /** @class */ (function () {
2929
+ function User(attrs) {
2930
+ if (attrs === void 0) { attrs = {}; }
2931
+ this.user_metadata = { preferences: {} };
2932
+ this.forbidProfiling = false;
2933
+ Object.assign(this, attrs);
2934
+ }
2935
+ Object.defineProperty(User.prototype, "supplierId", {
2936
+ get: function () {
2937
+ var _a;
2938
+ if (this.app_metadata.env === undefined) {
2939
+ return null;
2940
+ }
2941
+ return (_a = this.app_metadata.env[environment.env]) === null || _a === void 0 ? void 0 : _a.supplier_id;
2942
+ },
2943
+ enumerable: false,
2944
+ configurable: true
2945
+ });
2946
+ return User;
2947
+ }());
2948
+
2949
+ var RecipeStepsService = /** @class */ (function (_super) {
2950
+ __extends(RecipeStepsService, _super);
2951
+ function RecipeStepsService() {
2952
+ var _this = _super.call(this) || this;
2953
+ _this.resource = RecipeStep;
2954
+ _this.type = 'recipe-steps';
2955
+ _this.register();
2956
+ return _this;
2957
+ }
2958
+ /**
2959
+ * Merge Recipe steps list with output of recipe forms Step list
2960
+ * it's link with RecipeFormComponent
2961
+ * @param recipe to update
2962
+ * @param stepsForm list of step output of RecipeFormComponent form
2963
+ */
2964
+ RecipeStepsService.prototype.formToStepsMapper = function (recipe, stepsForm) {
2965
+ var _this = this;
2966
+ var oldRecipeSteps = __spread(recipe.relationships['recipe-steps'].data);
2967
+ var newRecipeSteps = [];
2968
+ stepsForm.forEach(function (step, index) {
2969
+ var _a;
2970
+ if (step.id) {
2971
+ var oldIndex = oldRecipeSteps.findIndex(function (el) { return el.id === step.id; });
2972
+ oldRecipeSteps[oldIndex].attributes = Object.assign(Object.assign({}, oldRecipeSteps[oldIndex].attributes), (_a = {}, _a['step-number'] = index, _a.description = step.attributes.description, _a));
2973
+ newRecipeSteps.push(pullAt__default['default'](oldRecipeSteps, [oldIndex])[0]);
2974
+ }
2975
+ else {
2976
+ newRecipeSteps.push(_this.newStep(step, recipe, index));
2977
+ }
2978
+ });
2979
+ return newRecipeSteps;
2980
+ };
2981
+ RecipeStepsService.prototype.newStep = function (step, recipe, index) {
2982
+ var _a;
2983
+ var newStep = this.new();
2984
+ newStep.addRelationship(recipe, 'recipe');
2985
+ newStep.attributes = Object.assign(Object.assign({}, newStep.attributes), (_a = {}, _a['step-number'] = index, _a.description = step.attributes.description, _a));
2986
+ delete newStep.id;
2987
+ return newStep;
2988
+ };
2989
+ RecipeStepsService.prototype.createOrUpdateRelatedSteps = function (recipeSteps) {
2990
+ return rxjs.forkJoin(recipeSteps.map(function (step) {
2991
+ return step.save();
2992
+ }));
2993
+ };
2994
+ RecipeStepsService.prototype.deleteStepList = function (stepIds) {
2995
+ var _this = this;
2996
+ return rxjs.forkJoin(stepIds.map(function (stepId) {
2997
+ return _this.delete(stepId);
2998
+ }));
2999
+ };
3000
+ return RecipeStepsService;
3001
+ }(i1.Service));
3002
+ RecipeStepsService.ɵfac = function RecipeStepsService_Factory(t) { return new (t || RecipeStepsService)(); };
3003
+ RecipeStepsService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeStepsService, factory: RecipeStepsService.ɵfac, providedIn: 'root' });
3004
+ /*@__PURE__*/ (function () {
3005
+ i0.ɵsetClassMetadata(RecipeStepsService, [{
3006
+ type: i0.Injectable,
3007
+ args: [{
3008
+ providedIn: 'root'
3009
+ }]
3010
+ }], function () { return []; }, null);
3011
+ })();
3012
+
3013
+ var RecipeLike = /** @class */ (function (_super) {
3014
+ __extends(RecipeLike, _super);
3015
+ function RecipeLike() {
3016
+ var _this = _super.apply(this, __spread(arguments)) || this;
3017
+ _this.attributes = {
3018
+ 'user-id': '',
3019
+ 'is-past': true,
3020
+ 'recipe-id': ''
3021
+ };
3022
+ _this.relationships = {
3023
+ recipe: new i1.DocumentResource()
3024
+ };
3025
+ return _this;
3026
+ }
3027
+ Object.defineProperty(RecipeLike.prototype, "isPast", {
3028
+ get: function () {
3029
+ return this.attributes['is-past'];
3314
3030
  },
3315
- set: function (classes) {
3316
- this.attributes['hidden-css-classes'] = classes.join(',');
3031
+ set: function (value) {
3032
+ this.attributes['is-past'] = value;
3317
3033
  },
3318
3034
  enumerable: false,
3319
3035
  configurable: true
3320
3036
  });
3321
- return Article;
3037
+ RecipeLike.prototype.toggle = function () {
3038
+ this.isPast = !this.isPast;
3039
+ };
3040
+ return RecipeLike;
3322
3041
  }(i1.Resource));
3323
3042
 
3324
- var User = /** @class */ (function () {
3325
- function User(attrs) {
3326
- if (attrs === void 0) { attrs = {}; }
3327
- this.user_metadata = { preferences: {} };
3328
- this.forbidProfiling = false;
3329
- Object.assign(this, attrs);
3043
+ var RecipeLikesService = /** @class */ (function (_super) {
3044
+ __extends(RecipeLikesService, _super);
3045
+ function RecipeLikesService(userService) {
3046
+ var _this = _super.call(this) || this;
3047
+ _this.userService = userService;
3048
+ _this.resource = RecipeLike;
3049
+ _this.type = 'recipe-likes';
3050
+ _this.activeRecipeLikes = new Map();
3051
+ _this.register();
3052
+ return _this;
3330
3053
  }
3331
- Object.defineProperty(User.prototype, "supplierId", {
3332
- get: function () {
3333
- var _a;
3334
- if (this.app_metadata.env === undefined) {
3335
- return null;
3054
+ RecipeLikesService.prototype.getLike = function (recipeId) {
3055
+ this.addLikeToActivesIfNecessary(recipeId);
3056
+ return this.activeRecipeLikes.get(recipeId);
3057
+ };
3058
+ RecipeLikesService.prototype.updateLike = function (recipeId, recipeLike) {
3059
+ var _this = this;
3060
+ recipeLike.save().subscribe(function () {
3061
+ _this.activeRecipeLikes.get(recipeId).next(recipeLike);
3062
+ });
3063
+ };
3064
+ RecipeLikesService.prototype.addLikeToActivesIfNecessary = function (recipeId) {
3065
+ var _this = this;
3066
+ if (!this.activeRecipeLikes.get(recipeId)) {
3067
+ this.activeRecipeLikes.set(recipeId, new rxjs.BehaviorSubject(this.new()));
3068
+ this.fetchLikesOfRecipe(recipeId).subscribe(function (likes) {
3069
+ // Double check because the BehaviorSubject could have been deleted in removeLikeFromActivesIfNecessary while fetching
3070
+ if (likes.data[0] && _this.activeRecipeLikes.get(recipeId)) {
3071
+ _this.activeRecipeLikes.get(recipeId).next(likes.data[0]);
3072
+ }
3073
+ });
3074
+ }
3075
+ };
3076
+ RecipeLikesService.prototype.removeLikeFromActivesIfNecessary = function (recipeId) {
3077
+ var activeLikes = this.activeRecipeLikes.get(recipeId);
3078
+ if (!activeLikes) {
3079
+ return;
3080
+ }
3081
+ if (activeLikes.observers.length === 0) {
3082
+ this.activeRecipeLikes.delete(recipeId);
3083
+ }
3084
+ };
3085
+ RecipeLikesService.prototype.addLikesToRecipes = function (recipes) {
3086
+ var _this = this;
3087
+ if (!this.userService.isLogged$.value) {
3088
+ return rxjs.of(null);
3089
+ }
3090
+ return this.all({
3091
+ page: { size: 20, number: 1 },
3092
+ remotefilter: {
3093
+ recipe_id: recipes.map(function (r) { return r.id; }).join(),
3094
+ is_past: 'true,false'
3336
3095
  }
3337
- return (_a = this.app_metadata.env[environment.env]) === null || _a === void 0 ? void 0 : _a.supplier_id;
3338
- },
3339
- enumerable: false,
3340
- configurable: true
3341
- });
3342
- return User;
3096
+ }).pipe(operators.skipWhile(function (resp) { return resp.is_loading; }), operators.tap(function (result) {
3097
+ // Create an entry for each like returned
3098
+ result.data.forEach(function (like) {
3099
+ _this.activeRecipeLikes.set(like.attributes['recipe-id'].toString(), new rxjs.BehaviorSubject(like));
3100
+ recipes = recipes.filter(function (r) { return r.id !== like.attributes['recipe-id'].toString(); });
3101
+ });
3102
+ // Create an empty entry for each recipe without like
3103
+ recipes.forEach(function (r) {
3104
+ _this.activeRecipeLikes.set(r.id, new rxjs.BehaviorSubject(_this.new()));
3105
+ });
3106
+ }));
3107
+ };
3108
+ // Because of API implementation, shouldn't return more than 1 recipe-like
3109
+ RecipeLikesService.prototype.fetchLikesOfRecipe = function (recipeId) {
3110
+ return this.all({ remotefilter: { recipe_id: recipeId, is_past: 'true,false' } }).pipe(operators.skipWhile(function (resp) { return resp.is_loading; }));
3111
+ };
3112
+ return RecipeLikesService;
3113
+ }(i1.Service));
3114
+ RecipeLikesService.ɵfac = function RecipeLikesService_Factory(t) { return new (t || RecipeLikesService)(i0.ɵɵinject(UserService)); };
3115
+ RecipeLikesService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeLikesService, factory: RecipeLikesService.ɵfac, providedIn: 'root' });
3116
+ /*@__PURE__*/ (function () {
3117
+ i0.ɵsetClassMetadata(RecipeLikesService, [{
3118
+ type: i0.Injectable,
3119
+ args: [{
3120
+ providedIn: 'root'
3121
+ }]
3122
+ }], function () { return [{ type: UserService }]; }, null);
3123
+ })();
3124
+
3125
+ var RecipeEventsService = /** @class */ (function () {
3126
+ function RecipeEventsService(http) {
3127
+ this.http = http;
3128
+ this.suggestion_url = environment.miamAPI + "/api/events/recipes";
3129
+ this.ORIGIN_SUGGESTION = 'suggestion';
3130
+ this.ORIGIN_CATALOG = 'catalog';
3131
+ this.ACTION_PROPOSED = 'proposed';
3132
+ this.ACTION_SHOWN = 'shown';
3133
+ this.ACTION_DISPLAYED = 'displayed';
3134
+ this.ACTION_ADDED = 'added';
3135
+ this.ACTION_PUSHED = 'pushed';
3136
+ this.eventQueue = [];
3137
+ this.willAlreadyProcess = false;
3138
+ this.QUEUE_REFRESH_TIME_MS = 2000;
3139
+ }
3140
+ RecipeEventsService.prototype.enqueueEvent = function (recipe, action) {
3141
+ var _this = this;
3142
+ if (!recipe.eventOrigin) {
3143
+ return;
3144
+ }
3145
+ var eventHash = {
3146
+ "recipe_id": recipe.id,
3147
+ "origin": recipe.eventOrigin,
3148
+ "action": action,
3149
+ "group_id": recipe.eventsGroupId
3150
+ };
3151
+ this.eventQueue.push(eventHash);
3152
+ if (this.willAlreadyProcess)
3153
+ return;
3154
+ this.willAlreadyProcess = true;
3155
+ setTimeout(function () { _this.processQueue(); }, this.QUEUE_REFRESH_TIME_MS);
3156
+ };
3157
+ RecipeEventsService.prototype.processQueue = function () {
3158
+ this.willAlreadyProcess = false;
3159
+ var eventsToProcess = this.eventQueue.splice(0, this.eventQueue.length);
3160
+ var url = this.suggestion_url + "/batch";
3161
+ this.http.post(url, { 'batch': eventsToProcess }).subscribe();
3162
+ };
3163
+ RecipeEventsService.prototype.sendEvent = function (recipe, action) {
3164
+ if (!recipe.eventOrigin) {
3165
+ return;
3166
+ }
3167
+ var url = this.suggestion_url + "/" + recipe.id + "/" + recipe.eventOrigin + "/" + action;
3168
+ if (recipe.eventsGroupId) {
3169
+ url += "?group_id=" + recipe.eventsGroupId;
3170
+ }
3171
+ this.http.post(url, {}).subscribe();
3172
+ };
3173
+ return RecipeEventsService;
3343
3174
  }());
3175
+ RecipeEventsService.ɵfac = function RecipeEventsService_Factory(t) { return new (t || RecipeEventsService)(i0.ɵɵinject(i1$1.HttpClient)); };
3176
+ RecipeEventsService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeEventsService, factory: RecipeEventsService.ɵfac, providedIn: 'root' });
3177
+ /*@__PURE__*/ (function () {
3178
+ i0.ɵsetClassMetadata(RecipeEventsService, [{
3179
+ type: i0.Injectable,
3180
+ args: [{
3181
+ providedIn: 'root'
3182
+ }]
3183
+ }], function () { return [{ type: i1$1.HttpClient }]; }, null);
3184
+ })();
3344
3185
 
3345
3186
  // THIS IS JUST AN EXAMPLE - UNUSED IN THE CODE
3346
3187
  var CounterService = /** @class */ (function () {
@@ -3363,7 +3204,7 @@
3363
3204
  }], function () { return [{ type: i0.ApplicationRef }]; }, null);
3364
3205
  })();
3365
3206
 
3366
- var MIAM_API_HOST$3 = environment.miamAPI + "/api/v1/";
3207
+ var MIAM_API_HOST = environment.miamAPI + "/api/v1/";
3367
3208
  var RecipeShareService = /** @class */ (function (_super) {
3368
3209
  __extends(RecipeShareService, _super);
3369
3210
  function RecipeShareService(http) {
@@ -3403,51 +3244,130 @@
3403
3244
  RecipeShareService.prototype.getAllRecipeShareOfShareable = function (shareable) {
3404
3245
  return this.all({
3405
3246
  remotefilter: {
3406
- shareable_id: shareable.id,
3407
- shareable_type: shareable.type
3408
- }
3409
- });
3247
+ shareable_id: shareable.id,
3248
+ shareable_type: shareable.type
3249
+ }
3250
+ });
3251
+ };
3252
+ RecipeShareService.prototype.hasAtLeastOneRecipeShare = function (shareable) {
3253
+ return this.getAllRecipeShareOfShareable(shareable).pipe(operators.skipWhile(function (res) { return res.is_loading; }), operators.switchMap(function (res) {
3254
+ return rxjs.of(res.data.length > 0);
3255
+ }));
3256
+ };
3257
+ RecipeShareService.prototype.deleteAllRecipeShareOfShareable = function (shareable) {
3258
+ var _this = this;
3259
+ return this.getAllRecipeShareOfShareable(shareable).pipe(operators.skipWhile(function (res) { return res.is_loading; }), operators.switchMap(function (recipeShares) {
3260
+ return rxjs.forkJoin(recipeShares.data.map(function (recipeShare) {
3261
+ return _this.delete(recipeShare.id);
3262
+ }));
3263
+ }));
3264
+ };
3265
+ // For shareable and destination, if only ids are passed, back will update shares for all elements with those ids, if only
3266
+ // filters are passed, back will use the filter to get the ids to update shares, and if both are passed, back will use the
3267
+ // filters to get ids, will remove those wich are in passed ids, and then update.
3268
+ RecipeShareService.prototype.updateMultipleRecipeShare = function (shareableIds, shareableType, destinationIds, destinationType, status, shareableFilters, destinationFilters) {
3269
+ var body = {
3270
+ destination_ids: destinationIds,
3271
+ destination_type: destinationType,
3272
+ shareable_ids: shareableIds,
3273
+ shareable_type: shareableType,
3274
+ status: status,
3275
+ destination_filters: destinationFilters,
3276
+ shareable_filters: shareableFilters
3277
+ };
3278
+ var url = MIAM_API_HOST + "recipe-shares/multi";
3279
+ return this.http.post(url, body);
3280
+ };
3281
+ return RecipeShareService;
3282
+ }(i1.Service));
3283
+ RecipeShareService.ɵfac = function RecipeShareService_Factory(t) { return new (t || RecipeShareService)(i0.ɵɵinject(i1$1.HttpClient)); };
3284
+ RecipeShareService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeShareService, factory: RecipeShareService.ɵfac, providedIn: 'root' });
3285
+ /*@__PURE__*/ (function () {
3286
+ i0.ɵsetClassMetadata(RecipeShareService, [{
3287
+ type: i0.Injectable,
3288
+ args: [{
3289
+ providedIn: 'root',
3290
+ }]
3291
+ }], function () { return [{ type: i1$1.HttpClient }]; }, null);
3292
+ })();
3293
+
3294
+ var SponsorService = /** @class */ (function (_super) {
3295
+ __extends(SponsorService, _super);
3296
+ function SponsorService() {
3297
+ var _this = _super.call(this) || this;
3298
+ _this.resource = Sponsor;
3299
+ _this.type = 'sponsors';
3300
+ _this.register();
3301
+ return _this;
3302
+ }
3303
+ return SponsorService;
3304
+ }(i1.Service));
3305
+ SponsorService.ɵfac = function SponsorService_Factory(t) { return new (t || SponsorService)(); };
3306
+ SponsorService.ɵprov = i0.ɵɵdefineInjectable({ token: SponsorService, factory: SponsorService.ɵfac, providedIn: 'root' });
3307
+ /*@__PURE__*/ (function () {
3308
+ i0.ɵsetClassMetadata(SponsorService, [{
3309
+ type: i0.Injectable,
3310
+ args: [{
3311
+ providedIn: 'root'
3312
+ }]
3313
+ }], function () { return []; }, null);
3314
+ })();
3315
+
3316
+ var MIAM_API_HOST$1 = environment.miamAPI + "/api/v1/";
3317
+ var PackageService = /** @class */ (function (_super) {
3318
+ __extends(PackageService, _super);
3319
+ function PackageService(http, providerService, statusService) {
3320
+ var _this = _super.call(this) || this;
3321
+ _this.http = http;
3322
+ _this.providerService = providerService;
3323
+ _this.statusService = statusService;
3324
+ _this.resource = Package;
3325
+ _this.type = 'packages';
3326
+ _this.register();
3327
+ return _this;
3328
+ }
3329
+ PackageService.prototype.categories_for = function (suppliersIds) {
3330
+ var _this = this;
3331
+ return this.statusService.active.pipe(operators.switchMap(function (activeStatus) { return _this.all({
3332
+ remotefilter: {
3333
+ category_for: suppliersIds.join(','),
3334
+ status: activeStatus.id,
3335
+ user_preferences: true
3336
+ },
3337
+ sort: ['catalog_position']
3338
+ }); }));
3410
3339
  };
3411
- RecipeShareService.prototype.hasAtLeastOneRecipeShare = function (shareable) {
3412
- return this.getAllRecipeShareOfShareable(shareable).pipe(operators.skipWhile(function (res) { return res.is_loading; }), operators.switchMap(function (res) {
3413
- return rxjs.of(res.data.length > 0);
3414
- }));
3340
+ PackageService.prototype.unshareWithSupplier = function (pack, supplier) {
3341
+ return this.http.delete(MIAM_API_HOST$1 + ("packages/" + pack.id + "/suppliers/" + supplier.id));
3415
3342
  };
3416
- RecipeShareService.prototype.deleteAllRecipeShareOfShareable = function (shareable) {
3417
- var _this = this;
3418
- return this.getAllRecipeShareOfShareable(shareable).pipe(operators.skipWhile(function (res) { return res.is_loading; }), operators.switchMap(function (recipeShares) {
3419
- return rxjs.forkJoin(recipeShares.data.map(function (recipeShare) {
3420
- return _this.delete(recipeShare.id);
3421
- }));
3422
- }));
3343
+ PackageService.prototype.shareWithSupplierOrUpdate = function (pack, supplier, category, catalog_position, edit_content) {
3344
+ // Only send params if they are passed
3345
+ var body = Object.assign(Object.assign(Object.assign({}, category !== null ? { category: category } : {}), catalog_position !== null ? { catalog_position: catalog_position } : {}), edit_content !== null ? { edit_content: edit_content } : {});
3346
+ var url = MIAM_API_HOST$1 + ("packages/" + pack.id + "/suppliers/" + supplier.id);
3347
+ if (pack.attributes.shared) {
3348
+ return this.http.patch(url, body);
3349
+ }
3350
+ else {
3351
+ return this.http.post(url, body);
3352
+ }
3423
3353
  };
3424
- // For shareable and destination, if only ids are passed, back will update shares for all elements with those ids, if only
3425
- // filters are passed, back will use the filter to get the ids to update shares, and if both are passed, back will use the
3426
- // filters to get ids, will remove those wich are in passed ids, and then update.
3427
- RecipeShareService.prototype.updateMultipleRecipeShare = function (shareableIds, shareableType, destinationIds, destinationType, status, shareableFilters, destinationFilters) {
3428
- var body = {
3429
- destination_ids: destinationIds,
3430
- destination_type: destinationType,
3431
- shareable_ids: shareableIds,
3432
- shareable_type: shareableType,
3433
- status: status,
3434
- destination_filters: destinationFilters,
3435
- shareable_filters: shareableFilters
3436
- };
3437
- var url = MIAM_API_HOST$3 + "recipe-shares/multi";
3438
- return this.http.post(url, body);
3354
+ PackageService.prototype.removeRecipeFromPackage = function (pack, recipe) {
3355
+ return this.http.delete(MIAM_API_HOST$1 + ("packages/" + pack.id + "/recipes/" + recipe.id));
3439
3356
  };
3440
- return RecipeShareService;
3357
+ PackageService.prototype.addRecipeToPackage = function (pack, recipe) {
3358
+ return this.http.post(MIAM_API_HOST$1 + ("packages/" + pack.id + "/recipes/" + recipe.id), {});
3359
+ };
3360
+ return PackageService;
3441
3361
  }(i1.Service));
3442
- RecipeShareService.ɵfac = function RecipeShareService_Factory(t) { return new (t || RecipeShareService)(i0.ɵɵinject(i1$1.HttpClient)); };
3443
- RecipeShareService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeShareService, factory: RecipeShareService.ɵfac, providedIn: 'root' });
3362
+ PackageService.ɵfac = function PackageService_Factory(t) { return new (t || PackageService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(RecipeProviderService), i0.ɵɵinject(RecipeStatusService)); };
3363
+ PackageService.ɵprov = i0.ɵɵdefineInjectable({ token: PackageService, factory: PackageService.ɵfac, providedIn: 'root' });
3444
3364
  /*@__PURE__*/ (function () {
3445
- i0.ɵsetClassMetadata(RecipeShareService, [{
3365
+ i0.ɵsetClassMetadata(PackageService, [{
3446
3366
  type: i0.Injectable,
3447
3367
  args: [{
3448
- providedIn: 'root',
3368
+ providedIn: 'root'
3449
3369
  }]
3450
- }], function () { return [{ type: i1$1.HttpClient }]; }, null);
3370
+ }], function () { return [{ type: i1$1.HttpClient }, { type: RecipeProviderService }, { type: RecipeStatusService }]; }, null);
3451
3371
  })();
3452
3372
 
3453
3373
  var ArticlesService = /** @class */ (function (_super) {
@@ -3531,6 +3451,33 @@
3531
3451
  }], null, null);
3532
3452
  })();
3533
3453
 
3454
+ var MIAM_API_HOST$2 = environment.miamAPI + "/api/v1/";
3455
+ var TagsService = /** @class */ (function (_super) {
3456
+ __extends(TagsService, _super);
3457
+ function TagsService(http) {
3458
+ var _this = _super.call(this) || this;
3459
+ _this.http = http;
3460
+ _this.resource = Tag;
3461
+ _this.type = 'tags';
3462
+ _this.register();
3463
+ return _this;
3464
+ }
3465
+ TagsService.prototype.autocomplete = function (searchStr) {
3466
+ return this.http.get(MIAM_API_HOST$2 + ("tags/autocomplete/" + searchStr));
3467
+ };
3468
+ return TagsService;
3469
+ }(i1.Service));
3470
+ TagsService.ɵfac = function TagsService_Factory(t) { return new (t || TagsService)(i0.ɵɵinject(i1$1.HttpClient)); };
3471
+ TagsService.ɵprov = i0.ɵɵdefineInjectable({ token: TagsService, factory: TagsService.ɵfac, providedIn: 'root' });
3472
+ /*@__PURE__*/ (function () {
3473
+ i0.ɵsetClassMetadata(TagsService, [{
3474
+ type: i0.Injectable,
3475
+ args: [{
3476
+ providedIn: 'root'
3477
+ }]
3478
+ }], function () { return [{ type: i1$1.HttpClient }]; }, null);
3479
+ })();
3480
+
3534
3481
  var UserService = /** @class */ (function () {
3535
3482
  function UserService(http, recipesProvidersService, toastr, suppliersService) {
3536
3483
  this.http = http;
@@ -3663,86 +3610,146 @@
3663
3610
  }], function () { return [{ type: i1$1.HttpClient }, { type: RecipeProviderService }, { type: ToastrService }, { type: SuppliersService }]; }, null);
3664
3611
  })();
3665
3612
 
3666
- var RecipeLikesService = /** @class */ (function (_super) {
3667
- __extends(RecipeLikesService, _super);
3668
- function RecipeLikesService(userService) {
3613
+ var MIAM_API_HOST$3 = environment.miamAPI + "/api/v1/";
3614
+ var IngredientsService = /** @class */ (function (_super) {
3615
+ __extends(IngredientsService, _super);
3616
+ function IngredientsService(http, userService) {
3669
3617
  var _this = _super.call(this) || this;
3618
+ _this.http = http;
3670
3619
  _this.userService = userService;
3671
- _this.resource = RecipeLike;
3672
- _this.type = 'recipe-likes';
3673
- _this.activeRecipeLikes = new Map();
3620
+ _this.resource = Ingredient;
3621
+ _this.type = 'ingredients';
3674
3622
  _this.register();
3623
+ // if you are using this service you will need this, prefetch it when user logs
3624
+ userService.isLogged$
3625
+ .pipe(operators.skipWhile(function (isLogged) { return !isLogged; }), operators.take(1))
3626
+ .subscribe(function (isLogged) {
3627
+ if (isLogged) {
3628
+ _this.fetchReviewedNames();
3629
+ _this.fetchReviewedUnits();
3630
+ }
3631
+ });
3675
3632
  return _this;
3676
3633
  }
3677
- RecipeLikesService.prototype.getLike = function (recipeId) {
3678
- this.addLikeToActivesIfNecessary(recipeId);
3679
- return this.activeRecipeLikes.get(recipeId);
3634
+ IngredientsService.prototype.getReviewedNames = function () {
3635
+ if (!this.reviewedNames) {
3636
+ this.fetchReviewedNames();
3637
+ }
3638
+ return this.reviewedNames;
3680
3639
  };
3681
- RecipeLikesService.prototype.updateLike = function (recipeId, recipeLike) {
3640
+ IngredientsService.prototype.getReviewedUnits = function () {
3641
+ if (!this.reviewedUnits) {
3642
+ this.fetchReviewedUnits();
3643
+ }
3644
+ return this.reviewedUnits;
3645
+ };
3646
+ IngredientsService.prototype.fetchReviewedNames = function () {
3682
3647
  var _this = this;
3683
- recipeLike.save().subscribe(function () {
3684
- _this.activeRecipeLikes.get(recipeId).next(recipeLike);
3648
+ return this.http.get(MIAM_API_HOST$3 + "ingredients-definitions/reviewed_names").subscribe(function (reviewedNames) {
3649
+ _this.reviewedNames = reviewedNames;
3685
3650
  });
3686
3651
  };
3687
- RecipeLikesService.prototype.addLikeToActivesIfNecessary = function (recipeId) {
3652
+ IngredientsService.prototype.fetchReviewedUnits = function () {
3688
3653
  var _this = this;
3689
- if (!this.activeRecipeLikes.get(recipeId)) {
3690
- this.activeRecipeLikes.set(recipeId, new rxjs.BehaviorSubject(this.new()));
3691
- this.fetchLikesOfRecipe(recipeId).subscribe(function (likes) {
3692
- // Double check because the BehaviorSubject could have been deleted in removeLikeFromActivesIfNecessary while fetching
3693
- if (likes.data[0] && _this.activeRecipeLikes.get(recipeId)) {
3694
- _this.activeRecipeLikes.get(recipeId).next(likes.data[0]);
3695
- }
3696
- });
3697
- }
3654
+ return this.http.get(MIAM_API_HOST$3 + "quantity-units/reviewed_names").subscribe(function (reviewedUnits) {
3655
+ _this.reviewedUnits = __spread(reviewedUnits.map(function (unitObject) { return unitObject['name']; }));
3656
+ });
3698
3657
  };
3699
- RecipeLikesService.prototype.removeLikeFromActivesIfNecessary = function (recipeId) {
3700
- var activeLikes = this.activeRecipeLikes.get(recipeId);
3701
- if (!activeLikes) {
3702
- return;
3703
- }
3704
- if (activeLikes.observers.length === 0) {
3705
- this.activeRecipeLikes.delete(recipeId);
3658
+ /**
3659
+ * Check if ingredient is already known in backend
3660
+ * @param ingredientDef exemple : 'steak'
3661
+ */
3662
+ IngredientsService.prototype.isReviewedName = function (ingredientDef) {
3663
+ var _this = this;
3664
+ if (!this.reviewedNames) {
3665
+ // get all knowed ingredient in backend
3666
+ return this.http.get(MIAM_API_HOST$3 + "ingredients-definitions/reviewed_names").pipe(operators.switchMap(function (reviewedNames) {
3667
+ _this.reviewedNames = reviewedNames;
3668
+ // check if ingredientDef is in the list
3669
+ return rxjs.of(_this.reviewedNames.some(function (el) { return el === ingredientDef; }));
3670
+ }));
3706
3671
  }
3672
+ return rxjs.of(this.reviewedNames.some(function (el) { return el === ingredientDef; }));
3707
3673
  };
3708
- RecipeLikesService.prototype.addLikesToRecipes = function (recipes) {
3674
+ /**
3675
+ * Check if unit is already known in backend
3676
+ * @param unit exemple : 'c. à c.'
3677
+ */
3678
+ IngredientsService.prototype.isReviewedUnit = function (unit) {
3709
3679
  var _this = this;
3710
- if (!this.userService.isLogged$.value) {
3711
- return rxjs.of(null);
3680
+ if (!this.reviewedUnits) {
3681
+ // get all knowed units in backend
3682
+ return this.http.get(MIAM_API_HOST$3 + "quantity-units/reviewed_names").pipe(operators.switchMap(function (reviewedUnits) {
3683
+ _this.reviewedUnits = __spread(reviewedUnits.map(function (unitObject) { return unitObject['name']; }));
3684
+ // check if unit is in the list
3685
+ // rem: the case is not always lowered for all units
3686
+ return rxjs.of(_this.reviewedUnits.some(function (el) { return el.toLowerCase() === unit.toLowerCase(); }));
3687
+ }));
3712
3688
  }
3713
- return this.all({
3714
- page: { size: 20, number: 1 },
3715
- remotefilter: {
3716
- recipe_id: recipes.map(function (r) { return r.id; }).join(),
3717
- is_past: 'true,false'
3689
+ return rxjs.of(this.reviewedUnits.some(function (el) { return el.toLowerCase() === unit.toLowerCase(); }));
3690
+ };
3691
+ IngredientsService.prototype.formatIngredients = function (listIngredient) {
3692
+ var _this = this;
3693
+ return rxjs.forkJoin(listIngredient.map(function (el) { return _this.get("from_s?ingredient_str=" + el); }));
3694
+ };
3695
+ /**
3696
+ * Merge Recipe Ingredients list with output of recipe forms ingredient list
3697
+ * it's link with RecipeFormComponent
3698
+ * @param recipe to update
3699
+ * @param ingredients list of ingredients
3700
+ */
3701
+ IngredientsService.prototype.createOrUpdateIngredients = function (recipe, ingredients) {
3702
+ var _this = this;
3703
+ var oldIngredients = __spread(recipe.relationships["ingredients"].data);
3704
+ var ingredientsToSave = [];
3705
+ ingredients.forEach(function (ing) {
3706
+ if (ing.id) {
3707
+ var oldIndex = oldIngredients.findIndex(function (el) { return el.id === ing.id; });
3708
+ var oldIngredientAttribute = oldIngredients[oldIndex].attributes;
3709
+ var hasChange = oldIngredientAttribute.name !== ing.attributes.name ||
3710
+ oldIngredientAttribute.unit !== ing.attributes.unit ||
3711
+ oldIngredientAttribute.quantity !== ing.attributes.quantity;
3712
+ if (hasChange) {
3713
+ oldIngredients[oldIndex].attributes = Object.assign(Object.assign({}, oldIngredients[oldIndex].attributes), { name: ing.attributes.name, unit: ing.attributes.unit, quantity: ing.attributes.quantity, 'picture-url': ing.attributes['picture-url'] });
3714
+ ingredientsToSave.push(oldIngredients[oldIndex]);
3715
+ }
3718
3716
  }
3719
- }).pipe(operators.skipWhile(function (resp) { return resp.is_loading; }), operators.tap(function (result) {
3720
- // Create an entry for each like returned
3721
- result.data.forEach(function (like) {
3722
- _this.activeRecipeLikes.set(like.attributes['recipe-id'].toString(), new rxjs.BehaviorSubject(like));
3723
- recipes = recipes.filter(function (r) { return r.id !== like.attributes['recipe-id'].toString(); });
3724
- });
3725
- // Create an empty entry for each recipe without like
3726
- recipes.forEach(function (r) {
3727
- _this.activeRecipeLikes.set(r.id, new rxjs.BehaviorSubject(_this.new()));
3728
- });
3717
+ else {
3718
+ var newIng = _this.new();
3719
+ delete newIng.id;
3720
+ newIng.attributes = Object.assign(Object.assign({}, newIng.attributes), { name: ing.attributes.name, unit: ing.attributes.unit, quantity: '' + ing.attributes.quantity, 'picture-url': ing.attributes['picture-url'] });
3721
+ newIng.addRelationship(recipe, 'recipe');
3722
+ ingredientsToSave.push(newIng);
3723
+ }
3724
+ });
3725
+ return ingredientsToSave;
3726
+ };
3727
+ /**
3728
+ * Create or update a list Of Ingredient
3729
+ * it'll create if Ingredient id is null otherwise update it
3730
+ * it's perform in parallel , Observable'll complet when all ingredents have been upserted
3731
+ * @param ingredients array of Ingredient
3732
+ */
3733
+ IngredientsService.prototype.upsertIngredientList = function (ingredients) {
3734
+ return rxjs.forkJoin(ingredients.map(function (ingredient) {
3735
+ return ingredient.save();
3729
3736
  }));
3730
3737
  };
3731
- // Because of API implementation, shouldn't return more than 1 recipe-like
3732
- RecipeLikesService.prototype.fetchLikesOfRecipe = function (recipeId) {
3733
- return this.all({ remotefilter: { recipe_id: recipeId, is_past: 'true,false' } }).pipe(operators.skipWhile(function (resp) { return resp.is_loading; }));
3738
+ IngredientsService.prototype.deleteIngredientList = function (ingredientIds) {
3739
+ var _this = this;
3740
+ return rxjs.forkJoin(ingredientIds.map(function (ingredientId) { return _this.delete(ingredientId); }));
3734
3741
  };
3735
- return RecipeLikesService;
3742
+ return IngredientsService;
3736
3743
  }(i1.Service));
3737
- RecipeLikesService.ɵfac = function RecipeLikesService_Factory(t) { return new (t || RecipeLikesService)(i0.ɵɵinject(UserService)); };
3738
- RecipeLikesService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeLikesService, factory: RecipeLikesService.ɵfac, providedIn: 'root' });
3744
+ IngredientsService.ɵfac = function IngredientsService_Factory(t) { return new (t || IngredientsService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(UserService)); };
3745
+ IngredientsService.ɵprov = i0.ɵɵdefineInjectable({ token: IngredientsService, factory: IngredientsService.ɵfac, providedIn: 'root' });
3739
3746
  /*@__PURE__*/ (function () {
3740
- i0.ɵsetClassMetadata(RecipeLikesService, [{
3747
+ i0.ɵsetClassMetadata(IngredientsService, [{
3741
3748
  type: i0.Injectable,
3742
3749
  args: [{
3743
3750
  providedIn: 'root'
3744
3751
  }]
3745
- }], function () { return [{ type: UserService }]; }, null);
3752
+ }], function () { return [{ type: i1$1.HttpClient }, { type: UserService }]; }, null);
3746
3753
  })();
3747
3754
 
3748
3755
  var MIAM_API_HOST$4 = environment.miamAPI + "/api/v1/";
@@ -8127,33 +8134,48 @@
8127
8134
  }] });
8128
8135
  })();
8129
8136
 
8130
- function RecipePricingComponent_div_1_Template(rf, ctx) {
8137
+ function RecipePricingComponent_div_0_Template(rf, ctx) {
8131
8138
  if (rf & 1) {
8132
- i0.ɵɵelementStart(0, "div", 2);
8133
- i0.ɵɵelementStart(1, "div", 3);
8134
- i0.ɵɵelementStart(2, "span");
8135
- i0.ɵɵtext(3);
8139
+ i0.ɵɵelementStart(0, "div", 1);
8140
+ i0.ɵɵelementStart(1, "div", 2);
8141
+ i0.ɵɵelementStart(2, "div", 3);
8142
+ i0.ɵɵelementStart(3, "span");
8143
+ i0.ɵɵtext(4);
8136
8144
  i0.ɵɵelementEnd();
8137
- i0.ɵɵelementStart(4, "span");
8138
- i0.ɵɵtext(5);
8145
+ i0.ɵɵelementStart(5, "span");
8146
+ i0.ɵɵtext(6);
8139
8147
  i0.ɵɵelementEnd();
8140
- i0.ɵɵelementStart(6, "span");
8141
- i0.ɵɵtext(7, " \u20AC");
8148
+ i0.ɵɵelementStart(7, "span");
8149
+ i0.ɵɵtext(8, " \u20AC");
8142
8150
  i0.ɵɵelementEnd();
8143
8151
  i0.ɵɵelementEnd();
8144
- i0.ɵɵelementStart(8, "div", 4);
8145
- i0.ɵɵtext(9);
8152
+ i0.ɵɵelementStart(9, "div", 4);
8153
+ i0.ɵɵtext(10);
8154
+ i0.ɵɵelementEnd();
8155
+ i0.ɵɵelementEnd();
8156
+ i0.ɵɵelementStart(11, "div", 5);
8157
+ i0.ɵɵelementStart(12, "span");
8158
+ i0.ɵɵtext(13, "Soit");
8159
+ i0.ɵɵelementEnd();
8160
+ i0.ɵɵelementStart(14, "span");
8161
+ i0.ɵɵtext(15);
8162
+ i0.ɵɵelementEnd();
8163
+ i0.ɵɵelementStart(16, "span");
8164
+ i0.ɵɵtext(17, "\u20AC");
8165
+ i0.ɵɵelementEnd();
8146
8166
  i0.ɵɵelementEnd();
8147
8167
  i0.ɵɵelementEnd();
8148
8168
  }
8149
8169
  if (rf & 2) {
8150
8170
  var ctx_r0 = i0.ɵɵnextContext();
8151
- i0.ɵɵadvance(3);
8171
+ i0.ɵɵadvance(4);
8152
8172
  i0.ɵɵtextInterpolate1("", ctx_r0.integerPart, ",");
8153
8173
  i0.ɵɵadvance(2);
8154
8174
  i0.ɵɵtextInterpolate(ctx_r0.decimalPart);
8155
8175
  i0.ɵɵadvance(4);
8156
8176
  i0.ɵɵtextInterpolate1(" ", ctx_r0.guestsText, " ");
8177
+ i0.ɵɵadvance(5);
8178
+ i0.ɵɵtextInterpolate(ctx_r0.total);
8157
8179
  }
8158
8180
  }
8159
8181
  var RecipePricingComponent = /** @class */ (function () {
@@ -8239,21 +8261,19 @@
8239
8261
  var values = this.pricing.price_per_serve.toFixed(2).toString().split('.');
8240
8262
  this.integerPart = values[0];
8241
8263
  this.decimalPart = values.length === 2 ? values[1] : '00';
8264
+ this.total = this.pricing.price;
8242
8265
  };
8243
8266
  return RecipePricingComponent;
8244
8267
  }());
8245
8268
  RecipePricingComponent.ɵfac = function RecipePricingComponent_Factory(t) { return new (t || RecipePricingComponent)(i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PointOfSalesService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(BasketsService)); };
8246
- RecipePricingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipePricingComponent, selectors: [["ng-miam-recipe-pricing"]], inputs: { recipe: "recipe", serves: "serves", guestsText: "guestsText" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 1, consts: [[1, "miam-recipe-pricing"], ["class", "miam-recipe-pricing__wrapper", 4, "ngIf"], [1, "miam-recipe-pricing__wrapper"], [1, "miam-recipe-pricing__wrapper__price"], [1, "miam-recipe-pricing__wrapper__subline"]], template: function RecipePricingComponent_Template(rf, ctx) {
8269
+ RecipePricingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipePricingComponent, selectors: [["ng-miam-recipe-pricing"]], inputs: { recipe: "recipe", serves: "serves", guestsText: "guestsText" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "miam-recipe-pricing", 4, "ngIf"], [1, "miam-recipe-pricing"], [1, "miam-recipe-pricing__wrapper"], [1, "miam-recipe-pricing__wrapper__price"], [1, "miam-recipe-pricing__wrapper__subline"], [1, "miam-recipe-pricing__total"]], template: function RecipePricingComponent_Template(rf, ctx) {
8247
8270
  if (rf & 1) {
8248
- i0.ɵɵelementStart(0, "div", 0);
8249
- i0.ɵɵtemplate(1, RecipePricingComponent_div_1_Template, 10, 3, "div", 1);
8250
- i0.ɵɵelementEnd();
8271
+ i0.ɵɵtemplate(0, RecipePricingComponent_div_0_Template, 18, 4, "div", 0);
8251
8272
  }
8252
8273
  if (rf & 2) {
8253
- i0.ɵɵadvance(1);
8254
8274
  i0.ɵɵproperty("ngIf", !ctx.loading);
8255
8275
  }
8256
- }, directives: [i3.NgIf], styles: [".miam-recipe-pricing .miam-recipe-pricing__wrapper{align-items:center;display:flex;flex-direction:column}.miam-recipe-pricing .miam-recipe-pricing__wrapper__price{font-size:18px;font-weight:700}.miam-recipe-pricing .miam-recipe-pricing__wrapper__subline{color:grey;font-size:12px}"], encapsulation: 2, changeDetection: 0 });
8276
+ }, directives: [i3.NgIf], styles: [".miam-recipe-pricing,.miam-recipe-pricing .miam-recipe-pricing__wrapper{align-items:center;display:flex;flex-direction:column}.miam-recipe-pricing .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__price{font-size:18px;font-weight:700}.miam-recipe-pricing .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__subline{color:grey;font-size:12px}.miam-recipe-pricing .miam-recipe-pricing__total{color:var(--m-color-grey04);display:none;font-size:12px;font-weight:400;line-height:16px}.miam-recipe-pricing .miam-recipe-pricing__total span{margin-right:4px}"], encapsulation: 2, changeDetection: 0 });
8257
8277
  /*@__PURE__*/ (function () {
8258
8278
  i0.ɵsetClassMetadata(RecipePricingComponent, [{
8259
8279
  type: i0.Component,
@@ -9907,7 +9927,8 @@
9907
9927
  return this.line.price;
9908
9928
  }
9909
9929
  var beItem = this.line.record.attributes['basket-entries-items'].find(function (i) { return i.item_id === _this.line.record.attributes['selected-item-id']; });
9910
- return parseFloat(beItem['unit-price']).toFixed(2);
9930
+ // beItem can be null after replacing an item, before the view is reloaded with the new item
9931
+ return beItem ? parseFloat(beItem['unit-price']).toFixed(2) : '0.00';
9911
9932
  };
9912
9933
  return BasketPreviewLineComponent;
9913
9934
  }());
@@ -11165,7 +11186,7 @@
11165
11186
  i0.ɵɵadvance(2);
11166
11187
  i0.ɵɵproperty("disabled", !ctx_r0.recipe)("ngClass", i0.ɵɵpureFunction2(26, _c1$5, i0.ɵɵpipeBind1(29, 22, ctx_r0.groceriesListsService.recipeIsInList(ctx_r0.recipe == null ? null : ctx_r0.recipe.id)), ctx_r0.addButtonLoading));
11167
11188
  i0.ɵɵadvance(3);
11168
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(32, 24, ctx_r0.groceriesListsService.recipeIsInList(ctx_r0.recipe == null ? null : ctx_r0.recipe.id)) ? "Voir le d\u00E9tails" : "Ajouter les ingr\u00E9dients", " ");
11189
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(32, 24, ctx_r0.groceriesListsService.recipeIsInList(ctx_r0.recipe == null ? null : ctx_r0.recipe.id)) ? "Voir le d\u00E9tail" : "Ajouter les ingr\u00E9dients", " ");
11169
11190
  i0.ɵɵadvance(2);
11170
11191
  i0.ɵɵproperty("ngIf", !ctx_r0.addButtonLoading)("ngIfElse", _r20);
11171
11192
  }
@@ -11347,9 +11368,9 @@
11347
11368
  i0.ɵɵelementEnd();
11348
11369
  }
11349
11370
  if (rf & 2) {
11350
- var ctx_r15 = i0.ɵɵnextContext(2);
11371
+ var ctx_r14 = i0.ɵɵnextContext(2);
11351
11372
  i0.ɵɵadvance(1);
11352
- i0.ɵɵproperty("src", ctx_r15.recipe.filigraneLogoUrl, i0.ɵɵsanitizeUrl);
11373
+ i0.ɵɵproperty("src", ctx_r14.recipe.filigraneLogoUrl, i0.ɵɵsanitizeUrl);
11353
11374
  }
11354
11375
  }
11355
11376
  function CatalogRecipeCardComponent_div_4_div_5_Template(rf, ctx) {
@@ -11359,9 +11380,9 @@
11359
11380
  i0.ɵɵelementEnd();
11360
11381
  }
11361
11382
  if (rf & 2) {
11362
- var ctx_r16 = i0.ɵɵnextContext(2);
11383
+ var ctx_r15 = i0.ɵɵnextContext(2);
11363
11384
  i0.ɵɵadvance(1);
11364
- i0.ɵɵproperty("iconName", ctx_r16.icon.Video)("width", 80)("height", 80);
11385
+ i0.ɵɵproperty("iconName", ctx_r15.icon.Video)("width", 80)("height", 80);
11365
11386
  }
11366
11387
  }
11367
11388
  function CatalogRecipeCardComponent_div_4_ng_container_6_div_1_Template(rf, ctx) {
@@ -11379,25 +11400,25 @@
11379
11400
  i0.ɵɵelementContainerEnd();
11380
11401
  }
11381
11402
  if (rf & 2) {
11382
- var ctx_r17 = i0.ɵɵnextContext(2);
11403
+ var ctx_r16 = i0.ɵɵnextContext(2);
11383
11404
  i0.ɵɵadvance(1);
11384
- i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 1, ctx_r17.groceriesListsService.recipeIsInList(ctx_r17.recipe == null ? null : ctx_r17.recipe.id)));
11405
+ i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 1, ctx_r16.groceriesListsService.recipeIsInList(ctx_r16.recipe == null ? null : ctx_r16.recipe.id)));
11385
11406
  }
11386
11407
  }
11387
11408
  function CatalogRecipeCardComponent_div_4_ng_container_7_Template(rf, ctx) {
11388
11409
  if (rf & 1) {
11389
- var _r25_1 = i0.ɵɵgetCurrentView();
11410
+ var _r24_1 = i0.ɵɵgetCurrentView();
11390
11411
  i0.ɵɵelementContainerStart(0);
11391
11412
  i0.ɵɵelementStart(1, "div", 33);
11392
- i0.ɵɵlistener("click", function CatalogRecipeCardComponent_div_4_ng_container_7_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r25_1); var ctx_r24 = i0.ɵɵnextContext(2); return ctx_r24.openRecipe(); });
11413
+ i0.ɵɵlistener("click", function CatalogRecipeCardComponent_div_4_ng_container_7_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r24_1); var ctx_r23 = i0.ɵɵnextContext(2); return ctx_r23.openRecipe(); });
11393
11414
  i0.ɵɵtext(2);
11394
11415
  i0.ɵɵelementEnd();
11395
11416
  i0.ɵɵelementContainerEnd();
11396
11417
  }
11397
11418
  if (rf & 2) {
11398
- var ctx_r18 = i0.ɵɵnextContext(2);
11419
+ var ctx_r17 = i0.ɵɵnextContext(2);
11399
11420
  i0.ɵɵadvance(2);
11400
- i0.ɵɵtextInterpolate1(" ", ctx_r18.recipe == null ? null : ctx_r18.recipe.attributes["title"], " ");
11421
+ i0.ɵɵtextInterpolate1(" ", ctx_r17.recipe == null ? null : ctx_r17.recipe.attributes["title"], " ");
11401
11422
  }
11402
11423
  }
11403
11424
  function CatalogRecipeCardComponent_div_4_ng_template_8_Template(rf, ctx) {
@@ -11405,8 +11426,8 @@
11405
11426
  i0.ɵɵelement(0, "ng-miam-skeleton", 34);
11406
11427
  }
11407
11428
  if (rf & 2) {
11408
- var ctx_r20 = i0.ɵɵnextContext(2);
11409
- i0.ɵɵproperty("type", ctx_r20.skeleton.Text);
11429
+ var ctx_r19 = i0.ɵɵnextContext(2);
11430
+ i0.ɵɵproperty("type", ctx_r19.skeleton.Text);
11410
11431
  }
11411
11432
  }
11412
11433
  function CatalogRecipeCardComponent_div_4_ng_miam_like_button_11_Template(rf, ctx) {
@@ -11414,36 +11435,36 @@
11414
11435
  i0.ɵɵelement(0, "ng-miam-like-button", 35);
11415
11436
  }
11416
11437
  if (rf & 2) {
11417
- var ctx_r21 = i0.ɵɵnextContext(2);
11418
- i0.ɵɵproperty("recipe", ctx_r21.recipe);
11438
+ var ctx_r20 = i0.ɵɵnextContext(2);
11439
+ i0.ɵɵproperty("recipe", ctx_r20.recipe);
11419
11440
  }
11420
11441
  }
11421
11442
  function CatalogRecipeCardComponent_div_4_Template(rf, ctx) {
11422
11443
  if (rf & 1) {
11423
- var _r27_1 = i0.ɵɵgetCurrentView();
11424
- i0.ɵɵelementStart(0, "div", 17);
11425
- i0.ɵɵlistener("click", function CatalogRecipeCardComponent_div_4_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r27_1); var ctx_r26 = i0.ɵɵnextContext(); return ctx_r26.openRecipe(); });
11426
- i0.ɵɵelementStart(1, "div", 18);
11427
- i0.ɵɵelement(2, "img", 19);
11428
- i0.ɵɵtemplate(3, CatalogRecipeCardComponent_div_4_div_3_Template, 2, 1, "div", 8);
11444
+ var _r26_1 = i0.ɵɵgetCurrentView();
11445
+ i0.ɵɵelementStart(0, "div", 16);
11446
+ i0.ɵɵlistener("click", function CatalogRecipeCardComponent_div_4_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r26_1); var ctx_r25 = i0.ɵɵnextContext(); return ctx_r25.openRecipe(); });
11447
+ i0.ɵɵelementStart(1, "div", 17);
11448
+ i0.ɵɵelement(2, "img", 18);
11449
+ i0.ɵɵtemplate(3, CatalogRecipeCardComponent_div_4_div_3_Template, 2, 1, "div", 19);
11429
11450
  i0.ɵɵpipe(4, "async");
11430
11451
  i0.ɵɵelementEnd();
11431
11452
  i0.ɵɵtemplate(5, CatalogRecipeCardComponent_div_4_div_5_Template, 2, 3, "div", 20);
11432
- i0.ɵɵtemplate(6, CatalogRecipeCardComponent_div_4_ng_container_6_Template, 3, 3, "ng-container", 8);
11453
+ i0.ɵɵtemplate(6, CatalogRecipeCardComponent_div_4_ng_container_6_Template, 3, 3, "ng-container", 19);
11433
11454
  i0.ɵɵtemplate(7, CatalogRecipeCardComponent_div_4_ng_container_7_Template, 3, 1, "ng-container", 21);
11434
11455
  i0.ɵɵtemplate(8, CatalogRecipeCardComponent_div_4_ng_template_8_Template, 1, 1, "ng-template", null, 22, i0.ɵɵtemplateRefExtractor);
11435
11456
  i0.ɵɵelementStart(10, "div", 23);
11436
11457
  i0.ɵɵtemplate(11, CatalogRecipeCardComponent_div_4_ng_miam_like_button_11_Template, 1, 1, "ng-miam-like-button", 24);
11437
11458
  i0.ɵɵpipe(12, "async");
11438
11459
  i0.ɵɵelementStart(13, "div", 25, 26);
11439
- i0.ɵɵlistener("click", function CatalogRecipeCardComponent_div_4_Template_div_click_13_listener($event) { i0.ɵɵrestoreView(_r27_1); var ctx_r28 = i0.ɵɵnextContext(); return ctx_r28.toggleMoreActions($event); });
11460
+ i0.ɵɵlistener("click", function CatalogRecipeCardComponent_div_4_Template_div_click_13_listener($event) { i0.ɵɵrestoreView(_r26_1); var ctx_r27 = i0.ɵɵnextContext(); return ctx_r27.toggleMoreActions($event); });
11440
11461
  i0.ɵɵelement(15, "ng-miam-icon", 27);
11441
11462
  i0.ɵɵelementEnd();
11442
11463
  i0.ɵɵelementEnd();
11443
11464
  i0.ɵɵelementEnd();
11444
11465
  }
11445
11466
  if (rf & 2) {
11446
- var _r19 = i0.ɵɵreference(9);
11467
+ var _r18 = i0.ɵɵreference(9);
11447
11468
  var ctx_r0 = i0.ɵɵnextContext();
11448
11469
  i0.ɵɵadvance(2);
11449
11470
  i0.ɵɵproperty("src", ctx_r0.recipe.attributes["media-url"], i0.ɵɵsanitizeUrl);
@@ -11454,7 +11475,7 @@
11454
11475
  i0.ɵɵadvance(1);
11455
11476
  i0.ɵɵproperty("ngIf", ctx_r0.recipe && ctx_r0.displayAddedOnPicture);
11456
11477
  i0.ɵɵadvance(1);
11457
- i0.ɵɵproperty("ngIf", ctx_r0.recipe)("ngIfElse", _r19);
11478
+ i0.ɵɵproperty("ngIf", ctx_r0.recipe)("ngIfElse", _r18);
11458
11479
  i0.ɵɵadvance(4);
11459
11480
  i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(12, 10, ctx_r0.userService.isLogged$));
11460
11481
  i0.ɵɵadvance(4);
@@ -11475,8 +11496,8 @@
11475
11496
  i0.ɵɵelement(0, "ng-miam-recipe-pricing", 38);
11476
11497
  }
11477
11498
  if (rf & 2) {
11478
- var ctx_r29 = i0.ɵɵnextContext(2);
11479
- i0.ɵɵproperty("recipe", ctx_r29.recipe)("serves", ctx_r29.recipe == null ? null : ctx_r29.recipe.modifiedGuests);
11499
+ var ctx_r28 = i0.ɵɵnextContext(2);
11500
+ i0.ɵɵproperty("recipe", ctx_r28.recipe)("serves", ctx_r28.recipe == null ? null : ctx_r28.recipe.modifiedGuests);
11480
11501
  }
11481
11502
  }
11482
11503
  function CatalogRecipeCardComponent_div_9_Template(rf, ctx) {
@@ -11491,35 +11512,22 @@
11491
11512
  i0.ɵɵproperty("ngIf", ctx_r3.isPriceDisplayed);
11492
11513
  }
11493
11514
  }
11494
- function CatalogRecipeCardComponent_span_12_Template(rf, ctx) {
11495
- if (rf & 1) {
11496
- i0.ɵɵelementStart(0, "span");
11497
- i0.ɵɵtext(1);
11498
- i0.ɵɵpipe(2, "async");
11499
- i0.ɵɵelementEnd();
11500
- }
11501
- if (rf & 2) {
11502
- var ctx_r4 = i0.ɵɵnextContext();
11503
- i0.ɵɵadvance(1);
11504
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r4.groceriesListsService.recipeIsInList(ctx_r4.recipe == null ? null : ctx_r4.recipe.id)) ? "Voir le d\u00E9tail" : "Ajouter les ingr\u00E9dients", " ");
11505
- }
11506
- }
11507
- function CatalogRecipeCardComponent_ng_miam_icon_13_Template(rf, ctx) {
11515
+ function CatalogRecipeCardComponent_ng_miam_icon_15_Template(rf, ctx) {
11508
11516
  if (rf & 1) {
11509
11517
  i0.ɵɵelement(0, "ng-miam-icon", 39);
11510
11518
  i0.ɵɵpipe(1, "async");
11511
11519
  }
11512
11520
  if (rf & 2) {
11513
- var ctx_r5 = i0.ɵɵnextContext();
11514
- i0.ɵɵproperty("width", 16)("height", 16)("iconName", i0.ɵɵpipeBind1(1, 3, ctx_r5.groceriesListsService.recipeIsInList(ctx_r5.recipe == null ? null : ctx_r5.recipe.id)) ? ctx_r5.icon.CheckList : ctx_r5.icon.Cart);
11521
+ var ctx_r4 = i0.ɵɵnextContext();
11522
+ i0.ɵɵproperty("width", 16)("height", 16)("iconName", i0.ɵɵpipeBind1(1, 3, ctx_r4.groceriesListsService.recipeIsInList(ctx_r4.recipe == null ? null : ctx_r4.recipe.id)) ? ctx_r4.icon.CheckList : ctx_r4.icon.Cart);
11515
11523
  }
11516
11524
  }
11517
- function CatalogRecipeCardComponent_ng_template_14_Template(rf, ctx) {
11525
+ function CatalogRecipeCardComponent_ng_template_16_Template(rf, ctx) {
11518
11526
  if (rf & 1) {
11519
11527
  i0.ɵɵelement(0, "ng-miam-loader");
11520
11528
  }
11521
11529
  }
11522
- function CatalogRecipeCardComponent_div_17_Template(rf, ctx) {
11530
+ function CatalogRecipeCardComponent_div_19_Template(rf, ctx) {
11523
11531
  if (rf & 1) {
11524
11532
  i0.ɵɵelementStart(0, "div", 40);
11525
11533
  i0.ɵɵelement(1, "ng-miam-icon", 41);
@@ -11529,57 +11537,57 @@
11529
11537
  i0.ɵɵelementEnd();
11530
11538
  }
11531
11539
  if (rf & 2) {
11532
- var ctx_r8 = i0.ɵɵnextContext();
11540
+ var ctx_r7 = i0.ɵɵnextContext();
11533
11541
  i0.ɵɵadvance(1);
11534
- i0.ɵɵproperty("iconName", ctx_r8.icon.Time);
11542
+ i0.ɵɵproperty("iconName", ctx_r7.icon.Time);
11535
11543
  i0.ɵɵadvance(2);
11536
- i0.ɵɵtextInterpolate(ctx_r8.recipe == null ? null : ctx_r8.recipe.totalTime);
11544
+ i0.ɵɵtextInterpolate(ctx_r7.recipe == null ? null : ctx_r7.recipe.totalTime);
11537
11545
  }
11538
11546
  }
11539
- function CatalogRecipeCardComponent_div_18_ng_container_2_Template(rf, ctx) {
11547
+ function CatalogRecipeCardComponent_div_20_ng_container_2_Template(rf, ctx) {
11540
11548
  if (rf & 1) {
11541
11549
  i0.ɵɵelementContainerStart(0);
11542
11550
  i0.ɵɵelement(1, "ng-miam-icon", 47);
11543
11551
  i0.ɵɵelementContainerEnd();
11544
11552
  }
11545
11553
  if (rf & 2) {
11546
- var ctx_r30 = i0.ɵɵnextContext(2);
11554
+ var ctx_r29 = i0.ɵɵnextContext(2);
11547
11555
  i0.ɵɵadvance(1);
11548
- i0.ɵɵproperty("width", 39)("height", 18)("iconName", ctx_r30.icon.DifficultyMedium);
11556
+ i0.ɵɵproperty("width", 39)("height", 18)("iconName", ctx_r29.icon.DifficultyMedium);
11549
11557
  }
11550
11558
  }
11551
- function CatalogRecipeCardComponent_div_18_ng_container_3_Template(rf, ctx) {
11559
+ function CatalogRecipeCardComponent_div_20_ng_container_3_Template(rf, ctx) {
11552
11560
  if (rf & 1) {
11553
11561
  i0.ɵɵelementContainerStart(0);
11554
11562
  i0.ɵɵelement(1, "ng-miam-icon", 47);
11555
11563
  i0.ɵɵelementContainerEnd();
11556
11564
  }
11557
11565
  if (rf & 2) {
11558
- var ctx_r31 = i0.ɵɵnextContext(2);
11566
+ var ctx_r30 = i0.ɵɵnextContext(2);
11559
11567
  i0.ɵɵadvance(1);
11560
- i0.ɵɵproperty("width", 60)("height", 18)("iconName", ctx_r31.icon.DifficultyHigh);
11568
+ i0.ɵɵproperty("width", 60)("height", 18)("iconName", ctx_r30.icon.DifficultyHigh);
11561
11569
  }
11562
11570
  }
11563
- function CatalogRecipeCardComponent_div_18_ng_container_4_Template(rf, ctx) {
11571
+ function CatalogRecipeCardComponent_div_20_ng_container_4_Template(rf, ctx) {
11564
11572
  if (rf & 1) {
11565
11573
  i0.ɵɵelementContainerStart(0);
11566
11574
  i0.ɵɵelement(1, "ng-miam-icon", 47);
11567
11575
  i0.ɵɵelementContainerEnd();
11568
11576
  }
11569
11577
  if (rf & 2) {
11570
- var ctx_r32 = i0.ɵɵnextContext(2);
11578
+ var ctx_r31 = i0.ɵɵnextContext(2);
11571
11579
  i0.ɵɵadvance(1);
11572
- i0.ɵɵproperty("width", 18)("height", 18)("iconName", ctx_r32.icon.DifficultyLow);
11580
+ i0.ɵɵproperty("width", 18)("height", 18)("iconName", ctx_r31.icon.DifficultyLow);
11573
11581
  }
11574
11582
  }
11575
11583
  var _c1$6 = function (a0, a1, a2) { return { "easy": a0, "medium": a1, "hard": a2 }; };
11576
- function CatalogRecipeCardComponent_div_18_Template(rf, ctx) {
11584
+ function CatalogRecipeCardComponent_div_20_Template(rf, ctx) {
11577
11585
  if (rf & 1) {
11578
11586
  i0.ɵɵelementStart(0, "div", 43);
11579
11587
  i0.ɵɵelementContainerStart(1, 44);
11580
- i0.ɵɵtemplate(2, CatalogRecipeCardComponent_div_18_ng_container_2_Template, 2, 3, "ng-container", 45);
11581
- i0.ɵɵtemplate(3, CatalogRecipeCardComponent_div_18_ng_container_3_Template, 2, 3, "ng-container", 45);
11582
- i0.ɵɵtemplate(4, CatalogRecipeCardComponent_div_18_ng_container_4_Template, 2, 3, "ng-container", 46);
11588
+ i0.ɵɵtemplate(2, CatalogRecipeCardComponent_div_20_ng_container_2_Template, 2, 3, "ng-container", 45);
11589
+ i0.ɵɵtemplate(3, CatalogRecipeCardComponent_div_20_ng_container_3_Template, 2, 3, "ng-container", 45);
11590
+ i0.ɵɵtemplate(4, CatalogRecipeCardComponent_div_20_ng_container_4_Template, 2, 3, "ng-container", 46);
11583
11591
  i0.ɵɵelementContainerEnd();
11584
11592
  i0.ɵɵelementStart(5, "span", 42);
11585
11593
  i0.ɵɵtext(6);
@@ -11587,36 +11595,36 @@
11587
11595
  i0.ɵɵelementEnd();
11588
11596
  }
11589
11597
  if (rf & 2) {
11590
- var ctx_r9 = i0.ɵɵnextContext();
11591
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(5, _c1$6, (ctx_r9.recipe == null ? null : ctx_r9.recipe.difficulty) === 1, (ctx_r9.recipe == null ? null : ctx_r9.recipe.difficulty) === 2, (ctx_r9.recipe == null ? null : ctx_r9.recipe.difficulty) === 3));
11598
+ var ctx_r8 = i0.ɵɵnextContext();
11599
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(5, _c1$6, (ctx_r8.recipe == null ? null : ctx_r8.recipe.difficulty) === 1, (ctx_r8.recipe == null ? null : ctx_r8.recipe.difficulty) === 2, (ctx_r8.recipe == null ? null : ctx_r8.recipe.difficulty) === 3));
11592
11600
  i0.ɵɵadvance(1);
11593
- i0.ɵɵproperty("ngSwitch", ctx_r9.recipe == null ? null : ctx_r9.recipe.difficulty);
11601
+ i0.ɵɵproperty("ngSwitch", ctx_r8.recipe == null ? null : ctx_r8.recipe.difficulty);
11594
11602
  i0.ɵɵadvance(1);
11595
11603
  i0.ɵɵproperty("ngSwitchCase", 2);
11596
11604
  i0.ɵɵadvance(1);
11597
11605
  i0.ɵɵproperty("ngSwitchCase", 3);
11598
11606
  i0.ɵɵadvance(3);
11599
- i0.ɵɵtextInterpolate(ctx_r9.recipe == null ? null : ctx_r9.recipe.difficultyLabel);
11607
+ i0.ɵɵtextInterpolate(ctx_r8.recipe == null ? null : ctx_r8.recipe.difficultyLabel);
11600
11608
  }
11601
11609
  }
11602
- function CatalogRecipeCardComponent_ng_template_19_Template(rf, ctx) {
11610
+ function CatalogRecipeCardComponent_ng_template_21_Template(rf, ctx) {
11603
11611
  if (rf & 1) {
11604
11612
  i0.ɵɵelement(0, "ng-miam-skeleton", 34);
11605
11613
  }
11606
11614
  if (rf & 2) {
11607
- var ctx_r11 = i0.ɵɵnextContext();
11608
- i0.ɵɵproperty("type", ctx_r11.skeleton == null ? null : ctx_r11.skeleton.IconWithInfo);
11615
+ var ctx_r10 = i0.ɵɵnextContext();
11616
+ i0.ɵɵproperty("type", ctx_r10.skeleton == null ? null : ctx_r10.skeleton.IconWithInfo);
11609
11617
  }
11610
11618
  }
11611
- function CatalogRecipeCardComponent_ng_miam_actions_popin_21_Template(rf, ctx) {
11619
+ function CatalogRecipeCardComponent_ng_miam_actions_popin_23_Template(rf, ctx) {
11612
11620
  if (rf & 1) {
11613
- var _r34_1 = i0.ɵɵgetCurrentView();
11621
+ var _r33_1 = i0.ɵɵgetCurrentView();
11614
11622
  i0.ɵɵelementStart(0, "ng-miam-actions-popin", 48);
11615
- i0.ɵɵlistener("close", function CatalogRecipeCardComponent_ng_miam_actions_popin_21_Template_ng_miam_actions_popin_close_0_listener() { i0.ɵɵrestoreView(_r34_1); var ctx_r33 = i0.ɵɵnextContext(); return ctx_r33.closeMoreActions(); })("actionTriggered", function CatalogRecipeCardComponent_ng_miam_actions_popin_21_Template_ng_miam_actions_popin_actionTriggered_0_listener($event) { i0.ɵɵrestoreView(_r34_1); var ctx_r35 = i0.ɵɵnextContext(); return ctx_r35.actionTriggered.emit($event); });
11623
+ i0.ɵɵlistener("close", function CatalogRecipeCardComponent_ng_miam_actions_popin_23_Template_ng_miam_actions_popin_close_0_listener() { i0.ɵɵrestoreView(_r33_1); var ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.closeMoreActions(); })("actionTriggered", function CatalogRecipeCardComponent_ng_miam_actions_popin_23_Template_ng_miam_actions_popin_actionTriggered_0_listener($event) { i0.ɵɵrestoreView(_r33_1); var ctx_r34 = i0.ɵɵnextContext(); return ctx_r34.actionTriggered.emit($event); });
11616
11624
  i0.ɵɵelementEnd();
11617
11625
  }
11618
11626
  }
11619
- function CatalogRecipeCardComponent_ng_template_22_Template(rf, ctx) {
11627
+ function CatalogRecipeCardComponent_ng_template_24_Template(rf, ctx) {
11620
11628
  if (rf & 1) {
11621
11629
  i0.ɵɵelement(0, "ng-miam-cors-overlay");
11622
11630
  }
@@ -11729,7 +11737,7 @@
11729
11737
  if (rf & 1) {
11730
11738
  i0.ɵɵlistener("scroll", function CatalogRecipeCardComponent_scroll_HostBindingHandler() { return ctx.onScroll(); }, false, i0.ɵɵresolveWindow);
11731
11739
  }
11732
- }, inputs: { displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture" }, outputs: { actionTriggered: "actionTriggered" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 24, vars: 18, consts: [[1, "miam-catalog-recipe-card"], [1, "miam-catalog-recipe-card__header"], ["class", "miam-catalog-card__picture", 3, "click", 4, "ngIf", "ngIfElse"], ["pictSkeleton", ""], [1, "miam-catalog-card__attributes"], [1, "miam-catalog-recipe-card__attributes__control"], ["class", "miam-catalog-recipe-card__right__col__price", 4, "ngIf"], [1, "m-button-primary", 3, "disabled", "ngClass", "click"], [4, "ngIf"], [3, "width", "height", "iconName", 4, "ngIf", "ngIfElse"], ["addLoader", ""], [1, "miam-catalog-card__attributes__infos"], ["class", "miam-catalog-card__attributes__info recipe__total__time", 4, "ngIf", "ngIfElse"], ["class", "miam-catalog-card__attributes__info recipe__difficulty", 3, "ngClass", 4, "ngIf"], ["skeletonInfo", ""], [3, "close", "actionTriggered", 4, "ngIf"], ["cors", ""], [1, "miam-catalog-card__picture", 3, "click"], [1, "miam-catalog-card__picture__gradient"], ["loading", "lazy", 1, "miam-catalog-card__picture__img", 3, "src"], ["class", "miam-catalog-recipe-card__picture__video", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["textSkeleton", ""], [1, "miam-catalog-recipe-card__picture__actions"], ["width", "17", "height", "17", "class", "miam-catalog-recipe-card__actions__icon", 3, "recipe", 4, "ngIf"], [1, "miam-catalog-recipe-card__actions__icon", 3, "click"], ["miamMoreActions", ""], ["primaryColor", "var(--m-color-primary)", 3, "iconName"], [1, "miam-catalog-card__picture__sponsor", 3, "src"], [1, "miam-catalog-recipe-card__picture__video"], ["primaryColor", "black", 3, "iconName", "width", "height"], ["class", "miam-catalog-recipe-card__picture__tag", 4, "ngIf"], [1, "miam-catalog-recipe-card__picture__tag"], [1, "miam-catalog-recipe-card__attributes__title", 3, "click"], [3, "type"], ["width", "17", "height", "17", 1, "miam-catalog-recipe-card__actions__icon", 3, "recipe"], [1, "miam-catalog-recipe-card__right__col__price"], [3, "recipe", "serves", 4, "ngIf"], [3, "recipe", "serves"], [3, "width", "height", "iconName"], [1, "miam-catalog-card__attributes__info", "recipe__total__time"], ["width", "18", "height", "18", "primaryColor", "var(--m-catalog-card-details-color)", 3, "iconName"], [1, "miam-catalog-card__info__label"], [1, "miam-catalog-card__attributes__info", "recipe__difficulty", 3, "ngClass"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["primaryColor", "var(--m-catalog-card-details-color)", 3, "width", "height", "iconName"], [3, "close", "actionTriggered"]], template: function CatalogRecipeCardComponent_Template(rf, ctx) {
11740
+ }, inputs: { displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture" }, outputs: { actionTriggered: "actionTriggered" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 26, vars: 20, consts: [[1, "miam-catalog-recipe-card"], [1, "miam-catalog-recipe-card__header"], ["class", "miam-catalog-card__picture", 3, "click", 4, "ngIf", "ngIfElse"], ["pictSkeleton", ""], [1, "miam-catalog-card__attributes"], [1, "miam-catalog-recipe-card__attributes__control"], ["class", "miam-catalog-recipe-card__right__col__price", 4, "ngIf"], [1, "m-button-primary", 3, "disabled", "ngClass", "click"], [3, "width", "height", "iconName", 4, "ngIf", "ngIfElse"], ["addLoader", ""], [1, "miam-catalog-card__attributes__infos"], ["class", "miam-catalog-card__attributes__info recipe__total__time", 4, "ngIf", "ngIfElse"], ["class", "miam-catalog-card__attributes__info recipe__difficulty", 3, "ngClass", 4, "ngIf"], ["skeletonInfo", ""], [3, "close", "actionTriggered", 4, "ngIf"], ["cors", ""], [1, "miam-catalog-card__picture", 3, "click"], [1, "miam-catalog-card__picture__gradient"], ["loading", "lazy", 1, "miam-catalog-card__picture__img", 3, "src"], [4, "ngIf"], ["class", "miam-catalog-recipe-card__picture__video", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["textSkeleton", ""], [1, "miam-catalog-recipe-card__picture__actions"], ["width", "17", "height", "17", "class", "miam-catalog-recipe-card__actions__icon", 3, "recipe", 4, "ngIf"], [1, "miam-catalog-recipe-card__actions__icon", 3, "click"], ["miamMoreActions", ""], ["primaryColor", "var(--m-color-primary)", 3, "iconName"], [1, "miam-catalog-card__picture__sponsor", 3, "src"], [1, "miam-catalog-recipe-card__picture__video"], ["primaryColor", "black", 3, "iconName", "width", "height"], ["class", "miam-catalog-recipe-card__picture__tag", 4, "ngIf"], [1, "miam-catalog-recipe-card__picture__tag"], [1, "miam-catalog-recipe-card__attributes__title", 3, "click"], [3, "type"], ["width", "17", "height", "17", 1, "miam-catalog-recipe-card__actions__icon", 3, "recipe"], [1, "miam-catalog-recipe-card__right__col__price"], [3, "recipe", "serves", 4, "ngIf"], [3, "recipe", "serves"], [3, "width", "height", "iconName"], [1, "miam-catalog-card__attributes__info", "recipe__total__time"], ["width", "18", "height", "18", "primaryColor", "var(--m-catalog-card-details-color)", 3, "iconName"], [1, "miam-catalog-card__info__label"], [1, "miam-catalog-card__attributes__info", "recipe__difficulty", 3, "ngClass"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["primaryColor", "var(--m-catalog-card-details-color)", 3, "width", "height", "iconName"], [3, "close", "actionTriggered"]], template: function CatalogRecipeCardComponent_Template(rf, ctx) {
11733
11741
  if (rf & 1) {
11734
11742
  i0.ɵɵelementStart(0, "div", 0);
11735
11743
  i0.ɵɵelementStart(1, "div", 1);
@@ -11745,25 +11753,28 @@
11745
11753
  i0.ɵɵelementStart(10, "button", 7);
11746
11754
  i0.ɵɵlistener("click", function CatalogRecipeCardComponent_Template_button_click_10_listener() { return ctx.clickPrimary(); });
11747
11755
  i0.ɵɵpipe(11, "async");
11748
- i0.ɵɵtemplate(12, CatalogRecipeCardComponent_span_12_Template, 3, 3, "span", 8);
11749
- i0.ɵɵtemplate(13, CatalogRecipeCardComponent_ng_miam_icon_13_Template, 2, 5, "ng-miam-icon", 9);
11750
- i0.ɵɵtemplate(14, CatalogRecipeCardComponent_ng_template_14_Template, 1, 0, "ng-template", null, 10, i0.ɵɵtemplateRefExtractor);
11756
+ i0.ɵɵelementStart(12, "span");
11757
+ i0.ɵɵtext(13);
11758
+ i0.ɵɵpipe(14, "async");
11751
11759
  i0.ɵɵelementEnd();
11760
+ i0.ɵɵtemplate(15, CatalogRecipeCardComponent_ng_miam_icon_15_Template, 2, 5, "ng-miam-icon", 8);
11761
+ i0.ɵɵtemplate(16, CatalogRecipeCardComponent_ng_template_16_Template, 1, 0, "ng-template", null, 9, i0.ɵɵtemplateRefExtractor);
11752
11762
  i0.ɵɵelementEnd();
11753
- i0.ɵɵelementStart(16, "div", 11);
11754
- i0.ɵɵtemplate(17, CatalogRecipeCardComponent_div_17_Template, 4, 2, "div", 12);
11755
- i0.ɵɵtemplate(18, CatalogRecipeCardComponent_div_18_Template, 7, 9, "div", 13);
11756
- i0.ɵɵtemplate(19, CatalogRecipeCardComponent_ng_template_19_Template, 1, 1, "ng-template", null, 14, i0.ɵɵtemplateRefExtractor);
11763
+ i0.ɵɵelementEnd();
11764
+ i0.ɵɵelementStart(18, "div", 10);
11765
+ i0.ɵɵtemplate(19, CatalogRecipeCardComponent_div_19_Template, 4, 2, "div", 11);
11766
+ i0.ɵɵtemplate(20, CatalogRecipeCardComponent_div_20_Template, 7, 9, "div", 12);
11767
+ i0.ɵɵtemplate(21, CatalogRecipeCardComponent_ng_template_21_Template, 1, 1, "ng-template", null, 13, i0.ɵɵtemplateRefExtractor);
11757
11768
  i0.ɵɵelementEnd();
11758
11769
  i0.ɵɵelementEnd();
11759
- i0.ɵɵtemplate(21, CatalogRecipeCardComponent_ng_miam_actions_popin_21_Template, 1, 0, "ng-miam-actions-popin", 15);
11770
+ i0.ɵɵtemplate(23, CatalogRecipeCardComponent_ng_miam_actions_popin_23_Template, 1, 0, "ng-miam-actions-popin", 14);
11760
11771
  i0.ɵɵelementEnd();
11761
- i0.ɵɵtemplate(22, CatalogRecipeCardComponent_ng_template_22_Template, 1, 0, "ng-template", null, 16, i0.ɵɵtemplateRefExtractor);
11772
+ i0.ɵɵtemplate(24, CatalogRecipeCardComponent_ng_template_24_Template, 1, 0, "ng-template", null, 15, i0.ɵɵtemplateRefExtractor);
11762
11773
  }
11763
11774
  if (rf & 2) {
11764
11775
  var _r1 = i0.ɵɵreference(6);
11765
- var _r6 = i0.ɵɵreference(15);
11766
- var _r10 = i0.ɵɵreference(20);
11776
+ var _r5 = i0.ɵɵreference(17);
11777
+ var _r9 = i0.ɵɵreference(22);
11767
11778
  i0.ɵɵadvance(3);
11768
11779
  i0.ɵɵtextInterpolate1(" ", ctx.headerText, "");
11769
11780
  i0.ɵɵadvance(1);
@@ -11771,13 +11782,13 @@
11771
11782
  i0.ɵɵadvance(5);
11772
11783
  i0.ɵɵproperty("ngIf", ctx.recipe && ctx.displayPricing);
11773
11784
  i0.ɵɵadvance(1);
11774
- i0.ɵɵproperty("disabled", !ctx.recipe)("ngClass", i0.ɵɵpureFunction2(15, _c2$1, ctx.addButtonLoading, i0.ɵɵpipeBind1(11, 13, ctx.groceriesListsService.recipeIsInList(ctx.recipe == null ? null : ctx.recipe.id))));
11785
+ i0.ɵɵproperty("disabled", !ctx.recipe)("ngClass", i0.ɵɵpureFunction2(17, _c2$1, ctx.addButtonLoading, i0.ɵɵpipeBind1(11, 13, ctx.groceriesListsService.recipeIsInList(ctx.recipe == null ? null : ctx.recipe.id))));
11786
+ i0.ɵɵadvance(3);
11787
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(14, 15, ctx.groceriesListsService.recipeIsInList(ctx.recipe == null ? null : ctx.recipe.id)) ? "Voir le d\u00E9tail" : "Ajouter les ingr\u00E9dients", " ");
11775
11788
  i0.ɵɵadvance(2);
11776
- i0.ɵɵproperty("ngIf", !ctx.displayPricing);
11777
- i0.ɵɵadvance(1);
11778
- i0.ɵɵproperty("ngIf", !ctx.addButtonLoading)("ngIfElse", _r6);
11789
+ i0.ɵɵproperty("ngIf", !ctx.addButtonLoading)("ngIfElse", _r5);
11779
11790
  i0.ɵɵadvance(4);
11780
- i0.ɵɵproperty("ngIf", ctx.recipe)("ngIfElse", _r10);
11791
+ i0.ɵɵproperty("ngIf", ctx.recipe)("ngIfElse", _r9);
11781
11792
  i0.ɵɵadvance(1);
11782
11793
  i0.ɵɵproperty("ngIf", ctx.recipe);
11783
11794
  i0.ɵɵadvance(3);
@@ -11853,7 +11864,8 @@
11853
11864
  }
11854
11865
  if (rf & 2) {
11855
11866
  var recipe_r8 = ctx.$implicit;
11856
- i0.ɵɵproperty("recipe", recipe_r8);
11867
+ var ctx_r4 = i0.ɵɵnextContext(2);
11868
+ i0.ɵɵproperty("recipe", recipe_r8)("displayPricing", ctx_r4.displayPricing);
11857
11869
  }
11858
11870
  }
11859
11871
  function CatalogCategoryComponent_div_0_ng_miam_catalog_article_card_18_Template(rf, ctx) {
@@ -11922,7 +11934,7 @@
11922
11934
  i0.ɵɵelementStart(13, "div", 11, 12);
11923
11935
  i0.ɵɵtemplate(15, CatalogCategoryComponent_div_0_div_15_Template, 4, 0, "div", 13);
11924
11936
  i0.ɵɵpipe(16, "async");
11925
- i0.ɵɵtemplate(17, CatalogCategoryComponent_div_0_ng_miam_catalog_recipe_card_17_Template, 1, 1, "ng-miam-catalog-recipe-card", 14);
11937
+ i0.ɵɵtemplate(17, CatalogCategoryComponent_div_0_ng_miam_catalog_recipe_card_17_Template, 1, 2, "ng-miam-catalog-recipe-card", 14);
11926
11938
  i0.ɵɵtemplate(18, CatalogCategoryComponent_div_0_ng_miam_catalog_article_card_18_Template, 1, 1, "ng-miam-catalog-article-card", 15);
11927
11939
  i0.ɵɵelementEnd();
11928
11940
  i0.ɵɵtemplate(19, CatalogCategoryComponent_div_0_div_19_Template, 2, 1, "div", 16);
@@ -12123,7 +12135,7 @@
12123
12135
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.categoryCards = _t.first);
12124
12136
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCards = _t);
12125
12137
  }
12126
- }, inputs: { filters: "filters", title: "title", subtitle: "subtitle", maxRecipeNumber: "maxRecipeNumber", modifiedGuests: "modifiedGuests" }, outputs: { displayList: "displayList", loading: "loading" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "miam-catalog-category", 4, "ngIf"], [1, "miam-catalog-category"], [1, "miam-catalog-category__header"], [1, "miam-catalog-category__left"], [1, "miam-catalog-category__title", 3, "click"], [1, "miam-catalog-category__subtitle"], [1, "miam-catalog-category__right"], [1, "miam-catalog-category__link", 3, "click"], ["height", "20", "width", "20", "primaryColor", "var(--m-color-primary)", 3, "iconName", "click"], [1, "miam-catalog-category__content"], ["categoryContent", ""], [1, "miam-catalog-category__cards", 3, "ngStyle"], ["categoryCards", ""], ["class", "miam-catalog-category__loader", 4, "ngIf"], [3, "recipe", 4, "ngFor", "ngForOf"], [3, "article", 4, "ngFor", "ngForOf"], ["class", "miam-catalog-category__slider__left", 3, "click", 4, "ngIf"], ["class", "miam-catalog-category__slider__right", 3, "click", 4, "ngIf"], [1, "miam-catalog-category__loader"], [3, "recipe"], [3, "article"], [1, "miam-catalog-category__slider__left", 3, "click"], ["height", "56", "width", "56", "primaryColor", "var(--m-color-white)", 3, "iconName"], [1, "miam-catalog-category__slider__right", 3, "click"]], template: function CatalogCategoryComponent_Template(rf, ctx) {
12138
+ }, inputs: { filters: "filters", title: "title", subtitle: "subtitle", maxRecipeNumber: "maxRecipeNumber", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing" }, outputs: { displayList: "displayList", loading: "loading" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "miam-catalog-category", 4, "ngIf"], [1, "miam-catalog-category"], [1, "miam-catalog-category__header"], [1, "miam-catalog-category__left"], [1, "miam-catalog-category__title", 3, "click"], [1, "miam-catalog-category__subtitle"], [1, "miam-catalog-category__right"], [1, "miam-catalog-category__link", 3, "click"], ["height", "20", "width", "20", "primaryColor", "var(--m-color-primary)", 3, "iconName", "click"], [1, "miam-catalog-category__content"], ["categoryContent", ""], [1, "miam-catalog-category__cards", 3, "ngStyle"], ["categoryCards", ""], ["class", "miam-catalog-category__loader", 4, "ngIf"], [3, "recipe", "displayPricing", 4, "ngFor", "ngForOf"], [3, "article", 4, "ngFor", "ngForOf"], ["class", "miam-catalog-category__slider__left", 3, "click", 4, "ngIf"], ["class", "miam-catalog-category__slider__right", 3, "click", 4, "ngIf"], [1, "miam-catalog-category__loader"], [3, "recipe", "displayPricing"], [3, "article"], [1, "miam-catalog-category__slider__left", 3, "click"], ["height", "56", "width", "56", "primaryColor", "var(--m-color-white)", 3, "iconName"], [1, "miam-catalog-category__slider__right", 3, "click"]], template: function CatalogCategoryComponent_Template(rf, ctx) {
12127
12139
  if (rf & 1) {
12128
12140
  i0.ɵɵtemplate(0, CatalogCategoryComponent_div_0_Template, 21, 13, "div", 0);
12129
12141
  }
@@ -12151,6 +12163,8 @@
12151
12163
  type: i0.Input
12152
12164
  }], modifiedGuests: [{
12153
12165
  type: i0.Input
12166
+ }], displayPricing: [{
12167
+ type: i0.Input
12154
12168
  }], displayList: [{
12155
12169
  type: i0.Output
12156
12170
  }], loading: [{
@@ -12555,7 +12569,8 @@
12555
12569
  }
12556
12570
  if (rf & 2) {
12557
12571
  var recipe_r14 = ctx.$implicit;
12558
- i0.ɵɵproperty("recipe", recipe_r14);
12572
+ var ctx_r2 = i0.ɵɵnextContext();
12573
+ i0.ɵɵproperty("recipe", recipe_r14)("displayPricing", ctx_r2.displayPricing);
12559
12574
  }
12560
12575
  }
12561
12576
  function CatalogListComponent_ng_miam_catalog_article_card_5_Template(rf, ctx) {
@@ -12776,13 +12791,13 @@
12776
12791
  var _t;
12777
12792
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCards = _t);
12778
12793
  }
12779
- }, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests" }, outputs: { retrievedRecipes: "retrievedRecipes", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0.ɵɵNgOnChangesFeature], decls: 9, vars: 9, consts: [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], [3, "recipe", "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"], [4, "ngIf"], [1, "miam-catalog-list__notFound__title2"], [1, "miam-catalog-list__card", 3, "clicked"], [3, "recipe", "actionTriggered"], [3, "article"], [1, "miam-catalog-list__loader"]], template: function CatalogListComponent_Template(rf, ctx) {
12794
+ }, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing" }, outputs: { retrievedRecipes: "retrievedRecipes", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0.ɵɵNgOnChangesFeature], decls: 9, vars: 9, consts: [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], [3, "recipe", "displayPricing", "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"], [4, "ngIf"], [1, "miam-catalog-list__notFound__title2"], [1, "miam-catalog-list__card", 3, "clicked"], [3, "recipe", "displayPricing", "actionTriggered"], [3, "article"], [1, "miam-catalog-list__loader"]], template: function CatalogListComponent_Template(rf, ctx) {
12780
12795
  if (rf & 1) {
12781
12796
  i0.ɵɵelementStart(0, "div", 0);
12782
12797
  i0.ɵɵtemplate(1, CatalogListComponent_div_1_Template, 7, 5, "div", 1);
12783
12798
  i0.ɵɵpipe(2, "async");
12784
12799
  i0.ɵɵtemplate(3, CatalogListComponent_ng_miam_card_create_recipe_3_Template, 1, 0, "ng-miam-card-create-recipe", 2);
12785
- i0.ɵɵtemplate(4, CatalogListComponent_ng_miam_catalog_recipe_card_4_Template, 1, 1, "ng-miam-catalog-recipe-card", 3);
12800
+ i0.ɵɵtemplate(4, CatalogListComponent_ng_miam_catalog_recipe_card_4_Template, 1, 2, "ng-miam-catalog-recipe-card", 3);
12786
12801
  i0.ɵɵtemplate(5, CatalogListComponent_ng_miam_catalog_article_card_5_Template, 1, 1, "ng-miam-catalog-article-card", 4);
12787
12802
  i0.ɵɵtemplate(6, CatalogListComponent_div_6_Template, 4, 0, "div", 5);
12788
12803
  i0.ɵɵpipe(7, "async");
@@ -12820,6 +12835,8 @@
12820
12835
  type: i0.Input
12821
12836
  }], modifiedGuests: [{
12822
12837
  type: i0.Input
12838
+ }], displayPricing: [{
12839
+ type: i0.Input
12823
12840
  }], retrievedRecipes: [{
12824
12841
  type: i0.Output
12825
12842
  }], filterRemoved: [{
@@ -15370,9 +15387,9 @@
15370
15387
  i0.ɵɵadvance(2);
15371
15388
  i0.ɵɵtextInterpolate(ctx_r5.assessTitle());
15372
15389
  i0.ɵɵadvance(1);
15373
- i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(6, 4, ctx_r5.canDisplayCreationButton()));
15390
+ i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(6, 5, ctx_r5.canDisplayCreationButton()));
15374
15391
  i0.ɵɵadvance(2);
15375
- i0.ɵɵproperty("filters", ctx_r5.filters);
15392
+ i0.ɵɵproperty("filters", ctx_r5.filters)("displayPricing", ctx_r5.displayPricing);
15376
15393
  }
15377
15394
  }
15378
15395
  function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_div_2_Template(rf, ctx) {
@@ -15395,8 +15412,9 @@
15395
15412
  if (rf & 2) {
15396
15413
  var category_r19 = ctx.$implicit;
15397
15414
  var i_r20 = ctx.index;
15415
+ var ctx_r18 = i0.ɵɵnextContext(4);
15398
15416
  i0.ɵɵadvance(1);
15399
- i0.ɵɵproperty("title", category_r19.title)("subtitle", category_r19.subtitle)("filters", category_r19.filters);
15417
+ i0.ɵɵproperty("title", category_r19.title)("subtitle", category_r19.subtitle)("filters", category_r19.filters)("displayPricing", ctx_r18.displayPricing);
15400
15418
  i0.ɵɵadvance(1);
15401
15419
  i0.ɵɵproperty("ngIf", i_r20 === 0);
15402
15420
  }
@@ -15404,7 +15422,7 @@
15404
15422
  function RecipeCatalogComponent_div_2_ng_template_7_div_0_Template(rf, ctx) {
15405
15423
  if (rf & 1) {
15406
15424
  i0.ɵɵelementStart(0, "div", 23);
15407
- i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template, 3, 4, "ng-container", 24);
15425
+ i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template, 3, 5, "ng-container", 24);
15408
15426
  i0.ɵɵelementEnd();
15409
15427
  }
15410
15428
  if (rf & 2) {
@@ -15432,7 +15450,7 @@
15432
15450
  i0.ɵɵpipe(3, "async");
15433
15451
  i0.ɵɵelementEnd();
15434
15452
  i0.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_4_Template, 5, 3, "div", 7);
15435
- i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_Template, 8, 6, "div", 8);
15453
+ i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_Template, 8, 7, "div", 8);
15436
15454
  i0.ɵɵelementEnd();
15437
15455
  i0.ɵɵelementStart(6, "ng-miam-recipe-filters", 9);
15438
15456
  i0.ɵɵlistener("filterChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterChanged_6_listener($event) { i0.ɵɵrestoreView(_r25_1); var ctx_r30 = i0.ɵɵnextContext(); return ctx_r30.updateFilters($event); })("filterCollapsed", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterCollapsed_6_listener() { i0.ɵɵrestoreView(_r25_1); var ctx_r31 = i0.ɵɵnextContext(); return ctx_r31.onFilterCollapsed(); })("preferencesChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_preferencesChanged_6_listener() { i0.ɵɵrestoreView(_r25_1); var ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.reloadPackages(); });
@@ -15483,6 +15501,7 @@
15483
15501
  this.initialRoute = '';
15484
15502
  this.filtersPosition = 'left';
15485
15503
  this.homeLabel = 'Idées repas';
15504
+ this.displayPricing = false;
15486
15505
  this.isFilterCollapsed = true;
15487
15506
  this.displayHomePage = true;
15488
15507
  this.icon = exports.Icon;
@@ -15792,7 +15811,7 @@
15792
15811
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topAnchor = _t.first);
15793
15812
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.categoriesComp = _t);
15794
15813
  }
15795
- }, inputs: { headerPictureUrl: "headerPictureUrl", homeTitlePictureUrl: "homeTitlePictureUrl", initialRoute: "initialRoute", filtersPosition: "filtersPosition", homeLabel: "homeLabel" }, decls: 5, vars: 2, consts: [[1, "miam-catalog-anchor"], ["miamCatalogTopAnchor", ""], ["class", "miam-recipe-catalog", 4, "ngIf", "ngIfElse"], ["creationPage", ""], [1, "miam-recipe-catalog"], [1, "miam-recipe-catalog__content"], [3, "title", "homeLabel", "pictureUrl", "titlePictureUrl", "favoritesButtonHidden", "personalButtonHidden", "filterBadgeCount", "returnButtonPressed", "filterButtonPressed", "searchStringChanged", "personalButtonPressed", "favoritesButtonPressed"], ["class", "miam-recipe-catalog__content__myMeal__button", 3, "click", 4, "ngIf"], ["class", "miam-recipe-catalog__list", 4, "ngIf", "ngIfElse"], [3, "filters", "isFilterCollapsed", "filterToRemove", "position", "filterChanged", "filterCollapsed", "preferencesChanged"], ["categoriesComponents", ""], [1, "miam-recipe-catalog__content__myMeal__button", 3, "click"], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__first__icon", 3, "iconName"], [1, "miam-recipe-catalog__myMeal__button__text"], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__second__icon", 3, "iconName"], [1, "miam-recipe-catalog__list"], [1, "miam-recipe-catalog__content__title"], ["width", "24", "height", "24", 3, "iconName", "click"], ["class", "miam-recipe-catalog__list__create___button", 3, "click", 4, "ngIf"], [3, "filters", "filterRemoved", "recipeActionTriggered"], [1, "miam-recipe-catalog__list__create___button", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-primary)", 3, "iconName"], ["class", "miam-recipe-catalog__categories", 4, "ngIf"], [1, "miam-recipe-catalog__categories"], [4, "ngFor", "ngForOf"], [3, "title", "subtitle", "filters", "displayList"], ["class", "miam-recipe-catalog__explaine_banner", 4, "ngIf"], [1, "miam-recipe-catalog__explaine_banner"], [3, "recipe", "recipeChange", "canceled"]], template: function RecipeCatalogComponent_Template(rf, ctx) {
15814
+ }, inputs: { headerPictureUrl: "headerPictureUrl", homeTitlePictureUrl: "homeTitlePictureUrl", initialRoute: "initialRoute", filtersPosition: "filtersPosition", homeLabel: "homeLabel", displayPricing: "displayPricing" }, decls: 5, vars: 2, consts: [[1, "miam-catalog-anchor"], ["miamCatalogTopAnchor", ""], ["class", "miam-recipe-catalog", 4, "ngIf", "ngIfElse"], ["creationPage", ""], [1, "miam-recipe-catalog"], [1, "miam-recipe-catalog__content"], [3, "title", "homeLabel", "pictureUrl", "titlePictureUrl", "favoritesButtonHidden", "personalButtonHidden", "filterBadgeCount", "returnButtonPressed", "filterButtonPressed", "searchStringChanged", "personalButtonPressed", "favoritesButtonPressed"], ["class", "miam-recipe-catalog__content__myMeal__button", 3, "click", 4, "ngIf"], ["class", "miam-recipe-catalog__list", 4, "ngIf", "ngIfElse"], [3, "filters", "isFilterCollapsed", "filterToRemove", "position", "filterChanged", "filterCollapsed", "preferencesChanged"], ["categoriesComponents", ""], [1, "miam-recipe-catalog__content__myMeal__button", 3, "click"], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__first__icon", 3, "iconName"], [1, "miam-recipe-catalog__myMeal__button__text"], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__second__icon", 3, "iconName"], [1, "miam-recipe-catalog__list"], [1, "miam-recipe-catalog__content__title"], ["width", "24", "height", "24", 3, "iconName", "click"], ["class", "miam-recipe-catalog__list__create___button", 3, "click", 4, "ngIf"], [3, "filters", "displayPricing", "filterRemoved", "recipeActionTriggered"], [1, "miam-recipe-catalog__list__create___button", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-primary)", 3, "iconName"], ["class", "miam-recipe-catalog__categories", 4, "ngIf"], [1, "miam-recipe-catalog__categories"], [4, "ngFor", "ngForOf"], [3, "title", "subtitle", "filters", "displayPricing", "displayList"], ["class", "miam-recipe-catalog__explaine_banner", 4, "ngIf"], [1, "miam-recipe-catalog__explaine_banner"], [3, "recipe", "recipeChange", "canceled"]], template: function RecipeCatalogComponent_Template(rf, ctx) {
15796
15815
  if (rf & 1) {
15797
15816
  i0.ɵɵelement(0, "div", 0, 1);
15798
15817
  i0.ɵɵtemplate(2, RecipeCatalogComponent_div_2_Template, 9, 16, "div", 2);
@@ -15833,6 +15852,8 @@
15833
15852
  type: i0.Input
15834
15853
  }], homeLabel: [{
15835
15854
  type: i0.Input
15855
+ }], displayPricing: [{
15856
+ type: i0.Input
15836
15857
  }] });
15837
15858
  })();
15838
15859
 
@@ -15901,7 +15922,7 @@
15901
15922
  function RecipeDetailsInfosComponent_ng_container_4_Template(rf, ctx) {
15902
15923
  if (rf & 1) {
15903
15924
  i0.ɵɵelementContainerStart(0);
15904
- i0.ɵɵelement(1, "ng-miam-icon", 13);
15925
+ i0.ɵɵelement(1, "ng-miam-icon", 11);
15905
15926
  i0.ɵɵelementContainerEnd();
15906
15927
  }
15907
15928
  if (rf & 2) {
@@ -15913,7 +15934,7 @@
15913
15934
  function RecipeDetailsInfosComponent_ng_container_5_Template(rf, ctx) {
15914
15935
  if (rf & 1) {
15915
15936
  i0.ɵɵelementContainerStart(0);
15916
- i0.ɵɵelement(1, "ng-miam-icon", 13);
15937
+ i0.ɵɵelement(1, "ng-miam-icon", 11);
15917
15938
  i0.ɵɵelementContainerEnd();
15918
15939
  }
15919
15940
  if (rf & 2) {
@@ -15925,7 +15946,7 @@
15925
15946
  function RecipeDetailsInfosComponent_ng_container_6_Template(rf, ctx) {
15926
15947
  if (rf & 1) {
15927
15948
  i0.ɵɵelementContainerStart(0);
15928
- i0.ɵɵelement(1, "ng-miam-icon", 13);
15949
+ i0.ɵɵelement(1, "ng-miam-icon", 11);
15929
15950
  i0.ɵɵelementContainerEnd();
15930
15951
  }
15931
15952
  if (rf & 2) {
@@ -15934,13 +15955,13 @@
15934
15955
  i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r2.icon.DifficultyLow);
15935
15956
  }
15936
15957
  }
15937
- function RecipeDetailsInfosComponent_div_19_Template(rf, ctx) {
15958
+ function RecipeDetailsInfosComponent_div_17_Template(rf, ctx) {
15938
15959
  if (rf & 1) {
15939
- i0.ɵɵelementStart(0, "div", 14);
15960
+ i0.ɵɵelementStart(0, "div", 6);
15940
15961
  i0.ɵɵelement(1, "ng-miam-icon", 7);
15941
15962
  i0.ɵɵelementStart(2, "div", 8);
15942
15963
  i0.ɵɵelementStart(3, "span");
15943
- i0.ɵɵtext(4, "Pr\u00E9paration : ");
15964
+ i0.ɵɵtext(4, "Cuisson : ");
15944
15965
  i0.ɵɵelementEnd();
15945
15966
  i0.ɵɵelementStart(5, "span");
15946
15967
  i0.ɵɵtext(6);
@@ -15951,14 +15972,36 @@
15951
15972
  if (rf & 2) {
15952
15973
  var ctx_r3 = i0.ɵɵnextContext();
15953
15974
  i0.ɵɵadvance(1);
15954
- i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r3.icon.Preparation);
15975
+ i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r3.icon.Hot);
15955
15976
  i0.ɵɵadvance(5);
15956
- i0.ɵɵtextInterpolate(ctx_r3.recipe == null ? null : ctx_r3.recipe.preparationTime);
15977
+ i0.ɵɵtextInterpolate(ctx_r3.recipe == null ? null : ctx_r3.recipe.cookingTime);
15957
15978
  }
15958
15979
  }
15959
- function RecipeDetailsInfosComponent_div_20_Template(rf, ctx) {
15980
+ function RecipeDetailsInfosComponent_div_18_div_2_Template(rf, ctx) {
15960
15981
  if (rf & 1) {
15961
- i0.ɵɵelementStart(0, "div", 14);
15982
+ i0.ɵɵelementStart(0, "div", 16);
15983
+ i0.ɵɵelement(1, "ng-miam-icon", 7);
15984
+ i0.ɵɵelementStart(2, "div", 8);
15985
+ i0.ɵɵelementStart(3, "span");
15986
+ i0.ɵɵtext(4, "Pr\u00E9paration : ");
15987
+ i0.ɵɵelementEnd();
15988
+ i0.ɵɵelementStart(5, "span");
15989
+ i0.ɵɵtext(6);
15990
+ i0.ɵɵelementEnd();
15991
+ i0.ɵɵelementEnd();
15992
+ i0.ɵɵelementEnd();
15993
+ }
15994
+ if (rf & 2) {
15995
+ var ctx_r5 = i0.ɵɵnextContext(2);
15996
+ i0.ɵɵadvance(1);
15997
+ i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r5.icon.Preparation);
15998
+ i0.ɵɵadvance(5);
15999
+ i0.ɵɵtextInterpolate(ctx_r5.recipe == null ? null : ctx_r5.recipe.preparationTime);
16000
+ }
16001
+ }
16002
+ function RecipeDetailsInfosComponent_div_18_div_3_Template(rf, ctx) {
16003
+ if (rf & 1) {
16004
+ i0.ɵɵelementStart(0, "div", 16);
15962
16005
  i0.ɵɵelement(1, "ng-miam-icon", 7);
15963
16006
  i0.ɵɵelementStart(2, "div", 8);
15964
16007
  i0.ɵɵelementStart(3, "span");
@@ -15971,16 +16014,16 @@
15971
16014
  i0.ɵɵelementEnd();
15972
16015
  }
15973
16016
  if (rf & 2) {
15974
- var ctx_r4 = i0.ɵɵnextContext();
16017
+ var ctx_r6 = i0.ɵɵnextContext(2);
15975
16018
  i0.ɵɵadvance(1);
15976
- i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r4.icon.Hot);
16019
+ i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r6.icon.Hot);
15977
16020
  i0.ɵɵadvance(5);
15978
- i0.ɵɵtextInterpolate(ctx_r4.recipe == null ? null : ctx_r4.recipe.cookingTime);
16021
+ i0.ɵɵtextInterpolate(ctx_r6.recipe == null ? null : ctx_r6.recipe.cookingTime);
15979
16022
  }
15980
16023
  }
15981
- function RecipeDetailsInfosComponent_div_21_Template(rf, ctx) {
16024
+ function RecipeDetailsInfosComponent_div_18_div_4_Template(rf, ctx) {
15982
16025
  if (rf & 1) {
15983
- i0.ɵɵelementStart(0, "div", 14);
16026
+ i0.ɵɵelementStart(0, "div", 16);
15984
16027
  i0.ɵɵelement(1, "ng-miam-icon", 7);
15985
16028
  i0.ɵɵelementStart(2, "div", 8);
15986
16029
  i0.ɵɵelementStart(3, "span");
@@ -15993,51 +16036,74 @@
15993
16036
  i0.ɵɵelementEnd();
15994
16037
  }
15995
16038
  if (rf & 2) {
15996
- var ctx_r5 = i0.ɵɵnextContext();
16039
+ var ctx_r7 = i0.ɵɵnextContext(2);
15997
16040
  i0.ɵɵadvance(1);
15998
- i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r5.icon.Wait);
16041
+ i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r7.icon.Wait);
15999
16042
  i0.ɵɵadvance(5);
16000
- i0.ɵɵtextInterpolate(ctx_r5.recipe == null ? null : ctx_r5.recipe.restingTime);
16043
+ i0.ɵɵtextInterpolate(ctx_r7.recipe == null ? null : ctx_r7.recipe.restingTime);
16001
16044
  }
16002
16045
  }
16003
- function RecipeDetailsInfosComponent_div_22_div_1_img_1_Template(rf, ctx) {
16046
+ function RecipeDetailsInfosComponent_div_18_div_5_div_1_img_1_Template(rf, ctx) {
16004
16047
  if (rf & 1) {
16005
- i0.ɵɵelement(0, "img", 20);
16048
+ i0.ɵɵelement(0, "img", 22);
16006
16049
  }
16007
16050
  if (rf & 2) {
16008
- var tag_r8 = i0.ɵɵnextContext().$implicit;
16009
- i0.ɵɵproperty("src", tag_r8.attributes.icon, i0.ɵɵsanitizeUrl);
16051
+ var tag_r10 = i0.ɵɵnextContext().$implicit;
16052
+ i0.ɵɵproperty("src", tag_r10.attributes.icon, i0.ɵɵsanitizeUrl);
16010
16053
  }
16011
16054
  }
16012
- function RecipeDetailsInfosComponent_div_22_div_1_Template(rf, ctx) {
16055
+ function RecipeDetailsInfosComponent_div_18_div_5_div_1_Template(rf, ctx) {
16013
16056
  if (rf & 1) {
16014
- i0.ɵɵelementStart(0, "div", 17);
16015
- i0.ɵɵtemplate(1, RecipeDetailsInfosComponent_div_22_div_1_img_1_Template, 1, 1, "img", 18);
16016
- i0.ɵɵelementStart(2, "span", 19);
16057
+ i0.ɵɵelementStart(0, "div", 19);
16058
+ i0.ɵɵtemplate(1, RecipeDetailsInfosComponent_div_18_div_5_div_1_img_1_Template, 1, 1, "img", 20);
16059
+ i0.ɵɵelementStart(2, "span", 21);
16017
16060
  i0.ɵɵtext(3);
16018
16061
  i0.ɵɵelementEnd();
16019
16062
  i0.ɵɵelementEnd();
16020
16063
  }
16021
16064
  if (rf & 2) {
16022
- var tag_r8 = ctx.$implicit;
16023
- var ctx_r7 = i0.ɵɵnextContext(2);
16024
- i0.ɵɵproperty("ngClass", ctx_r7.tagClass(tag_r8));
16065
+ var tag_r10 = ctx.$implicit;
16066
+ var ctx_r9 = i0.ɵɵnextContext(3);
16067
+ i0.ɵɵproperty("ngClass", ctx_r9.tagClass(tag_r10));
16025
16068
  i0.ɵɵadvance(1);
16026
- i0.ɵɵproperty("ngIf", ctx_r7.displayTagsIcons);
16069
+ i0.ɵɵproperty("ngIf", ctx_r9.displayTagsIcons);
16027
16070
  i0.ɵɵadvance(2);
16028
- i0.ɵɵtextInterpolate1(" ", tag_r8.name, " ");
16071
+ i0.ɵɵtextInterpolate1(" ", tag_r10.name, " ");
16029
16072
  }
16030
16073
  }
16031
- function RecipeDetailsInfosComponent_div_22_Template(rf, ctx) {
16074
+ function RecipeDetailsInfosComponent_div_18_div_5_Template(rf, ctx) {
16032
16075
  if (rf & 1) {
16033
- i0.ɵɵelementStart(0, "div", 15);
16034
- i0.ɵɵtemplate(1, RecipeDetailsInfosComponent_div_22_div_1_Template, 4, 3, "div", 16);
16076
+ i0.ɵɵelementStart(0, "div", 17);
16077
+ i0.ɵɵtemplate(1, RecipeDetailsInfosComponent_div_18_div_5_div_1_Template, 4, 3, "div", 18);
16035
16078
  i0.ɵɵelementEnd();
16036
16079
  }
16037
16080
  if (rf & 2) {
16038
- var ctx_r6 = i0.ɵɵnextContext();
16081
+ var ctx_r8 = i0.ɵɵnextContext(2);
16082
+ i0.ɵɵadvance(1);
16083
+ i0.ɵɵproperty("ngForOf", ctx_r8.tags);
16084
+ }
16085
+ }
16086
+ function RecipeDetailsInfosComponent_div_18_Template(rf, ctx) {
16087
+ if (rf & 1) {
16088
+ i0.ɵɵelementStart(0, "div", 12);
16089
+ i0.ɵɵelementStart(1, "div", 13);
16090
+ i0.ɵɵtemplate(2, RecipeDetailsInfosComponent_div_18_div_2_Template, 7, 4, "div", 14);
16091
+ i0.ɵɵtemplate(3, RecipeDetailsInfosComponent_div_18_div_3_Template, 7, 4, "div", 14);
16092
+ i0.ɵɵtemplate(4, RecipeDetailsInfosComponent_div_18_div_4_Template, 7, 4, "div", 14);
16093
+ i0.ɵɵelementEnd();
16094
+ i0.ɵɵtemplate(5, RecipeDetailsInfosComponent_div_18_div_5_Template, 2, 1, "div", 15);
16095
+ i0.ɵɵelementEnd();
16096
+ }
16097
+ if (rf & 2) {
16098
+ var ctx_r4 = i0.ɵɵnextContext();
16099
+ i0.ɵɵadvance(2);
16100
+ i0.ɵɵproperty("ngIf", (ctx_r4.recipe == null ? null : ctx_r4.recipe.preparationTime) !== "-");
16039
16101
  i0.ɵɵadvance(1);
16040
- i0.ɵɵproperty("ngForOf", ctx_r6.tags);
16102
+ i0.ɵɵproperty("ngIf", (ctx_r4.recipe == null ? null : ctx_r4.recipe.cookingTime) !== "-");
16103
+ i0.ɵɵadvance(1);
16104
+ i0.ɵɵproperty("ngIf", (ctx_r4.recipe == null ? null : ctx_r4.recipe.restingTime) !== "-");
16105
+ i0.ɵɵadvance(1);
16106
+ i0.ɵɵproperty("ngIf", ctx_r4.displayTags);
16041
16107
  }
16042
16108
  }
16043
16109
  var RecipeDetailsInfosComponent = /** @class */ (function () {
@@ -16045,6 +16111,7 @@
16045
16111
  this.cdr = cdr;
16046
16112
  this.displayTags = false;
16047
16113
  this.displayTagsIcons = false;
16114
+ this.reduced = false;
16048
16115
  this.icon = exports.Icon;
16049
16116
  this.tags = [];
16050
16117
  this.tagTypeOrder = ['meal_type', 'ingredient_category', 'diet', 'equipment'];
@@ -16067,7 +16134,7 @@
16067
16134
  return RecipeDetailsInfosComponent;
16068
16135
  }());
16069
16136
  RecipeDetailsInfosComponent.ɵfac = function RecipeDetailsInfosComponent_Factory(t) { return new (t || RecipeDetailsInfosComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
16070
- RecipeDetailsInfosComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeDetailsInfosComponent, selectors: [["ng-miam-recipe-details-infos"]], inputs: { recipe: "recipe", displayTags: "displayTags", displayTagsIcons: "displayTagsIcons" }, features: [i0.ɵɵNgOnChangesFeature], decls: 23, vars: 14, consts: [[1, "miam-recipe-details-infos"], [1, "miam-recipe-details-infos__main"], [1, "miam-recipe-details-infos__difficulty"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [1, "miam-recipe-details-infos__time", "miam-recipe-details-infos__time__total"], ["primaryColor", "var(--m-color-black)", 3, "width", "height", "iconName"], [1, "miam-recipe-details-infos__time__text"], [1, "miam-recipe-details-infos__additional"], [1, "miam-recipe-details-infos__times"], ["class", "miam-recipe-details-infos__time", 4, "ngIf"], ["class", "miam-recipe-details__tags", 4, "ngIf"], [3, "width", "height", "iconName"], [1, "miam-recipe-details-infos__time"], [1, "miam-recipe-details__tags"], ["class", "miam-recipe-details__tag", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "miam-recipe-details__tag", 3, "ngClass"], ["class", "miam-recipe-details__tag__icon", 3, "src", 4, "ngIf"], [1, "miam-recipe-details__tag__name"], [1, "miam-recipe-details__tag__icon", 3, "src"]], template: function RecipeDetailsInfosComponent_Template(rf, ctx) {
16137
+ RecipeDetailsInfosComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeDetailsInfosComponent, selectors: [["ng-miam-recipe-details-infos"]], inputs: { recipe: "recipe", displayTags: "displayTags", displayTagsIcons: "displayTagsIcons", reduced: "reduced" }, features: [i0.ɵɵNgOnChangesFeature], decls: 19, vars: 12, consts: [[1, "miam-recipe-details-infos"], [1, "miam-recipe-details-infos__main"], [1, "miam-recipe-details-infos__difficulty"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [1, "miam-recipe-details-infos__time", "miam-recipe-details-infos__time__total"], ["primaryColor", "var(--m-color-black)", 3, "width", "height", "iconName"], [1, "miam-recipe-details-infos__time__text"], ["class", "miam-recipe-details-infos__time miam-recipe-details-infos__time__total", 4, "ngIf"], ["class", "miam-recipe-details-infos__additional", 4, "ngIf"], [3, "width", "height", "iconName"], [1, "miam-recipe-details-infos__additional"], [1, "miam-recipe-details-infos__times"], ["class", "miam-recipe-details-infos__time", 4, "ngIf"], ["class", "miam-recipe-details__tags", 4, "ngIf"], [1, "miam-recipe-details-infos__time"], [1, "miam-recipe-details__tags"], ["class", "miam-recipe-details__tag", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "miam-recipe-details__tag", 3, "ngClass"], ["class", "miam-recipe-details__tag__icon", 3, "src", 4, "ngIf"], [1, "miam-recipe-details__tag__name"], [1, "miam-recipe-details__tag__icon", 3, "src"]], template: function RecipeDetailsInfosComponent_Template(rf, ctx) {
16071
16138
  if (rf & 1) {
16072
16139
  i0.ɵɵelementStart(0, "div", 0);
16073
16140
  i0.ɵɵelementStart(1, "div", 1);
@@ -16093,15 +16160,9 @@
16093
16160
  i0.ɵɵelementEnd();
16094
16161
  i0.ɵɵelementEnd();
16095
16162
  i0.ɵɵelementEnd();
16163
+ i0.ɵɵtemplate(17, RecipeDetailsInfosComponent_div_17_Template, 7, 4, "div", 9);
16096
16164
  i0.ɵɵelementEnd();
16097
- i0.ɵɵelementStart(17, "div", 9);
16098
- i0.ɵɵelementStart(18, "div", 10);
16099
- i0.ɵɵtemplate(19, RecipeDetailsInfosComponent_div_19_Template, 7, 4, "div", 11);
16100
- i0.ɵɵtemplate(20, RecipeDetailsInfosComponent_div_20_Template, 7, 4, "div", 11);
16101
- i0.ɵɵtemplate(21, RecipeDetailsInfosComponent_div_21_Template, 7, 4, "div", 11);
16102
- i0.ɵɵelementEnd();
16103
- i0.ɵɵtemplate(22, RecipeDetailsInfosComponent_div_22_Template, 2, 1, "div", 12);
16104
- i0.ɵɵelementEnd();
16165
+ i0.ɵɵtemplate(18, RecipeDetailsInfosComponent_div_18_Template, 6, 4, "div", 10);
16105
16166
  i0.ɵɵelementEnd();
16106
16167
  }
16107
16168
  if (rf & 2) {
@@ -16112,19 +16173,15 @@
16112
16173
  i0.ɵɵadvance(1);
16113
16174
  i0.ɵɵproperty("ngSwitchCase", 3);
16114
16175
  i0.ɵɵadvance(3);
16115
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 12, ctx.recipe == null ? null : ctx.recipe.difficultyLabel));
16176
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 10, ctx.recipe == null ? null : ctx.recipe.difficultyLabel));
16116
16177
  i0.ɵɵadvance(3);
16117
16178
  i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx.icon.Time);
16118
16179
  i0.ɵɵadvance(5);
16119
16180
  i0.ɵɵtextInterpolate(ctx.recipe == null ? null : ctx.recipe.totalTime);
16120
- i0.ɵɵadvance(3);
16121
- i0.ɵɵproperty("ngIf", (ctx.recipe == null ? null : ctx.recipe.preparationTime) !== "-");
16122
16181
  i0.ɵɵadvance(1);
16123
- i0.ɵɵproperty("ngIf", (ctx.recipe == null ? null : ctx.recipe.cookingTime) !== "-");
16182
+ i0.ɵɵproperty("ngIf", ctx.reduced && (ctx.recipe == null ? null : ctx.recipe.cookingTime) !== "-");
16124
16183
  i0.ɵɵadvance(1);
16125
- i0.ɵɵproperty("ngIf", (ctx.recipe == null ? null : ctx.recipe.restingTime) !== "-");
16126
- i0.ɵɵadvance(1);
16127
- i0.ɵɵproperty("ngIf", ctx.displayTags);
16184
+ i0.ɵɵproperty("ngIf", !ctx.reduced);
16128
16185
  }
16129
16186
  }, directives: [i3.NgSwitch, i3.NgSwitchCase, i3.NgSwitchDefault, IconComponent, i3.NgIf, i3.NgForOf, i3.NgClass], pipes: [i3.TitleCasePipe], styles: [".miam-recipe-details-infos{align-items:center;background-color:var(--m-color-white);display:flex;flex-direction:column;justify-content:center;padding:40px 16px}@media (min-width:1023px) and (max-height:804px){.miam-recipe-details-infos{padding:17px 24px}}.miam-recipe-details-infos .miam-recipe-details-infos__time{align-items:center;display:flex;flex-direction:column;justify-content:center;min-width:120px;padding:0 8px}.miam-recipe-details-infos .miam-recipe-details-infos__time .miam-recipe-details-infos__time__text span{font-size:16px}.miam-recipe-details-infos .miam-recipe-details-infos__time .miam-recipe-details-infos__time__text span:last-child{font-weight:700}.miam-recipe-details-infos .miam-recipe-details-infos__time ng-miam-icon{margin-bottom:8px}.miam-recipe-details-infos .miam-recipe-details-infos__main{align-items:center;display:flex;flex-direction:row;justify-content:center}.miam-recipe-details-infos .miam-recipe-details-infos__main .miam-recipe-details-infos__difficulty{align-items:center;display:flex;flex-direction:column;justify-content:center;min-width:120px;padding:0 8px}.miam-recipe-details-infos .miam-recipe-details-infos__main .miam-recipe-details-infos__difficulty ng-miam-icon{margin-bottom:8px}.miam-recipe-details-infos .miam-recipe-details-infos__main .miam-recipe-details-infos__time__total .miam-recipe-details-infos__time__text span:first-child{display:none}.miam-recipe-details-infos .miam-recipe-details-infos__main .miam-recipe-details-infos__time__total .miam-recipe-details-infos__time__text span:last-child{font-weight:400}.miam-recipe-details-infos .miam-recipe-details-infos__additional{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-top:24px;max-height:150px;overflow:hidden;transition:var(--m-default-transition);width:100%}@media print{.miam-recipe-details-infos .miam-recipe-details-infos__additional{margin-top:24px;max-height:150px;opacity:1}}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details-infos__times{align-items:center;display:flex;justify-content:center;width:100%}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details-infos__times .miam-recipe-details-infos__time{flex:1;max-width:172px}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details-infos__times .miam-recipe-details-infos__time ng-miam-icon{display:none}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags{display:flex;flex-wrap:wrap;justify-content:center;margin-top:20px;width:100%}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags .miam-recipe-details__tag{background-color:var(--m-color-grey05);border-radius:4px;display:flex;margin:4px;padding:8px}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags .miam-recipe-details__tag .miam-recipe-details__tag__icon{height:16px;width:16px}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags .miam-recipe-details__tag .miam-recipe-details__tag__name{font-size:13px;line-height:16px}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags .miam-recipe-details__tag.meal_type{background-color:var(--m-color-tag-meal-type)}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags .miam-recipe-details__tag.ingredient_category{background-color:var(--m-color-tag-ingredient-category)}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags .miam-recipe-details__tag.equipment{background-color:var(--m-color-tag-equipment)}.miam-recipe-details-infos .miam-recipe-details-infos__additional .miam-recipe-details__tags .miam-recipe-details__tag.diet{background-color:var(--m-color-tag-diet)}"], encapsulation: 2, changeDetection: 0 });
16130
16187
  /*@__PURE__*/ (function () {
@@ -16143,13 +16200,15 @@
16143
16200
  type: i0.Input
16144
16201
  }], displayTagsIcons: [{
16145
16202
  type: i0.Input
16203
+ }], reduced: [{
16204
+ type: i0.Input
16146
16205
  }] });
16147
16206
  })();
16148
16207
 
16149
- function RecipeDetailsIngredientsComponent_div_9_div_1_Template(rf, ctx) {
16208
+ function RecipeDetailsIngredientsComponent_div_12_div_1_Template(rf, ctx) {
16150
16209
  if (rf & 1) {
16151
16210
  i0.ɵɵelementStart(0, "div");
16152
- i0.ɵɵelement(1, "img", 10);
16211
+ i0.ɵɵelement(1, "img", 11);
16153
16212
  i0.ɵɵelementEnd();
16154
16213
  }
16155
16214
  if (rf & 2) {
@@ -16160,15 +16219,15 @@
16160
16219
  }
16161
16220
  }
16162
16221
  var _c0$r = function (a0) { return { "checked": a0 }; };
16163
- function RecipeDetailsIngredientsComponent_div_9_Template(rf, ctx) {
16222
+ function RecipeDetailsIngredientsComponent_div_12_Template(rf, ctx) {
16164
16223
  if (rf & 1) {
16165
- i0.ɵɵelementStart(0, "div", 7);
16166
- i0.ɵɵtemplate(1, RecipeDetailsIngredientsComponent_div_9_div_1_Template, 2, 1, "div", 8);
16224
+ i0.ɵɵelementStart(0, "div", 8);
16225
+ i0.ɵɵtemplate(1, RecipeDetailsIngredientsComponent_div_12_div_1_Template, 2, 1, "div", 9);
16167
16226
  i0.ɵɵelementStart(2, "div");
16168
16227
  i0.ɵɵtext(3);
16169
16228
  i0.ɵɵpipe(4, "capitalizeFirstLetter");
16170
16229
  i0.ɵɵelementEnd();
16171
- i0.ɵɵelementStart(5, "div", 9);
16230
+ i0.ɵɵelementStart(5, "div", 10);
16172
16231
  i0.ɵɵtext(6);
16173
16232
  i0.ɵɵpipe(7, "readableFloatNumber");
16174
16233
  i0.ɵɵelementEnd();
@@ -16206,30 +16265,37 @@
16206
16265
  return RecipeDetailsIngredientsComponent;
16207
16266
  }());
16208
16267
  RecipeDetailsIngredientsComponent.ɵfac = function RecipeDetailsIngredientsComponent_Factory(t) { return new (t || RecipeDetailsIngredientsComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService)); };
16209
- RecipeDetailsIngredientsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeDetailsIngredientsComponent, selectors: [["ng-miam-recipe-details-ingredients"]], inputs: { recipe: "recipe", ingredientsPictures: "ingredientsPictures" }, outputs: { recipeChanged: "recipeChanged" }, decls: 10, vars: 5, consts: [[1, "miam-recipe-details-ingredients"], [1, "miam-recipe-details-ingredients__header"], [1, "miam-recipe-details-ingredients__counter"], [3, "counter", "counterChange"], [1, "miam-recipe-details-ingredients__counter__print"], [1, "miam-recipe-details-ingredients__list"], ["class", "miam-recipe-details-ingredients__row", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "miam-recipe-details-ingredients__row", 3, "ngClass"], [4, "ngIf"], [1, "miam-recipe-details-ingredients__row__qty"], [1, "miam-recipe-details-ingredients__row__picture", 3, "src"]], template: function RecipeDetailsIngredientsComponent_Template(rf, ctx) {
16268
+ RecipeDetailsIngredientsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeDetailsIngredientsComponent, selectors: [["ng-miam-recipe-details-ingredients"]], inputs: { recipe: "recipe", ingredientsPictures: "ingredientsPictures" }, outputs: { recipeChanged: "recipeChanged" }, decls: 13, vars: 5, consts: [[1, "miam-recipe-details-ingredients"], [1, "miam-recipe-details-ingredients__header"], [1, "miam-recipe-details-ingredients__header__title"], [1, "miam-recipe-details-ingredients__counter"], [3, "counter", "counterChange"], [1, "miam-recipe-details-ingredients__counter__print"], [1, "miam-recipe-details-ingredients__list"], ["class", "miam-recipe-details-ingredients__row", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "miam-recipe-details-ingredients__row", 3, "ngClass"], [4, "ngIf"], [1, "miam-recipe-details-ingredients__row__qty"], [1, "miam-recipe-details-ingredients__row__picture", 3, "src"]], template: function RecipeDetailsIngredientsComponent_Template(rf, ctx) {
16210
16269
  if (rf & 1) {
16211
16270
  i0.ɵɵelementStart(0, "div", 0);
16212
16271
  i0.ɵɵelementStart(1, "div", 1);
16213
- i0.ɵɵelementStart(2, "span");
16214
- i0.ɵɵtext(3);
16272
+ i0.ɵɵelementStart(2, "span", 2);
16273
+ i0.ɵɵelementStart(3, "span");
16274
+ i0.ɵɵtext(4);
16215
16275
  i0.ɵɵelementEnd();
16216
- i0.ɵɵelementStart(4, "div", 2);
16217
- i0.ɵɵelementStart(5, "ng-miam-counter-input", 3);
16218
- i0.ɵɵlistener("counterChange", function RecipeDetailsIngredientsComponent_Template_ng_miam_counter_input_counterChange_5_listener($event) { return ctx.updateGuests($event); });
16276
+ i0.ɵɵelementStart(5, "span");
16277
+ i0.ɵɵtext(6);
16219
16278
  i0.ɵɵelementEnd();
16220
- i0.ɵɵelementStart(6, "span", 4);
16221
- i0.ɵɵtext(7);
16222
16279
  i0.ɵɵelementEnd();
16280
+ i0.ɵɵelementStart(7, "div", 3);
16281
+ i0.ɵɵelementStart(8, "ng-miam-counter-input", 4);
16282
+ i0.ɵɵlistener("counterChange", function RecipeDetailsIngredientsComponent_Template_ng_miam_counter_input_counterChange_8_listener($event) { return ctx.updateGuests($event); });
16223
16283
  i0.ɵɵelementEnd();
16284
+ i0.ɵɵelementStart(9, "span", 5);
16285
+ i0.ɵɵtext(10);
16224
16286
  i0.ɵɵelementEnd();
16225
- i0.ɵɵelementStart(8, "div", 5);
16226
- i0.ɵɵtemplate(9, RecipeDetailsIngredientsComponent_div_9_Template, 8, 11, "div", 6);
16287
+ i0.ɵɵelementEnd();
16288
+ i0.ɵɵelementEnd();
16289
+ i0.ɵɵelementStart(11, "div", 6);
16290
+ i0.ɵɵtemplate(12, RecipeDetailsIngredientsComponent_div_12_Template, 8, 11, "div", 7);
16227
16291
  i0.ɵɵelementEnd();
16228
16292
  i0.ɵɵelementEnd();
16229
16293
  }
16230
16294
  if (rf & 2) {
16231
- i0.ɵɵadvance(3);
16232
- i0.ɵɵtextInterpolate2(" ", ctx.recipe == null ? null : ctx.recipe.modifiedIngredients.length, " ingr\u00E9dient", (ctx.recipe == null ? null : ctx.recipe.modifiedIngredients.length) > 1 ? "s" : "", " ");
16295
+ i0.ɵɵadvance(4);
16296
+ i0.ɵɵtextInterpolate1(" ", ctx.recipe == null ? null : ctx.recipe.modifiedIngredients.length, " ");
16297
+ i0.ɵɵadvance(2);
16298
+ i0.ɵɵtextInterpolate1(" ingr\u00E9dient", (ctx.recipe == null ? null : ctx.recipe.modifiedIngredients.length) > 1 ? "s" : "", " ");
16233
16299
  i0.ɵɵadvance(2);
16234
16300
  i0.ɵɵproperty("counter", (ctx.recipe == null ? null : ctx.recipe.modifiedGuests) || ctx.recipe.guests);
16235
16301
  i0.ɵɵadvance(2);
@@ -16237,7 +16303,7 @@
16237
16303
  i0.ɵɵadvance(2);
16238
16304
  i0.ɵɵproperty("ngForOf", ctx.recipe == null ? null : ctx.recipe.modifiedIngredients);
16239
16305
  }
16240
- }, directives: [CounterInputComponent, i3.NgForOf, i3.NgClass, i3.NgIf], pipes: [CapitalizeFirstLetterPipe, ReadableFloatNumberPipe], styles: [".miam-recipe-details-ingredients{display:flex;flex-direction:column}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header{border-bottom:1px solid var(--m-color-grey07);display:flex;flex-direction:row;justify-content:space-between;margin-bottom:16px;padding-bottom:12px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header span{color:var(--m-color-primary);font-size:21px;font-weight:700;line-height:24px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter{align-items:center;display:flex}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter ng-miam-counter-input .miam-counter-input__icon{margin-right:16px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter .miam-recipe-details-ingredients__counter__print{display:none}@media print{.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter ng-miam-counter-input{display:none}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter .miam-recipe-details-ingredients__counter__print{display:block}}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__list{background-color:var(--m-color-primary-light);border-radius:8px;display:flex;flex-direction:column;padding:4px 16px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__row{color:var(--m-color-black);display:flex;font-size:16px;justify-content:space-between;line-height:20px;padding:12px 0}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__row .miam-recipe-details-ingredients__row__qty{font-weight:700}"], encapsulation: 2, changeDetection: 0 });
16306
+ }, directives: [CounterInputComponent, i3.NgForOf, i3.NgClass, i3.NgIf], pipes: [CapitalizeFirstLetterPipe, ReadableFloatNumberPipe], styles: [".miam-recipe-details-ingredients{display:flex;flex-direction:column}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header{border-bottom:1px solid var(--m-color-grey07);display:flex;flex-direction:row;justify-content:space-between;margin-bottom:16px;padding-bottom:12px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__header__title{color:var(--m-color-primary);font-size:21px;font-weight:700;line-height:24px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter{align-items:center;display:flex}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter ng-miam-counter-input .miam-counter-input__icon{margin-right:16px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter .miam-recipe-details-ingredients__counter__print{display:none}@media print{.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter ng-miam-counter-input{display:none}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__header .miam-recipe-details-ingredients__counter .miam-recipe-details-ingredients__counter__print{display:block}}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__list{background-color:var(--m-color-primary-light);border-radius:8px;display:flex;flex-direction:column;padding:4px 16px}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__row{color:var(--m-color-black);display:flex;font-size:16px;justify-content:space-between;line-height:20px;padding:12px 0}.miam-recipe-details-ingredients .miam-recipe-details-ingredients__row .miam-recipe-details-ingredients__row__qty{font-weight:700}"], encapsulation: 2, changeDetection: 0 });
16241
16307
  /*@__PURE__*/ (function () {
16242
16308
  i0.ɵsetClassMetadata(RecipeDetailsIngredientsComponent, [{
16243
16309
  type: i0.Component,
@@ -16368,17 +16434,17 @@
16368
16434
  var _c0$t = ["topContainerImg"];
16369
16435
  function RecipeDetailsComponent_div_0_img_4_Template(rf, ctx) {
16370
16436
  if (rf & 1) {
16371
- i0.ɵɵelement(0, "img", 34);
16437
+ i0.ɵɵelement(0, "img", 37);
16372
16438
  }
16373
16439
  }
16374
16440
  function RecipeDetailsComponent_div_0_ng_template_5_Template(rf, ctx) {
16375
16441
  if (rf & 1) {
16376
- i0.ɵɵelement(0, "img", 35);
16442
+ i0.ɵɵelement(0, "img", 38);
16377
16443
  }
16378
16444
  }
16379
- function RecipeDetailsComponent_div_0_span_7_Template(rf, ctx) {
16445
+ function RecipeDetailsComponent_div_0_span_8_Template(rf, ctx) {
16380
16446
  if (rf & 1) {
16381
- i0.ɵɵelementStart(0, "span", 36);
16447
+ i0.ɵɵelementStart(0, "span");
16382
16448
  i0.ɵɵtext(1);
16383
16449
  i0.ɵɵelementEnd();
16384
16450
  }
@@ -16388,11 +16454,11 @@
16388
16454
  i0.ɵɵtextInterpolate1(" ", ctx_r7.recipe == null ? null : ctx_r7.recipe.attributes["title"], " ");
16389
16455
  }
16390
16456
  }
16391
- function RecipeDetailsComponent_div_0_ng_miam_addon_link_14_Template(rf, ctx) {
16457
+ function RecipeDetailsComponent_div_0_ng_miam_addon_link_15_Template(rf, ctx) {
16392
16458
  if (rf & 1) {
16393
- var _r20_1 = i0.ɵɵgetCurrentView();
16394
- i0.ɵɵelementStart(0, "ng-miam-addon-link", 37);
16395
- i0.ɵɵlistener("showAddon", function RecipeDetailsComponent_div_0_ng_miam_addon_link_14_Template_ng_miam_addon_link_showAddon_0_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(2); return ctx_r19.toggleAddon(); });
16459
+ var _r22_1 = i0.ɵɵgetCurrentView();
16460
+ i0.ɵɵelementStart(0, "ng-miam-addon-link", 39);
16461
+ i0.ɵɵlistener("showAddon", function RecipeDetailsComponent_div_0_ng_miam_addon_link_15_Template_ng_miam_addon_link_showAddon_0_listener() { i0.ɵɵrestoreView(_r22_1); var ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.toggleAddon(); });
16396
16462
  i0.ɵɵelementEnd();
16397
16463
  }
16398
16464
  if (rf & 2) {
@@ -16401,193 +16467,217 @@
16401
16467
  }
16402
16468
  }
16403
16469
  var _c1$d = function (a0, a1) { return { "sponsor": a0, "tags": a1 }; };
16404
- function RecipeDetailsComponent_div_0_img_17_Template(rf, ctx) {
16470
+ function RecipeDetailsComponent_div_0_img_18_Template(rf, ctx) {
16405
16471
  if (rf & 1) {
16406
- i0.ɵɵelement(0, "img", 38);
16472
+ i0.ɵɵelement(0, "img", 40);
16407
16473
  }
16408
16474
  if (rf & 2) {
16409
16475
  var ctx_r10 = i0.ɵɵnextContext(2);
16410
16476
  i0.ɵɵproperty("src", ctx_r10.recipe == null ? null : ctx_r10.recipe.attributes["media-url"], i0.ɵɵsanitizeUrl)("ngClass", i0.ɵɵpureFunction2(2, _c1$d, (ctx_r10.recipe == null ? null : ctx_r10.recipe.sponsors == null ? null : ctx_r10.recipe.sponsors.length) > 0, ctx_r10.displayTags && ctx_r10.recipe.relationships.tags.data.length > 0));
16411
16477
  }
16412
16478
  }
16413
- function RecipeDetailsComponent_div_0_youtube_player_18_Template(rf, ctx) {
16479
+ function RecipeDetailsComponent_div_0_youtube_player_19_Template(rf, ctx) {
16414
16480
  if (rf & 1) {
16415
- i0.ɵɵelement(0, "youtube-player", 39);
16481
+ i0.ɵɵelement(0, "youtube-player", 41);
16416
16482
  }
16417
16483
  if (rf & 2) {
16418
16484
  var ctx_r11 = i0.ɵɵnextContext(2);
16419
16485
  i0.ɵɵproperty("videoId", ctx_r11.recipe.videoId)("width", ctx_r11.playerWidth)("height", ctx_r11.playerHeight);
16420
16486
  }
16421
16487
  }
16422
- function RecipeDetailsComponent_div_0_ng_miam_like_button_21_Template(rf, ctx) {
16488
+ function RecipeDetailsComponent_div_0_ng_miam_like_button_22_Template(rf, ctx) {
16423
16489
  if (rf & 1) {
16424
- i0.ɵɵelement(0, "ng-miam-like-button", 40);
16490
+ i0.ɵɵelement(0, "ng-miam-like-button", 42);
16425
16491
  }
16426
16492
  if (rf & 2) {
16427
16493
  var ctx_r12 = i0.ɵɵnextContext(2);
16428
16494
  i0.ɵɵproperty("recipe", ctx_r12.recipe)("width", 24)("height", 24);
16429
16495
  }
16430
16496
  }
16431
- function RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_26_Template(rf, ctx) {
16497
+ function RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_27_Template(rf, ctx) {
16432
16498
  if (rf & 1) {
16433
- i0.ɵɵelement(0, "ng-miam-recipe-details-infos", 41);
16499
+ i0.ɵɵelement(0, "ng-miam-recipe-details-infos", 43);
16434
16500
  }
16435
16501
  if (rf & 2) {
16436
16502
  var ctx_r13 = i0.ɵɵnextContext(2);
16437
- i0.ɵɵproperty("recipe", ctx_r13.recipe)("displayTags", ctx_r13.displayTags)("displayTagsIcons", ctx_r13.displayTagsIcons);
16503
+ i0.ɵɵproperty("recipe", ctx_r13.recipe)("displayTags", ctx_r13.displayTags)("displayTagsIcons", ctx_r13.displayTagsIcons)("reduced", ctx_r13.stepsOnLeftSide);
16438
16504
  }
16439
16505
  }
16440
- function RecipeDetailsComponent_div_0_div_29_Template(rf, ctx) {
16506
+ function RecipeDetailsComponent_div_0_ng_miam_recipe_details_steps_28_Template(rf, ctx) {
16441
16507
  if (rf & 1) {
16442
- i0.ɵɵelementStart(0, "div", 42);
16443
- i0.ɵɵtext(1);
16444
- i0.ɵɵelementEnd();
16508
+ i0.ɵɵelement(0, "ng-miam-recipe-details-steps", 44);
16445
16509
  }
16446
16510
  if (rf & 2) {
16447
16511
  var ctx_r14 = i0.ɵɵnextContext(2);
16448
- i0.ɵɵadvance(1);
16449
- i0.ɵɵtextInterpolate1(" ", ctx_r14.recipe == null ? null : ctx_r14.recipe.attributes["title"], " ");
16512
+ i0.ɵɵproperty("recipe", ctx_r14.recipe);
16450
16513
  }
16451
16514
  }
16452
- function RecipeDetailsComponent_div_0_div_30_Template(rf, ctx) {
16515
+ function RecipeDetailsComponent_div_0_ng_miam_recipe_pricing_31_Template(rf, ctx) {
16453
16516
  if (rf & 1) {
16454
- i0.ɵɵelementStart(0, "div", 43);
16455
- i0.ɵɵtext(1);
16456
- i0.ɵɵelementEnd();
16517
+ i0.ɵɵelement(0, "ng-miam-recipe-pricing", 45);
16457
16518
  }
16458
16519
  if (rf & 2) {
16459
16520
  var ctx_r15 = i0.ɵɵnextContext(2);
16460
- i0.ɵɵadvance(1);
16461
- i0.ɵɵtextInterpolate1(" ", ctx_r15.recipe == null ? null : ctx_r15.recipe.attributes.description, " ");
16462
- }
16463
- }
16464
- function RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_31_Template(rf, ctx) {
16465
- if (rf & 1) {
16466
- i0.ɵɵelement(0, "ng-miam-recipe-details-infos", 41);
16467
- }
16468
- if (rf & 2) {
16469
- var ctx_r16 = i0.ɵɵnextContext(2);
16470
- i0.ɵɵproperty("recipe", ctx_r16.recipe)("displayTags", ctx_r16.displayTags)("displayTagsIcons", ctx_r16.displayTagsIcons);
16471
- }
16472
- }
16473
- function RecipeDetailsComponent_div_0_ng_miam_recipe_pricing_36_Template(rf, ctx) {
16474
- if (rf & 1) {
16475
- i0.ɵɵelement(0, "ng-miam-recipe-pricing", 44);
16476
- }
16477
- if (rf & 2) {
16478
- var ctx_r17 = i0.ɵɵnextContext(2);
16479
- i0.ɵɵproperty("recipe", ctx_r17.recipe)("serves", ctx_r17.recipe == null ? null : ctx_r17.recipe.modifiedGuests);
16521
+ i0.ɵɵproperty("recipe", ctx_r15.recipe)("serves", ctx_r15.recipe == null ? null : ctx_r15.recipe.modifiedGuests)("guestsText", ctx_r15.pricingGuestsText);
16480
16522
  }
16481
16523
  }
16482
- function RecipeDetailsComponent_div_0_div_37_div_2_ng_miam_icon_4_Template(rf, ctx) {
16524
+ function RecipeDetailsComponent_div_0_div_32_div_2_ng_miam_icon_4_Template(rf, ctx) {
16483
16525
  if (rf & 1) {
16484
- i0.ɵɵelement(0, "ng-miam-icon", 50);
16526
+ i0.ɵɵelement(0, "ng-miam-icon", 51);
16485
16527
  }
16486
16528
  if (rf & 2) {
16487
- var ctx_r24 = i0.ɵɵnextContext(4);
16488
- i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r24.icon.Cart);
16529
+ var ctx_r26 = i0.ɵɵnextContext(4);
16530
+ i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r26.icon.Cart);
16489
16531
  }
16490
16532
  }
16491
- function RecipeDetailsComponent_div_0_div_37_div_2_Template(rf, ctx) {
16533
+ function RecipeDetailsComponent_div_0_div_32_div_2_Template(rf, ctx) {
16492
16534
  if (rf & 1) {
16493
- i0.ɵɵelementStart(0, "div", 48);
16535
+ i0.ɵɵelementStart(0, "div", 49);
16494
16536
  i0.ɵɵelementStart(1, "span");
16495
16537
  i0.ɵɵtext(2);
16496
16538
  i0.ɵɵpipe(3, "async");
16497
16539
  i0.ɵɵelementEnd();
16498
- i0.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_37_div_2_ng_miam_icon_4_Template, 1, 3, "ng-miam-icon", 49);
16540
+ i0.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_32_div_2_ng_miam_icon_4_Template, 1, 3, "ng-miam-icon", 50);
16499
16541
  i0.ɵɵpipe(5, "async");
16500
16542
  i0.ɵɵelementEnd();
16501
16543
  }
16502
16544
  if (rf & 2) {
16503
- var ctx_r21 = i0.ɵɵnextContext(3);
16545
+ var ctx_r23 = i0.ɵɵnextContext(3);
16504
16546
  i0.ɵɵadvance(2);
16505
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, ctx_r21.groceriesListsService.recipeIsInList(ctx_r21.recipe == null ? null : ctx_r21.recipe.id)) ? "Voir les produits" : "Ajouter les ingr\u00E9dients", " ");
16547
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, ctx_r23.groceriesListsService.recipeIsInList(ctx_r23.recipe == null ? null : ctx_r23.recipe.id)) ? "Voir les produits" : "Ajouter les ingr\u00E9dients", " ");
16506
16548
  i0.ɵɵadvance(2);
16507
- i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(5, 4, ctx_r21.groceriesListsService.recipeIsInList(ctx_r21.recipe == null ? null : ctx_r21.recipe.id)));
16549
+ i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(5, 4, ctx_r23.groceriesListsService.recipeIsInList(ctx_r23.recipe == null ? null : ctx_r23.recipe.id)));
16508
16550
  }
16509
16551
  }
16510
- function RecipeDetailsComponent_div_0_div_37_ng_template_3_Template(rf, ctx) {
16552
+ function RecipeDetailsComponent_div_0_div_32_ng_template_3_Template(rf, ctx) {
16511
16553
  if (rf & 1) {
16512
16554
  i0.ɵɵelement(0, "ng-miam-loader");
16513
16555
  }
16514
16556
  }
16515
16557
  var _c2$4 = function (a0, a1) { return { "in-basket": a0, "loading": a1 }; };
16516
- function RecipeDetailsComponent_div_0_div_37_Template(rf, ctx) {
16558
+ function RecipeDetailsComponent_div_0_div_32_Template(rf, ctx) {
16517
16559
  if (rf & 1) {
16518
- var _r26_1 = i0.ɵɵgetCurrentView();
16519
- i0.ɵɵelementStart(0, "div", 45);
16520
- i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_37_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r26_1); var ctx_r25 = i0.ɵɵnextContext(2); return ctx_r25.clickPrimary(); });
16560
+ var _r28_1 = i0.ɵɵgetCurrentView();
16561
+ i0.ɵɵelementStart(0, "div", 46);
16562
+ i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_32_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r28_1); var ctx_r27 = i0.ɵɵnextContext(2); return ctx_r27.clickPrimary(); });
16521
16563
  i0.ɵɵpipe(1, "async");
16522
- i0.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_37_div_2_Template, 6, 6, "div", 46);
16523
- i0.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_37_ng_template_3_Template, 1, 0, "ng-template", null, 47, i0.ɵɵtemplateRefExtractor);
16564
+ i0.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_32_div_2_Template, 6, 6, "div", 47);
16565
+ i0.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_32_ng_template_3_Template, 1, 0, "ng-template", null, 48, i0.ɵɵtemplateRefExtractor);
16524
16566
  i0.ɵɵelementEnd();
16525
16567
  }
16526
16568
  if (rf & 2) {
16527
- var _r22 = i0.ɵɵreference(4);
16528
- var ctx_r18 = i0.ɵɵnextContext(2);
16529
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(5, _c2$4, i0.ɵɵpipeBind1(1, 3, ctx_r18.groceriesListsService.recipeIsInList(ctx_r18.recipe == null ? null : ctx_r18.recipe.id)), ctx_r18.addButtonLoading));
16569
+ var _r24 = i0.ɵɵreference(4);
16570
+ var ctx_r16 = i0.ɵɵnextContext(2);
16571
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(5, _c2$4, i0.ɵɵpipeBind1(1, 3, ctx_r16.groceriesListsService.recipeIsInList(ctx_r16.recipe == null ? null : ctx_r16.recipe.id)), ctx_r16.addButtonLoading));
16530
16572
  i0.ɵɵadvance(2);
16531
- i0.ɵɵproperty("ngIf", !ctx_r18.addButtonLoading)("ngIfElse", _r22);
16573
+ i0.ɵɵproperty("ngIf", !ctx_r16.addButtonLoading)("ngIfElse", _r24);
16574
+ }
16575
+ }
16576
+ function RecipeDetailsComponent_div_0_div_35_Template(rf, ctx) {
16577
+ if (rf & 1) {
16578
+ i0.ɵɵelementStart(0, "div", 52);
16579
+ i0.ɵɵtext(1);
16580
+ i0.ɵɵelementEnd();
16581
+ }
16582
+ if (rf & 2) {
16583
+ var ctx_r17 = i0.ɵɵnextContext(2);
16584
+ i0.ɵɵadvance(1);
16585
+ i0.ɵɵtextInterpolate1(" ", ctx_r17.recipe == null ? null : ctx_r17.recipe.attributes["title"], " ");
16586
+ }
16587
+ }
16588
+ function RecipeDetailsComponent_div_0_div_36_Template(rf, ctx) {
16589
+ if (rf & 1) {
16590
+ i0.ɵɵelementStart(0, "div", 53);
16591
+ i0.ɵɵtext(1);
16592
+ i0.ɵɵelementEnd();
16593
+ }
16594
+ if (rf & 2) {
16595
+ var ctx_r18 = i0.ɵɵnextContext(2);
16596
+ i0.ɵɵadvance(1);
16597
+ i0.ɵɵtextInterpolate1(" ", ctx_r18.recipe == null ? null : ctx_r18.recipe.attributes.description, " ");
16598
+ }
16599
+ }
16600
+ function RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_37_Template(rf, ctx) {
16601
+ if (rf & 1) {
16602
+ i0.ɵɵelement(0, "ng-miam-recipe-details-infos", 43);
16603
+ }
16604
+ if (rf & 2) {
16605
+ var ctx_r19 = i0.ɵɵnextContext(2);
16606
+ i0.ɵɵproperty("recipe", ctx_r19.recipe)("displayTags", ctx_r19.displayTags)("displayTagsIcons", ctx_r19.displayTagsIcons)("reduced", ctx_r19.stepsOnLeftSide);
16607
+ }
16608
+ }
16609
+ function RecipeDetailsComponent_div_0_ng_miam_recipe_details_steps_39_Template(rf, ctx) {
16610
+ if (rf & 1) {
16611
+ i0.ɵɵelement(0, "ng-miam-recipe-details-steps", 44);
16612
+ }
16613
+ if (rf & 2) {
16614
+ var ctx_r20 = i0.ɵɵnextContext(2);
16615
+ i0.ɵɵproperty("recipe", ctx_r20.recipe);
16532
16616
  }
16533
16617
  }
16534
16618
  function RecipeDetailsComponent_div_0_Template(rf, ctx) {
16535
16619
  if (rf & 1) {
16536
- var _r28_1 = i0.ɵɵgetCurrentView();
16620
+ var _r30_1 = i0.ɵɵgetCurrentView();
16537
16621
  i0.ɵɵelementStart(0, "div", 2, 3);
16538
16622
  i0.ɵɵelementStart(2, "div", 4);
16539
16623
  i0.ɵɵelementStart(3, "div", 5);
16540
16624
  i0.ɵɵtemplate(4, RecipeDetailsComponent_div_0_img_4_Template, 1, 0, "img", 6);
16541
16625
  i0.ɵɵtemplate(5, RecipeDetailsComponent_div_0_ng_template_5_Template, 1, 0, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
16542
16626
  i0.ɵɵelementEnd();
16543
- i0.ɵɵtemplate(7, RecipeDetailsComponent_div_0_span_7_Template, 2, 1, "span", 8);
16544
- i0.ɵɵelementStart(8, "a", 9);
16545
- i0.ɵɵtext(9, " Voir plus d'id\u00E9es repas ");
16627
+ i0.ɵɵelementStart(7, "div", 8);
16628
+ i0.ɵɵtemplate(8, RecipeDetailsComponent_div_0_span_8_Template, 2, 1, "span", 9);
16629
+ i0.ɵɵelementEnd();
16630
+ i0.ɵɵelementStart(9, "a", 10);
16631
+ i0.ɵɵtext(10, " Voir plus d'id\u00E9es repas ");
16546
16632
  i0.ɵɵelementEnd();
16547
16633
  i0.ɵɵelementEnd();
16548
- i0.ɵɵelementStart(10, "div", 10);
16549
16634
  i0.ɵɵelementStart(11, "div", 11);
16550
16635
  i0.ɵɵelementStart(12, "div", 12);
16551
16636
  i0.ɵɵelementStart(13, "div", 13);
16552
- i0.ɵɵtemplate(14, RecipeDetailsComponent_div_0_ng_miam_addon_link_14_Template, 1, 1, "ng-miam-addon-link", 14);
16637
+ i0.ɵɵelementStart(14, "div", 14);
16638
+ i0.ɵɵtemplate(15, RecipeDetailsComponent_div_0_ng_miam_addon_link_15_Template, 1, 1, "ng-miam-addon-link", 15);
16553
16639
  i0.ɵɵelementEnd();
16554
- i0.ɵɵelementStart(15, "div", 15, 16);
16555
- i0.ɵɵtemplate(17, RecipeDetailsComponent_div_0_img_17_Template, 1, 5, "img", 17);
16556
- i0.ɵɵtemplate(18, RecipeDetailsComponent_div_0_youtube_player_18_Template, 1, 3, "youtube-player", 18);
16640
+ i0.ɵɵelementStart(16, "div", 16, 17);
16641
+ i0.ɵɵtemplate(18, RecipeDetailsComponent_div_0_img_18_Template, 1, 5, "img", 18);
16642
+ i0.ɵɵtemplate(19, RecipeDetailsComponent_div_0_youtube_player_19_Template, 1, 3, "youtube-player", 19);
16557
16643
  i0.ɵɵelementEnd();
16558
- i0.ɵɵelementStart(19, "div", 19);
16559
16644
  i0.ɵɵelementStart(20, "div", 20);
16560
- i0.ɵɵtemplate(21, RecipeDetailsComponent_div_0_ng_miam_like_button_21_Template, 1, 3, "ng-miam-like-button", 21);
16561
- i0.ɵɵpipe(22, "async");
16562
- i0.ɵɵelementStart(23, "ng-miam-icon", 22);
16563
- i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_Template_ng_miam_icon_click_23_listener() { i0.ɵɵrestoreView(_r28_1); var ctx_r27 = i0.ɵɵnextContext(); return ctx_r27.print(); });
16645
+ i0.ɵɵelementStart(21, "div", 21);
16646
+ i0.ɵɵtemplate(22, RecipeDetailsComponent_div_0_ng_miam_like_button_22_Template, 1, 3, "ng-miam-like-button", 22);
16647
+ i0.ɵɵpipe(23, "async");
16648
+ i0.ɵɵelementStart(24, "ng-miam-icon", 23);
16649
+ i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_Template_ng_miam_icon_click_24_listener() { i0.ɵɵrestoreView(_r30_1); var ctx_r29 = i0.ɵɵnextContext(); return ctx_r29.print(); });
16564
16650
  i0.ɵɵelementEnd();
16565
16651
  i0.ɵɵelementEnd();
16566
- i0.ɵɵelementStart(24, "div", 20);
16567
- i0.ɵɵelementStart(25, "ng-miam-icon", 23);
16568
- i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_Template_ng_miam_icon_click_25_listener() { i0.ɵɵrestoreView(_r28_1); var ctx_r29 = i0.ɵɵnextContext(); return ctx_r29.toggleHelper(); });
16652
+ i0.ɵɵelementStart(25, "div", 21);
16653
+ i0.ɵɵelementStart(26, "ng-miam-icon", 24);
16654
+ i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_Template_ng_miam_icon_click_26_listener() { i0.ɵɵrestoreView(_r30_1); var ctx_r31 = i0.ɵɵnextContext(); return ctx_r31.toggleHelper(); });
16569
16655
  i0.ɵɵelementEnd();
16570
16656
  i0.ɵɵelementEnd();
16571
16657
  i0.ɵɵelementEnd();
16572
- i0.ɵɵtemplate(26, RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_26_Template, 1, 3, "ng-miam-recipe-details-infos", 24);
16658
+ i0.ɵɵtemplate(27, RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_27_Template, 1, 4, "ng-miam-recipe-details-infos", 25);
16659
+ i0.ɵɵtemplate(28, RecipeDetailsComponent_div_0_ng_miam_recipe_details_steps_28_Template, 1, 1, "ng-miam-recipe-details-steps", 26);
16660
+ i0.ɵɵelementStart(29, "div", 27);
16661
+ i0.ɵɵelementStart(30, "div", 28);
16662
+ i0.ɵɵtemplate(31, RecipeDetailsComponent_div_0_ng_miam_recipe_pricing_31_Template, 1, 3, "ng-miam-recipe-pricing", 29);
16663
+ i0.ɵɵelementEnd();
16664
+ i0.ɵɵtemplate(32, RecipeDetailsComponent_div_0_div_32_Template, 5, 8, "div", 30);
16573
16665
  i0.ɵɵelementEnd();
16574
16666
  i0.ɵɵelementEnd();
16575
- i0.ɵɵelementStart(27, "div", 25);
16576
- i0.ɵɵelementStart(28, "div");
16577
- i0.ɵɵtemplate(29, RecipeDetailsComponent_div_0_div_29_Template, 2, 1, "div", 26);
16578
16667
  i0.ɵɵelementEnd();
16579
- i0.ɵɵtemplate(30, RecipeDetailsComponent_div_0_div_30_Template, 2, 1, "div", 27);
16580
- i0.ɵɵtemplate(31, RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_31_Template, 1, 3, "ng-miam-recipe-details-infos", 24);
16581
- i0.ɵɵelementStart(32, "ng-miam-recipe-details-ingredients", 28);
16582
- i0.ɵɵlistener("recipeChanged", function RecipeDetailsComponent_div_0_Template_ng_miam_recipe_details_ingredients_recipeChanged_32_listener() { i0.ɵɵrestoreView(_r28_1); var ctx_r30 = i0.ɵɵnextContext(); return ctx_r30.recipeChanged.emit(); });
16668
+ i0.ɵɵelementStart(33, "div", 31);
16669
+ i0.ɵɵelementStart(34, "div");
16670
+ i0.ɵɵtemplate(35, RecipeDetailsComponent_div_0_div_35_Template, 2, 1, "div", 32);
16583
16671
  i0.ɵɵelementEnd();
16584
- i0.ɵɵelement(33, "ng-miam-recipe-details-steps", 29);
16672
+ i0.ɵɵtemplate(36, RecipeDetailsComponent_div_0_div_36_Template, 2, 1, "div", 33);
16673
+ i0.ɵɵtemplate(37, RecipeDetailsComponent_div_0_ng_miam_recipe_details_infos_37_Template, 1, 4, "ng-miam-recipe-details-infos", 25);
16674
+ i0.ɵɵelementStart(38, "ng-miam-recipe-details-ingredients", 34);
16675
+ i0.ɵɵlistener("recipeChanged", function RecipeDetailsComponent_div_0_Template_ng_miam_recipe_details_ingredients_recipeChanged_38_listener() { i0.ɵɵrestoreView(_r30_1); var ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.recipeUpdated(); });
16585
16676
  i0.ɵɵelementEnd();
16586
- i0.ɵɵelementStart(34, "div", 30);
16587
- i0.ɵɵelementStart(35, "div", 31);
16588
- i0.ɵɵtemplate(36, RecipeDetailsComponent_div_0_ng_miam_recipe_pricing_36_Template, 1, 2, "ng-miam-recipe-pricing", 32);
16677
+ i0.ɵɵtemplate(39, RecipeDetailsComponent_div_0_ng_miam_recipe_details_steps_39_Template, 1, 1, "ng-miam-recipe-details-steps", 26);
16678
+ i0.ɵɵelementStart(40, "a", 35);
16679
+ i0.ɵɵelement(41, "img", 36);
16589
16680
  i0.ɵɵelementEnd();
16590
- i0.ɵɵtemplate(37, RecipeDetailsComponent_div_0_div_37_Template, 5, 8, "div", 33);
16591
16681
  i0.ɵɵelementEnd();
16592
16682
  i0.ɵɵelementEnd();
16593
16683
  i0.ɵɵelementEnd();
@@ -16597,7 +16687,7 @@
16597
16687
  var ctx_r0 = i0.ɵɵnextContext();
16598
16688
  i0.ɵɵadvance(4);
16599
16689
  i0.ɵɵproperty("ngIf", !ctx_r0.isMobile)("ngIfElse", _r5);
16600
- i0.ɵɵadvance(3);
16690
+ i0.ɵɵadvance(4);
16601
16691
  i0.ɵɵproperty("ngIf", !ctx_r0.isMobile || ctx_r0.titleInHeader);
16602
16692
  i0.ɵɵadvance(1);
16603
16693
  i0.ɵɵproperty("href", ctx_r0.contextService.miam.router.catalog, i0.ɵɵsanitizeUrl);
@@ -16608,13 +16698,19 @@
16608
16698
  i0.ɵɵadvance(1);
16609
16699
  i0.ɵɵproperty("ngIf", ctx_r0.showVideo && ctx_r0.playerWidth);
16610
16700
  i0.ɵɵadvance(3);
16611
- i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(22, 23, ctx_r0.userService.isLogged$));
16701
+ i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(23, 26, ctx_r0.userService.isLogged$));
16612
16702
  i0.ɵɵadvance(2);
16613
16703
  i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r0.icon.Print);
16614
16704
  i0.ɵɵadvance(2);
16615
16705
  i0.ɵɵproperty("width", 40)("height", 40)("iconName", ctx_r0.icon.Help);
16616
16706
  i0.ɵɵadvance(1);
16617
16707
  i0.ɵɵproperty("ngIf", !ctx_r0.isMobile);
16708
+ i0.ɵɵadvance(1);
16709
+ i0.ɵɵproperty("ngIf", !ctx_r0.isMobile && ctx_r0.stepsOnLeftSide);
16710
+ i0.ɵɵadvance(3);
16711
+ i0.ɵɵproperty("ngIf", ctx_r0.recipe && ctx_r0.displayPricing);
16712
+ i0.ɵɵadvance(1);
16713
+ i0.ɵɵproperty("ngIf", ctx_r0.previewAllowed);
16618
16714
  i0.ɵɵadvance(3);
16619
16715
  i0.ɵɵproperty("ngIf", ctx_r0.isMobile);
16620
16716
  i0.ɵɵadvance(1);
@@ -16624,18 +16720,18 @@
16624
16720
  i0.ɵɵadvance(1);
16625
16721
  i0.ɵɵproperty("recipe", ctx_r0.recipe)("ingredientsPictures", ctx_r0.ingredientsPictures);
16626
16722
  i0.ɵɵadvance(1);
16627
- i0.ɵɵproperty("recipe", ctx_r0.recipe);
16628
- i0.ɵɵadvance(3);
16629
- i0.ɵɵproperty("ngIf", ctx_r0.recipe && ctx_r0.displayPricing);
16723
+ i0.ɵɵproperty("ngIf", !(!ctx_r0.isMobile && ctx_r0.stepsOnLeftSide));
16630
16724
  i0.ɵɵadvance(1);
16631
- i0.ɵɵproperty("ngIf", ctx_r0.previewAllowed);
16725
+ i0.ɵɵproperty("href", ctx_r0.contextService.miam.router.catalog, i0.ɵɵsanitizeUrl);
16726
+ i0.ɵɵadvance(1);
16727
+ i0.ɵɵproperty("src", ctx_r0.moreRecipesImageURL, i0.ɵɵsanitizeUrl);
16632
16728
  }
16633
16729
  }
16634
16730
  function RecipeDetailsComponent_ng_template_1_Template(rf, ctx) {
16635
16731
  if (rf & 1) {
16636
- var _r32_1 = i0.ɵɵgetCurrentView();
16637
- i0.ɵɵelementStart(0, "ng-miam-recipe-addon", 51);
16638
- i0.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_template_1_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0.ɵɵrestoreView(_r32_1); var ctx_r31 = i0.ɵɵnextContext(); return ctx_r31.toggleAddon(); });
16732
+ var _r34_1 = i0.ɵɵgetCurrentView();
16733
+ i0.ɵɵelementStart(0, "ng-miam-recipe-addon", 54);
16734
+ i0.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_template_1_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0.ɵɵrestoreView(_r34_1); var ctx_r33 = i0.ɵɵnextContext(); return ctx_r33.toggleAddon(); });
16639
16735
  i0.ɵɵelementEnd();
16640
16736
  }
16641
16737
  if (rf & 2) {
@@ -16658,6 +16754,8 @@
16658
16754
  this.displayTagsIcons = false;
16659
16755
  this.displayPricing = true;
16660
16756
  this.displayAddedOnPicture = true;
16757
+ this.stepsOnLeftSide = false; // If true, display the detail in 4 quarters instead of 2 halves
16758
+ this.pricingGuestsText = 'par personne';
16661
16759
  this.recipeAdded = new i0.EventEmitter();
16662
16760
  this.recipeChanged = new i0.EventEmitter();
16663
16761
  this.recipeError = new i0.EventEmitter();
@@ -16780,6 +16878,10 @@
16780
16878
  this.addButtonLoading = value;
16781
16879
  this.cdr.detectChanges();
16782
16880
  };
16881
+ RecipeDetailsComponent.prototype.recipeUpdated = function () {
16882
+ this.recipeChanged.emit();
16883
+ this.cdr.detectChanges();
16884
+ };
16783
16885
  return RecipeDetailsComponent;
16784
16886
  }());
16785
16887
  RecipeDetailsComponent.ɵfac = function RecipeDetailsComponent_Factory(t) { return new (t || RecipeDetailsComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(PointOfSalesService), i0.ɵɵdirectiveInject(RecipeEventsService), i0.ɵɵdirectiveInject(i1$2.MediaMatcher), i0.ɵɵdirectiveInject(ContextService)); };
@@ -16791,16 +16893,16 @@
16791
16893
  var _t;
16792
16894
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topContainerImg = _t.first);
16793
16895
  }
16794
- }, inputs: { recipe: "recipe", previewAllowed: "previewAllowed", ingredientsPictures: "ingredientsPictures", forceDisplayTags: "forceDisplayTags", displayTagsIcons: "displayTagsIcons", displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture" }, outputs: { recipeAdded: "recipeAdded", recipeChanged: "recipeChanged", recipeError: "recipeError" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: [["class", "miam-recipe-details", 4, "ngIf", "ngIfElse"], ["addon", ""], [1, "miam-recipe-details"], ["mainContainer", ""], [1, "miam-recipe-details__header"], [1, "miam-recipe-details__bookmark"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg", 4, "ngIf", "ngIfElse"], ["stamp", ""], ["class", "miam-recipe-details__title", 4, "ngIf"], [1, "miam-recipe-details__header__link", 3, "href"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__summary"], [1, "miam-recipe-details__summary__container"], [1, "miam-recipe-details__sponsor"], [3, "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [3, "src", "ngClass", 4, "ngIf"], [3, "videoId", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__actionbar"], [1, "miam-recipe-details__actionbar__group"], ["class", "miam-recipe-details__actions__icon like", 3, "recipe", "width", "height", 4, "ngIf"], ["primaryColor", "var(--m-color-primary)", 1, "miam-recipe-details__actions__icon", "print", 3, "width", "height", "iconName", "click"], ["primaryColor", "var(--m-color-grey02)", "secondaryColor", "var(--m-color-grey07)", 1, "miam-recipe-details__actions__icon", "help", 3, "width", "height", "iconName", "click"], [3, "recipe", "displayTags", "displayTagsIcons", 4, "ngIf"], ["id", "miam-recipe-details__content", 1, "miam-recipe-details__content"], ["class", "miam-recipe-details__title", "id", "miam-recipe-details__title", 4, "ngIf"], ["class", "miam-recipe-details__content__description", 4, "ngIf"], [3, "recipe", "ingredientsPictures", "recipeChanged"], [3, "recipe"], [1, "miam-recipe-details__action__container"], [1, "miam-recipe-details__price"], ["guestsText", "par personne", 3, "recipe", "serves", 4, "ngIf"], ["class", "miam-recipe-details__addbasket", 3, "ngClass", "click", 4, "ngIf"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-stamp.svg"], [1, "miam-recipe-details__title"], [3, "recipe", "showAddon"], [3, "src", "ngClass"], [3, "videoId", "width", "height"], [1, "miam-recipe-details__actions__icon", "like", 3, "recipe", "width", "height"], [3, "recipe", "displayTags", "displayTagsIcons"], ["id", "miam-recipe-details__title", 1, "miam-recipe-details__title"], [1, "miam-recipe-details__content__description"], ["guestsText", "par personne", 3, "recipe", "serves"], [1, "miam-recipe-details__addbasket", 3, "ngClass", "click"], ["class", "miam-recipe-details__addbasket__cta", 4, "ngIf", "ngIfElse"], ["addLoader", ""], [1, "miam-recipe-details__addbasket__cta"], ["primaryColor", "#fff", 3, "width", "height", "iconName", 4, "ngIf"], ["primaryColor", "#fff", 3, "width", "height", "iconName"], [3, "recipe", "hideAddon"]], template: function RecipeDetailsComponent_Template(rf, ctx) {
16896
+ }, inputs: { recipe: "recipe", previewAllowed: "previewAllowed", ingredientsPictures: "ingredientsPictures", forceDisplayTags: "forceDisplayTags", displayTagsIcons: "displayTagsIcons", displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture", stepsOnLeftSide: "stepsOnLeftSide", moreRecipesImageURL: "moreRecipesImageURL", pricingGuestsText: "pricingGuestsText" }, outputs: { recipeAdded: "recipeAdded", recipeChanged: "recipeChanged", recipeError: "recipeError" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: [["class", "miam-recipe-details", 4, "ngIf", "ngIfElse"], ["addon", ""], [1, "miam-recipe-details"], ["mainContainer", ""], [1, "miam-recipe-details__header"], [1, "miam-recipe-details__bookmark"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg", 4, "ngIf", "ngIfElse"], ["stamp", ""], [1, "miam-recipe-details__title"], [4, "ngIf"], [1, "miam-recipe-details__header__link", 3, "href"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__summary"], [1, "miam-recipe-details__summary__container"], [1, "miam-recipe-details__sponsor"], [3, "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [3, "src", "ngClass", 4, "ngIf"], [3, "videoId", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__actionbar"], [1, "miam-recipe-details__actionbar__group"], ["class", "miam-recipe-details__actions__icon like", 3, "recipe", "width", "height", 4, "ngIf"], ["primaryColor", "var(--m-color-primary)", 1, "miam-recipe-details__actions__icon", "print", 3, "width", "height", "iconName", "click"], ["primaryColor", "var(--m-color-grey02)", "secondaryColor", "var(--m-color-grey07)", 1, "miam-recipe-details__actions__icon", "help", 3, "width", "height", "iconName", "click"], [3, "recipe", "displayTags", "displayTagsIcons", "reduced", 4, "ngIf"], [3, "recipe", 4, "ngIf"], [1, "miam-recipe-details__action__container"], [1, "miam-recipe-details__price"], [3, "recipe", "serves", "guestsText", 4, "ngIf"], ["class", "miam-recipe-details__addbasket", 3, "ngClass", "click", 4, "ngIf"], ["id", "miam-recipe-details__content", 1, "miam-recipe-details__content"], ["class", "miam-recipe-details__title", "id", "miam-recipe-details__title", 4, "ngIf"], ["class", "miam-recipe-details__content__description", 4, "ngIf"], [3, "recipe", "ingredientsPictures", "recipeChanged"], [1, "miam-recipe-details__content__image", 3, "href"], [3, "src"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-stamp.svg"], [3, "recipe", "showAddon"], [3, "src", "ngClass"], [3, "videoId", "width", "height"], [1, "miam-recipe-details__actions__icon", "like", 3, "recipe", "width", "height"], [3, "recipe", "displayTags", "displayTagsIcons", "reduced"], [3, "recipe"], [3, "recipe", "serves", "guestsText"], [1, "miam-recipe-details__addbasket", 3, "ngClass", "click"], ["class", "miam-recipe-details__addbasket__cta", 4, "ngIf", "ngIfElse"], ["addLoader", ""], [1, "miam-recipe-details__addbasket__cta"], ["primaryColor", "#fff", 3, "width", "height", "iconName", 4, "ngIf"], ["primaryColor", "#fff", 3, "width", "height", "iconName"], ["id", "miam-recipe-details__title", 1, "miam-recipe-details__title"], [1, "miam-recipe-details__content__description"], [3, "recipe", "hideAddon"]], template: function RecipeDetailsComponent_Template(rf, ctx) {
16795
16897
  if (rf & 1) {
16796
- i0.ɵɵtemplate(0, RecipeDetailsComponent_div_0_Template, 38, 25, "div", 0);
16898
+ i0.ɵɵtemplate(0, RecipeDetailsComponent_div_0_Template, 42, 28, "div", 0);
16797
16899
  i0.ɵɵtemplate(1, RecipeDetailsComponent_ng_template_1_Template, 1, 1, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
16798
16900
  }
16799
16901
  if (rf & 2) {
16800
16902
  var _r1 = i0.ɵɵreference(2);
16801
16903
  i0.ɵɵproperty("ngIf", ctx.showDetail)("ngIfElse", _r1);
16802
16904
  }
16803
- }, directives: [i3.NgIf, IconComponent, RecipeDetailsIngredientsComponent, RecipeDetailsStepsComponent, AddonLinkComponent, i3.NgClass, i8.YouTubePlayer, LikeButtonComponent, RecipeDetailsInfosComponent, RecipePricingComponent, LoaderComponent, RecipeAddonComponent], pipes: [i3.AsyncPipe], styles: [".miam-recipe-details{display:flex;flex-direction:column;height:100vh;width:100%}.miam-recipe-details .miam-recipe-details__title{font-size:32px;font-weight:700;line-height:40px;margin-left:112px;max-width:calc(100% - 352px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.miam-recipe-details .miam-recipe-details__header{align-items:center;background-color:var(--m-color-white);box-shadow:0 1px 0 #e9e9e9;display:flex;flex-direction:row;height:80px;justify-content:space-between;position:relative;width:100%}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__bookmark{height:126px;left:20px;position:absolute;top:0;width:72px;z-index:1}@media (min-width:1023px){.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__bookmark img{height:100%}}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__header__link{cursor:pointer;font-size:14px;line-height:20px;margin-right:64px}.miam-recipe-details .miam-recipe-details__container{display:flex;flex-direction:row;height:calc(100% - 80px);width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary{border-right:1px solid #e9e9e9;display:flex;margin-bottom:80px;width:60%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container{display:flex;flex-direction:column;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture{height:auto;max-height:48vh;position:relative;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}@media (min-width:1023px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img{max-height:calc(100vh - 396px)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.sponsor{max-height:calc(100vh - 504px)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.tags{max-height:calc(100vh - 476px)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.sponsor.tags{max-height:calc(100vh - 584px)}}@media (min-width:1023px) and (max-height:816px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.sponsor.tags{max-height:232px}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar{background-color:var(--m-color-white);display:flex;filter:drop-shadow(0 8px 28px rgba(0,0,0,.07));flex-direction:row;justify-content:space-between}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar{display:none}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar .miam-recipe-details__actionbar__group{display:flex;flex-direction:row}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar .miam-recipe-details__actionbar__group .miam-recipe-details__actions__icon{-webkit-tap-highlight-color:transparent;align-items:center;cursor:pointer;display:flex;height:40px;justify-content:center;margin:8px 16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content{background-color:var(--m-color-white);display:flex;flex-direction:column;height:100%;overflow-y:auto;padding:24px 24px 0;width:40%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__content__description{color:var(--m-color-grey-text-dark);display:flex;flex-direction:column;font-size:16px;line-height:20px;margin-bottom:40px;text-align:left;word-break:break-word}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content ng-miam-recipe-details-ingredients{margin-bottom:40px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container{background-color:var(--m-color-white);bottom:0;box-shadow:0 -1px 0 #e9e9e9,0 1px 0 #e9e9e9;display:flex;flex-direction:row;height:80px;left:0;position:absolute;right:40%}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container{display:none}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__price{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;position:relative;width:34%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper{color:var(--m-color-primary);flex-direction:row}@media (max-width:1022px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper{display:flex;flex-direction:column}}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper{display:none}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__price{font-size:20px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__subline{font-size:14px;margin-left:12px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__addbasket{align-items:center;background-color:var(--m-color-secondary);color:var(--m-color-white);cursor:pointer;display:flex;font-size:19px;font-weight:700;justify-content:center;width:66%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__addbasket .miam-recipe-details__addbasket__cta{display:flex;flex-direction:row}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__addbasket{display:none}}@media (min-width:1022px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__addbasket:hover{background-color:var(--m-color-secondary-dark)}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__addbasket ng-miam-icon{margin-left:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container .miam-recipe-details__addbasket .loader{border:var(--m-loader-thickness) solid transparent;border-top:var(--m-loader-thickness) solid var(--m-color-white);height:24px;width:24px}@media print{.miam-recipe-details{height:unset!important}}@media (max-width:1023px){.miam-recipe-details .miam-recipe-details__header{height:48px}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__bookmark{left:16px;top:4px}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__title{font-size:16px;font-weight:900;line-height:20px;margin-left:64px;max-width:calc(100% - 200px)}}@media print and (max-width:1023px){.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__title{margin-left:112px}}@media (max-width:1023px){.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__header__link{display:none}.miam-recipe-details .miam-recipe-details__container{flex-direction:column;overflow-y:auto}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary{height:100%;margin-bottom:8px;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar{filter:unset}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content{height:100%;overflow-y:unset;padding:0 24px;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__title{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;font-size:24px;line-height:28px;margin:0;max-width:unset;overflow:hidden;text-overflow:ellipsis;white-space:unset;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__content__description{margin:16px 0 0}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__action__container{right:0}}"], encapsulation: 2, changeDetection: 0 });
16905
+ }, directives: [i3.NgIf, IconComponent, RecipeDetailsIngredientsComponent, AddonLinkComponent, i3.NgClass, i7.YouTubePlayer, LikeButtonComponent, RecipeDetailsInfosComponent, RecipeDetailsStepsComponent, RecipePricingComponent, LoaderComponent, RecipeAddonComponent], pipes: [i3.AsyncPipe], styles: [".miam-recipe-details{display:flex;flex-direction:column;height:100vh;width:100%}.miam-recipe-details .miam-recipe-details__title{font-size:32px;font-weight:700;line-height:40px;margin-left:112px;max-width:calc(100% - 352px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.miam-recipe-details .miam-recipe-details__header{align-items:center;background-color:var(--m-color-white);box-shadow:0 1px 0 #e9e9e9;display:flex;flex-direction:row;height:80px;justify-content:space-between;position:relative;width:100%}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__bookmark{height:126px;left:20px;position:absolute;top:0;width:72px;z-index:1}@media (min-width:1023px){.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__bookmark img{height:100%}}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__header__link{cursor:pointer;font-size:14px;line-height:20px;margin-right:64px}.miam-recipe-details .miam-recipe-details__container{display:flex;flex-direction:row;height:calc(100% - 80px);width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary{border-right:1px solid #e9e9e9;display:flex;margin-bottom:80px;width:60%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container{display:flex;flex-direction:column;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture{height:auto;max-height:48vh;position:relative;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}@media (min-width:1023px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img{max-height:calc(100vh - 396px)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.sponsor{max-height:calc(100vh - 504px)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.tags{max-height:calc(100vh - 476px)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.sponsor.tags{max-height:calc(100vh - 584px)}}@media (min-width:1023px) and (max-height:816px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__picture img.sponsor.tags{max-height:232px}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar{background-color:var(--m-color-white);display:flex;filter:drop-shadow(0 8px 28px rgba(0,0,0,.07));flex-direction:row;justify-content:space-between}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar{display:none}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar .miam-recipe-details__actionbar__group{display:flex;flex-direction:row}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar .miam-recipe-details__actionbar__group .miam-recipe-details__actions__icon{-webkit-tap-highlight-color:transparent;align-items:center;cursor:pointer;display:flex;height:40px;justify-content:center;margin:8px 16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container{background-color:var(--m-color-white);bottom:0;box-shadow:0 -1px 0 #e9e9e9,0 1px 0 #e9e9e9;display:flex;flex-direction:row;height:80px;left:0;position:absolute;right:40%}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container{display:none}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__price{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;position:relative;width:34%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper{color:var(--m-color-primary);flex-direction:row}@media (max-width:1022px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper{display:flex;flex-direction:column}}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper{display:none}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__price{font-size:20px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__price .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__subline{font-size:14px;margin-left:12px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__addbasket{align-items:center;background-color:var(--m-color-secondary);color:var(--m-color-white);cursor:pointer;display:flex;font-size:19px;font-weight:700;justify-content:center;width:66%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__addbasket .miam-recipe-details__addbasket__cta{display:flex;flex-direction:row}@media print{.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__addbasket{display:none}}@media (min-width:1022px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__addbasket:hover{background-color:var(--m-color-secondary-dark)}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__addbasket ng-miam-icon{margin-left:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container .miam-recipe-details__addbasket .loader{border:var(--m-loader-thickness) solid transparent;border-top:var(--m-loader-thickness) solid var(--m-color-white);height:24px;width:24px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content{background-color:var(--m-color-white);display:flex;flex-direction:column;height:100%;overflow-y:auto;padding:24px 24px 0;width:40%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__content__description{color:var(--m-color-grey-text-dark);display:flex;flex-direction:column;font-size:16px;line-height:20px;margin-bottom:40px;text-align:left;word-break:break-word}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content ng-miam-recipe-details-ingredients{margin-bottom:40px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__content__image,.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__content__image img{width:100%}@media print{.miam-recipe-details{height:unset!important}}@media (max-width:1023px){.miam-recipe-details .miam-recipe-details__header{height:48px}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__bookmark{left:16px;top:4px}.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__title{font-size:16px;font-weight:900;line-height:20px;margin-left:64px;max-width:calc(100% - 200px)}}@media print and (max-width:1023px){.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__title{margin-left:112px}}@media (max-width:1023px){.miam-recipe-details .miam-recipe-details__header .miam-recipe-details__header__link{display:none}.miam-recipe-details .miam-recipe-details__container{flex-direction:column;overflow-y:auto}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary{height:100%;margin-bottom:8px;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__actionbar{filter:unset}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__summary .miam-recipe-details__summary__container .miam-recipe-details__action__container{position:fixed;right:0;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content{height:100%;overflow-y:unset;padding:0 24px;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__title{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;font-size:24px;line-height:28px;margin:0;max-width:unset;overflow:hidden;text-overflow:ellipsis;white-space:unset;width:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__content .miam-recipe-details__content__description{margin:16px 0 0}}"], encapsulation: 2, changeDetection: 0 });
16804
16906
  /*@__PURE__*/ (function () {
16805
16907
  i0.ɵsetClassMetadata(RecipeDetailsComponent, [{
16806
16908
  type: i0.Component,
@@ -16825,6 +16927,12 @@
16825
16927
  type: i0.Input
16826
16928
  }], displayAddedOnPicture: [{
16827
16929
  type: i0.Input
16930
+ }], stepsOnLeftSide: [{
16931
+ type: i0.Input
16932
+ }], moreRecipesImageURL: [{
16933
+ type: i0.Input
16934
+ }], pricingGuestsText: [{
16935
+ type: i0.Input
16828
16936
  }], recipeAdded: [{
16829
16937
  type: i0.Output
16830
16938
  }], recipeChanged: [{
@@ -16866,7 +16974,7 @@
16866
16974
  UtilsModule,
16867
16975
  ComponentsModule,
16868
16976
  LoaderModule,
16869
- i8.YouTubePlayerModule
16977
+ i7.YouTubePlayerModule
16870
16978
  ]] });
16871
16979
  (function () {
16872
16980
  (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(RecipeDetailsModule, { declarations: [RecipeDetailsIngredientsComponent,
@@ -16878,7 +16986,7 @@
16878
16986
  UtilsModule,
16879
16987
  ComponentsModule,
16880
16988
  LoaderModule,
16881
- i8.YouTubePlayerModule], exports: [RecipeDetailsIngredientsComponent,
16989
+ i7.YouTubePlayerModule], exports: [RecipeDetailsIngredientsComponent,
16882
16990
  RecipeDetailsComponent,
16883
16991
  RecipeAddonComponent,
16884
16992
  RecipeDetailsStepsComponent,
@@ -16894,7 +17002,7 @@
16894
17002
  UtilsModule,
16895
17003
  ComponentsModule,
16896
17004
  LoaderModule,
16897
- i8.YouTubePlayerModule
17005
+ i7.YouTubePlayerModule
16898
17006
  ],
16899
17007
  declarations: [
16900
17008
  RecipeDetailsIngredientsComponent,
@@ -18796,7 +18904,7 @@
18796
18904
  }
18797
18905
  if (rf & 2) {
18798
18906
  var ctx_r0 = i0.ɵɵnextContext();
18799
- i0.ɵɵproperty("recipe", ctx_r0.recipe)("previewAllowed", ctx_r0.previewAllowed);
18907
+ i0.ɵɵproperty("recipe", ctx_r0.recipe)("previewAllowed", ctx_r0.previewAllowed)("stepsOnLeftSide", ctx_r0.detailsStepsOnLeftSide)("moreRecipesImageURL", ctx_r0.detailsMoreRecipesImageURL)("pricingGuestsText", ctx_r0.detailsPricingGuestsText);
18800
18908
  }
18801
18909
  }
18802
18910
  function RecipeModalComponent_div_2_div_1_Template(rf, ctx) {
@@ -18840,14 +18948,14 @@
18840
18948
  this.removeIsLoading = false;
18841
18949
  this.basketChangedSinceOpened = false; // true if show = true and basket is different since last time show was false
18842
18950
  this.recipeWasAdded = false;
18843
- this.openWithoutRecipe = false;
18951
+ this.detailsStepsOnLeftSide = false;
18952
+ this.detailsPricingGuestsText = 'par personne';
18844
18953
  this.hasChangesOnClose = new i0.EventEmitter(false);
18845
18954
  }
18846
18955
  RecipeModalComponent.prototype.ngOnInit = function () {
18847
18956
  var _this = this;
18848
18957
  this.recipesService.displayedRecipe$.subscribe(function (result) {
18849
18958
  var _a;
18850
- _this.openWithoutRecipe = result === null || result === void 0 ? void 0 : result.force;
18851
18959
  if (!(result === null || result === void 0 ? void 0 : result.recipe)) {
18852
18960
  if (result === null || result === void 0 ? void 0 : result.force) {
18853
18961
  _this.previewMode = result.previewMode;
@@ -18895,9 +19003,6 @@
18895
19003
  this.previewMode = !this.previewMode;
18896
19004
  this.cdr.detectChanges();
18897
19005
  };
18898
- RecipeModalComponent.prototype.getTitle = function () {
18899
- return this.previewMode ? "" + (this.openWithoutRecipe ? 'Repas ajoutés : ' : '1 repas ajouté à votre panier') : '';
18900
- };
18901
19006
  RecipeModalComponent.prototype.removeRecipe = function () {
18902
19007
  var _this = this;
18903
19008
  if (this.canCloseModal) {
@@ -18933,16 +19038,16 @@
18933
19038
  return RecipeModalComponent;
18934
19039
  }());
18935
19040
  RecipeModalComponent.ɵfac = function RecipeModalComponent_Factory(t) { return new (t || RecipeModalComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PrintService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(BasketsService)); };
18936
- RecipeModalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], outputs: { hasChangesOnClose: "hasChangesOnClose" }, decls: 3, vars: 11, consts: [[3, "isAngularComponent", "noHeaderMode", "expanded", "title", "confirmButtonText", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm"], [3, "recipe", "previewAllowed", "recipeAdded", "recipeChanged", "recipeError", 4, "ngIf"], ["class", "miam-wrapper-preview", 4, "ngIf"], [3, "recipe", "previewAllowed", "recipeAdded", "recipeChanged", "recipeError"], ["details", ""], [1, "miam-wrapper-preview"], [3, "recipeId", "displayItemsUnitaryPrice", "guestCountChanged", "loading"]], template: function RecipeModalComponent_Template(rf, ctx) {
19041
+ RecipeModalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], inputs: { detailsStepsOnLeftSide: "detailsStepsOnLeftSide", detailsMoreRecipesImageURL: "detailsMoreRecipesImageURL", detailsPricingGuestsText: "detailsPricingGuestsText" }, outputs: { hasChangesOnClose: "hasChangesOnClose" }, decls: 3, vars: 11, consts: [[3, "isAngularComponent", "noHeaderMode", "expanded", "title", "confirmButtonText", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm"], [3, "recipe", "previewAllowed", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "recipeAdded", "recipeChanged", "recipeError", 4, "ngIf"], ["class", "miam-wrapper-preview", 4, "ngIf"], [3, "recipe", "previewAllowed", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "recipeAdded", "recipeChanged", "recipeError"], ["details", ""], [1, "miam-wrapper-preview"], [3, "recipeId", "displayItemsUnitaryPrice", "guestCountChanged", "loading"]], template: function RecipeModalComponent_Template(rf, ctx) {
18937
19042
  if (rf & 1) {
18938
19043
  i0.ɵɵelementStart(0, "ng-miam-modal", 0);
18939
19044
  i0.ɵɵlistener("expandedChange", function RecipeModalComponent_Template_ng_miam_modal_expandedChange_0_listener($event) { return ctx.show = $event; })("close", function RecipeModalComponent_Template_ng_miam_modal_close_0_listener() { return ctx.hide(); })("cancel", function RecipeModalComponent_Template_ng_miam_modal_cancel_0_listener() { return ctx.removeRecipe(); })("confirm", function RecipeModalComponent_Template_ng_miam_modal_confirm_0_listener() { return ctx.hide(); });
18940
- i0.ɵɵtemplate(1, RecipeModalComponent_ng_miam_recipe_details_1_Template, 2, 2, "ng-miam-recipe-details", 1);
19045
+ i0.ɵɵtemplate(1, RecipeModalComponent_ng_miam_recipe_details_1_Template, 2, 5, "ng-miam-recipe-details", 1);
18941
19046
  i0.ɵɵtemplate(2, RecipeModalComponent_div_2_Template, 2, 1, "div", 2);
18942
19047
  i0.ɵɵelementEnd();
18943
19048
  }
18944
19049
  if (rf & 2) {
18945
- i0.ɵɵproperty("isAngularComponent", true)("noHeaderMode", true)("expanded", ctx.show)("noHeaderMode", !ctx.previewMode)("title", ctx.getTitle())("confirmButtonText", ctx.previewMode ? "Ok, continuer mes courses" : "")("cancelButtonDisabled", !ctx.canCloseModal)("confirmButtonDisabled", !ctx.canCloseModal)("cancelButtonIsLoading", ctx.removeIsLoading);
19050
+ i0.ɵɵproperty("isAngularComponent", true)("noHeaderMode", true)("expanded", ctx.show)("noHeaderMode", !ctx.previewMode)("title", ctx.previewMode ? "Repas ajout\u00E9s : " : "")("confirmButtonText", ctx.previewMode ? "Ok, continuer mes courses" : "")("cancelButtonDisabled", !ctx.canCloseModal)("confirmButtonDisabled", !ctx.canCloseModal)("cancelButtonIsLoading", ctx.removeIsLoading);
18946
19051
  i0.ɵɵadvance(1);
18947
19052
  i0.ɵɵproperty("ngIf", ctx.recipe && !ctx.previewMode);
18948
19053
  i0.ɵɵadvance(1);
@@ -18959,7 +19064,13 @@
18959
19064
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
18960
19065
  encapsulation: i0.ViewEncapsulation.None
18961
19066
  }]
18962
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: PrintService }, { type: i0.ElementRef }, { type: GroceriesListsService }, { type: BasketsService }]; }, { hasChangesOnClose: [{
19067
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: PrintService }, { type: i0.ElementRef }, { type: GroceriesListsService }, { type: BasketsService }]; }, { detailsStepsOnLeftSide: [{
19068
+ type: i0.Input
19069
+ }], detailsMoreRecipesImageURL: [{
19070
+ type: i0.Input
19071
+ }], detailsPricingGuestsText: [{
19072
+ type: i0.Input
19073
+ }], hasChangesOnClose: [{
18963
19074
  type: i0.Output
18964
19075
  }] });
18965
19076
  })();
@@ -19203,7 +19314,7 @@
19203
19314
  useFactory: dateFns.adapterFactory,
19204
19315
  }),
19205
19316
  UtilsModule,
19206
- i8.YouTubePlayerModule
19317
+ i7.YouTubePlayerModule
19207
19318
  ]), LoaderModule,
19208
19319
  BasketPreviewModule,
19209
19320
  ListScanModule,
@@ -19240,7 +19351,7 @@
19240
19351
  i15.FormsModule,
19241
19352
  i15.ReactiveFormsModule,
19242
19353
  ComponentsModule, i1$4.CalendarModule, UtilsModule,
19243
- i8.YouTubePlayerModule], exports: [LoaderModule,
19354
+ i7.YouTubePlayerModule], exports: [LoaderModule,
19244
19355
  BasketPreviewModule,
19245
19356
  ListScanModule,
19246
19357
  RecipeDetailsModule,
@@ -19282,14 +19393,14 @@
19282
19393
  useFactory: dateFns.adapterFactory,
19283
19394
  }),
19284
19395
  UtilsModule,
19285
- i8.YouTubePlayerModule
19396
+ i7.YouTubePlayerModule
19286
19397
  ]),
19287
19398
  declarations: WEB_COMPONENTS,
19288
19399
  exports: WEBC_MODULES.concat(WEB_COMPONENTS)
19289
19400
  }]
19290
19401
  }], null, null);
19291
19402
  })();
19292
- i0.ɵɵsetComponentScope(RecipeCatalogComponent, [LoaderComponent, BasketPreviewBlockComponent, BasketPreviewLineComponent, BasketPreviewDisabledComponent, ReplaceItemComponent, ListScanComponent, RecipeDetailsIngredientsComponent, RecipeDetailsComponent, RecipeAddonComponent, RecipeDetailsStepsComponent, RecipeDetailsInfosComponent, ModalComponent, i3.NgClass, i3.NgComponentOutlet, i3.NgForOf, i3.NgIf, i3.NgTemplateOutlet, i3.NgStyle, i3.NgSwitch, i3.NgSwitchCase, i3.NgSwitchDefault, i3.NgPlural, i3.NgPluralCase, i15.ɵangular_packages_forms_forms_y, i15.NgSelectOption, i15.ɵangular_packages_forms_forms_x, i15.DefaultValueAccessor, i15.NumberValueAccessor, i15.RangeValueAccessor, i15.CheckboxControlValueAccessor, i15.SelectControlValueAccessor, i15.SelectMultipleControlValueAccessor, i15.RadioControlValueAccessor, i15.NgControlStatus, i15.NgControlStatusGroup, i15.RequiredValidator, i15.MinLengthValidator, i15.MaxLengthValidator, i15.PatternValidator, i15.CheckboxRequiredValidator, i15.EmailValidator, i15.NgModel, i15.NgModelGroup, i15.NgForm, i15.FormControlDirective, i15.FormGroupDirective, i15.FormControlName, i15.FormGroupName, i15.FormArrayName, IconComponent, CORSOverlayComponent, ListInputComponent, SkeletonComponent, SliderComponent, TimePickerComponent, CounterInputComponent, LikeButtonComponent, TabsComponent, TabBodyComponent, TabItemComponent, TabLabelComponent, DeleteConfirmButtonComponent, RecipePricingComponent, AddonLinkComponent, RecipeFiltersComponent, SelectInputComponent, TextInputComponent, ActionsPopinComponent, CardCreateRecipeComponent, RecipeTypeChooserComponent, ExplaineBannerComponent, i1$4.ɵb, i1$4.ɵc, i1$4.ɵd, i1$4.ɵe, i1$4.ɵf, i1$4.ɵg, i1$4.ɵh, i1$4.ɵl, i1$4.ɵm, i38.ɵb, i38.ɵa, i38.ɵd, i1$4.CalendarMonthViewComponent, i1$4.ɵn, i1$4.ɵa, i1$4.ɵo, i39.ResizableDirective, i39.ResizeHandleDirective, i1$4.CalendarWeekViewComponent, i1$4.ɵp, i1$4.ɵq, i1$4.ɵr, i1$4.ɵs, i1$4.CalendarDayViewComponent, AutowidthInputDirective, i8.YouTubePlayer, SuggestionCardComponent,
19403
+ i0.ɵɵsetComponentScope(RecipeCatalogComponent, [LoaderComponent, BasketPreviewBlockComponent, BasketPreviewLineComponent, BasketPreviewDisabledComponent, ReplaceItemComponent, ListScanComponent, RecipeDetailsIngredientsComponent, RecipeDetailsComponent, RecipeAddonComponent, RecipeDetailsStepsComponent, RecipeDetailsInfosComponent, ModalComponent, i3.NgClass, i3.NgComponentOutlet, i3.NgForOf, i3.NgIf, i3.NgTemplateOutlet, i3.NgStyle, i3.NgSwitch, i3.NgSwitchCase, i3.NgSwitchDefault, i3.NgPlural, i3.NgPluralCase, i15.ɵangular_packages_forms_forms_y, i15.NgSelectOption, i15.ɵangular_packages_forms_forms_x, i15.DefaultValueAccessor, i15.NumberValueAccessor, i15.RangeValueAccessor, i15.CheckboxControlValueAccessor, i15.SelectControlValueAccessor, i15.SelectMultipleControlValueAccessor, i15.RadioControlValueAccessor, i15.NgControlStatus, i15.NgControlStatusGroup, i15.RequiredValidator, i15.MinLengthValidator, i15.MaxLengthValidator, i15.PatternValidator, i15.CheckboxRequiredValidator, i15.EmailValidator, i15.NgModel, i15.NgModelGroup, i15.NgForm, i15.FormControlDirective, i15.FormGroupDirective, i15.FormControlName, i15.FormGroupName, i15.FormArrayName, IconComponent, CORSOverlayComponent, ListInputComponent, SkeletonComponent, SliderComponent, TimePickerComponent, CounterInputComponent, LikeButtonComponent, TabsComponent, TabBodyComponent, TabItemComponent, TabLabelComponent, DeleteConfirmButtonComponent, RecipePricingComponent, AddonLinkComponent, RecipeFiltersComponent, SelectInputComponent, TextInputComponent, ActionsPopinComponent, CardCreateRecipeComponent, RecipeTypeChooserComponent, ExplaineBannerComponent, i1$4.ɵb, i1$4.ɵc, i1$4.ɵd, i1$4.ɵe, i1$4.ɵf, i1$4.ɵg, i1$4.ɵh, i1$4.ɵl, i1$4.ɵm, i38.ɵb, i38.ɵa, i38.ɵd, i1$4.CalendarMonthViewComponent, i1$4.ɵn, i1$4.ɵa, i1$4.ɵo, i39.ResizableDirective, i39.ResizeHandleDirective, i1$4.CalendarWeekViewComponent, i1$4.ɵp, i1$4.ɵq, i1$4.ɵr, i1$4.ɵs, i1$4.CalendarDayViewComponent, AutowidthInputDirective, i7.YouTubePlayer, SuggestionCardComponent,
19293
19404
  DrawerComponent,
19294
19405
  OrderButtonComponent,
19295
19406
  PosSelectionComponent,