ng-miam 6.3.3 → 6.3.5
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.
- package/bundles/ng-miam.umd.js +546 -359
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +2 -2
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_components/abstracts/abstract-recipe-card.component.js +5 -2
- package/esm2015/lib/_components/meals-planner-link/meals-planner-link.component.js +6 -19
- package/esm2015/lib/_services/analytics.service.js +2 -1
- package/esm2015/lib/_services/groceries-lists.service.js +26 -14
- package/esm2015/lib/_services/interceptor.service.js +2 -2
- package/esm2015/lib/_services/recipes.service.js +5 -5
- package/esm2015/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.js +4 -3
- package/esm2015/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.js +2 -2
- package/esm2015/lib/_web-components/meals-planner/meals-planner-basket-confirmation/meals-planner-basket-confirmation.component.js +14 -7
- package/esm2015/lib/_web-components/meals-planner/meals-planner-basket-preview/meals-planner-basket-preview.component.js +83 -54
- package/esm2015/lib/_web-components/meals-planner/meals-planner-catalog/meals-planner-catalog.component.js +20 -9
- package/esm2015/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.js +93 -62
- package/esm2015/lib/_web-components/meals-planner/meals-planner-result/meals-planner-result.component.js +18 -10
- package/esm2015/lib/_web-components/meals-planner/meals-planner.component.js +83 -35
- package/esm2015/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.js +6 -3
- package/esm2015/lib/_web-components/recipe-cards/suggestion-card/suggestion-card.component.js +5 -7
- package/esm2015/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.js +36 -21
- package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +68 -58
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +10 -5
- package/fesm2015/ng-miam.js +455 -292
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_components/abstracts/abstract-recipe-card.component.d.ts +2 -1
- package/lib/_components/meals-planner-link/meals-planner-link.component.d.ts +2 -4
- package/lib/_services/analytics.service.d.ts +7 -0
- package/lib/_services/groceries-lists.service.d.ts +6 -1
- package/lib/_services/recipes.service.d.ts +5 -2
- package/lib/_web-components/meals-planner/meals-planner-basket-confirmation/meals-planner-basket-confirmation.component.d.ts +8 -4
- package/lib/_web-components/meals-planner/meals-planner-basket-preview/meals-planner-basket-preview.component.d.ts +12 -6
- package/lib/_web-components/meals-planner/meals-planner-catalog/meals-planner-catalog.component.d.ts +8 -4
- package/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.d.ts +8 -4
- package/lib/_web-components/meals-planner/meals-planner-result/meals-planner-result.component.d.ts +8 -4
- package/lib/_web-components/meals-planner/meals-planner.component.d.ts +9 -1
- package/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.d.ts +2 -1
- package/lib/_web-components/recipe-cards/suggestion-card/suggestion-card.component.d.ts +1 -0
- package/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.d.ts +3 -1
- package/lib/_web-components/recipe-details/recipe-details.component.d.ts +2 -1
- package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts +1 -0
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -679,6 +679,7 @@
|
|
|
679
679
|
this.EVENT_PAYMENT_STARTED = 'payment.started';
|
|
680
680
|
this.EVENT_PAYMENT_CONFIRMED = 'payment.confirmed';
|
|
681
681
|
this.EVENT_BASKET_CONFIRMED = 'basket.confirmed';
|
|
682
|
+
this.EVENT_MEALS_PLANNER_CONFIRMED = 'planner.confirmed';
|
|
682
683
|
this.ready$ = new rxjs.BehaviorSubject(false);
|
|
683
684
|
this.eventEmitter = new i0.EventEmitter();
|
|
684
685
|
}
|
|
@@ -777,12 +778,14 @@
|
|
|
777
778
|
_this.recipeWasAdded$ = new rxjs.BehaviorSubject([]);
|
|
778
779
|
// Unused in sdk at the moment but any client app can subscribe on it to know when a recipe has been added
|
|
779
780
|
_this.recipeWasDeleted$ = new rxjs.BehaviorSubject([]);
|
|
781
|
+
_this.recipesToRemove = new rxjs.BehaviorSubject([]);
|
|
780
782
|
// Singleton instance of GroceriesList
|
|
781
783
|
_this._list$ = new rxjs.BehaviorSubject(null);
|
|
782
784
|
_this.saveOperationType = '';
|
|
783
785
|
// Observe the fetching of the recipe so calls to list$ are delayed instead of calling refreshCurrentList dozens of times
|
|
784
786
|
_this.listIsFetching = false;
|
|
785
787
|
_this.register();
|
|
788
|
+
_this.recipesToRemove.pipe(operators.skipWhile(function (toRemove) { return toRemove.length === 0; }), operators.debounceTime(500), operators.switchMap(function () { return _this.emptyRecipesToRemove(); })).subscribe();
|
|
786
789
|
return _this;
|
|
787
790
|
}
|
|
788
791
|
Object.defineProperty(GroceriesListsService.prototype, "list$", {
|
|
@@ -854,7 +857,7 @@
|
|
|
854
857
|
if (openBasket === void 0) { openBasket = false; }
|
|
855
858
|
return this.takeFirstList().pipe(operators.switchMap(function (list) {
|
|
856
859
|
recipes.forEach(function (recipe) {
|
|
857
|
-
_this.addOrUpdateRecipeInList(list, recipe, eventTrace);
|
|
860
|
+
_this.addOrUpdateRecipeInList(list, recipe, { originPath: eventTrace.originPath, props: { recipe_id: recipe === null || recipe === void 0 ? void 0 : recipe.id } });
|
|
858
861
|
});
|
|
859
862
|
return _this.saveList(list, openBasket);
|
|
860
863
|
}));
|
|
@@ -883,18 +886,9 @@
|
|
|
883
886
|
}
|
|
884
887
|
};
|
|
885
888
|
GroceriesListsService.prototype.removeRecipeFromList = function (recipeId, eventTrace) {
|
|
886
|
-
var
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
list.attributes['recipes-infos'] = list.attributes['recipes-infos'].filter(function (info) {
|
|
890
|
-
return info.id !== recipeId;
|
|
891
|
-
});
|
|
892
|
-
_this.analyticsService.sendEventWhenReady(_this.analyticsService.EVENT_RECIPE_REMOVE, eventTrace.originPath, eventTrace.props);
|
|
893
|
-
_this.saveOperationType = 'REMOVE';
|
|
894
|
-
return _this.saveList(list);
|
|
895
|
-
}
|
|
896
|
-
return rxjs.of(null);
|
|
897
|
-
}));
|
|
889
|
+
var toRemove = this.recipesToRemove.value;
|
|
890
|
+
toRemove.push({ id: recipeId, eventTrace: eventTrace });
|
|
891
|
+
this.recipesToRemove.next(toRemove);
|
|
898
892
|
};
|
|
899
893
|
GroceriesListsService.prototype.updateRecipeGuests = function (recipeId, guests, eventTrace) {
|
|
900
894
|
var _this = this;
|
|
@@ -943,6 +937,25 @@
|
|
|
943
937
|
_this.listIsFetching = false;
|
|
944
938
|
});
|
|
945
939
|
};
|
|
940
|
+
GroceriesListsService.prototype.emptyRecipesToRemove = function () {
|
|
941
|
+
var _this = this;
|
|
942
|
+
var idsToRemove = this.recipesToRemove.value.map(function (i) { return i.id; });
|
|
943
|
+
if (idsToRemove.length > 0) {
|
|
944
|
+
var eventTrace_1 = this.recipesToRemove.value[0].eventTrace;
|
|
945
|
+
return this.takeFirstList().pipe(operators.switchMap(function (list) {
|
|
946
|
+
if (list.attributes['recipes-infos']) {
|
|
947
|
+
list.attributes['recipes-infos'] = list.attributes['recipes-infos'].filter(function (info) {
|
|
948
|
+
return !idsToRemove.includes(info.id);
|
|
949
|
+
});
|
|
950
|
+
_this.analyticsService.sendEventWhenReady(_this.analyticsService.EVENT_RECIPE_REMOVE, eventTrace_1.originPath, eventTrace_1.props);
|
|
951
|
+
_this.saveOperationType = 'REMOVE';
|
|
952
|
+
return _this.saveList(list).pipe(operators.take(1), operators.tap(function () { return _this.recipesToRemove.next(_this.recipesToRemove.value.filter(function (i) { return !idsToRemove.includes(i.id); })); }));
|
|
953
|
+
}
|
|
954
|
+
return rxjs.of(null);
|
|
955
|
+
}));
|
|
956
|
+
}
|
|
957
|
+
return rxjs.of(null);
|
|
958
|
+
};
|
|
946
959
|
/**
|
|
947
960
|
* save() returns an object that isn't a resource so methods aren't attached, so we have to do a little trick
|
|
948
961
|
* @param res result of the save
|
|
@@ -3527,23 +3540,23 @@
|
|
|
3527
3540
|
// Open modal showing recipe details
|
|
3528
3541
|
RecipesService.prototype.display = function (recipeId, _c, eventTrace) {
|
|
3529
3542
|
var _this = this;
|
|
3530
|
-
var _d = _c.previewAllowed, previewAllowed = _d === void 0 ? true : _d, _e = _c.guests, guests = _e === void 0 ? null : _e, _f = _c.previewMode, previewMode = _f === void 0 ? false : _f, _g = _c.displayGuests, displayGuests = _g === void 0 ? true : _g;
|
|
3543
|
+
var _d = _c.previewAllowed, previewAllowed = _d === void 0 ? true : _d, _e = _c.guests, guests = _e === void 0 ? null : _e, _f = _c.previewMode, previewMode = _f === void 0 ? false : _f, _g = _c.displayGuests, displayGuests = _g === void 0 ? true : _g, _h = _c.helpButtonAllowed, helpButtonAllowed = _h === void 0 ? true : _h;
|
|
3531
3544
|
if (!recipeId) {
|
|
3532
3545
|
return;
|
|
3533
3546
|
}
|
|
3534
3547
|
this.get(recipeId, { include: ['ingredients', 'recipe-steps', 'recipe-type', 'sponsors', 'tags'] })
|
|
3535
3548
|
.pipe(operators.skipWhile(function (recipe) { return recipe.is_loading; }))
|
|
3536
3549
|
.subscribe(function (recipe) {
|
|
3537
|
-
_this.displayObject(recipe, { previewAllowed: previewAllowed, guests: guests, previewMode: previewMode, displayGuests: displayGuests }, eventTrace);
|
|
3550
|
+
_this.displayObject(recipe, { previewAllowed: previewAllowed, guests: guests, previewMode: previewMode, displayGuests: displayGuests, helpButtonAllowed: helpButtonAllowed }, eventTrace);
|
|
3538
3551
|
});
|
|
3539
3552
|
};
|
|
3540
3553
|
RecipesService.prototype.displayObject = function (recipe, _c, eventTrace) {
|
|
3541
|
-
var _d = _c.previewAllowed, previewAllowed = _d === void 0 ? true : _d, _e = _c.guests, guests = _e === void 0 ? null : _e, _f = _c.previewMode, previewMode = _f === void 0 ? false : _f, _g = _c.wasAdded, wasAdded = _g === void 0 ? false : _g, _h = _c.displayGuests, displayGuests = _h === void 0 ? true : _h;
|
|
3554
|
+
var _d = _c.previewAllowed, previewAllowed = _d === void 0 ? true : _d, _e = _c.guests, guests = _e === void 0 ? null : _e, _f = _c.previewMode, previewMode = _f === void 0 ? false : _f, _g = _c.wasAdded, wasAdded = _g === void 0 ? false : _g, _h = _c.displayGuests, displayGuests = _h === void 0 ? true : _h, _j = _c.helpButtonAllowed, helpButtonAllowed = _j === void 0 ? true : _j;
|
|
3542
3555
|
if (!recipe) {
|
|
3543
3556
|
return;
|
|
3544
3557
|
}
|
|
3545
3558
|
recipe.modifiedGuests = guests || +recipe.guests;
|
|
3546
|
-
this.displayedRecipe$.next({ previewAllowed: previewAllowed, recipe: recipe, previewMode: previewMode, wasAdded: wasAdded, displayGuests: displayGuests, eventTrace: eventTrace });
|
|
3559
|
+
this.displayedRecipe$.next({ previewAllowed: previewAllowed, recipe: recipe, previewMode: previewMode, wasAdded: wasAdded, displayGuests: displayGuests, helpButtonAllowed: helpButtonAllowed, eventTrace: eventTrace });
|
|
3547
3560
|
if (!previewMode) {
|
|
3548
3561
|
this.recipeEventsService.sendEvent(recipe, this.recipeEventsService.ACTION_DISPLAYED);
|
|
3549
3562
|
}
|
|
@@ -12179,29 +12192,17 @@
|
|
|
12179
12192
|
var templateObject_1$a;
|
|
12180
12193
|
|
|
12181
12194
|
var MealsPlannerLink = /** @class */ (function () {
|
|
12182
|
-
function MealsPlannerLink(context
|
|
12195
|
+
function MealsPlannerLink(context) {
|
|
12183
12196
|
this.context = context;
|
|
12184
|
-
this.userService = userService;
|
|
12185
|
-
this.posService = posService;
|
|
12186
12197
|
this.icon = exports.Icon;
|
|
12187
12198
|
this.subscriptions = [];
|
|
12188
12199
|
}
|
|
12189
12200
|
MealsPlannerLink.prototype.openMealsPlanner = function () {
|
|
12190
|
-
|
|
12191
|
-
this.subscriptions.push(rxjs.forkJoin([
|
|
12192
|
-
this.userService.isLogged$.asObservable().pipe(operators.take(1)),
|
|
12193
|
-
this.posService.isPosValid().pipe(operators.take(1))
|
|
12194
|
-
])
|
|
12195
|
-
.subscribe(function (res) {
|
|
12196
|
-
var isHookOk = _this.context.hookCallback(res[0], res[1]);
|
|
12197
|
-
if (isHookOk) {
|
|
12198
|
-
window.location.href = _this.context.mealsPlannerUrl;
|
|
12199
|
-
}
|
|
12200
|
-
}));
|
|
12201
|
+
window.location.href = this.context.mealsPlannerUrl;
|
|
12201
12202
|
};
|
|
12202
12203
|
return MealsPlannerLink;
|
|
12203
12204
|
}());
|
|
12204
|
-
MealsPlannerLink.ɵfac = function MealsPlannerLink_Factory(t) { return new (t || MealsPlannerLink)(i0.ɵɵdirectiveInject(ContextService)
|
|
12205
|
+
MealsPlannerLink.ɵfac = function MealsPlannerLink_Factory(t) { return new (t || MealsPlannerLink)(i0.ɵɵdirectiveInject(ContextService)); };
|
|
12205
12206
|
MealsPlannerLink.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerLink, selectors: [["ng-miam-meals-planner-link"]], decls: 14, vars: 1, consts: function () {
|
|
12206
12207
|
var i18n_0;
|
|
12207
12208
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -12269,7 +12270,7 @@
|
|
|
12269
12270
|
encapsulation: i0.ViewEncapsulation.None,
|
|
12270
12271
|
styleUrls: ['./meals-planner-link.component.scss']
|
|
12271
12272
|
}]
|
|
12272
|
-
}], function () { return [{ type: ContextService }
|
|
12273
|
+
}], function () { return [{ type: ContextService }]; }, null);
|
|
12273
12274
|
})();
|
|
12274
12275
|
var templateObject_1$b, templateObject_2$7, templateObject_3$4;
|
|
12275
12276
|
|
|
@@ -13723,7 +13724,7 @@
|
|
|
13723
13724
|
});
|
|
13724
13725
|
}
|
|
13725
13726
|
else {
|
|
13726
|
-
this.recipesService.display(this.line.id, { guests: this.line.count }, this.eventTrace());
|
|
13727
|
+
this.recipesService.display(this.line.id, { guests: this.line.count, helpButtonAllowed: false }, this.eventTrace());
|
|
13727
13728
|
}
|
|
13728
13729
|
event.stopPropagation();
|
|
13729
13730
|
};
|
|
@@ -14386,7 +14387,8 @@
|
|
|
14386
14387
|
};
|
|
14387
14388
|
BasketPreviewBlockComponent.prototype.removeRecipe = function (line) {
|
|
14388
14389
|
var _this = this;
|
|
14389
|
-
this.listsService.removeRecipeFromList(line.id, this.eventTrace())
|
|
14390
|
+
this.listsService.removeRecipeFromList(line.id, this.eventTrace());
|
|
14391
|
+
this.listsService.recipesToRemove.pipe(operators.skipWhile(function (toRemove) { return toRemove.map(function (i) { return i.id; }).includes(line.id); }), operators.take(1)).subscribe(function () {
|
|
14390
14392
|
var recipeIndex = _this.recipesIds.findIndex(function (recipeId) { return recipeId === line.id; });
|
|
14391
14393
|
if (recipeIndex >= 0) {
|
|
14392
14394
|
_this.recipesIds.splice(recipeIndex, 1);
|
|
@@ -16121,9 +16123,9 @@
|
|
|
16121
16123
|
}
|
|
16122
16124
|
function RecipeDetailsComponent_div_0_div_11_ng_miam_addon_link_5_Template(rf, ctx) {
|
|
16123
16125
|
if (rf & 1) {
|
|
16124
|
-
var
|
|
16126
|
+
var _r25_1 = i0.ɵɵgetCurrentView();
|
|
16125
16127
|
i0.ɵɵelementStart(0, "ng-miam-addon-link", 42);
|
|
16126
|
-
i0.ɵɵlistener("showAddon", function RecipeDetailsComponent_div_0_div_11_ng_miam_addon_link_5_Template_ng_miam_addon_link_showAddon_0_listener() { i0.ɵɵrestoreView(
|
|
16128
|
+
i0.ɵɵlistener("showAddon", function RecipeDetailsComponent_div_0_div_11_ng_miam_addon_link_5_Template_ng_miam_addon_link_showAddon_0_listener() { i0.ɵɵrestoreView(_r25_1); var ctx_r24 = i0.ɵɵnextContext(3); return ctx_r24.toggleAddon(); });
|
|
16127
16129
|
i0.ɵɵelementEnd();
|
|
16128
16130
|
}
|
|
16129
16131
|
if (rf & 2) {
|
|
@@ -16171,77 +16173,89 @@
|
|
|
16171
16173
|
i0.ɵɵproperty("recipe", ctx_r14.recipe)("originTrace", ctx_r14.eventTrace())("width", 24)("height", 24);
|
|
16172
16174
|
}
|
|
16173
16175
|
}
|
|
16174
|
-
function
|
|
16176
|
+
function RecipeDetailsComponent_div_0_div_11_ng_miam_icon_16_Template(rf, ctx) {
|
|
16175
16177
|
if (rf & 1) {
|
|
16176
|
-
i0.ɵɵ
|
|
16178
|
+
var _r27_1 = i0.ɵɵgetCurrentView();
|
|
16179
|
+
i0.ɵɵelementStart(0, "ng-miam-icon", 47);
|
|
16180
|
+
i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_11_ng_miam_icon_16_Template_ng_miam_icon_click_0_listener() { i0.ɵɵrestoreView(_r27_1); var ctx_r26 = i0.ɵɵnextContext(3); return ctx_r26.toggleHelper(); });
|
|
16181
|
+
i0.ɵɵelementEnd();
|
|
16177
16182
|
}
|
|
16178
16183
|
if (rf & 2) {
|
|
16179
16184
|
var ctx_r15 = i0.ɵɵnextContext(3);
|
|
16180
|
-
i0.ɵɵproperty("
|
|
16185
|
+
i0.ɵɵproperty("width", 40)("height", 40)("iconName", ctx_r15.icon.Help);
|
|
16181
16186
|
}
|
|
16182
16187
|
}
|
|
16183
|
-
function
|
|
16188
|
+
function RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_details_infos_17_Template(rf, ctx) {
|
|
16184
16189
|
if (rf & 1) {
|
|
16185
|
-
i0.ɵɵelement(0, "ng-miam-recipe-details-
|
|
16190
|
+
i0.ɵɵelement(0, "ng-miam-recipe-details-infos", 48);
|
|
16186
16191
|
}
|
|
16187
16192
|
if (rf & 2) {
|
|
16188
16193
|
var ctx_r16 = i0.ɵɵnextContext(3);
|
|
16189
|
-
i0.ɵɵproperty("recipe", ctx_r16.recipe);
|
|
16194
|
+
i0.ɵɵproperty("recipe", ctx_r16.recipe)("displayTags", ctx_r16.displayTags)("displayTagsIcons", ctx_r16.displayTagsIcons)("reduced", ctx_r16.cookingTimeAsPrimaryInfo);
|
|
16190
16195
|
}
|
|
16191
16196
|
}
|
|
16192
|
-
function
|
|
16197
|
+
function RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_details_steps_18_Template(rf, ctx) {
|
|
16193
16198
|
if (rf & 1) {
|
|
16194
|
-
i0.ɵɵelement(0, "ng-miam-recipe-
|
|
16199
|
+
i0.ɵɵelement(0, "ng-miam-recipe-details-steps", 49);
|
|
16195
16200
|
}
|
|
16196
16201
|
if (rf & 2) {
|
|
16197
16202
|
var ctx_r17 = i0.ɵɵnextContext(3);
|
|
16198
|
-
i0.ɵɵproperty("recipe", ctx_r17.recipe)
|
|
16203
|
+
i0.ɵɵproperty("recipe", ctx_r17.recipe);
|
|
16204
|
+
}
|
|
16205
|
+
}
|
|
16206
|
+
function RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_pricing_21_Template(rf, ctx) {
|
|
16207
|
+
if (rf & 1) {
|
|
16208
|
+
i0.ɵɵelement(0, "ng-miam-recipe-pricing", 50);
|
|
16209
|
+
}
|
|
16210
|
+
if (rf & 2) {
|
|
16211
|
+
var ctx_r18 = i0.ɵɵnextContext(3);
|
|
16212
|
+
i0.ɵɵproperty("recipe", ctx_r18.recipe)("serves", ctx_r18.recipe == null ? null : ctx_r18.recipe.modifiedGuests)("guestsText", ctx_r18.pricingGuestsText);
|
|
16199
16213
|
}
|
|
16200
16214
|
}
|
|
16201
16215
|
function RecipeDetailsComponent_div_0_div_11_div_22_div_2_span_2_Template(rf, ctx) {
|
|
16202
16216
|
if (rf & 1) {
|
|
16203
16217
|
i0.ɵɵelementStart(0, "span");
|
|
16204
|
-
i0.ɵɵi18n(1,
|
|
16218
|
+
i0.ɵɵi18n(1, 56);
|
|
16205
16219
|
i0.ɵɵelementEnd();
|
|
16206
16220
|
}
|
|
16207
16221
|
}
|
|
16208
16222
|
function RecipeDetailsComponent_div_0_div_11_div_22_div_2_span_4_Template(rf, ctx) {
|
|
16209
16223
|
if (rf & 1) {
|
|
16210
16224
|
i0.ɵɵelementStart(0, "span");
|
|
16211
|
-
i0.ɵɵi18n(1,
|
|
16225
|
+
i0.ɵɵi18n(1, 57);
|
|
16212
16226
|
i0.ɵɵelementEnd();
|
|
16213
16227
|
}
|
|
16214
16228
|
}
|
|
16215
16229
|
function RecipeDetailsComponent_div_0_div_11_div_22_div_2_ng_miam_icon_6_Template(rf, ctx) {
|
|
16216
16230
|
if (rf & 1) {
|
|
16217
|
-
i0.ɵɵelement(0, "ng-miam-icon",
|
|
16231
|
+
i0.ɵɵelement(0, "ng-miam-icon", 58);
|
|
16218
16232
|
}
|
|
16219
16233
|
if (rf & 2) {
|
|
16220
|
-
var
|
|
16221
|
-
i0.ɵɵproperty("width", 24)("height", 24)("iconName",
|
|
16234
|
+
var ctx_r33 = i0.ɵɵnextContext(5);
|
|
16235
|
+
i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r33.icon.Cart);
|
|
16222
16236
|
}
|
|
16223
16237
|
}
|
|
16224
16238
|
function RecipeDetailsComponent_div_0_div_11_div_22_div_2_Template(rf, ctx) {
|
|
16225
16239
|
if (rf & 1) {
|
|
16226
|
-
i0.ɵɵelementStart(0, "div",
|
|
16240
|
+
i0.ɵɵelementStart(0, "div", 54);
|
|
16227
16241
|
i0.ɵɵelementStart(1, "span");
|
|
16228
16242
|
i0.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_11_div_22_div_2_span_2_Template, 2, 0, "span", 9);
|
|
16229
16243
|
i0.ɵɵpipe(3, "async");
|
|
16230
16244
|
i0.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_11_div_22_div_2_span_4_Template, 2, 0, "span", 9);
|
|
16231
16245
|
i0.ɵɵpipe(5, "async");
|
|
16232
16246
|
i0.ɵɵelementEnd();
|
|
16233
|
-
i0.ɵɵtemplate(6, RecipeDetailsComponent_div_0_div_11_div_22_div_2_ng_miam_icon_6_Template, 1, 3, "ng-miam-icon",
|
|
16247
|
+
i0.ɵɵtemplate(6, RecipeDetailsComponent_div_0_div_11_div_22_div_2_ng_miam_icon_6_Template, 1, 3, "ng-miam-icon", 55);
|
|
16234
16248
|
i0.ɵɵpipe(7, "async");
|
|
16235
16249
|
i0.ɵɵelementEnd();
|
|
16236
16250
|
}
|
|
16237
16251
|
if (rf & 2) {
|
|
16238
|
-
var
|
|
16252
|
+
var ctx_r28 = i0.ɵɵnextContext(4);
|
|
16239
16253
|
i0.ɵɵadvance(2);
|
|
16240
|
-
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(3, 3,
|
|
16254
|
+
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(3, 3, ctx_r28.groceriesListsService.recipeIsInList(ctx_r28.recipe == null ? null : ctx_r28.recipe.id)));
|
|
16241
16255
|
i0.ɵɵadvance(2);
|
|
16242
|
-
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(5, 5,
|
|
16256
|
+
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(5, 5, ctx_r28.groceriesListsService.recipeIsInList(ctx_r28.recipe == null ? null : ctx_r28.recipe.id)));
|
|
16243
16257
|
i0.ɵɵadvance(2);
|
|
16244
|
-
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(7, 7,
|
|
16258
|
+
i0.ɵɵproperty("ngIf", !i0.ɵɵpipeBind1(7, 7, ctx_r28.groceriesListsService.recipeIsInList(ctx_r28.recipe == null ? null : ctx_r28.recipe.id)));
|
|
16245
16259
|
}
|
|
16246
16260
|
}
|
|
16247
16261
|
function RecipeDetailsComponent_div_0_div_11_div_22_ng_template_3_Template(rf, ctx) {
|
|
@@ -16252,67 +16266,67 @@
|
|
|
16252
16266
|
var _c8$2 = function (a0, a1) { return { "in-basket": a0, "loading": a1 }; };
|
|
16253
16267
|
function RecipeDetailsComponent_div_0_div_11_div_22_Template(rf, ctx) {
|
|
16254
16268
|
if (rf & 1) {
|
|
16255
|
-
var
|
|
16256
|
-
i0.ɵɵelementStart(0, "div",
|
|
16257
|
-
i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_11_div_22_Template_div_click_0_listener() { i0.ɵɵrestoreView(
|
|
16269
|
+
var _r35_1 = i0.ɵɵgetCurrentView();
|
|
16270
|
+
i0.ɵɵelementStart(0, "div", 51);
|
|
16271
|
+
i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_11_div_22_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r35_1); var ctx_r34 = i0.ɵɵnextContext(3); return ctx_r34.clickPrimary(); });
|
|
16258
16272
|
i0.ɵɵpipe(1, "async");
|
|
16259
|
-
i0.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_11_div_22_div_2_Template, 8, 9, "div",
|
|
16260
|
-
i0.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_11_div_22_ng_template_3_Template, 1, 0, "ng-template", null,
|
|
16273
|
+
i0.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_11_div_22_div_2_Template, 8, 9, "div", 52);
|
|
16274
|
+
i0.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_11_div_22_ng_template_3_Template, 1, 0, "ng-template", null, 53, i0.ɵɵtemplateRefExtractor);
|
|
16261
16275
|
i0.ɵɵelementEnd();
|
|
16262
16276
|
}
|
|
16263
16277
|
if (rf & 2) {
|
|
16264
|
-
var
|
|
16265
|
-
var
|
|
16266
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(5, _c8$2, i0.ɵɵpipeBind1(1, 3,
|
|
16278
|
+
var _r29 = i0.ɵɵreference(4);
|
|
16279
|
+
var ctx_r19 = i0.ɵɵnextContext(3);
|
|
16280
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(5, _c8$2, i0.ɵɵpipeBind1(1, 3, ctx_r19.groceriesListsService.recipeIsInList(ctx_r19.recipe == null ? null : ctx_r19.recipe.id)), ctx_r19.addButtonLoading));
|
|
16267
16281
|
i0.ɵɵadvance(2);
|
|
16268
|
-
i0.ɵɵproperty("ngIf", !
|
|
16282
|
+
i0.ɵɵproperty("ngIf", !ctx_r19.addButtonLoading)("ngIfElse", _r29);
|
|
16269
16283
|
}
|
|
16270
16284
|
}
|
|
16271
16285
|
function RecipeDetailsComponent_div_0_div_11_div_25_Template(rf, ctx) {
|
|
16272
16286
|
if (rf & 1) {
|
|
16273
|
-
i0.ɵɵelementStart(0, "div",
|
|
16287
|
+
i0.ɵɵelementStart(0, "div", 59);
|
|
16274
16288
|
i0.ɵɵtext(1);
|
|
16275
16289
|
i0.ɵɵelementEnd();
|
|
16276
16290
|
}
|
|
16277
16291
|
if (rf & 2) {
|
|
16278
|
-
var
|
|
16292
|
+
var ctx_r20 = i0.ɵɵnextContext(3);
|
|
16279
16293
|
i0.ɵɵadvance(1);
|
|
16280
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
16294
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r20.recipe == null ? null : ctx_r20.recipe.attributes["title"], " ");
|
|
16281
16295
|
}
|
|
16282
16296
|
}
|
|
16283
16297
|
function RecipeDetailsComponent_div_0_div_11_div_26_Template(rf, ctx) {
|
|
16284
16298
|
if (rf & 1) {
|
|
16285
|
-
i0.ɵɵelementStart(0, "div",
|
|
16299
|
+
i0.ɵɵelementStart(0, "div", 60);
|
|
16286
16300
|
i0.ɵɵtext(1);
|
|
16287
16301
|
i0.ɵɵelementEnd();
|
|
16288
16302
|
}
|
|
16289
16303
|
if (rf & 2) {
|
|
16290
|
-
var
|
|
16304
|
+
var ctx_r21 = i0.ɵɵnextContext(3);
|
|
16291
16305
|
i0.ɵɵadvance(1);
|
|
16292
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
16306
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r21.recipe == null ? null : ctx_r21.recipe.attributes.description, " ");
|
|
16293
16307
|
}
|
|
16294
16308
|
}
|
|
16295
16309
|
function RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_details_infos_27_Template(rf, ctx) {
|
|
16296
16310
|
if (rf & 1) {
|
|
16297
|
-
i0.ɵɵelement(0, "ng-miam-recipe-details-infos",
|
|
16311
|
+
i0.ɵɵelement(0, "ng-miam-recipe-details-infos", 48);
|
|
16298
16312
|
}
|
|
16299
16313
|
if (rf & 2) {
|
|
16300
|
-
var
|
|
16301
|
-
i0.ɵɵproperty("recipe",
|
|
16314
|
+
var ctx_r22 = i0.ɵɵnextContext(3);
|
|
16315
|
+
i0.ɵɵproperty("recipe", ctx_r22.recipe)("displayTags", ctx_r22.displayTags)("displayTagsIcons", ctx_r22.displayTagsIcons)("reduced", ctx_r22.cookingTimeAsPrimaryInfo);
|
|
16302
16316
|
}
|
|
16303
16317
|
}
|
|
16304
16318
|
function RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_details_steps_29_Template(rf, ctx) {
|
|
16305
16319
|
if (rf & 1) {
|
|
16306
|
-
i0.ɵɵelement(0, "ng-miam-recipe-details-steps",
|
|
16320
|
+
i0.ɵɵelement(0, "ng-miam-recipe-details-steps", 49);
|
|
16307
16321
|
}
|
|
16308
16322
|
if (rf & 2) {
|
|
16309
|
-
var
|
|
16310
|
-
i0.ɵɵproperty("recipe",
|
|
16323
|
+
var ctx_r23 = i0.ɵɵnextContext(3);
|
|
16324
|
+
i0.ɵɵproperty("recipe", ctx_r23.recipe);
|
|
16311
16325
|
}
|
|
16312
16326
|
}
|
|
16313
16327
|
function RecipeDetailsComponent_div_0_div_11_Template(rf, ctx) {
|
|
16314
16328
|
if (rf & 1) {
|
|
16315
|
-
var
|
|
16329
|
+
var _r37_1 = i0.ɵɵgetCurrentView();
|
|
16316
16330
|
i0.ɵɵelementStart(0, "div", 15);
|
|
16317
16331
|
i0.ɵɵelementStart(1, "div", 16, 17);
|
|
16318
16332
|
i0.ɵɵelementStart(3, "div", 18);
|
|
@@ -16329,13 +16343,11 @@
|
|
|
16329
16343
|
i0.ɵɵtemplate(12, RecipeDetailsComponent_div_0_div_11_ng_miam_like_button_12_Template, 1, 4, "ng-miam-like-button", 27);
|
|
16330
16344
|
i0.ɵɵpipe(13, "async");
|
|
16331
16345
|
i0.ɵɵelementStart(14, "ng-miam-icon", 28);
|
|
16332
|
-
i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_11_Template_ng_miam_icon_click_14_listener() { i0.ɵɵrestoreView(
|
|
16346
|
+
i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_11_Template_ng_miam_icon_click_14_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r36 = i0.ɵɵnextContext(2); return ctx_r36.print(); });
|
|
16333
16347
|
i0.ɵɵelementEnd();
|
|
16334
16348
|
i0.ɵɵelementEnd();
|
|
16335
16349
|
i0.ɵɵelementStart(15, "div", 26);
|
|
16336
|
-
i0.ɵɵ
|
|
16337
|
-
i0.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_11_Template_ng_miam_icon_click_16_listener() { i0.ɵɵrestoreView(_r34_1); var ctx_r35 = i0.ɵɵnextContext(2); return ctx_r35.toggleHelper(); });
|
|
16338
|
-
i0.ɵɵelementEnd();
|
|
16350
|
+
i0.ɵɵtemplate(16, RecipeDetailsComponent_div_0_div_11_ng_miam_icon_16_Template, 1, 3, "ng-miam-icon", 29);
|
|
16339
16351
|
i0.ɵɵelementEnd();
|
|
16340
16352
|
i0.ɵɵelementEnd();
|
|
16341
16353
|
i0.ɵɵtemplate(17, RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_details_infos_17_Template, 1, 4, "ng-miam-recipe-details-infos", 30);
|
|
@@ -16355,7 +16367,7 @@
|
|
|
16355
16367
|
i0.ɵɵtemplate(26, RecipeDetailsComponent_div_0_div_11_div_26_Template, 2, 1, "div", 38);
|
|
16356
16368
|
i0.ɵɵtemplate(27, RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_details_infos_27_Template, 1, 4, "ng-miam-recipe-details-infos", 30);
|
|
16357
16369
|
i0.ɵɵelementStart(28, "ng-miam-recipe-details-ingredients", 39);
|
|
16358
|
-
i0.ɵɵlistener("guestsUpdated", function RecipeDetailsComponent_div_0_div_11_Template_ng_miam_recipe_details_ingredients_guestsUpdated_28_listener() { i0.ɵɵrestoreView(
|
|
16370
|
+
i0.ɵɵlistener("guestsUpdated", function RecipeDetailsComponent_div_0_div_11_Template_ng_miam_recipe_details_ingredients_guestsUpdated_28_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r38 = i0.ɵɵnextContext(2); return ctx_r38.updateGuests(); });
|
|
16359
16371
|
i0.ɵɵelementEnd();
|
|
16360
16372
|
i0.ɵɵtemplate(29, RecipeDetailsComponent_div_0_div_11_ng_miam_recipe_details_steps_29_Template, 1, 1, "ng-miam-recipe-details-steps", 31);
|
|
16361
16373
|
i0.ɵɵelementStart(30, "a", 40);
|
|
@@ -16375,11 +16387,11 @@
|
|
|
16375
16387
|
i0.ɵɵadvance(1);
|
|
16376
16388
|
i0.ɵɵproperty("ngIf", ctx_r8.recipe.filigraneLogoUrl);
|
|
16377
16389
|
i0.ɵɵadvance(3);
|
|
16378
|
-
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(13,
|
|
16390
|
+
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(13, 22, ctx_r8.userService.isLogged$));
|
|
16379
16391
|
i0.ɵɵadvance(2);
|
|
16380
16392
|
i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r8.icon.Print);
|
|
16381
16393
|
i0.ɵɵadvance(2);
|
|
16382
|
-
i0.ɵɵproperty("
|
|
16394
|
+
i0.ɵɵproperty("ngIf", ctx_r8.helpButtonAllowed);
|
|
16383
16395
|
i0.ɵɵadvance(1);
|
|
16384
16396
|
i0.ɵɵproperty("ngIf", !ctx_r8.isMobile);
|
|
16385
16397
|
i0.ɵɵadvance(1);
|
|
@@ -16419,7 +16431,7 @@
|
|
|
16419
16431
|
i0.ɵɵi18n(10, 11);
|
|
16420
16432
|
i0.ɵɵelementEnd();
|
|
16421
16433
|
i0.ɵɵelementEnd();
|
|
16422
|
-
i0.ɵɵtemplate(11, RecipeDetailsComponent_div_0_div_11_Template, 32,
|
|
16434
|
+
i0.ɵɵtemplate(11, RecipeDetailsComponent_div_0_div_11_Template, 32, 24, "div", 12);
|
|
16423
16435
|
i0.ɵɵelementEnd();
|
|
16424
16436
|
}
|
|
16425
16437
|
if (rf & 2) {
|
|
@@ -16437,9 +16449,9 @@
|
|
|
16437
16449
|
}
|
|
16438
16450
|
function RecipeDetailsComponent_ng_template_1_Template(rf, ctx) {
|
|
16439
16451
|
if (rf & 1) {
|
|
16440
|
-
var
|
|
16441
|
-
i0.ɵɵelementStart(0, "ng-miam-recipe-addon",
|
|
16442
|
-
i0.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_template_1_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0.ɵɵrestoreView(
|
|
16452
|
+
var _r40_1 = i0.ɵɵgetCurrentView();
|
|
16453
|
+
i0.ɵɵelementStart(0, "ng-miam-recipe-addon", 61);
|
|
16454
|
+
i0.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_template_1_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0.ɵɵrestoreView(_r40_1); var ctx_r39 = i0.ɵɵnextContext(); return ctx_r39.toggleAddon(); });
|
|
16443
16455
|
i0.ɵɵelementEnd();
|
|
16444
16456
|
}
|
|
16445
16457
|
if (rf & 2) {
|
|
@@ -16476,6 +16488,7 @@
|
|
|
16476
16488
|
_this.displayPricing = true;
|
|
16477
16489
|
_this.displayAddedOnPicture = true;
|
|
16478
16490
|
_this.displayGuests = true;
|
|
16491
|
+
_this.helpButtonAllowed = true;
|
|
16479
16492
|
_this.stepsOnLeftSide = false; // If true, display the detail in 4 quarters instead of 2 halves
|
|
16480
16493
|
_this.cookingTimeAsPrimaryInfo = false; // If true, display the cooking time next to total time
|
|
16481
16494
|
_this.pricingGuestsText = 'par-personne';
|
|
@@ -16676,7 +16689,7 @@
|
|
|
16676
16689
|
var _t;
|
|
16677
16690
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topContainerImg = _t.first);
|
|
16678
16691
|
}
|
|
16679
|
-
}, inputs: { recipeId: "recipeId", previewAllowed: "previewAllowed", ingredientsPictures: "ingredientsPictures", forceDisplayTags: "forceDisplayTags", displayTagsIcons: "displayTagsIcons", displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture", displayGuests: "displayGuests", stepsOnLeftSide: "stepsOnLeftSide", cookingTimeAsPrimaryInfo: "cookingTimeAsPrimaryInfo", moreRecipesImageURL: "moreRecipesImageURL", pricingGuestsText: "pricingGuestsText" }, outputs: { recipeAdded: "recipeAdded", recipeError: "recipeError" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: function () {
|
|
16692
|
+
}, inputs: { recipeId: "recipeId", previewAllowed: "previewAllowed", ingredientsPictures: "ingredientsPictures", forceDisplayTags: "forceDisplayTags", displayTagsIcons: "displayTagsIcons", displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture", displayGuests: "displayGuests", helpButtonAllowed: "helpButtonAllowed", stepsOnLeftSide: "stepsOnLeftSide", cookingTimeAsPrimaryInfo: "cookingTimeAsPrimaryInfo", moreRecipesImageURL: "moreRecipesImageURL", pricingGuestsText: "pricingGuestsText" }, outputs: { recipeAdded: "recipeAdded", recipeError: "recipeError" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: function () {
|
|
16680
16693
|
var i18n_1;
|
|
16681
16694
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
16682
16695
|
var MSG_EXTERNAL_4599208369990758061$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS__2 = goog.getMsg(" Voir plus d'id\u00E9es repas ");
|
|
@@ -16701,7 +16714,7 @@
|
|
|
16701
16714
|
else {
|
|
16702
16715
|
i18n_6 = $localize(templateObject_3$d || (templateObject_3$d = __makeTemplateObject([":\u241Fe3d3d7039794cbbd2e16e8548bfbf9ee8fa29247\u241F1225769932237505428:Ajouter les ingr\u00E9dients"], [":\u241Fe3d3d7039794cbbd2e16e8548bfbf9ee8fa29247\u241F1225769932237505428:Ajouter les ingr\u00E9dients"])));
|
|
16703
16716
|
}
|
|
16704
|
-
return [["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"], i18n_1, ["class", "miam-recipe-details__container", 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__container"], [1, "miam-recipe-details__summary"], ["topContainerImg", ""], [1, "miam-recipe-details__summary__container"], [1, "miam-recipe-details__sponsor"], [3, "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__picture"], [3, "src", "ngClass", 4, "ngIf"], [3, "videoId", "width", "height", 4, "ngIf"], ["class", "miam-recipe-details__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-details__actionbar"], [1, "miam-recipe-details__actionbar__group"], ["class", "miam-recipe-details__actions__icon like", 3, "recipe", "originTrace", "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)",
|
|
16717
|
+
return [["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"], i18n_1, ["class", "miam-recipe-details__container", 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__container"], [1, "miam-recipe-details__summary"], ["topContainerImg", ""], [1, "miam-recipe-details__summary__container"], [1, "miam-recipe-details__sponsor"], [3, "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__picture"], [3, "src", "ngClass", 4, "ngIf"], [3, "videoId", "width", "height", 4, "ngIf"], ["class", "miam-recipe-details__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-details__actionbar"], [1, "miam-recipe-details__actionbar__group"], ["class", "miam-recipe-details__actions__icon like", 3, "recipe", "originTrace", "width", "height", 4, "ngIf"], ["primaryColor", "var(--m-color-primary)", 1, "miam-recipe-details__actions__icon", "print", 3, "width", "height", "iconName", "click"], ["class", "miam-recipe-details__actions__icon help", "primaryColor", "var(--m-color-grey02)", "secondaryColor", "var(--m-color-grey07)", 3, "width", "height", "iconName", "click", 4, "ngIf"], [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", "displayGuests", "guestsUpdated"], [1, "miam-recipe-details__content__image", 3, "href"], [3, "src"], [3, "recipe", "showAddon"], [3, "src", "ngClass"], [3, "videoId", "width", "height"], [1, "miam-recipe-details__picture__filigrane"], [1, "miam-recipe-details__actions__icon", "like", 3, "recipe", "originTrace", "width", "height"], ["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"], [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"], i18n_4, i18n_6, ["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"]];
|
|
16705
16718
|
}, template: function RecipeDetailsComponent_Template(rf, ctx) {
|
|
16706
16719
|
if (rf & 1) {
|
|
16707
16720
|
i0.ɵɵtemplate(0, RecipeDetailsComponent_div_0_Template, 12, 5, "div", 0);
|
|
@@ -16738,6 +16751,8 @@
|
|
|
16738
16751
|
type: i0.Input
|
|
16739
16752
|
}], displayGuests: [{
|
|
16740
16753
|
type: i0.Input
|
|
16754
|
+
}], helpButtonAllowed: [{
|
|
16755
|
+
type: i0.Input
|
|
16741
16756
|
}], stepsOnLeftSide: [{
|
|
16742
16757
|
type: i0.Input
|
|
16743
16758
|
}], cookingTimeAsPrimaryInfo: [{
|
|
@@ -16786,7 +16801,7 @@
|
|
|
16786
16801
|
}
|
|
16787
16802
|
if (rf & 2) {
|
|
16788
16803
|
var ctx_r8 = i0.ɵɵnextContext(2);
|
|
16789
|
-
i0.ɵɵproperty("recipeId", ctx_r8.recipe.id)("previewAllowed", ctx_r8.previewAllowed)("originTrace", ctx_r8.eventTrace)("stepsOnLeftSide", ctx_r8.detailsStepsOnLeftSide)("moreRecipesImageURL", ctx_r8.detailsMoreRecipesImageURL)("pricingGuestsText", ctx_r8.detailsPricingGuestsText)("displayGuests", ctx_r8.displayGuestsInDetails);
|
|
16804
|
+
i0.ɵɵproperty("recipeId", ctx_r8.recipe.id)("previewAllowed", ctx_r8.previewAllowed)("originTrace", ctx_r8.eventTrace)("stepsOnLeftSide", ctx_r8.detailsStepsOnLeftSide)("moreRecipesImageURL", ctx_r8.detailsMoreRecipesImageURL)("pricingGuestsText", ctx_r8.detailsPricingGuestsText)("displayGuests", ctx_r8.displayGuestsInDetails)("helpButtonAllowed", ctx_r8.helpButtonAllowedInDetails);
|
|
16790
16805
|
}
|
|
16791
16806
|
}
|
|
16792
16807
|
function RecipeModalComponent_ng_miam_modal_1_Template(rf, ctx) {
|
|
@@ -16794,7 +16809,7 @@
|
|
|
16794
16809
|
var _r14_1 = i0.ɵɵgetCurrentView();
|
|
16795
16810
|
i0.ɵɵelementStart(0, "ng-miam-modal", 6);
|
|
16796
16811
|
i0.ɵɵlistener("expandedChange", function RecipeModalComponent_ng_miam_modal_1_Template_ng_miam_modal_expandedChange_0_listener($event) { i0.ɵɵrestoreView(_r14_1); var ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.show = $event; })("close", function RecipeModalComponent_ng_miam_modal_1_Template_ng_miam_modal_close_0_listener() { i0.ɵɵrestoreView(_r14_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.hide(); })("cancel", function RecipeModalComponent_ng_miam_modal_1_Template_ng_miam_modal_cancel_0_listener() { i0.ɵɵrestoreView(_r14_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.removeRecipe(); })("confirm", function RecipeModalComponent_ng_miam_modal_1_Template_ng_miam_modal_confirm_0_listener() { i0.ɵɵrestoreView(_r14_1); var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.hide(); });
|
|
16797
|
-
i0.ɵɵtemplate(1, RecipeModalComponent_ng_miam_modal_1_ng_miam_recipe_details_1_Template, 2,
|
|
16812
|
+
i0.ɵɵtemplate(1, RecipeModalComponent_ng_miam_modal_1_ng_miam_recipe_details_1_Template, 2, 8, "ng-miam-recipe-details", 7);
|
|
16798
16813
|
i0.ɵɵelementEnd();
|
|
16799
16814
|
}
|
|
16800
16815
|
if (rf & 2) {
|
|
@@ -16815,6 +16830,7 @@
|
|
|
16815
16830
|
this.show = false;
|
|
16816
16831
|
this.previewMode = false;
|
|
16817
16832
|
this.displayGuestsInDetails = true;
|
|
16833
|
+
this.helpButtonAllowedInDetails = true;
|
|
16818
16834
|
this.canCloseModal = true;
|
|
16819
16835
|
this.removeIsLoading = false;
|
|
16820
16836
|
this.basketChangedSinceOpened = false; // true if show = true and basket is different since last time show was false
|
|
@@ -16846,6 +16862,7 @@
|
|
|
16846
16862
|
_this.previewMode = result.previewMode;
|
|
16847
16863
|
_this.previewAllowed = result.previewAllowed;
|
|
16848
16864
|
_this.displayGuestsInDetails = result.displayGuests;
|
|
16865
|
+
_this.helpButtonAllowedInDetails = result.helpButtonAllowed;
|
|
16849
16866
|
_this.show = true;
|
|
16850
16867
|
_this.printService.prepareForPrint(_this.elRef);
|
|
16851
16868
|
(_a = _this.detailsComponent) === null || _a === void 0 ? void 0 : _a.cdr.markForCheck();
|
|
@@ -16890,7 +16907,9 @@
|
|
|
16890
16907
|
if (this.canCloseModal) {
|
|
16891
16908
|
this.removeIsLoading = true;
|
|
16892
16909
|
this.cdr.detectChanges();
|
|
16893
|
-
this.
|
|
16910
|
+
var recipeId_1 = '' + this.recipe.id;
|
|
16911
|
+
this.groceriesListsService.removeRecipeFromList(recipeId_1, this.eventTrace);
|
|
16912
|
+
this.groceriesListsService.recipesToRemove.pipe(operators.skipWhile(function (toRemove) { return toRemove.map(function (i) { return i.id; }).includes(recipeId_1); }), operators.take(1)).subscribe(function () {
|
|
16894
16913
|
// if remove and recipe was added, then no change was made to basket, and if removed and not added it's a change to the basket
|
|
16895
16914
|
_this.basketChangedSinceOpened = !_this.recipeWasAdded;
|
|
16896
16915
|
_this.removeIsLoading = false;
|
|
@@ -16925,7 +16944,7 @@
|
|
|
16925
16944
|
else {
|
|
16926
16945
|
i18n_2 = $localize(templateObject_2$i || (templateObject_2$i = __makeTemplateObject([":\u241Ffbcdc7ac4903b6cf1768873b28836553fa58247a\u241F4845069511982551334:Ok, continuer mes courses"], [":\u241Ffbcdc7ac4903b6cf1768873b28836553fa58247a\u241F4845069511982551334:Ok, continuer mes courses"])));
|
|
16927
16946
|
}
|
|
16928
|
-
return [[3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm", 4, "ngIf", 6, "title", "confirmButtonText"], [3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm", 4, "ngIf"], [3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm", 6, "title", "confirmButtonText"], ["title", i18n_0, "confirmButtonText", i18n_2], [1, "miam-wrapper-preview"], [3, "recipeId", "displayItemsUnitaryPrice", "originTrace", "loading"], [3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm"], [3, "recipeId", "previewAllowed", "originTrace", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "recipeAdded", "recipeError", 4, "ngIf"], [3, "recipeId", "previewAllowed", "originTrace", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "recipeAdded", "recipeError"], ["details", ""]];
|
|
16947
|
+
return [[3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm", 4, "ngIf", 6, "title", "confirmButtonText"], [3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm", 4, "ngIf"], [3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm", 6, "title", "confirmButtonText"], ["title", i18n_0, "confirmButtonText", i18n_2], [1, "miam-wrapper-preview"], [3, "recipeId", "displayItemsUnitaryPrice", "originTrace", "loading"], [3, "isAngularComponent", "noHeaderMode", "expanded", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm"], [3, "recipeId", "previewAllowed", "originTrace", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError", 4, "ngIf"], [3, "recipeId", "previewAllowed", "originTrace", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError"], ["details", ""]];
|
|
16929
16948
|
}, template: function RecipeModalComponent_Template(rf, ctx) {
|
|
16930
16949
|
if (rf & 1) {
|
|
16931
16950
|
i0.ɵɵtemplate(0, RecipeModalComponent_ng_miam_modal_0_Template, 4, 10, "ng-miam-modal", 0);
|
|
@@ -17774,6 +17793,7 @@
|
|
|
17774
17793
|
_this.headerText = '';
|
|
17775
17794
|
_this.displayPricing = true;
|
|
17776
17795
|
_this.displayGuests = true;
|
|
17796
|
+
_this.helpButtonAllowed = true;
|
|
17777
17797
|
_this.displayAddedOnPicture = true;
|
|
17778
17798
|
_this.hovered = false;
|
|
17779
17799
|
_this.icon = exports.Icon;
|
|
@@ -17913,7 +17933,7 @@
|
|
|
17913
17933
|
if (rf & 1) {
|
|
17914
17934
|
i0.ɵɵlistener("scroll", function AbstractRecipeCardComponent_scroll_HostBindingHandler() { return ctx.onScroll(); }, false, i0.ɵɵresolveWindow);
|
|
17915
17935
|
}
|
|
17916
|
-
}, inputs: { headerText: "headerText", displayPricing: "displayPricing", displayGuests: "displayGuests", displayAddedOnPicture: "displayAddedOnPicture" }, outputs: { hide: "hide" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function AbstractRecipeCardComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
17936
|
+
}, inputs: { headerText: "headerText", displayPricing: "displayPricing", displayGuests: "displayGuests", helpButtonAllowed: "helpButtonAllowed", displayAddedOnPicture: "displayAddedOnPicture" }, outputs: { hide: "hide" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function AbstractRecipeCardComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
17917
17937
|
/*@__PURE__*/ (function () {
|
|
17918
17938
|
i0.ɵsetClassMetadata(AbstractRecipeCardComponent, [{
|
|
17919
17939
|
type: i0.Component,
|
|
@@ -17924,6 +17944,8 @@
|
|
|
17924
17944
|
type: i0.Input
|
|
17925
17945
|
}], displayGuests: [{
|
|
17926
17946
|
type: i0.Input
|
|
17947
|
+
}], helpButtonAllowed: [{
|
|
17948
|
+
type: i0.Input
|
|
17927
17949
|
}], displayAddedOnPicture: [{
|
|
17928
17950
|
type: i0.Input
|
|
17929
17951
|
}], hide: [{
|
|
@@ -18517,6 +18539,7 @@
|
|
|
18517
18539
|
_this.element = element;
|
|
18518
18540
|
_this.toasterService = toasterService;
|
|
18519
18541
|
_this.previewAllowed = true;
|
|
18542
|
+
_this.helpButtonAllowed = true;
|
|
18520
18543
|
_this.removedFromFavorite = new i0.EventEmitter();
|
|
18521
18544
|
_this.displayed = new i0.EventEmitter();
|
|
18522
18545
|
_this.guestsChanged = new i0.EventEmitter();
|
|
@@ -18545,7 +18568,7 @@
|
|
|
18545
18568
|
};
|
|
18546
18569
|
RecipeCardComponent.prototype.openRecipe = function () {
|
|
18547
18570
|
var videoEvent = this.contextService.videoRecipesEnabled && this.recipe.videoId;
|
|
18548
|
-
this.recipeService.displayObject(this.recipe, { previewAllowed: this.previewAllowed, guests: this.recipe.modifiedGuests, displayGuests: this.displayGuests }, this.eventTrace());
|
|
18571
|
+
this.recipeService.displayObject(this.recipe, { previewAllowed: this.previewAllowed, guests: this.recipe.modifiedGuests, displayGuests: this.displayGuests, helpButtonAllowed: this.helpButtonAllowed }, this.eventTrace());
|
|
18549
18572
|
this.displayed.emit();
|
|
18550
18573
|
};
|
|
18551
18574
|
RecipeCardComponent.prototype.updateGuests = function (count) {
|
|
@@ -18622,7 +18645,7 @@
|
|
|
18622
18645
|
return RecipeCardComponent;
|
|
18623
18646
|
}(AbstractRecipeCardComponent));
|
|
18624
18647
|
RecipeCardComponent.ɵfac = function RecipeCardComponent_Factory(t) { return new (t || RecipeCardComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(RecipeEventsService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(PointOfSalesService), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(AnalyticsService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(ToasterService)); };
|
|
18625
|
-
RecipeCardComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeCardComponent, selectors: [["ng-miam-recipe-card"]], inputs: { recipeId: "recipeId", recipe: "recipe", previewAllowed: "previewAllowed" }, outputs: { removedFromFavorite: "removedFromFavorite", displayed: "displayed", guestsChanged: "guestsChanged" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: function () {
|
|
18648
|
+
RecipeCardComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeCardComponent, selectors: [["ng-miam-recipe-card"]], inputs: { recipeId: "recipeId", recipe: "recipe", previewAllowed: "previewAllowed", helpButtonAllowed: "helpButtonAllowed" }, outputs: { removedFromFavorite: "removedFromFavorite", displayed: "displayed", guestsChanged: "guestsChanged" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: function () {
|
|
18626
18649
|
var i18n_0;
|
|
18627
18650
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
18628
18651
|
var MSG_EXTERNAL_3684169623116339825$$LIB__WEB_COMPONENTS_RECIPE_CARDS_RECIPE_CARD_RECIPE_CARD_COMPONENT_TS_____1 = goog.getMsg("Chef d\u00E9butant");
|
|
@@ -18728,6 +18751,8 @@
|
|
|
18728
18751
|
type: i0.Input
|
|
18729
18752
|
}], previewAllowed: [{
|
|
18730
18753
|
type: i0.Input
|
|
18754
|
+
}], helpButtonAllowed: [{
|
|
18755
|
+
type: i0.Input
|
|
18731
18756
|
}], removedFromFavorite: [{
|
|
18732
18757
|
type: i0.Output
|
|
18733
18758
|
}], displayed: [{
|
|
@@ -19611,7 +19636,7 @@
|
|
|
19611
19636
|
})();
|
|
19612
19637
|
var templateObject_1$t, templateObject_2$m, templateObject_3$h, templateObject_4$c, templateObject_5$8, templateObject_6$7, templateObject_7$6, templateObject_8$5, templateObject_9$5, templateObject_10$2;
|
|
19613
19638
|
|
|
19614
|
-
var
|
|
19639
|
+
var _a;
|
|
19615
19640
|
var _c0$s = ["recipeCard"];
|
|
19616
19641
|
function SuggestionCardComponent_ng_miam_recipe_card_0_Template(rf, ctx) {
|
|
19617
19642
|
if (rf & 1) {
|
|
@@ -19626,13 +19651,13 @@
|
|
|
19626
19651
|
}
|
|
19627
19652
|
}
|
|
19628
19653
|
var recipeIncludes$2 = ['recipe-provider', 'sponsors'];
|
|
19629
|
-
var recipeSparseFields$2 = (
|
|
19654
|
+
var recipeSparseFields$2 = (_a = {
|
|
19630
19655
|
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
19631
19656
|
'resting-time'], recipeIncludes$2),
|
|
19632
19657
|
sponsors: ['logo-url']
|
|
19633
19658
|
},
|
|
19634
|
-
|
|
19635
|
-
|
|
19659
|
+
_a['recipe-provider'] = ['name'],
|
|
19660
|
+
_a);
|
|
19636
19661
|
/**
|
|
19637
19662
|
* This is an angular component design to be a web component
|
|
19638
19663
|
* that's why we use onPushStrategie with the changeDetetectorRef
|
|
@@ -19661,6 +19686,10 @@
|
|
|
19661
19686
|
this.loadRecipe();
|
|
19662
19687
|
}
|
|
19663
19688
|
};
|
|
19689
|
+
// Only send show event if the recipe has changed while the card was in viewport
|
|
19690
|
+
SuggestionCardComponent.prototype.sendShowEvent = function () {
|
|
19691
|
+
return false;
|
|
19692
|
+
};
|
|
19664
19693
|
// If recipe already in basket, update the number of guests so that the pricing gets updated as well
|
|
19665
19694
|
// (display = false so that the recipe details don't show up)
|
|
19666
19695
|
SuggestionCardComponent.prototype.guestsChanged = function () {
|
|
@@ -19695,10 +19724,8 @@
|
|
|
19695
19724
|
// Otherwise, will show default number of guests for the recipe
|
|
19696
19725
|
SuggestionCardComponent.prototype.processResults = function (recipes) {
|
|
19697
19726
|
var _this = this;
|
|
19698
|
-
var _a, _b;
|
|
19699
19727
|
this.isEmpty = (!recipes || recipes.length === 0);
|
|
19700
19728
|
if (!this.isEmpty) {
|
|
19701
|
-
var recipeChanged = ((_a = this.recipe) === null || _a === void 0 ? void 0 : _a.id) !== ((_b = recipes[0]) === null || _b === void 0 ? void 0 : _b.id);
|
|
19702
19729
|
// get the first recipe and shallow copy it to permit to send event and do not disturb any other component
|
|
19703
19730
|
// if ressource is cached without copy another load will get the attributes
|
|
19704
19731
|
this.recipe = recipes[0].shallowCopyWithEvents(this.recipeEventsService.ORIGIN_SUGGESTION, this.eventsGroupId);
|
|
@@ -19710,10 +19737,6 @@
|
|
|
19710
19737
|
}
|
|
19711
19738
|
}));
|
|
19712
19739
|
this.recipeCard.cdr.markForCheck();
|
|
19713
|
-
if (recipeChanged) {
|
|
19714
|
-
this.analyticsEventSent = false;
|
|
19715
|
-
this.sendShowEvent();
|
|
19716
|
-
}
|
|
19717
19740
|
}
|
|
19718
19741
|
else {
|
|
19719
19742
|
this.hide.emit();
|
|
@@ -19993,7 +20016,7 @@
|
|
|
19993
20016
|
})();
|
|
19994
20017
|
var templateObject_1$v;
|
|
19995
20018
|
|
|
19996
|
-
var _c
|
|
20019
|
+
var _c;
|
|
19997
20020
|
var _c0$t = ["categoryContent"];
|
|
19998
20021
|
var _c1$c = ["categoryCards"];
|
|
19999
20022
|
function CatalogCategoryComponent_div_0_div_15_Template(rf, ctx) {
|
|
@@ -20118,13 +20141,13 @@
|
|
|
20118
20141
|
var SPACE_BETWEEN_CARD = 16;
|
|
20119
20142
|
var SLIDER_WIDTH = 48;
|
|
20120
20143
|
var recipeIncludes$3 = ['recipe-provider', 'sponsors'];
|
|
20121
|
-
var recipeSparseFields$3 = (_c
|
|
20144
|
+
var recipeSparseFields$3 = (_c = {
|
|
20122
20145
|
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
20123
20146
|
'resting-time'], recipeIncludes$3),
|
|
20124
20147
|
sponsors: ['logo-url']
|
|
20125
20148
|
},
|
|
20126
|
-
_c
|
|
20127
|
-
_c
|
|
20149
|
+
_c['recipe-provider'] = ['name'],
|
|
20150
|
+
_c);
|
|
20128
20151
|
var CatalogCategoryComponent = /** @class */ (function (_super) {
|
|
20129
20152
|
__extends(CatalogCategoryComponent, _super);
|
|
20130
20153
|
function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService) {
|
|
@@ -20931,12 +20954,12 @@
|
|
|
20931
20954
|
return RecipeFilters;
|
|
20932
20955
|
}());
|
|
20933
20956
|
|
|
20934
|
-
var _c$
|
|
20957
|
+
var _c$1;
|
|
20935
20958
|
function CatalogListComponent_div_1_div_2_div_4_Template(rf, ctx) {
|
|
20936
20959
|
if (rf & 1) {
|
|
20937
|
-
i0.ɵɵelementStart(0, "div");
|
|
20960
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
20938
20961
|
i0.ɵɵelementStart(1, "span");
|
|
20939
|
-
i0.ɵɵi18n(2,
|
|
20962
|
+
i0.ɵɵi18n(2, 18);
|
|
20940
20963
|
i0.ɵɵelementEnd();
|
|
20941
20964
|
i0.ɵɵelementStart(3, "span");
|
|
20942
20965
|
i0.ɵɵtext(4);
|
|
@@ -20959,7 +20982,9 @@
|
|
|
20959
20982
|
i0.ɵɵtemplate(4, CatalogListComponent_div_1_div_2_div_4_Template, 5, 1, "div", 14);
|
|
20960
20983
|
i0.ɵɵelementEnd();
|
|
20961
20984
|
i0.ɵɵelementStart(5, "div", 15);
|
|
20962
|
-
i0.ɵɵ
|
|
20985
|
+
i0.ɵɵelementStart(6, "span");
|
|
20986
|
+
i0.ɵɵi18n(7, 16);
|
|
20987
|
+
i0.ɵɵelementEnd();
|
|
20963
20988
|
i0.ɵɵelementEnd();
|
|
20964
20989
|
i0.ɵɵelementEnd();
|
|
20965
20990
|
}
|
|
@@ -20972,15 +20997,17 @@
|
|
|
20972
20997
|
function CatalogListComponent_div_1_ng_template_3_div_0_Template(rf, ctx) {
|
|
20973
20998
|
if (rf & 1) {
|
|
20974
20999
|
i0.ɵɵelementStart(0, "div");
|
|
20975
|
-
i0.ɵɵelementStart(1, "
|
|
20976
|
-
i0.ɵɵ
|
|
21000
|
+
i0.ɵɵelementStart(1, "div", 19);
|
|
21001
|
+
i0.ɵɵelementStart(2, "span");
|
|
21002
|
+
i0.ɵɵi18n(3, 20);
|
|
21003
|
+
i0.ɵɵelementEnd();
|
|
20977
21004
|
i0.ɵɵelementEnd();
|
|
20978
21005
|
i0.ɵɵelementEnd();
|
|
20979
21006
|
}
|
|
20980
21007
|
}
|
|
20981
21008
|
function CatalogListComponent_div_1_ng_template_3_Template(rf, ctx) {
|
|
20982
21009
|
if (rf & 1) {
|
|
20983
|
-
i0.ɵɵtemplate(0, CatalogListComponent_div_1_ng_template_3_div_0_Template,
|
|
21010
|
+
i0.ɵɵtemplate(0, CatalogListComponent_div_1_ng_template_3_div_0_Template, 4, 0, "div", 9);
|
|
20984
21011
|
i0.ɵɵpipe(1, "async");
|
|
20985
21012
|
}
|
|
20986
21013
|
if (rf & 2) {
|
|
@@ -20992,8 +21019,10 @@
|
|
|
20992
21019
|
}
|
|
20993
21020
|
function CatalogListComponent_div_1_ng_template_5_Template(rf, ctx) {
|
|
20994
21021
|
if (rf & 1) {
|
|
20995
|
-
i0.ɵɵelementStart(0, "
|
|
20996
|
-
i0.ɵɵ
|
|
21022
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
21023
|
+
i0.ɵɵelementStart(1, "span");
|
|
21024
|
+
i0.ɵɵi18n(2, 22);
|
|
21025
|
+
i0.ɵɵelementEnd();
|
|
20997
21026
|
i0.ɵɵelementEnd();
|
|
20998
21027
|
}
|
|
20999
21028
|
}
|
|
@@ -21001,9 +21030,9 @@
|
|
|
21001
21030
|
if (rf & 1) {
|
|
21002
21031
|
i0.ɵɵelementStart(0, "div", 7);
|
|
21003
21032
|
i0.ɵɵelement(1, "ng-miam-icon", 8);
|
|
21004
|
-
i0.ɵɵtemplate(2, CatalogListComponent_div_1_div_2_Template,
|
|
21033
|
+
i0.ɵɵtemplate(2, CatalogListComponent_div_1_div_2_Template, 8, 1, "div", 9);
|
|
21005
21034
|
i0.ɵɵtemplate(3, CatalogListComponent_div_1_ng_template_3_Template, 2, 4, "ng-template", null, 10, i0.ɵɵtemplateRefExtractor);
|
|
21006
|
-
i0.ɵɵtemplate(5, CatalogListComponent_div_1_ng_template_5_Template,
|
|
21035
|
+
i0.ɵɵtemplate(5, CatalogListComponent_div_1_ng_template_5_Template, 3, 0, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
|
|
21007
21036
|
i0.ɵɵelementEnd();
|
|
21008
21037
|
}
|
|
21009
21038
|
if (rf & 2) {
|
|
@@ -21018,7 +21047,7 @@
|
|
|
21018
21047
|
function CatalogListComponent_ng_miam_card_create_recipe_3_Template(rf, ctx) {
|
|
21019
21048
|
if (rf & 1) {
|
|
21020
21049
|
var _r13_1 = i0.ɵɵgetCurrentView();
|
|
21021
|
-
i0.ɵɵelementStart(0, "ng-miam-card-create-recipe",
|
|
21050
|
+
i0.ɵɵelementStart(0, "ng-miam-card-create-recipe", 23);
|
|
21022
21051
|
i0.ɵɵlistener("clicked", function CatalogListComponent_ng_miam_card_create_recipe_3_Template_ng_miam_card_create_recipe_clicked_0_listener() { i0.ɵɵrestoreView(_r13_1); var ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.recipeActionTriggered.emit({ action: "CREATE", recipe: null }); });
|
|
21023
21052
|
i0.ɵɵelementEnd();
|
|
21024
21053
|
}
|
|
@@ -21026,19 +21055,19 @@
|
|
|
21026
21055
|
function CatalogListComponent_ng_miam_catalog_recipe_card_4_Template(rf, ctx) {
|
|
21027
21056
|
if (rf & 1) {
|
|
21028
21057
|
var _r16_1 = i0.ɵɵgetCurrentView();
|
|
21029
|
-
i0.ɵɵelementStart(0, "ng-miam-catalog-recipe-card",
|
|
21058
|
+
i0.ɵɵelementStart(0, "ng-miam-catalog-recipe-card", 24);
|
|
21030
21059
|
i0.ɵɵlistener("addToMealsPlanner", function CatalogListComponent_ng_miam_catalog_recipe_card_4_Template_ng_miam_catalog_recipe_card_addToMealsPlanner_0_listener($event) { i0.ɵɵrestoreView(_r16_1); var ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.addToMealsPlanner.emit($event); })("actionTriggered", function CatalogListComponent_ng_miam_catalog_recipe_card_4_Template_ng_miam_catalog_recipe_card_actionTriggered_0_listener($event) { i0.ɵɵrestoreView(_r16_1); var recipe_r14 = ctx.$implicit; var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.recipeActionTriggered.emit({ action: $event, recipe: recipe_r14 }); });
|
|
21031
21060
|
i0.ɵɵelementEnd();
|
|
21032
21061
|
}
|
|
21033
21062
|
if (rf & 2) {
|
|
21034
21063
|
var recipe_r14 = ctx.$implicit;
|
|
21035
21064
|
var ctx_r2 = i0.ɵɵnextContext();
|
|
21036
|
-
i0.ɵɵproperty("recipe", recipe_r14)("originTrace", ctx_r2.eventTrace())("displayPricing", ctx_r2.displayPricing)("previewAllowed", !ctx_r2.addRecipeMode)("addRecipeMode", ctx_r2.addRecipeMode)("displayGuests", ctx_r2.displayGuests);
|
|
21065
|
+
i0.ɵɵproperty("recipe", recipe_r14)("originTrace", ctx_r2.eventTrace())("displayPricing", ctx_r2.displayPricing)("previewAllowed", !ctx_r2.addRecipeMode)("addRecipeMode", ctx_r2.addRecipeMode)("displayGuests", ctx_r2.displayGuests)("helpButtonAllowed", ctx_r2.helpButtonAllowed);
|
|
21037
21066
|
}
|
|
21038
21067
|
}
|
|
21039
21068
|
function CatalogListComponent_ng_miam_catalog_article_card_5_Template(rf, ctx) {
|
|
21040
21069
|
if (rf & 1) {
|
|
21041
|
-
i0.ɵɵelement(0, "ng-miam-catalog-article-card",
|
|
21070
|
+
i0.ɵɵelement(0, "ng-miam-catalog-article-card", 25);
|
|
21042
21071
|
}
|
|
21043
21072
|
if (rf & 2) {
|
|
21044
21073
|
var article_r18 = ctx.$implicit;
|
|
@@ -21047,22 +21076,22 @@
|
|
|
21047
21076
|
}
|
|
21048
21077
|
function CatalogListComponent_div_6_Template(rf, ctx) {
|
|
21049
21078
|
if (rf & 1) {
|
|
21050
|
-
i0.ɵɵelementStart(0, "div",
|
|
21079
|
+
i0.ɵɵelementStart(0, "div", 26);
|
|
21051
21080
|
i0.ɵɵelement(1, "ng-miam-loader");
|
|
21052
21081
|
i0.ɵɵelementStart(2, "div");
|
|
21053
|
-
i0.ɵɵi18n(3,
|
|
21082
|
+
i0.ɵɵi18n(3, 27);
|
|
21054
21083
|
i0.ɵɵelementEnd();
|
|
21055
21084
|
i0.ɵɵelementEnd();
|
|
21056
21085
|
}
|
|
21057
21086
|
}
|
|
21058
21087
|
var recipeIncludes$4 = ['recipe-provider', 'sponsors'];
|
|
21059
|
-
var recipeSparseFields$4 = (_c$
|
|
21088
|
+
var recipeSparseFields$4 = (_c$1 = {
|
|
21060
21089
|
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
21061
21090
|
'resting-time', 'computed-cost'], recipeIncludes$4),
|
|
21062
21091
|
sponsors: ['logo-url']
|
|
21063
21092
|
},
|
|
21064
|
-
_c$
|
|
21065
|
-
_c$
|
|
21093
|
+
_c$1['recipe-provider'] = ['name'],
|
|
21094
|
+
_c$1);
|
|
21066
21095
|
var CatalogListComponent = /** @class */ (function (_super) {
|
|
21067
21096
|
__extends(CatalogListComponent, _super);
|
|
21068
21097
|
function CatalogListComponent(recipesService, recipeLikesService, articlesService, userService, context, cdr, analyticsService) {
|
|
@@ -21077,7 +21106,9 @@
|
|
|
21077
21106
|
_this.insertCreateCard = false;
|
|
21078
21107
|
_this.randomMode = false;
|
|
21079
21108
|
_this.displayGuests = true;
|
|
21109
|
+
_this.helpButtonAllowed = true;
|
|
21080
21110
|
_this.addRecipeMode = false;
|
|
21111
|
+
_this.excludedRecipesIds = [];
|
|
21081
21112
|
_this.addToMealsPlanner = new i0.EventEmitter();
|
|
21082
21113
|
_this.filterRemoved = new i0.EventEmitter();
|
|
21083
21114
|
_this.recipeActionTriggered = new i0.EventEmitter();
|
|
@@ -21176,6 +21207,9 @@
|
|
|
21176
21207
|
var _this = this;
|
|
21177
21208
|
// Because Filter is a type, attributes are always in the same order, so stringify won't be false for objects with same attributes
|
|
21178
21209
|
if (JSON.stringify(requestFilters) === JSON.stringify(this.filters)) {
|
|
21210
|
+
if (this.excludedRecipesIds.length > 0) {
|
|
21211
|
+
results = results.filter(function (recipe) { return !_this.excludedRecipesIds.includes(recipe.id); });
|
|
21212
|
+
}
|
|
21179
21213
|
// if you spam click on filters, multiple requests with page == 1 could be sent for the same filters -> only keep the last result
|
|
21180
21214
|
this.currentRecipes = page === 1 ? results : __spread(this.currentRecipes, results);
|
|
21181
21215
|
this.currentRecipes.forEach(function (r) {
|
|
@@ -21307,7 +21341,7 @@
|
|
|
21307
21341
|
var _t;
|
|
21308
21342
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCards = _t);
|
|
21309
21343
|
}
|
|
21310
|
-
}, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing", displayGuests: "displayGuests", addRecipeMode: "addRecipeMode" }, outputs: { addToMealsPlanner: "addToMealsPlanner", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 9, vars: 9, consts: function () {
|
|
21344
|
+
}, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing", displayGuests: "displayGuests", helpButtonAllowed: "helpButtonAllowed", addRecipeMode: "addRecipeMode", excludedRecipesIds: "excludedRecipesIds" }, outputs: { addToMealsPlanner: "addToMealsPlanner", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 9, vars: 9, consts: function () {
|
|
21311
21345
|
var i18n_0;
|
|
21312
21346
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
21313
21347
|
var MSG_EXTERNAL_2565683500171826824$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_LIST_CATALOG_LIST_COMPONENT_TS___1 = goog.getMsg("D\u00E9sol\u00E9, aucune proposition trouv\u00E9e");
|
|
@@ -21356,14 +21390,14 @@
|
|
|
21356
21390
|
else {
|
|
21357
21391
|
i18n_10 = $localize(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject([":\u241F834498e5698b366d53cba7a7f98b06a12967862c\u241F1875448131572248295: Chargement des r\u00E9sultats... "], [":\u241F834498e5698b366d53cba7a7f98b06a12967862c\u241F1875448131572248295: Chargement des r\u00E9sultats... "])));
|
|
21358
21392
|
}
|
|
21359
|
-
return [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "addToMealsPlanner", "actionTriggered", 4, "ngFor", "ngForOf"], [3, "article", 4, "ngFor", "ngForOf"], ["class", "miam-catalog-list__loader", 4, "ngIf"], ["id", "miam-catalog-list__anchor"], [1, "miam-catalog-list__notFound"], [1, "miam-catalog-list__notFound__icon", 3, "width", "height", "iconName"], [4, "ngIf", "ngIfElse"], ["notFiltering", ""], ["notLogged", ""], [1, "miam-catalog-list__notFound__title1"], i18n_0, [4, "ngIf"], [1, "miam-catalog-list__notFound__title2"], i18n_2, i18n_4, i18n_6, i18n_8, [1, "miam-catalog-list__card", 3, "clicked"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "addToMealsPlanner", "actionTriggered"], [3, "article"], [1, "miam-catalog-list__loader"], i18n_10];
|
|
21393
|
+
return [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "helpButtonAllowed", "addToMealsPlanner", "actionTriggered", 4, "ngFor", "ngForOf"], [3, "article", 4, "ngFor", "ngForOf"], ["class", "miam-catalog-list__loader", 4, "ngIf"], ["id", "miam-catalog-list__anchor"], [1, "miam-catalog-list__notFound"], [1, "miam-catalog-list__notFound__icon", 3, "width", "height", "iconName"], [4, "ngIf", "ngIfElse"], ["notFiltering", ""], ["notLogged", ""], [1, "miam-catalog-list__notFound__title1", "filtering"], i18n_0, ["class", "miam-catalog-list__notFound__searching", 4, "ngIf"], [1, "miam-catalog-list__notFound__title2"], i18n_2, [1, "miam-catalog-list__notFound__searching"], i18n_4, [1, "miam-catalog-list__notFound__title1", "not-filtering"], i18n_6, [1, "miam-catalog-list__notFound__title1", "not-logged"], i18n_8, [1, "miam-catalog-list__card", 3, "clicked"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "helpButtonAllowed", "addToMealsPlanner", "actionTriggered"], [3, "article"], [1, "miam-catalog-list__loader"], i18n_10];
|
|
21360
21394
|
}, template: function CatalogListComponent_Template(rf, ctx) {
|
|
21361
21395
|
if (rf & 1) {
|
|
21362
21396
|
i0.ɵɵelementStart(0, "div", 0);
|
|
21363
21397
|
i0.ɵɵtemplate(1, CatalogListComponent_div_1_Template, 7, 5, "div", 1);
|
|
21364
21398
|
i0.ɵɵpipe(2, "async");
|
|
21365
21399
|
i0.ɵɵtemplate(3, CatalogListComponent_ng_miam_card_create_recipe_3_Template, 1, 0, "ng-miam-card-create-recipe", 2);
|
|
21366
|
-
i0.ɵɵtemplate(4, CatalogListComponent_ng_miam_catalog_recipe_card_4_Template, 1,
|
|
21400
|
+
i0.ɵɵtemplate(4, CatalogListComponent_ng_miam_catalog_recipe_card_4_Template, 1, 7, "ng-miam-catalog-recipe-card", 3);
|
|
21367
21401
|
i0.ɵɵtemplate(5, CatalogListComponent_ng_miam_catalog_article_card_5_Template, 1, 1, "ng-miam-catalog-article-card", 4);
|
|
21368
21402
|
i0.ɵɵtemplate(6, CatalogListComponent_div_6_Template, 4, 0, "div", 5);
|
|
21369
21403
|
i0.ɵɵpipe(7, "async");
|
|
@@ -21382,7 +21416,7 @@
|
|
|
21382
21416
|
i0.ɵɵadvance(1);
|
|
21383
21417
|
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(7, 7, ctx.loading));
|
|
21384
21418
|
}
|
|
21385
|
-
}, directives: [i2$1.NgIf, i2$1.NgForOf, IconComponent, CardCreateRecipeComponent, CatalogRecipeCardComponent, CatalogArticleCardComponent, LoaderComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-catalog-list__cards{display:flex;flex-flow:row wrap;justify-content:center;margin:calc(0px - var(--m-catalog-cards-spacing)/2);position:relative;right:0;top:0;width:calc(100% + var(--m-catalog-cards-spacing))}.miam-catalog-list__cards .miam-catalog-list__notFound{display:flex;flex-direction:column;justify-content:center;padding:36px 0 0;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1{color:var(--m-color-primary);font-size:24px;font-weight:700;margin-top:36px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title2{color:var(--m-color-grey-text);font-size:22px}.miam-catalog-list__cards .miam-catalog-list__loader{color:var(--m-color-grey-text);font-size:20px;font-weight:700;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__loader .miam-loader{height:80px;margin-bottom:16px;margin-left:calc(50% - 40px);margin-top:80px;width:80px}.miam-catalog-list__cards #miam-catalog-list__anchor{bottom:0;height:600px;margin-top:-600px;position:relative}"], encapsulation: 2, changeDetection: 0 });
|
|
21419
|
+
}, directives: [i2$1.NgIf, i2$1.NgForOf, IconComponent, CardCreateRecipeComponent, CatalogRecipeCardComponent, CatalogArticleCardComponent, LoaderComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-catalog-list__cards{display:flex;flex-flow:row wrap;justify-content:center;margin:calc(0px - var(--m-catalog-cards-spacing)/2);position:relative;right:0;top:0;width:calc(100% + var(--m-catalog-cards-spacing))}.miam-catalog-list__cards .miam-catalog-list__notFound{display:flex;flex-direction:column;justify-content:center;padding:36px 0 0;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1{color:var(--m-color-primary);font-size:24px;font-weight:700;margin-top:36px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering{display:flex;justify-content:center}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering .miam-catalog-list__notFound__searching span{margin-left:5px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title2{color:var(--m-color-grey-text);font-size:22px}.miam-catalog-list__cards .miam-catalog-list__loader{color:var(--m-color-grey-text);font-size:20px;font-weight:700;text-align:center;width:100%}.miam-catalog-list__cards .miam-catalog-list__loader .miam-loader{height:80px;margin-bottom:16px;margin-left:calc(50% - 40px);margin-top:80px;width:80px}.miam-catalog-list__cards #miam-catalog-list__anchor{bottom:0;height:600px;margin-top:-600px;position:relative}"], encapsulation: 2, changeDetection: 0 });
|
|
21386
21420
|
/*@__PURE__*/ (function () {
|
|
21387
21421
|
i0.ɵsetClassMetadata(CatalogListComponent, [{
|
|
21388
21422
|
type: i0.Component,
|
|
@@ -21405,8 +21439,12 @@
|
|
|
21405
21439
|
type: i0.Input
|
|
21406
21440
|
}], displayGuests: [{
|
|
21407
21441
|
type: i0.Input
|
|
21442
|
+
}], helpButtonAllowed: [{
|
|
21443
|
+
type: i0.Input
|
|
21408
21444
|
}], addRecipeMode: [{
|
|
21409
21445
|
type: i0.Input
|
|
21446
|
+
}], excludedRecipesIds: [{
|
|
21447
|
+
type: i0.Input
|
|
21410
21448
|
}], addToMealsPlanner: [{
|
|
21411
21449
|
type: i0.Output
|
|
21412
21450
|
}], filterRemoved: [{
|
|
@@ -23903,7 +23941,7 @@
|
|
|
23903
23941
|
i0.ɵɵadvance(2);
|
|
23904
23942
|
i0.ɵɵproperty("ngIf", !ctx.creatingRecipe && ctx.catalogSettingHasLoaded)("ngIfElse", _r2);
|
|
23905
23943
|
}
|
|
23906
|
-
}, directives: [i2$1.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2$1.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, MealsPlannerLink, RecipeStepperComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon{cursor:pointer;margin-right:20px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;padding:48px 24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-end;display:flex;flex-direction:row;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 22px 40px 0}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:48px 0 48px 24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-start;flex-direction:column}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-catalog-category{width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 24px 24px 0;width:calc(100% - 24px)}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{padding:24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;color:var(--miam-color-primary);cursor:pointer;display:flex;padding:4px 8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{align-items:center;background:var(--m-color-primary);border-radius:0 0 20px 20px;cursor:pointer;display:flex;height:50px;justify-content:space-around;left:unset;position:absolute;right:50px;width:200px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{color:var(--m-color-white);font-weight:700}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{border-radius:20px 20px 0 0;bottom:0;left:8px;position:fixed;right:8px;width:auto;z-index:2}}"], encapsulation: 2, changeDetection: 0 });
|
|
23944
|
+
}, directives: [i2$1.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2$1.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, MealsPlannerLink, RecipeStepperComponent], pipes: [i2$1.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon{cursor:pointer;margin-right:20px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title span:last-child{margin-left:6px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;padding:48px 24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-end;display:flex;flex-direction:row;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 22px 40px 0}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__explain_banner{margin-bottom:40px}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:48px 0 48px 24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-start;flex-direction:column}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-catalog-category{width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 24px 24px 0;width:calc(100% - 24px)}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{padding:24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;color:var(--miam-color-primary);cursor:pointer;display:flex;padding:4px 8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{align-items:center;background:var(--m-color-primary);border-radius:0 0 20px 20px;cursor:pointer;display:flex;height:50px;justify-content:space-around;left:unset;position:absolute;right:50px;width:200px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{color:var(--m-color-white);font-weight:700}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{border-radius:20px 20px 0 0;bottom:0;left:8px;position:fixed;right:8px;width:auto;z-index:2}}"], encapsulation: 2, changeDetection: 0 });
|
|
23907
23945
|
/*@__PURE__*/ (function () {
|
|
23908
23946
|
i0.ɵsetClassMetadata(RecipeCatalogComponent, [{
|
|
23909
23947
|
type: i0.Component,
|
|
@@ -25472,9 +25510,9 @@
|
|
|
25472
25510
|
|
|
25473
25511
|
function MealsPlannerFormComponent_ng_miam_counter_input_28_Template(rf, ctx) {
|
|
25474
25512
|
if (rf & 1) {
|
|
25475
|
-
var
|
|
25476
|
-
i0.ɵɵelementStart(0, "ng-miam-counter-input",
|
|
25477
|
-
i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_28_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(
|
|
25513
|
+
var _r11_1 = i0.ɵɵgetCurrentView();
|
|
25514
|
+
i0.ɵɵelementStart(0, "ng-miam-counter-input", 34);
|
|
25515
|
+
i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_28_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(_r11_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.updateGuests($event); });
|
|
25478
25516
|
i0.ɵɵelementEnd();
|
|
25479
25517
|
}
|
|
25480
25518
|
if (rf & 2) {
|
|
@@ -25484,27 +25522,27 @@
|
|
|
25484
25522
|
}
|
|
25485
25523
|
function MealsPlannerFormComponent_ng_template_29_option_3_Template(rf, ctx) {
|
|
25486
25524
|
if (rf & 1) {
|
|
25487
|
-
i0.ɵɵelementStart(0, "option",
|
|
25525
|
+
i0.ɵɵelementStart(0, "option", 38);
|
|
25488
25526
|
i0.ɵɵtext(1);
|
|
25489
25527
|
i0.ɵɵelementEnd();
|
|
25490
25528
|
}
|
|
25491
25529
|
if (rf & 2) {
|
|
25492
|
-
var
|
|
25493
|
-
i0.ɵɵproperty("ngValue",
|
|
25530
|
+
var number_r13 = ctx.$implicit;
|
|
25531
|
+
i0.ɵɵproperty("ngValue", number_r13);
|
|
25494
25532
|
i0.ɵɵadvance(1);
|
|
25495
|
-
i0.ɵɵtextInterpolate(
|
|
25533
|
+
i0.ɵɵtextInterpolate(number_r13);
|
|
25496
25534
|
}
|
|
25497
25535
|
}
|
|
25498
25536
|
var _c12$1 = function () { return [1, 2, 3, 4, 5, 6, 7, 8, 9]; };
|
|
25499
25537
|
function MealsPlannerFormComponent_ng_template_29_Template(rf, ctx) {
|
|
25500
25538
|
if (rf & 1) {
|
|
25501
|
-
var
|
|
25502
|
-
i0.ɵɵelementStart(0, "select",
|
|
25503
|
-
i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_29_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(
|
|
25504
|
-
i0.ɵɵelementStart(1, "option",
|
|
25539
|
+
var _r15_1 = i0.ɵɵgetCurrentView();
|
|
25540
|
+
i0.ɵɵelementStart(0, "select", 35);
|
|
25541
|
+
i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_29_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.updateView(); });
|
|
25542
|
+
i0.ɵɵelementStart(1, "option", 36);
|
|
25505
25543
|
i0.ɵɵtext(2);
|
|
25506
25544
|
i0.ɵɵelementEnd();
|
|
25507
|
-
i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_29_option_3_Template, 2, 2, "option",
|
|
25545
|
+
i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_29_option_3_Template, 2, 2, "option", 37);
|
|
25508
25546
|
i0.ɵɵelementEnd();
|
|
25509
25547
|
}
|
|
25510
25548
|
if (rf & 2) {
|
|
@@ -25519,9 +25557,9 @@
|
|
|
25519
25557
|
}
|
|
25520
25558
|
function MealsPlannerFormComponent_ng_miam_counter_input_39_Template(rf, ctx) {
|
|
25521
25559
|
if (rf & 1) {
|
|
25522
|
-
var
|
|
25523
|
-
i0.ɵɵelementStart(0, "ng-miam-counter-input",
|
|
25524
|
-
i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_39_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(
|
|
25560
|
+
var _r17_1 = i0.ɵɵgetCurrentView();
|
|
25561
|
+
i0.ɵɵelementStart(0, "ng-miam-counter-input", 34);
|
|
25562
|
+
i0.ɵɵlistener("counterChange", function MealsPlannerFormComponent_ng_miam_counter_input_39_Template_ng_miam_counter_input_counterChange_0_listener($event) { i0.ɵɵrestoreView(_r17_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.updateRecipesCount($event); });
|
|
25525
25563
|
i0.ɵɵelementEnd();
|
|
25526
25564
|
}
|
|
25527
25565
|
if (rf & 2) {
|
|
@@ -25531,26 +25569,26 @@
|
|
|
25531
25569
|
}
|
|
25532
25570
|
function MealsPlannerFormComponent_ng_template_40_option_3_Template(rf, ctx) {
|
|
25533
25571
|
if (rf & 1) {
|
|
25534
|
-
i0.ɵɵelementStart(0, "option",
|
|
25572
|
+
i0.ɵɵelementStart(0, "option", 38);
|
|
25535
25573
|
i0.ɵɵtext(1);
|
|
25536
25574
|
i0.ɵɵelementEnd();
|
|
25537
25575
|
}
|
|
25538
25576
|
if (rf & 2) {
|
|
25539
|
-
var
|
|
25540
|
-
i0.ɵɵproperty("ngValue",
|
|
25577
|
+
var option_r19 = ctx.$implicit;
|
|
25578
|
+
i0.ɵɵproperty("ngValue", option_r19);
|
|
25541
25579
|
i0.ɵɵadvance(1);
|
|
25542
|
-
i0.ɵɵtextInterpolate(
|
|
25580
|
+
i0.ɵɵtextInterpolate(option_r19);
|
|
25543
25581
|
}
|
|
25544
25582
|
}
|
|
25545
25583
|
function MealsPlannerFormComponent_ng_template_40_Template(rf, ctx) {
|
|
25546
25584
|
if (rf & 1) {
|
|
25547
|
-
var
|
|
25548
|
-
i0.ɵɵelementStart(0, "select",
|
|
25549
|
-
i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_40_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(
|
|
25550
|
-
i0.ɵɵelementStart(1, "option",
|
|
25585
|
+
var _r21_1 = i0.ɵɵgetCurrentView();
|
|
25586
|
+
i0.ɵɵelementStart(0, "select", 39);
|
|
25587
|
+
i0.ɵɵlistener("ngModelChange", function MealsPlannerFormComponent_ng_template_40_Template_select_ngModelChange_0_listener() { i0.ɵɵrestoreView(_r21_1); var ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.updateView(); });
|
|
25588
|
+
i0.ɵɵelementStart(1, "option", 40);
|
|
25551
25589
|
i0.ɵɵtext(2, "S\u00E9lectionner");
|
|
25552
25590
|
i0.ɵɵelementEnd();
|
|
25553
|
-
i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_40_option_3_Template, 2, 2, "option",
|
|
25591
|
+
i0.ɵɵtemplate(3, MealsPlannerFormComponent_ng_template_40_option_3_Template, 2, 2, "option", 37);
|
|
25554
25592
|
i0.ɵɵelementEnd();
|
|
25555
25593
|
}
|
|
25556
25594
|
if (rf & 2) {
|
|
@@ -25562,28 +25600,42 @@
|
|
|
25562
25600
|
i0.ɵɵproperty("ngForOf", ctx_r5.recipesNumbers);
|
|
25563
25601
|
}
|
|
25564
25602
|
}
|
|
25565
|
-
function
|
|
25603
|
+
function MealsPlannerFormComponent_ng_miam_icon_44_Template(rf, ctx) {
|
|
25604
|
+
if (rf & 1) {
|
|
25605
|
+
i0.ɵɵelement(0, "ng-miam-icon", 32);
|
|
25606
|
+
}
|
|
25607
|
+
if (rf & 2) {
|
|
25608
|
+
var ctx_r6 = i0.ɵɵnextContext();
|
|
25609
|
+
i0.ɵɵproperty("width", 24)("height", 24)("iconName", ctx_r6.icon.Search);
|
|
25610
|
+
}
|
|
25611
|
+
}
|
|
25612
|
+
function MealsPlannerFormComponent_ng_template_45_Template(rf, ctx) {
|
|
25566
25613
|
if (rf & 1) {
|
|
25567
|
-
i0.ɵɵ
|
|
25568
|
-
|
|
25614
|
+
i0.ɵɵelement(0, "ng-miam-loader");
|
|
25615
|
+
}
|
|
25616
|
+
}
|
|
25617
|
+
function MealsPlannerFormComponent_div_55_Template(rf, ctx) {
|
|
25618
|
+
if (rf & 1) {
|
|
25619
|
+
i0.ɵɵelementStart(0, "div", 41);
|
|
25620
|
+
i0.ɵɵelementStart(1, "div", 42);
|
|
25569
25621
|
i0.ɵɵelementStart(2, "span");
|
|
25570
|
-
i0.ɵɵi18n(3,
|
|
25622
|
+
i0.ɵɵi18n(3, 43);
|
|
25571
25623
|
i0.ɵɵelementEnd();
|
|
25572
25624
|
i0.ɵɵelementEnd();
|
|
25573
|
-
i0.ɵɵelementStart(4, "div",
|
|
25574
|
-
i0.ɵɵelementStart(5, "a",
|
|
25625
|
+
i0.ɵɵelementStart(4, "div", 44);
|
|
25626
|
+
i0.ɵɵelementStart(5, "a", 45);
|
|
25575
25627
|
i0.ɵɵelementStart(6, "span");
|
|
25576
|
-
i0.ɵɵi18n(7,
|
|
25628
|
+
i0.ɵɵi18n(7, 46);
|
|
25577
25629
|
i0.ɵɵelementEnd();
|
|
25578
25630
|
i0.ɵɵelementEnd();
|
|
25579
|
-
i0.ɵɵelementStart(8, "a",
|
|
25631
|
+
i0.ɵɵelementStart(8, "a", 47);
|
|
25580
25632
|
i0.ɵɵelementStart(9, "span");
|
|
25581
|
-
i0.ɵɵi18n(10,
|
|
25633
|
+
i0.ɵɵi18n(10, 48);
|
|
25582
25634
|
i0.ɵɵelementEnd();
|
|
25583
25635
|
i0.ɵɵelementEnd();
|
|
25584
|
-
i0.ɵɵelementStart(11, "a",
|
|
25636
|
+
i0.ɵɵelementStart(11, "a", 49);
|
|
25585
25637
|
i0.ɵɵelementStart(12, "span");
|
|
25586
|
-
i0.ɵɵi18n(13,
|
|
25638
|
+
i0.ɵɵi18n(13, 50);
|
|
25587
25639
|
i0.ɵɵelementEnd();
|
|
25588
25640
|
i0.ɵɵelement(14, "ng-miam-icon", 4);
|
|
25589
25641
|
i0.ɵɵelementEnd();
|
|
@@ -25591,30 +25643,35 @@
|
|
|
25591
25643
|
i0.ɵɵelementEnd();
|
|
25592
25644
|
}
|
|
25593
25645
|
if (rf & 2) {
|
|
25594
|
-
var
|
|
25646
|
+
var ctx_r9 = i0.ɵɵnextContext();
|
|
25595
25647
|
i0.ɵɵadvance(5);
|
|
25596
|
-
i0.ɵɵproperty("href",
|
|
25648
|
+
i0.ɵɵproperty("href", ctx_r9.context.catalogUrl + "?cost=0,3", i0.ɵɵsanitizeUrl);
|
|
25597
25649
|
i0.ɵɵadvance(3);
|
|
25598
|
-
i0.ɵɵproperty("href",
|
|
25650
|
+
i0.ɵɵproperty("href", ctx_r9.context.catalogUrl + "?cost=0,5", i0.ɵɵsanitizeUrl);
|
|
25599
25651
|
i0.ɵɵadvance(3);
|
|
25600
|
-
i0.ɵɵproperty("href",
|
|
25652
|
+
i0.ɵɵproperty("href", ctx_r9.context.catalogUrl, i0.ɵɵsanitizeUrl);
|
|
25601
25653
|
i0.ɵɵadvance(3);
|
|
25602
|
-
i0.ɵɵproperty("iconName",
|
|
25654
|
+
i0.ɵɵproperty("iconName", ctx_r9.icon.ChevronDown);
|
|
25603
25655
|
}
|
|
25604
25656
|
}
|
|
25605
25657
|
var _c21 = function (a0) { return { "reduced": a0 }; };
|
|
25606
|
-
var MealsPlannerFormComponent = /** @class */ (function () {
|
|
25607
|
-
|
|
25608
|
-
|
|
25609
|
-
|
|
25610
|
-
|
|
25611
|
-
|
|
25612
|
-
|
|
25613
|
-
|
|
25614
|
-
|
|
25615
|
-
|
|
25616
|
-
|
|
25617
|
-
|
|
25658
|
+
var MealsPlannerFormComponent = /** @class */ (function (_super) {
|
|
25659
|
+
__extends(MealsPlannerFormComponent, _super);
|
|
25660
|
+
function MealsPlannerFormComponent(cdr, context, userService, recipesService, posService, analyticsService) {
|
|
25661
|
+
var _this = _super.call(this, analyticsService) || this;
|
|
25662
|
+
_this.cdr = cdr;
|
|
25663
|
+
_this.context = context;
|
|
25664
|
+
_this.userService = userService;
|
|
25665
|
+
_this.recipesService = recipesService;
|
|
25666
|
+
_this.posService = posService;
|
|
25667
|
+
_this.analyticsService = analyticsService;
|
|
25668
|
+
_this.reduced = false;
|
|
25669
|
+
_this.loading = false;
|
|
25670
|
+
_this.submitted = new i0.EventEmitter();
|
|
25671
|
+
_this.icon = exports.Icon;
|
|
25672
|
+
_this.recipesNumbers = [];
|
|
25673
|
+
_this.subscriptions = [];
|
|
25674
|
+
return _this;
|
|
25618
25675
|
}
|
|
25619
25676
|
MealsPlannerFormComponent.prototype.ngOnInit = function () {
|
|
25620
25677
|
var _this = this;
|
|
@@ -25626,6 +25683,7 @@
|
|
|
25626
25683
|
MealsPlannerFormComponent.prototype.ngOnDestroy = function () {
|
|
25627
25684
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
25628
25685
|
};
|
|
25686
|
+
MealsPlannerFormComponent.prototype.currentPath = function () { return ''; };
|
|
25629
25687
|
MealsPlannerFormComponent.prototype.fetchRecipesNumbers = function () {
|
|
25630
25688
|
var _this = this;
|
|
25631
25689
|
if (!this.form.value.guestsCount || !this.form.value.budget) {
|
|
@@ -25650,7 +25708,13 @@
|
|
|
25650
25708
|
])
|
|
25651
25709
|
.subscribe(function (res) {
|
|
25652
25710
|
var isHookOk = _this.context.hookCallback(res[0], res[1]);
|
|
25711
|
+
sessionStorage.setItem('miam-meals-planner-form', JSON.stringify({
|
|
25712
|
+
budget: parseInt(_this.form.get('budget').value),
|
|
25713
|
+
guestsCount: parseInt(_this.form.get('guestsCount').value),
|
|
25714
|
+
recipesCount: parseInt(_this.form.get('recipesCount').value),
|
|
25715
|
+
}));
|
|
25653
25716
|
if (isHookOk) {
|
|
25717
|
+
sessionStorage.removeItem('miam-meals-planner-form');
|
|
25654
25718
|
_this.submitted.emit({
|
|
25655
25719
|
budget: _this.form.get('budget').value,
|
|
25656
25720
|
guestsCount: _this.form.get('guestsCount').value,
|
|
@@ -25660,6 +25724,9 @@
|
|
|
25660
25724
|
}));
|
|
25661
25725
|
};
|
|
25662
25726
|
MealsPlannerFormComponent.prototype.updateView = function () {
|
|
25727
|
+
if (parseInt(this.form.get('budget').value) > 999) {
|
|
25728
|
+
this.form.get('budget').patchValue(999);
|
|
25729
|
+
}
|
|
25663
25730
|
this.cdr.detectChanges();
|
|
25664
25731
|
};
|
|
25665
25732
|
MealsPlannerFormComponent.prototype.updateGuests = function (guests) {
|
|
@@ -25674,9 +25741,9 @@
|
|
|
25674
25741
|
window.history.back();
|
|
25675
25742
|
};
|
|
25676
25743
|
return MealsPlannerFormComponent;
|
|
25677
|
-
}());
|
|
25678
|
-
MealsPlannerFormComponent.ɵfac = function MealsPlannerFormComponent_Factory(t) { return new (t || MealsPlannerFormComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
|
|
25679
|
-
MealsPlannerFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerFormComponent, selectors: [["ng-miam-meals-planner-form"]], inputs: { form: "form", reduced: "reduced" }, outputs: { submitted: "submitted" }, features: [i0.ɵɵNgOnChangesFeature], decls:
|
|
25744
|
+
}(EventTracerComponent));
|
|
25745
|
+
MealsPlannerFormComponent.ɵfac = function MealsPlannerFormComponent_Factory(t) { return new (t || MealsPlannerFormComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PointOfSalesService), i0.ɵɵdirectiveInject(AnalyticsService)); };
|
|
25746
|
+
MealsPlannerFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerFormComponent, selectors: [["ng-miam-meals-planner-form"]], inputs: { form: "form", reduced: "reduced", loading: "loading" }, outputs: { submitted: "submitted" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 56, vars: 27, consts: function () {
|
|
25680
25747
|
var i18n_0;
|
|
25681
25748
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
25682
25749
|
var MSG_EXTERNAL_5479681205645032650$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_FORM_MEALS_PLANNER_FORM_COMPONENT_TS_1 = goog.getMsg("Je d\u00E9finis mes crit\u00E8res");
|
|
@@ -25757,7 +25824,7 @@
|
|
|
25757
25824
|
else {
|
|
25758
25825
|
i18n_19 = $localize(templateObject_10$5 || (templateObject_10$5 = __makeTemplateObject([":\u241Ff05cda5fdcd3e6bcc1ddec3f588db62823e96504\u241F4881881106969851436:Voir plus"], [":\u241Ff05cda5fdcd3e6bcc1ddec3f588db62823e96504\u241F4881881106969851436:Voir plus"])));
|
|
25759
25826
|
}
|
|
25760
|
-
return [[1, "miam-meals-planner-form", 3, "ngClass"], [1, "miam-meals-planner-form__left"], [1, "miam-meals-planner-form__right", 3, "formGroup"], [1, "miam-meals-planner-form__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-form__form"], [1, "miam-meals-planner-form__inputs"], [1, "miam-meals-planner-form__input", "budget"], [1, "miam-meals-planner-form__input__label"], i18n_2, [1, "miam-meals-planner-form__input__label__mandatory"], [1, "miam-meals-planner-form__input__budget"], [1, "miam-meals-planner-form__input__small-label"], ["type", "number", "formControlName", "budget", 3, "min", "max", "placeholder", "ngModelChange"], [1, "miam-meals-planner-form__input", "guests"], i18n_4, ["primaryColor", "var(--m-color-grey06)", 3, "width", "height", "iconName"], ["class", "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange", 4, "ngIf", "ngIfElse"], ["selectGuests", ""], [1, "miam-meals-planner-form__input", "meals"], i18n_6, ["selectMeals", ""], [1, "miam-meals-planner-form__cta"], [1, "m-button-primary", "plan", 3, "disabled", "click"], i18n_8, [1, "m-button-primary", "reverse", "swap", 3, "disabled", "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Swap.svg"], i18n_10, [1, "m-button-primary", "validate", 3, "disabled", "click"], ["primaryColor", "var(--m-color-white)", 3, "width", "height", "iconName"], ["class", "miam-meals-planner-form__anti-inflation", 4, "ngIf"], [1, "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange"], ["formControlName", "guestsCount", 3, "ngModelChange"], ["selected", "", "disabled", "", "hidden", "", 3, "value"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["formControlName", "recipesCount", 3, "ngModelChange"], ["value", "0", "disabled", "", 3, "selected"], [1, "miam-meals-planner-form__anti-inflation"], [1, "miam-meals-planner-form__anti-inflation__title"], i18n_13, [1, "miam-meals-planner-form__anti-inflation__links"], [1, "miam-meals-planner-form__anti-inflation__link", "cheaper", 3, "href"], i18n_15, [1, "miam-meals-planner-form__anti-inflation__link", "cheap", 3, "href"], i18n_17, [1, "miam-meals-planner-form__anti-inflation__link", "see-more", 3, "href"], i18n_19];
|
|
25827
|
+
return [[1, "miam-meals-planner-form", 3, "ngClass"], [1, "miam-meals-planner-form__left"], [1, "miam-meals-planner-form__right", 3, "formGroup"], [1, "miam-meals-planner-form__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-form__form"], [1, "miam-meals-planner-form__inputs"], [1, "miam-meals-planner-form__input", "budget"], [1, "miam-meals-planner-form__input__label"], i18n_2, [1, "miam-meals-planner-form__input__label__mandatory"], [1, "miam-meals-planner-form__input__budget"], [1, "miam-meals-planner-form__input__small-label"], ["type", "number", "formControlName", "budget", 3, "min", "max", "placeholder", "ngModelChange"], [1, "miam-meals-planner-form__input", "guests"], i18n_4, ["primaryColor", "var(--m-color-grey06)", 3, "width", "height", "iconName"], ["class", "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange", 4, "ngIf", "ngIfElse"], ["selectGuests", ""], [1, "miam-meals-planner-form__input", "meals"], i18n_6, ["selectMeals", ""], [1, "miam-meals-planner-form__cta"], [1, "m-button-primary", "plan", 3, "disabled", "click"], ["primaryColor", "var(--m-color-white)", 3, "width", "height", "iconName", 4, "ngIf", "ngIfElse"], ["isLoading", ""], i18n_8, [1, "m-button-primary", "reverse", "swap", 3, "disabled", "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Swap.svg"], i18n_10, [1, "m-button-primary", "validate", 3, "disabled", "click"], ["primaryColor", "var(--m-color-white)", 3, "width", "height", "iconName"], ["class", "miam-meals-planner-form__anti-inflation", 4, "ngIf"], [1, "custom-counter-input", 3, "counter", "minRange", "maxRange", "counterChange"], ["formControlName", "guestsCount", 3, "ngModelChange"], ["selected", "", "disabled", "", "hidden", "", 3, "value"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["formControlName", "recipesCount", 3, "ngModelChange"], ["value", "0", "disabled", "", 3, "selected"], [1, "miam-meals-planner-form__anti-inflation"], [1, "miam-meals-planner-form__anti-inflation__title"], i18n_13, [1, "miam-meals-planner-form__anti-inflation__links"], [1, "miam-meals-planner-form__anti-inflation__link", "cheaper", 3, "href"], i18n_15, [1, "miam-meals-planner-form__anti-inflation__link", "cheap", 3, "href"], i18n_17, [1, "miam-meals-planner-form__anti-inflation__link", "see-more", 3, "href"], i18n_19];
|
|
25761
25828
|
}, template: function MealsPlannerFormComponent_Template(rf, ctx) {
|
|
25762
25829
|
if (rf & 1) {
|
|
25763
25830
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -25826,31 +25893,34 @@
|
|
|
25826
25893
|
i0.ɵɵelementStart(42, "div", 23);
|
|
25827
25894
|
i0.ɵɵelementStart(43, "button", 24);
|
|
25828
25895
|
i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_43_listener() { return ctx.submit(); });
|
|
25829
|
-
i0.ɵɵ
|
|
25830
|
-
i0.ɵɵ
|
|
25896
|
+
i0.ɵɵtemplate(44, MealsPlannerFormComponent_ng_miam_icon_44_Template, 1, 3, "ng-miam-icon", 25);
|
|
25897
|
+
i0.ɵɵtemplate(45, MealsPlannerFormComponent_ng_template_45_Template, 1, 0, "ng-template", null, 26, i0.ɵɵtemplateRefExtractor);
|
|
25898
|
+
i0.ɵɵelementStart(47, "span");
|
|
25899
|
+
i0.ɵɵi18n(48, 27);
|
|
25831
25900
|
i0.ɵɵelementEnd();
|
|
25832
25901
|
i0.ɵɵelementEnd();
|
|
25833
|
-
i0.ɵɵelementStart(
|
|
25834
|
-
i0.ɵɵlistener("click", function
|
|
25835
|
-
i0.ɵɵelement(
|
|
25836
|
-
i0.ɵɵelementStart(
|
|
25837
|
-
i0.ɵɵi18n(
|
|
25902
|
+
i0.ɵɵelementStart(49, "button", 28);
|
|
25903
|
+
i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_49_listener() { return ctx.submit(); });
|
|
25904
|
+
i0.ɵɵelement(50, "img", 29);
|
|
25905
|
+
i0.ɵɵelementStart(51, "span");
|
|
25906
|
+
i0.ɵɵi18n(52, 30);
|
|
25838
25907
|
i0.ɵɵelementEnd();
|
|
25839
25908
|
i0.ɵɵelementEnd();
|
|
25840
|
-
i0.ɵɵelementStart(
|
|
25841
|
-
i0.ɵɵlistener("click", function
|
|
25842
|
-
i0.ɵɵelement(
|
|
25909
|
+
i0.ɵɵelementStart(53, "button", 31);
|
|
25910
|
+
i0.ɵɵlistener("click", function MealsPlannerFormComponent_Template_button_click_53_listener() { return ctx.submit(); });
|
|
25911
|
+
i0.ɵɵelement(54, "ng-miam-icon", 32);
|
|
25843
25912
|
i0.ɵɵelementEnd();
|
|
25844
25913
|
i0.ɵɵelementEnd();
|
|
25845
25914
|
i0.ɵɵelementEnd();
|
|
25846
|
-
i0.ɵɵtemplate(
|
|
25915
|
+
i0.ɵɵtemplate(55, MealsPlannerFormComponent_div_55_Template, 15, 4, "div", 33);
|
|
25847
25916
|
i0.ɵɵelementEnd();
|
|
25848
25917
|
i0.ɵɵelementEnd();
|
|
25849
25918
|
}
|
|
25850
25919
|
if (rf & 2) {
|
|
25851
25920
|
var _r1 = i0.ɵɵreference(30);
|
|
25852
25921
|
var _r4 = i0.ɵɵreference(41);
|
|
25853
|
-
|
|
25922
|
+
var _r7 = i0.ɵɵreference(46);
|
|
25923
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c21, ctx.reduced));
|
|
25854
25924
|
i0.ɵɵadvance(2);
|
|
25855
25925
|
i0.ɵɵproperty("formGroup", ctx.form);
|
|
25856
25926
|
i0.ɵɵadvance(2);
|
|
@@ -25867,7 +25937,9 @@
|
|
|
25867
25937
|
i0.ɵɵproperty("ngIf", !ctx.context.antiInflation)("ngIfElse", _r4);
|
|
25868
25938
|
i0.ɵɵadvance(4);
|
|
25869
25939
|
i0.ɵɵproperty("disabled", ctx.form.invalid);
|
|
25870
|
-
i0.ɵɵadvance(
|
|
25940
|
+
i0.ɵɵadvance(1);
|
|
25941
|
+
i0.ɵɵproperty("ngIf", !ctx.loading)("ngIfElse", _r7);
|
|
25942
|
+
i0.ɵɵadvance(5);
|
|
25871
25943
|
i0.ɵɵproperty("disabled", ctx.form.invalid);
|
|
25872
25944
|
i0.ɵɵadvance(4);
|
|
25873
25945
|
i0.ɵɵproperty("disabled", ctx.form.invalid);
|
|
@@ -25876,7 +25948,7 @@
|
|
|
25876
25948
|
i0.ɵɵadvance(1);
|
|
25877
25949
|
i0.ɵɵproperty("ngIf", !ctx.reduced && ctx.context.antiInflation);
|
|
25878
25950
|
}
|
|
25879
|
-
}, directives: [i2$1.NgClass, i3.NgControlStatusGroup, i3.FormGroupDirective, IconComponent, i3.NumberValueAccessor, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlName, i2$1.NgIf, CounterInputComponent, i3.SelectControlValueAccessor, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i2$1.NgForOf], styles: [".miam-meals-planner-form{display:flex;min-height:90vh;width:100%}.miam-meals-planner-form .miam-meals-planner-form__left{background-image:url(https://storage.googleapis.com/assets.miam.tech/generic/meals-planner/background-meals-planner-link.jpeg);background-position:50%;background-size:cover;display:flex;flex:1}.miam-meals-planner-form .miam-meals-planner-form__right{display:flex;flex:1;flex-direction:column;padding:32px 16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex;flex-direction:row;font-size:24px;font-weight:900;line-height:120%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon{transform:rotate(90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title span{margin-left:16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs{display:flex;flex-direction:column;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{display:flex;flex-direction:column;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{font-size:14px;font-weight:700;line-height:16px;margin-bottom:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label .miam-meals-planner-form__input__label__mandatory{color:var(--m-color-danger);margin-left:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{border:1px solid var(--m-color-grey06);border-radius:6px 0 0 6px;border-right:unset;box-sizing:border-box;display:none;font-size:14px;line-height:24px;padding:12px 8px;text-align:center;width:48px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget{display:inline-flex;flex-direction:row;flex-wrap:nowrap;position:relative;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget input[type=number]{border:1px solid var(--m-color-grey06);border-radius:0 6px 6px 0;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-grey06);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input{border:1px solid var(--m-color-primary);border-radius:6px;justify-content:space-between;padding:12px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__icon{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{background-color:transparent;border:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus ng-miam-icon .icon-container svg path,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus ng-miam-icon .icon-container svg path{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__count{border:none!important;font-size:16px;font-weight:900;line-height:150%;outline:none!important;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{background-color:#fff;border:1px solid var(--m-color-primary);border-radius:6px;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-primary);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{align-items:center;display:flex;justify-content:center;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .validate{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta img{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-top:60px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__title{font-size:20px;font-weight:600;line-height:28px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link{color:var(--m-color-primary);font-size:16px;font-weight:400;line-height:24px;margin:10px 29px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheaper{text-decoration:underline}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more{display:flex;text-decoration:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more span{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon{transform:rotate(-90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form.reduced .miam-meals-planner-form__left{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:0 16px 24px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.meals .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan{display:none}@media (max-width:1023px){.miam-meals-planner-form .miam-meals-planner-form__left{display:none}.miam-meals-planner-form .miam-meals-planner-form__right{padding:20px 16px}.miam-meals-planner-form.reduced{min-height:unset}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:24px 16px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{flex-direction:row}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 8px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{border:1px solid var(--m-color-grey06);border-bottom-left-radius:0;border-top-left-radius:0;outline-color:var(--m-color-grey06)}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary{border-radius:6px;padding:12px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.swap{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.validate{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary ng-miam-icon{margin:0}}@media (max-width:375px){.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 4px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:4px}}"], encapsulation: 2, changeDetection: 0 });
|
|
25951
|
+
}, directives: [i2$1.NgClass, i3.NgControlStatusGroup, i3.FormGroupDirective, IconComponent, i3.NumberValueAccessor, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlName, i2$1.NgIf, CounterInputComponent, i3.SelectControlValueAccessor, i3.NgSelectOption, i3.ɵangular_packages_forms_forms_x, i2$1.NgForOf, LoaderComponent], styles: [".miam-meals-planner-form{display:flex;min-height:90vh;width:100%}.miam-meals-planner-form .miam-meals-planner-form__left{background-image:url(https://storage.googleapis.com/assets.miam.tech/generic/meals-planner/background-meals-planner-link.jpeg);background-position:50%;background-size:cover;display:flex;flex:1}.miam-meals-planner-form .miam-meals-planner-form__right{display:flex;flex:1;flex-direction:column;padding:32px 16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex;flex-direction:row;font-size:24px;font-weight:900;line-height:120%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon{transform:rotate(90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__title span{margin-left:16px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs{display:flex;flex-direction:column;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{display:flex;flex-direction:column;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{font-size:14px;font-weight:700;line-height:16px;margin-bottom:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label .miam-meals-planner-form__input__label__mandatory{color:var(--m-color-danger);margin-left:2px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{border:1px solid var(--m-color-grey06);border-radius:6px 0 0 6px;border-right:unset;box-sizing:border-box;display:none;font-size:14px;line-height:24px;padding:12px 8px;text-align:center;width:48px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget{display:inline-flex;flex-direction:row;flex-wrap:nowrap;position:relative;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__budget input[type=number]{border:1px solid var(--m-color-grey06);border-radius:0 6px 6px 0;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-grey06);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input{border:1px solid var(--m-color-primary);border-radius:6px;justify-content:space-between;padding:12px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__icon{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{background-color:transparent;border:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus ng-miam-icon .icon-container svg path,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus ng-miam-icon .icon-container svg path{fill:var(--m-color-primary)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-counter-input .miam-counter-input__count{border:none!important;font-size:16px;font-weight:900;line-height:150%;outline:none!important;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{background-color:#fff;border:1px solid var(--m-color-primary);border-radius:6px;box-sizing:border-box;display:block;font-size:16px;height:50px;line-height:24px;outline-color:var(--m-color-primary);padding:12px 8px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{align-items:center;display:flex;justify-content:center;margin-top:24px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan ng-miam-icon{display:none;margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan .miam-loader{border:4px solid var(--m-color-grey);border-top:4px solid var(--m-color-grey);border-top-color:var(--m-color-primary);height:28px;margin-right:8px;width:28px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .validate{display:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta img{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-top:60px;max-width:592px;width:100%}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__title{font-size:20px;font-weight:600;line-height:28px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link{color:var(--m-color-primary);font-size:16px;font-weight:400;line-height:24px;margin:10px 29px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheap,.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.cheaper{text-decoration:underline}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more{display:flex;text-decoration:none}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link.see-more span{margin-right:8px}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon{transform:rotate(-90deg)}.miam-meals-planner-form .miam-meals-planner-form__right .miam-meals-planner-form__anti-inflation .miam-meals-planner-form__anti-inflation__links .miam-meals-planner-form__anti-inflation__link ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-form.reduced .miam-meals-planner-form__left{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:0 16px 24px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.meals .miam-meals-planner-form__input__label,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .swap{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .plan{display:none}@media (max-width:1023px){.miam-meals-planner-form .miam-meals-planner-form__left{display:none}.miam-meals-planner-form .miam-meals-planner-form__right{padding:20px 16px}.miam-meals-planner-form.reduced{min-height:unset}.miam-meals-planner-form.reduced .miam-meals-planner-form__right{padding:24px 16px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__title{display:flex}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input{flex-direction:row}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__label{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input .miam-meals-planner-form__input__small-label{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 8px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input input,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input select{border:1px solid var(--m-color-grey06);border-bottom-left-radius:0;border-top-left-radius:0;outline-color:var(--m-color-grey06)}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__minus,.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-counter-input .miam-counter-input__button.miam-counter-input__button__plus{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary{border-radius:6px;padding:12px}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.swap{display:none}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary.validate{display:initial}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta .m-button-primary ng-miam-icon{margin:0}}@media (max-width:375px){.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__inputs .miam-meals-planner-form__input.guests{margin:24px 4px 0}.miam-meals-planner-form.reduced .miam-meals-planner-form__right .miam-meals-planner-form__form .miam-meals-planner-form__cta{margin-left:4px}}"], encapsulation: 2, changeDetection: 0 });
|
|
25880
25952
|
/*@__PURE__*/ (function () {
|
|
25881
25953
|
i0.ɵsetClassMetadata(MealsPlannerFormComponent, [{
|
|
25882
25954
|
type: i0.Component,
|
|
@@ -25887,10 +25959,12 @@
|
|
|
25887
25959
|
encapsulation: i0.ViewEncapsulation.None,
|
|
25888
25960
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
25889
25961
|
}]
|
|
25890
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: RecipesService }, { type: PointOfSalesService }]; }, { form: [{
|
|
25962
|
+
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: RecipesService }, { type: PointOfSalesService }, { type: AnalyticsService }]; }, { form: [{
|
|
25891
25963
|
type: i0.Input
|
|
25892
25964
|
}], reduced: [{
|
|
25893
25965
|
type: i0.Input
|
|
25966
|
+
}], loading: [{
|
|
25967
|
+
type: i0.Input
|
|
25894
25968
|
}], submitted: [{
|
|
25895
25969
|
type: i0.Output
|
|
25896
25970
|
}] });
|
|
@@ -25908,8 +25982,9 @@
|
|
|
25908
25982
|
}
|
|
25909
25983
|
if (rf & 2) {
|
|
25910
25984
|
var recipe_r8 = i0.ɵɵnextContext().$implicit;
|
|
25985
|
+
var ctx_r10 = i0.ɵɵnextContext(2);
|
|
25911
25986
|
i0.ɵɵadvance(1);
|
|
25912
|
-
i0.ɵɵproperty("recipe", recipe_r8)("displayPricing", true)("displayGuests", false)("previewAllowed", false)("replaceMode", true);
|
|
25987
|
+
i0.ɵɵproperty("recipe", recipe_r8)("originTrace", ctx_r10.eventTrace())("displayPricing", true)("displayGuests", false)("previewAllowed", false)("helpButtonAllowed", false)("replaceMode", true);
|
|
25913
25988
|
}
|
|
25914
25989
|
}
|
|
25915
25990
|
function MealsPlannerResultComponent_div_6_div_1_ng_template_2_Template(rf, ctx) {
|
|
@@ -25923,7 +25998,7 @@
|
|
|
25923
25998
|
function MealsPlannerResultComponent_div_6_div_1_Template(rf, ctx) {
|
|
25924
25999
|
if (rf & 1) {
|
|
25925
26000
|
i0.ɵɵelementStart(0, "div", 12);
|
|
25926
|
-
i0.ɵɵtemplate(1, MealsPlannerResultComponent_div_6_div_1_div_1_Template, 2,
|
|
26001
|
+
i0.ɵɵtemplate(1, MealsPlannerResultComponent_div_6_div_1_div_1_Template, 2, 7, "div", 13);
|
|
25927
26002
|
i0.ɵɵtemplate(2, MealsPlannerResultComponent_div_6_div_1_ng_template_2_Template, 1, 0, "ng-template", null, 14, i0.ɵɵtemplateRefExtractor);
|
|
25928
26003
|
i0.ɵɵelementEnd();
|
|
25929
26004
|
}
|
|
@@ -25974,21 +26049,25 @@
|
|
|
25974
26049
|
i0.ɵɵelement(0, "ng-miam-loader");
|
|
25975
26050
|
}
|
|
25976
26051
|
}
|
|
25977
|
-
var MealsPlannerResultComponent = /** @class */ (function () {
|
|
25978
|
-
|
|
25979
|
-
|
|
25980
|
-
|
|
25981
|
-
|
|
25982
|
-
|
|
25983
|
-
|
|
25984
|
-
|
|
25985
|
-
|
|
25986
|
-
|
|
25987
|
-
|
|
25988
|
-
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
26052
|
+
var MealsPlannerResultComponent = /** @class */ (function (_super) {
|
|
26053
|
+
__extends(MealsPlannerResultComponent, _super);
|
|
26054
|
+
function MealsPlannerResultComponent(cdr, context, userService, posService, analyticsService) {
|
|
26055
|
+
var _this = _super.call(this, analyticsService) || this;
|
|
26056
|
+
_this.cdr = cdr;
|
|
26057
|
+
_this.context = context;
|
|
26058
|
+
_this.userService = userService;
|
|
26059
|
+
_this.posService = posService;
|
|
26060
|
+
_this.analyticsService = analyticsService;
|
|
26061
|
+
_this.recipes = [];
|
|
26062
|
+
_this.usedBudget = 0;
|
|
26063
|
+
_this.maxBudget = 0;
|
|
26064
|
+
_this.loading = false;
|
|
26065
|
+
_this.confirmed = new i0.EventEmitter();
|
|
26066
|
+
_this.recipeRemoval = new i0.EventEmitter();
|
|
26067
|
+
_this.openCatalog = new i0.EventEmitter();
|
|
26068
|
+
_this.icon = exports.Icon;
|
|
26069
|
+
_this.subscriptions = [];
|
|
26070
|
+
return _this;
|
|
25992
26071
|
}
|
|
25993
26072
|
MealsPlannerResultComponent.prototype.submit = function () {
|
|
25994
26073
|
var _this = this;
|
|
@@ -26003,21 +26082,25 @@
|
|
|
26003
26082
|
}
|
|
26004
26083
|
}));
|
|
26005
26084
|
};
|
|
26085
|
+
MealsPlannerResultComponent.prototype.ngOnInit = function () {
|
|
26086
|
+
this.pageview();
|
|
26087
|
+
};
|
|
26006
26088
|
MealsPlannerResultComponent.prototype.ngOnChanges = function () {
|
|
26007
26089
|
this.cdr.detectChanges();
|
|
26008
26090
|
};
|
|
26009
26091
|
MealsPlannerResultComponent.prototype.ngOnDestroy = function () {
|
|
26010
26092
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
26011
26093
|
};
|
|
26094
|
+
MealsPlannerResultComponent.prototype.currentPath = function () { return 'results'; };
|
|
26012
26095
|
MealsPlannerResultComponent.prototype.removeRecipe = function (index) {
|
|
26013
26096
|
this.recipes[index] = undefined;
|
|
26014
26097
|
this.recipeRemoval.emit(index);
|
|
26015
26098
|
this.cdr.detectChanges();
|
|
26016
26099
|
};
|
|
26017
26100
|
return MealsPlannerResultComponent;
|
|
26018
|
-
}());
|
|
26019
|
-
MealsPlannerResultComponent.ɵfac = function MealsPlannerResultComponent_Factory(t) { return new (t || MealsPlannerResultComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
|
|
26020
|
-
MealsPlannerResultComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerResultComponent, selectors: [["ng-miam-meals-planner-result"]], inputs: { recipes: "recipes", usedBudget: "usedBudget", maxBudget: "maxBudget", loading: "loading" }, outputs: { confirmed: "confirmed", recipeRemoval: "recipeRemoval", openCatalog: "openCatalog" }, features: [i0.ɵɵNgOnChangesFeature], decls: 17, vars: 7, consts: function () {
|
|
26101
|
+
}(EventTracerComponent));
|
|
26102
|
+
MealsPlannerResultComponent.ɵfac = function MealsPlannerResultComponent_Factory(t) { return new (t || MealsPlannerResultComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(UserService), i0.ɵɵdirectiveInject(PointOfSalesService), i0.ɵɵdirectiveInject(AnalyticsService)); };
|
|
26103
|
+
MealsPlannerResultComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerResultComponent, selectors: [["ng-miam-meals-planner-result"]], inputs: { recipes: "recipes", usedBudget: "usedBudget", maxBudget: "maxBudget", loading: "loading" }, outputs: { confirmed: "confirmed", recipeRemoval: "recipeRemoval", openCatalog: "openCatalog" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 17, vars: 7, consts: function () {
|
|
26021
26104
|
var i18n_0;
|
|
26022
26105
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26023
26106
|
var MSG_EXTERNAL_4657629567820612951$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_RESULT_MEALS_PLANNER_RESULT_COMPONENT_TS_1 = goog.getMsg(" id\u00E9es repas pour vous");
|
|
@@ -26034,7 +26117,7 @@
|
|
|
26034
26117
|
else {
|
|
26035
26118
|
i18n_2 = $localize(templateObject_2$A || (templateObject_2$A = __makeTemplateObject([":\u241Fcbd8320aa840fa217e5711e1e1a23bbc04cddacb\u241F1290005437956785602:Ajouter tous les ingr\u00E9dients"], [":\u241Fcbd8320aa840fa217e5711e1e1a23bbc04cddacb\u241F1290005437956785602:Ajouter tous les ingr\u00E9dients"])));
|
|
26036
26119
|
}
|
|
26037
|
-
return [[1, "miam-meals-planner-result"], [1, "miam-meals-planner-result__header"], i18n_0, ["class", "miam-meals-planner-result__recipes", 4, "ngIf", "ngIfElse"], ["isLoading", ""], [1, "miam-meals-planner-result__cta"], ["class", "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], [1, "m-button-primary", 3, "disabled", "click"], ["width", "24", "height", "24", 3, "iconName", 4, "ngIf", "ngIfElse"], i18n_2, [1, "miam-meals-planner-result__recipes"], ["class", "miam-meals-planner-result__recipe", 4, "ngFor", "ngForOf"], [1, "miam-meals-planner-result__recipe"], [4, "ngIf", "ngIfElse"], ["addRecipeTemplate", ""], [3, "recipe", "displayPricing", "displayGuests", "previewAllowed", "replaceMode", "openCatalog", "removeFromMealsPlanner"], [3, "addRecipe"], [1, "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max"], ["width", "24", "height", "24", 3, "iconName"]];
|
|
26120
|
+
return [[1, "miam-meals-planner-result"], [1, "miam-meals-planner-result__header"], i18n_0, ["class", "miam-meals-planner-result__recipes", 4, "ngIf", "ngIfElse"], ["isLoading", ""], [1, "miam-meals-planner-result__cta"], ["class", "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], [1, "m-button-primary", 3, "disabled", "click"], ["width", "24", "height", "24", 3, "iconName", 4, "ngIf", "ngIfElse"], i18n_2, [1, "miam-meals-planner-result__recipes"], ["class", "miam-meals-planner-result__recipe", 4, "ngFor", "ngForOf"], [1, "miam-meals-planner-result__recipe"], [4, "ngIf", "ngIfElse"], ["addRecipeTemplate", ""], [3, "recipe", "originTrace", "displayPricing", "displayGuests", "previewAllowed", "helpButtonAllowed", "replaceMode", "openCatalog", "removeFromMealsPlanner"], [3, "addRecipe"], [1, "miam-meals-planner-result__progress-bar", 3, "unit", "value", "max"], ["width", "24", "height", "24", 3, "iconName"]];
|
|
26038
26121
|
}, template: function MealsPlannerResultComponent_Template(rf, ctx) {
|
|
26039
26122
|
if (rf & 1) {
|
|
26040
26123
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -26085,7 +26168,7 @@
|
|
|
26085
26168
|
encapsulation: i0.ViewEncapsulation.None,
|
|
26086
26169
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
26087
26170
|
}]
|
|
26088
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: PointOfSalesService }]; }, { recipes: [{
|
|
26171
|
+
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: UserService }, { type: PointOfSalesService }, { type: AnalyticsService }]; }, { recipes: [{
|
|
26089
26172
|
type: i0.Input
|
|
26090
26173
|
}], usedBudget: [{
|
|
26091
26174
|
type: i0.Input
|
|
@@ -26103,53 +26186,64 @@
|
|
|
26103
26186
|
})();
|
|
26104
26187
|
var templateObject_1$K, templateObject_2$A;
|
|
26105
26188
|
|
|
26106
|
-
function
|
|
26189
|
+
function MealsPlannerBasketPreviewComponent_div_0_div_7_Template(rf, ctx) {
|
|
26107
26190
|
if (rf & 1) {
|
|
26108
|
-
i0.ɵɵ
|
|
26191
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
26192
|
+
i0.ɵɵelementStart(1, "div", 14);
|
|
26193
|
+
i0.ɵɵelementStart(2, "span");
|
|
26194
|
+
i0.ɵɵi18n(3, 15);
|
|
26195
|
+
i0.ɵɵelementEnd();
|
|
26196
|
+
i0.ɵɵelementEnd();
|
|
26197
|
+
i0.ɵɵelementEnd();
|
|
26198
|
+
}
|
|
26199
|
+
}
|
|
26200
|
+
function MealsPlannerBasketPreviewComponent_div_0_ng_miam_progress_tracker_10_Template(rf, ctx) {
|
|
26201
|
+
if (rf & 1) {
|
|
26202
|
+
i0.ɵɵelement(0, "ng-miam-progress-tracker", 16);
|
|
26109
26203
|
}
|
|
26110
26204
|
if (rf & 2) {
|
|
26111
|
-
var
|
|
26112
|
-
i0.ɵɵproperty("unit", "\u20AC")("value",
|
|
26205
|
+
var ctx_r2 = i0.ɵɵnextContext(2);
|
|
26206
|
+
i0.ɵɵproperty("unit", "\u20AC")("value", ctx_r2.usedBudget)("max", ctx_r2.maxBudget);
|
|
26113
26207
|
}
|
|
26114
26208
|
}
|
|
26115
|
-
function
|
|
26209
|
+
function MealsPlannerBasketPreviewComponent_div_0_button_11_Template(rf, ctx) {
|
|
26116
26210
|
if (rf & 1) {
|
|
26117
|
-
i0.ɵɵelementStart(0, "button",
|
|
26118
|
-
i0.ɵɵelementStart(1, "a",
|
|
26119
|
-
i0.ɵɵelementStart(2, "div",
|
|
26211
|
+
i0.ɵɵelementStart(0, "button", 17);
|
|
26212
|
+
i0.ɵɵelementStart(1, "a", 18);
|
|
26213
|
+
i0.ɵɵelementStart(2, "div", 19);
|
|
26120
26214
|
i0.ɵɵelementStart(3, "span");
|
|
26121
|
-
i0.ɵɵi18n(4,
|
|
26215
|
+
i0.ɵɵi18n(4, 20);
|
|
26122
26216
|
i0.ɵɵelementEnd();
|
|
26123
26217
|
i0.ɵɵelementEnd();
|
|
26124
26218
|
i0.ɵɵelementEnd();
|
|
26125
26219
|
i0.ɵɵelementEnd();
|
|
26126
26220
|
}
|
|
26127
26221
|
if (rf & 2) {
|
|
26128
|
-
var
|
|
26129
|
-
i0.ɵɵproperty("disabled",
|
|
26222
|
+
var ctx_r3 = i0.ɵɵnextContext(2);
|
|
26223
|
+
i0.ɵɵproperty("disabled", ctx_r3.ctasDisabled);
|
|
26130
26224
|
i0.ɵɵadvance(1);
|
|
26131
|
-
i0.ɵɵproperty("href",
|
|
26225
|
+
i0.ɵɵproperty("href", ctx_r3.context.retailerCartUrl, i0.ɵɵsanitizeUrl);
|
|
26132
26226
|
}
|
|
26133
26227
|
}
|
|
26134
|
-
function
|
|
26228
|
+
function MealsPlannerBasketPreviewComponent_div_0_a_13_Template(rf, ctx) {
|
|
26135
26229
|
if (rf & 1) {
|
|
26136
|
-
i0.ɵɵelementStart(0, "a",
|
|
26137
|
-
i0.ɵɵelementStart(1, "div",
|
|
26230
|
+
i0.ɵɵelementStart(0, "a", 21);
|
|
26231
|
+
i0.ɵɵelementStart(1, "div", 19);
|
|
26138
26232
|
i0.ɵɵelementStart(2, "span");
|
|
26139
|
-
i0.ɵɵi18n(3,
|
|
26233
|
+
i0.ɵɵi18n(3, 22);
|
|
26140
26234
|
i0.ɵɵelementEnd();
|
|
26141
26235
|
i0.ɵɵelementEnd();
|
|
26142
26236
|
i0.ɵɵelementEnd();
|
|
26143
26237
|
}
|
|
26144
26238
|
}
|
|
26145
|
-
function
|
|
26239
|
+
function MealsPlannerBasketPreviewComponent_div_0_ng_template_14_Template(rf, ctx) {
|
|
26146
26240
|
if (rf & 1) {
|
|
26147
|
-
var
|
|
26148
|
-
i0.ɵɵelementStart(0, "a",
|
|
26149
|
-
i0.ɵɵlistener("click", function
|
|
26150
|
-
i0.ɵɵelementStart(1, "div",
|
|
26241
|
+
var _r8_1 = i0.ɵɵgetCurrentView();
|
|
26242
|
+
i0.ɵɵelementStart(0, "a", 23);
|
|
26243
|
+
i0.ɵɵlistener("click", function MealsPlannerBasketPreviewComponent_div_0_ng_template_14_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(2); return ctx_r7.ctasDisabled ? {} : ctx_r7.closed.emit(); });
|
|
26244
|
+
i0.ɵɵelementStart(1, "div", 19);
|
|
26151
26245
|
i0.ɵɵelementStart(2, "span");
|
|
26152
|
-
i0.ɵɵi18n(3,
|
|
26246
|
+
i0.ɵɵi18n(3, 24);
|
|
26153
26247
|
i0.ɵɵelementEnd();
|
|
26154
26248
|
i0.ɵɵelementEnd();
|
|
26155
26249
|
i0.ɵɵelementEnd();
|
|
@@ -26157,7 +26251,7 @@
|
|
|
26157
26251
|
}
|
|
26158
26252
|
function MealsPlannerBasketPreviewComponent_div_0_Template(rf, ctx) {
|
|
26159
26253
|
if (rf & 1) {
|
|
26160
|
-
var
|
|
26254
|
+
var _r10_1 = i0.ɵɵgetCurrentView();
|
|
26161
26255
|
i0.ɵɵelementStart(0, "div", 1);
|
|
26162
26256
|
i0.ɵɵelementStart(1, "div", 2);
|
|
26163
26257
|
i0.ɵɵelementStart(2, "div", 3);
|
|
@@ -26168,27 +26262,30 @@
|
|
|
26168
26262
|
i0.ɵɵi18n(6, 4);
|
|
26169
26263
|
i0.ɵɵelementEnd();
|
|
26170
26264
|
i0.ɵɵelementEnd();
|
|
26171
|
-
i0.ɵɵ
|
|
26172
|
-
i0.ɵɵ
|
|
26265
|
+
i0.ɵɵtemplate(7, MealsPlannerBasketPreviewComponent_div_0_div_7_Template, 4, 0, "div", 5);
|
|
26266
|
+
i0.ɵɵelementStart(8, "ng-miam-basket-preview-block", 6);
|
|
26267
|
+
i0.ɵɵlistener("loading", function MealsPlannerBasketPreviewComponent_div_0_Template_ng_miam_basket_preview_block_loading_8_listener($event) { i0.ɵɵrestoreView(_r10_1); var ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.setCtasDisabled($event); });
|
|
26173
26268
|
i0.ɵɵelementEnd();
|
|
26174
26269
|
i0.ɵɵelementEnd();
|
|
26175
|
-
i0.ɵɵelementStart(
|
|
26176
|
-
i0.ɵɵtemplate(
|
|
26177
|
-
i0.ɵɵtemplate(
|
|
26178
|
-
i0.ɵɵelementStart(
|
|
26179
|
-
i0.ɵɵtemplate(
|
|
26180
|
-
i0.ɵɵtemplate(
|
|
26270
|
+
i0.ɵɵelementStart(9, "div", 7);
|
|
26271
|
+
i0.ɵɵtemplate(10, MealsPlannerBasketPreviewComponent_div_0_ng_miam_progress_tracker_10_Template, 1, 3, "ng-miam-progress-tracker", 8);
|
|
26272
|
+
i0.ɵɵtemplate(11, MealsPlannerBasketPreviewComponent_div_0_button_11_Template, 5, 2, "button", 9);
|
|
26273
|
+
i0.ɵɵelementStart(12, "button", 10);
|
|
26274
|
+
i0.ɵɵtemplate(13, MealsPlannerBasketPreviewComponent_div_0_a_13_Template, 4, 0, "a", 11);
|
|
26275
|
+
i0.ɵɵtemplate(14, MealsPlannerBasketPreviewComponent_div_0_ng_template_14_Template, 4, 0, "ng-template", null, 12, i0.ɵɵtemplateRefExtractor);
|
|
26181
26276
|
i0.ɵɵelementEnd();
|
|
26182
26277
|
i0.ɵɵelementEnd();
|
|
26183
26278
|
i0.ɵɵelementEnd();
|
|
26184
26279
|
}
|
|
26185
26280
|
if (rf & 2) {
|
|
26186
|
-
var
|
|
26281
|
+
var _r5 = i0.ɵɵreference(15);
|
|
26187
26282
|
var ctx_r0 = i0.ɵɵnextContext();
|
|
26188
26283
|
i0.ɵɵadvance(4);
|
|
26189
26284
|
i0.ɵɵtextInterpolate(ctx_r0.recipesIds.length);
|
|
26190
26285
|
i0.ɵɵadvance(3);
|
|
26191
|
-
i0.ɵɵproperty("
|
|
26286
|
+
i0.ɵɵproperty("ngIf", ctx_r0.ingredientsRegrouped);
|
|
26287
|
+
i0.ɵɵadvance(1);
|
|
26288
|
+
i0.ɵɵproperty("originTrace", ctx_r0.eventTrace())("recipesIds", ctx_r0.recipesIds)("displayItemsUnitaryPrice", true);
|
|
26192
26289
|
i0.ɵɵadvance(2);
|
|
26193
26290
|
i0.ɵɵproperty("ngIf", ctx_r0.context.antiInflation);
|
|
26194
26291
|
i0.ɵɵadvance(1);
|
|
@@ -26196,27 +26293,36 @@
|
|
|
26196
26293
|
i0.ɵɵadvance(1);
|
|
26197
26294
|
i0.ɵɵproperty("disabled", ctx_r0.ctasDisabled);
|
|
26198
26295
|
i0.ɵɵadvance(1);
|
|
26199
|
-
i0.ɵɵproperty("ngIf", !ctx_r0.context.antiInflation)("ngIfElse",
|
|
26296
|
+
i0.ɵɵproperty("ngIf", !ctx_r0.context.antiInflation)("ngIfElse", _r5);
|
|
26200
26297
|
}
|
|
26201
26298
|
}
|
|
26202
|
-
var MealsPlannerBasketPreviewComponent = /** @class */ (function () {
|
|
26203
|
-
|
|
26204
|
-
|
|
26205
|
-
|
|
26206
|
-
|
|
26207
|
-
|
|
26208
|
-
|
|
26209
|
-
|
|
26210
|
-
|
|
26211
|
-
|
|
26212
|
-
|
|
26299
|
+
var MealsPlannerBasketPreviewComponent = /** @class */ (function (_super) {
|
|
26300
|
+
__extends(MealsPlannerBasketPreviewComponent, _super);
|
|
26301
|
+
function MealsPlannerBasketPreviewComponent(cdr, context, analyticsService) {
|
|
26302
|
+
var _this = _super.call(this, analyticsService) || this;
|
|
26303
|
+
_this.cdr = cdr;
|
|
26304
|
+
_this.context = context;
|
|
26305
|
+
_this.analyticsService = analyticsService;
|
|
26306
|
+
_this.recipesIds = [];
|
|
26307
|
+
_this.usedBudget = 0;
|
|
26308
|
+
_this.maxBudget = 0;
|
|
26309
|
+
_this.ingredientsRegrouped = false;
|
|
26310
|
+
_this.closed = new i0.EventEmitter();
|
|
26311
|
+
_this.icon = exports.Icon;
|
|
26312
|
+
_this.ctasDisabled = true;
|
|
26313
|
+
_this.subscriptions = [];
|
|
26314
|
+
return _this;
|
|
26213
26315
|
}
|
|
26316
|
+
MealsPlannerBasketPreviewComponent.prototype.ngOnInit = function () {
|
|
26317
|
+
this.pageview();
|
|
26318
|
+
};
|
|
26214
26319
|
MealsPlannerBasketPreviewComponent.prototype.ngOnDestroy = function () {
|
|
26215
26320
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
26216
26321
|
};
|
|
26217
26322
|
MealsPlannerBasketPreviewComponent.prototype.ngOnChanges = function () {
|
|
26218
26323
|
this.cdr.detectChanges();
|
|
26219
26324
|
};
|
|
26325
|
+
MealsPlannerBasketPreviewComponent.prototype.currentPath = function () { return 'basket-preview'; };
|
|
26220
26326
|
/**
|
|
26221
26327
|
* If the preview is opened and loading, block the user from closing the modal
|
|
26222
26328
|
*/
|
|
@@ -26225,9 +26331,9 @@
|
|
|
26225
26331
|
this.cdr.detectChanges();
|
|
26226
26332
|
};
|
|
26227
26333
|
return MealsPlannerBasketPreviewComponent;
|
|
26228
|
-
}());
|
|
26229
|
-
MealsPlannerBasketPreviewComponent.ɵfac = function MealsPlannerBasketPreviewComponent_Factory(t) { return new (t || MealsPlannerBasketPreviewComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService)); };
|
|
26230
|
-
MealsPlannerBasketPreviewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketPreviewComponent, selectors: [["ng-miam-meals-planner-basket-preview"]], inputs: { recipesIds: "recipesIds", usedBudget: "usedBudget", maxBudget: "maxBudget" }, outputs: { closed: "closed" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: function () {
|
|
26334
|
+
}(EventTracerComponent));
|
|
26335
|
+
MealsPlannerBasketPreviewComponent.ɵfac = function MealsPlannerBasketPreviewComponent_Factory(t) { return new (t || MealsPlannerBasketPreviewComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(AnalyticsService)); };
|
|
26336
|
+
MealsPlannerBasketPreviewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketPreviewComponent, selectors: [["ng-miam-meals-planner-basket-preview"]], inputs: { recipesIds: "recipesIds", usedBudget: "usedBudget", maxBudget: "maxBudget", ingredientsRegrouped: "ingredientsRegrouped" }, outputs: { closed: "closed" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: function () {
|
|
26231
26337
|
var i18n_0;
|
|
26232
26338
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26233
26339
|
var MSG_EXTERNAL_2700281655709788634$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS__1 = goog.getMsg("repas ajout\u00E9s \u00E0 votre panier");
|
|
@@ -26238,37 +26344,45 @@
|
|
|
26238
26344
|
}
|
|
26239
26345
|
var i18n_2;
|
|
26240
26346
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26241
|
-
var
|
|
26242
|
-
i18n_2 =
|
|
26347
|
+
var MSG_EXTERNAL_349368051595787077$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___3 = goog.getMsg("Les ingr\u00E9dients partageant plusieurs recettes ont \u00E9t\u00E9 regroup\u00E9s");
|
|
26348
|
+
i18n_2 = MSG_EXTERNAL_349368051595787077$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___3;
|
|
26243
26349
|
}
|
|
26244
26350
|
else {
|
|
26245
|
-
i18n_2 = $localize(templateObject_2$B || (templateObject_2$B = __makeTemplateObject([":\
|
|
26351
|
+
i18n_2 = $localize(templateObject_2$B || (templateObject_2$B = __makeTemplateObject([":\u241Fa0d1fe7eaa09916660fc5082c77b25044a39a100\u241F349368051595787077:Les ingr\u00E9dients partageant plusieurs recettes ont \u00E9t\u00E9 regroup\u00E9s"], [":\u241Fa0d1fe7eaa09916660fc5082c77b25044a39a100\u241F349368051595787077:Les ingr\u00E9dients partageant plusieurs recettes ont \u00E9t\u00E9 regroup\u00E9s"])));
|
|
26246
26352
|
}
|
|
26247
26353
|
var i18n_4;
|
|
26248
26354
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26249
|
-
var
|
|
26250
|
-
i18n_4 =
|
|
26355
|
+
var MSG_EXTERNAL_2597486146640590065$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___5 = goog.getMsg("Aller \u00E0 mon panier");
|
|
26356
|
+
i18n_4 = MSG_EXTERNAL_2597486146640590065$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___5;
|
|
26251
26357
|
}
|
|
26252
26358
|
else {
|
|
26253
|
-
i18n_4 = $localize(templateObject_3$t || (templateObject_3$t = __makeTemplateObject([":\
|
|
26359
|
+
i18n_4 = $localize(templateObject_3$t || (templateObject_3$t = __makeTemplateObject([":\u241F36b57ca9ce912938699424cf85d5cac2a6bfa738\u241F2597486146640590065:Aller \u00E0 mon panier"], [":\u241F36b57ca9ce912938699424cf85d5cac2a6bfa738\u241F2597486146640590065:Aller \u00E0 mon panier"])));
|
|
26254
26360
|
}
|
|
26255
26361
|
var i18n_6;
|
|
26256
26362
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26257
|
-
var
|
|
26258
|
-
i18n_6 =
|
|
26363
|
+
var MSG_EXTERNAL_4645762297074474087$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___7 = goog.getMsg("Continuer mes achats");
|
|
26364
|
+
i18n_6 = MSG_EXTERNAL_4645762297074474087$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___7;
|
|
26259
26365
|
}
|
|
26260
26366
|
else {
|
|
26261
|
-
i18n_6 = $localize(templateObject_4$n || (templateObject_4$n = __makeTemplateObject([":\
|
|
26367
|
+
i18n_6 = $localize(templateObject_4$n || (templateObject_4$n = __makeTemplateObject([":\u241Fd8ccc910c8536280f86357456fb751e967f3041f\u241F4645762297074474087:Continuer mes achats"], [":\u241Fd8ccc910c8536280f86357456fb751e967f3041f\u241F4645762297074474087:Continuer mes achats"])));
|
|
26368
|
+
}
|
|
26369
|
+
var i18n_8;
|
|
26370
|
+
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26371
|
+
var MSG_EXTERNAL_3503734824800029552$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___9 = goog.getMsg("Finaliser");
|
|
26372
|
+
i18n_8 = MSG_EXTERNAL_3503734824800029552$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___9;
|
|
26262
26373
|
}
|
|
26263
|
-
|
|
26374
|
+
else {
|
|
26375
|
+
i18n_8 = $localize(templateObject_5$h || (templateObject_5$h = __makeTemplateObject([":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"], [":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"])));
|
|
26376
|
+
}
|
|
26377
|
+
return [["class", "miam-meals-planner-basket-preview", 4, "ngIf"], [1, "miam-meals-planner-basket-preview"], [1, "miam-meals-planner-basket-preview__content"], [1, "miam-meals-planner-basket-preview__title"], i18n_0, ["class", "miam-meals-planner-basket-preview__ingredients-regrouped", 4, "ngIf"], [3, "originTrace", "recipesIds", "displayItemsUnitaryPrice", "loading"], [1, "miam-meals-planner-basket-preview__actions"], ["class", "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], ["class", "m-button-primary reverse", 3, "disabled", 4, "ngIf"], [1, "m-button-primary", 3, "disabled"], ["href", "/", 4, "ngIf", "ngIfElse"], ["antiInflation", ""], [1, "miam-meals-planner-basket-preview__ingredients-regrouped"], [1, "miam-meals-planner-basket-preview__ingredients-regrouped__title"], i18n_2, [1, "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max"], [1, "m-button-primary", "reverse", 3, "disabled"], [3, "href"], [1, "miam-meals-planner-basket-preview__button-text"], i18n_4, ["href", "/"], i18n_6, [3, "click"], i18n_8];
|
|
26264
26378
|
}, template: function MealsPlannerBasketPreviewComponent_Template(rf, ctx) {
|
|
26265
26379
|
if (rf & 1) {
|
|
26266
|
-
i0.ɵɵtemplate(0, MealsPlannerBasketPreviewComponent_div_0_Template,
|
|
26380
|
+
i0.ɵɵtemplate(0, MealsPlannerBasketPreviewComponent_div_0_Template, 16, 10, "div", 0);
|
|
26267
26381
|
}
|
|
26268
26382
|
if (rf & 2) {
|
|
26269
26383
|
i0.ɵɵproperty("ngIf", ctx.recipesIds.length > 0);
|
|
26270
26384
|
}
|
|
26271
|
-
}, directives: [i2$1.NgIf, BasketPreviewBlockComponent, ProgressTrackerComponent], styles: [".miam-meals-planner-basket-preview{display:flex;flex-direction:column;height:100%;min-height:90vh;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{height:100%;padding:32px 340px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title{font-size:24px;font-style:normal;font-weight:900;line-height:120%;margin-bottom:24px;text-align:center}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title span:last-child{margin-left:8px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{align-items:center;background:#fff;border-top:1px solid #d9dde1;bottom:0;display:flex;justify-content:space-evenly;left:0;padding:16px;position:fixed;right:0;z-index:2}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .miam-meals-planner-basket-preview__progress-bar{max-width:300px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{padding:unset}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a{border-radius:var(--m-button-radius)}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a .miam-meals-planner-basket-preview__button-text{border-radius:var(--m-button-radius);padding:var(--m-button-padding)}@media (max-width:1023px){.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{padding:16px 0}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{flex-direction:column-reverse}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary.reverse{margin-left:0;margin-top:12px}}"], encapsulation: 2, changeDetection: 0 });
|
|
26385
|
+
}, directives: [i2$1.NgIf, BasketPreviewBlockComponent, ProgressTrackerComponent], styles: [".miam-meals-planner-basket-preview{display:flex;flex-direction:column;height:100%;min-height:90vh;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{height:100%;padding:32px 340px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title{font-size:24px;font-style:normal;font-weight:900;line-height:120%;margin-bottom:24px;text-align:center}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__title span:last-child{margin-left:8px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__ingredients-regrouped{align-items:center;background-color:var(--m-color-success);border-radius:4px;color:var(--m-color-success-text);display:flex;display:none;margin-bottom:6px;padding:12px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content .miam-meals-planner-basket-preview__ingredients-regrouped .miam-meals-planner-basket-preview__ingredients-regrouped__title{font-size:16px;line-height:24px}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{align-items:center;background:#fff;border-top:1px solid #d9dde1;bottom:0;display:flex;justify-content:space-evenly;left:0;padding:16px;position:fixed;right:0;z-index:2}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .miam-meals-planner-basket-preview__progress-bar{max-width:300px;width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{padding:unset}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a{border-radius:var(--m-button-radius)}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary a .miam-meals-planner-basket-preview__button-text{border-radius:var(--m-button-radius);padding:var(--m-button-padding)}@media (max-width:1023px){.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__content{padding:16px 0}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions{flex-direction:column-reverse}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary{width:100%}.miam-meals-planner-basket-preview .miam-meals-planner-basket-preview__actions .m-button-primary.reverse{margin-left:0;margin-top:12px}}"], encapsulation: 2, changeDetection: 0 });
|
|
26272
26386
|
/*@__PURE__*/ (function () {
|
|
26273
26387
|
i0.ɵsetClassMetadata(MealsPlannerBasketPreviewComponent, [{
|
|
26274
26388
|
type: i0.Component,
|
|
@@ -26279,17 +26393,19 @@
|
|
|
26279
26393
|
encapsulation: i0.ViewEncapsulation.None,
|
|
26280
26394
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
26281
26395
|
}]
|
|
26282
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }]; }, { recipesIds: [{
|
|
26396
|
+
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: AnalyticsService }]; }, { recipesIds: [{
|
|
26283
26397
|
type: i0.Input
|
|
26284
26398
|
}], usedBudget: [{
|
|
26285
26399
|
type: i0.Input
|
|
26286
26400
|
}], maxBudget: [{
|
|
26287
26401
|
type: i0.Input
|
|
26402
|
+
}], ingredientsRegrouped: [{
|
|
26403
|
+
type: i0.Input
|
|
26288
26404
|
}], closed: [{
|
|
26289
26405
|
type: i0.Output
|
|
26290
26406
|
}] });
|
|
26291
26407
|
})();
|
|
26292
|
-
var templateObject_1$L, templateObject_2$B, templateObject_3$t, templateObject_4$n;
|
|
26408
|
+
var templateObject_1$L, templateObject_2$B, templateObject_3$t, templateObject_4$n, templateObject_5$h;
|
|
26293
26409
|
|
|
26294
26410
|
function MealsPlannerCatalogComponent_div_14_Template(rf, ctx) {
|
|
26295
26411
|
if (rf & 1) {
|
|
@@ -26303,20 +26419,27 @@
|
|
|
26303
26419
|
i0.ɵɵtextInterpolate1(" ", ctx_r0.filterBadgeCount, " ");
|
|
26304
26420
|
}
|
|
26305
26421
|
}
|
|
26306
|
-
var MealsPlannerCatalogComponent = /** @class */ (function () {
|
|
26307
|
-
|
|
26308
|
-
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26312
|
-
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
|
|
26422
|
+
var MealsPlannerCatalogComponent = /** @class */ (function (_super) {
|
|
26423
|
+
__extends(MealsPlannerCatalogComponent, _super);
|
|
26424
|
+
function MealsPlannerCatalogComponent(cdr, recipesService, analyticsService) {
|
|
26425
|
+
var _this = _super.call(this, analyticsService) || this;
|
|
26426
|
+
_this.cdr = cdr;
|
|
26427
|
+
_this.recipesService = recipesService;
|
|
26428
|
+
_this.analyticsService = analyticsService;
|
|
26429
|
+
_this.excludedRecipesIds = [];
|
|
26430
|
+
_this.canceled = new i0.EventEmitter();
|
|
26431
|
+
_this.editRecipe = new i0.EventEmitter();
|
|
26432
|
+
_this.icon = exports.Icon;
|
|
26433
|
+
_this.searchString = '';
|
|
26434
|
+
_this.filterBadgeCount = 0;
|
|
26435
|
+
_this.isFilterCollapsed = true;
|
|
26436
|
+
return _this;
|
|
26316
26437
|
}
|
|
26317
26438
|
MealsPlannerCatalogComponent.prototype.ngOnInit = function () {
|
|
26318
26439
|
this.initFilters();
|
|
26440
|
+
this.pageview();
|
|
26319
26441
|
};
|
|
26442
|
+
MealsPlannerCatalogComponent.prototype.currentPath = function () { return 'catalog'; };
|
|
26320
26443
|
// Used on load to build the filters attribute, and on click on the link to reset the filters
|
|
26321
26444
|
MealsPlannerCatalogComponent.prototype.initFilters = function () {
|
|
26322
26445
|
this.filters = new RecipeFilters({
|
|
@@ -26346,6 +26469,9 @@
|
|
|
26346
26469
|
this.cdr.detectChanges();
|
|
26347
26470
|
};
|
|
26348
26471
|
MealsPlannerCatalogComponent.prototype.updateSearchString = function () {
|
|
26472
|
+
if (this.filters.search === this.searchString) {
|
|
26473
|
+
return;
|
|
26474
|
+
}
|
|
26349
26475
|
this.filters.search = this.searchString;
|
|
26350
26476
|
this.updateFilters(this.filters);
|
|
26351
26477
|
};
|
|
@@ -26361,9 +26487,9 @@
|
|
|
26361
26487
|
configurable: true
|
|
26362
26488
|
});
|
|
26363
26489
|
return MealsPlannerCatalogComponent;
|
|
26364
|
-
}());
|
|
26365
|
-
MealsPlannerCatalogComponent.ɵfac = function MealsPlannerCatalogComponent_Factory(t) { return new (t || MealsPlannerCatalogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService)); };
|
|
26366
|
-
MealsPlannerCatalogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerCatalogComponent, selectors: [["ng-miam-meals-planner-catalog"]], inputs: { modifiedGuests: "modifiedGuests", remainingBudget: "remainingBudget", remainingRecipesNumber: "remainingRecipesNumber" }, outputs: { canceled: "canceled", editRecipe: "editRecipe" }, decls: 17, vars:
|
|
26490
|
+
}(EventTracerComponent));
|
|
26491
|
+
MealsPlannerCatalogComponent.ɵfac = function MealsPlannerCatalogComponent_Factory(t) { return new (t || MealsPlannerCatalogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(AnalyticsService)); };
|
|
26492
|
+
MealsPlannerCatalogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerCatalogComponent, selectors: [["ng-miam-meals-planner-catalog"]], inputs: { modifiedGuests: "modifiedGuests", remainingBudget: "remainingBudget", remainingRecipesNumber: "remainingRecipesNumber", excludedRecipesIds: "excludedRecipesIds" }, outputs: { canceled: "canceled", editRecipe: "editRecipe" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 17, vars: 16, consts: function () {
|
|
26367
26493
|
var i18n_0;
|
|
26368
26494
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26369
26495
|
var MSG_EXTERNAL_2741573127118604046$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_CATALOG_MEALS_PLANNER_CATALOG_COMPONENT_TS_1 = goog.getMsg("Notre catalogue");
|
|
@@ -26380,7 +26506,7 @@
|
|
|
26380
26506
|
else {
|
|
26381
26507
|
i18n_2 = $localize(templateObject_2$C || (templateObject_2$C = __makeTemplateObject([":\u241F43a5be6775550e305fdcc873e3fe93fe756b2340\u241F673430564078029527:Filtrer"], [":\u241F43a5be6775550e305fdcc873e3fe93fe756b2340\u241F673430564078029527:Filtrer"])));
|
|
26382
26508
|
}
|
|
26383
|
-
return [[1, "miam-meals-planner-catalog"], [1, "miam-meals-planner-catalog__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-catalog__search-and-filters"], [1, "miam-meals-planner-catalog__searchbar"], ["type", "text", "placeholder", "
|
|
26509
|
+
return [[1, "miam-meals-planner-catalog"], [1, "miam-meals-planner-catalog__title", 3, "click"], ["width", "24", "height", "24", 3, "iconName"], i18n_0, [1, "miam-meals-planner-catalog__search-and-filters"], [1, "miam-meals-planner-catalog__searchbar"], ["type", "text", "placeholder", "Rechercher un ingr\u00E9dient, un repas...", 1, "miam-meals-planner-catalog__searchbar__input", 3, "ngModel", "ngModelChange", "keydown.enter", "blur"], [1, "miam-meals-planner-catalog__searchbar__button", "m-button-primary"], ["width", "20", "height", "20", 3, "iconName", "click"], [1, "miam-meals-planner-catalog__controls__filter", "m-button-primary", 3, "click"], ["width", "18", "height", "18", 3, "iconName"], i18n_2, ["class", "miam-meals-planner-catalog__controls__filter-badge", 4, "ngIf"], [3, "filters", "isFilterCollapsed", "position", "filterChanged", "filterCollapsed"], [3, "displayPricing", "addRecipeMode", "modifiedGuests", "originTrace", "filters", "displayGuests", "helpButtonAllowed", "excludedRecipesIds", "addToMealsPlanner"], [1, "miam-meals-planner-catalog__controls__filter-badge"]];
|
|
26384
26510
|
}, template: function MealsPlannerCatalogComponent_Template(rf, ctx) {
|
|
26385
26511
|
if (rf & 1) {
|
|
26386
26512
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -26433,7 +26559,7 @@
|
|
|
26433
26559
|
i0.ɵɵadvance(1);
|
|
26434
26560
|
i0.ɵɵproperty("filters", ctx.filters)("isFilterCollapsed", ctx.isFilterCollapsed)("position", "right");
|
|
26435
26561
|
i0.ɵɵadvance(1);
|
|
26436
|
-
i0.ɵɵproperty("displayPricing", true)("addRecipeMode", true)("modifiedGuests", ctx.modifiedGuests)("filters", ctx.filters)("displayGuests", false);
|
|
26562
|
+
i0.ɵɵproperty("displayPricing", true)("addRecipeMode", true)("modifiedGuests", ctx.modifiedGuests)("originTrace", ctx.eventTrace())("filters", ctx.filters)("displayGuests", false)("helpButtonAllowed", false)("excludedRecipesIds", ctx.excludedRecipesIds);
|
|
26437
26563
|
}
|
|
26438
26564
|
}, directives: [IconComponent, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i2$1.NgIf, RecipeFiltersComponent, CatalogListComponent], styles: [".miam-meals-planner-catalog .miam-meals-planner-catalog__title{display:flex;flex-direction:row;font-size:24px;font-weight:900;line-height:120%;margin-bottom:24px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-meals-planner-catalog .miam-meals-planner-catalog__title ng-miam-icon{cursor:pointer;transform:rotate(90deg)}.miam-meals-planner-catalog .miam-meals-planner-catalog__title ng-miam-icon .icon-container svg path:last-child{fill:var(--m-color-primary)}.miam-meals-planner-catalog .miam-meals-planner-catalog__title span{cursor:pointer;margin-left:16px}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px;width:100%}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar{align-items:center;background:var(--m-color-white);border:1px solid #ddd;border-radius:var(--m-border-radius-pill);display:flex;font-size:14px;height:45px;margin-right:8px;padding:0 2px 0 20px;width:400px}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar .miam-meals-planner-catalog__searchbar__input{background:transparent;border:transparent;flex:1;outline:none!important}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar .miam-meals-planner-catalog__searchbar__button{padding:10px}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar .miam-meals-planner-catalog__searchbar__button:hover{border-color:transparent}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__controls__filter{border-color:transparent;font-weight:700;position:relative}.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__controls__filter .miam-meals-planner-catalog__controls__filter-badge{align-items:center;background-color:var(--m-catalog-redpoint-color);border-radius:var(--m-border-radius-circle);color:var(--m-catalog-redpoint-text-color);display:flex;font-size:12px;height:18px;justify-content:center;line-height:18px;position:absolute;right:-4px;top:-4px;width:18px}@media (max-width:1023px){.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters .miam-meals-planner-catalog__searchbar{width:300px}.miam-meals-planner-catalog .miam-meals-planner-catalog__controls__filter{border-radius:var(--m-border-radius-circle);padding:10px}.miam-meals-planner-catalog .miam-meals-planner-catalog__controls__filter span{display:none}.miam-meals-planner-catalog .miam-meals-planner-catalog__controls__filter ng-miam-icon{margin-right:0!important}}@media (max-width:607px){.miam-meals-planner-catalog .miam-meals-planner-catalog__search-and-filters{justify-content:center}}"], encapsulation: 2, changeDetection: 0 });
|
|
26439
26565
|
/*@__PURE__*/ (function () {
|
|
@@ -26446,12 +26572,14 @@
|
|
|
26446
26572
|
encapsulation: i0.ViewEncapsulation.None,
|
|
26447
26573
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
26448
26574
|
}]
|
|
26449
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }]; }, { modifiedGuests: [{
|
|
26575
|
+
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: AnalyticsService }]; }, { modifiedGuests: [{
|
|
26450
26576
|
type: i0.Input
|
|
26451
26577
|
}], remainingBudget: [{
|
|
26452
26578
|
type: i0.Input
|
|
26453
26579
|
}], remainingRecipesNumber: [{
|
|
26454
26580
|
type: i0.Input
|
|
26581
|
+
}], excludedRecipesIds: [{
|
|
26582
|
+
type: i0.Input
|
|
26455
26583
|
}], canceled: [{
|
|
26456
26584
|
type: i0.Output
|
|
26457
26585
|
}], editRecipe: [{
|
|
@@ -26460,13 +26588,21 @@
|
|
|
26460
26588
|
})();
|
|
26461
26589
|
var templateObject_1$M, templateObject_2$C;
|
|
26462
26590
|
|
|
26463
|
-
var MealsPlannerBasketConfirmationComponent = /** @class */ (function () {
|
|
26464
|
-
|
|
26465
|
-
|
|
26466
|
-
|
|
26467
|
-
|
|
26468
|
-
|
|
26591
|
+
var MealsPlannerBasketConfirmationComponent = /** @class */ (function (_super) {
|
|
26592
|
+
__extends(MealsPlannerBasketConfirmationComponent, _super);
|
|
26593
|
+
function MealsPlannerBasketConfirmationComponent(cdr, context, analyticsService) {
|
|
26594
|
+
var _this = _super.call(this, analyticsService) || this;
|
|
26595
|
+
_this.cdr = cdr;
|
|
26596
|
+
_this.context = context;
|
|
26597
|
+
_this.analyticsService = analyticsService;
|
|
26598
|
+
_this.recipesIds = [];
|
|
26599
|
+
_this.budget = 0;
|
|
26600
|
+
return _this;
|
|
26469
26601
|
}
|
|
26602
|
+
MealsPlannerBasketConfirmationComponent.prototype.ngOnInit = function () {
|
|
26603
|
+
this.pageview();
|
|
26604
|
+
};
|
|
26605
|
+
MealsPlannerBasketConfirmationComponent.prototype.currentPath = function () { return 'confirmation'; };
|
|
26470
26606
|
Object.defineProperty(MealsPlannerBasketConfirmationComponent.prototype, "roundedBudget", {
|
|
26471
26607
|
get: function () {
|
|
26472
26608
|
return (Math.round(this.budget * 100) / 100).toFixed(2).replace('.', ',');
|
|
@@ -26475,9 +26611,9 @@
|
|
|
26475
26611
|
configurable: true
|
|
26476
26612
|
});
|
|
26477
26613
|
return MealsPlannerBasketConfirmationComponent;
|
|
26478
|
-
}());
|
|
26479
|
-
MealsPlannerBasketConfirmationComponent.ɵfac = function MealsPlannerBasketConfirmationComponent_Factory(t) { return new (t || MealsPlannerBasketConfirmationComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService)); };
|
|
26480
|
-
MealsPlannerBasketConfirmationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketConfirmationComponent, selectors: [["ng-miam-meals-planner-basket-confirmation"]], inputs: { recipesIds: "recipesIds", budget: "budget" }, decls: 24, vars: 3, consts: function () {
|
|
26614
|
+
}(EventTracerComponent));
|
|
26615
|
+
MealsPlannerBasketConfirmationComponent.ɵfac = function MealsPlannerBasketConfirmationComponent_Factory(t) { return new (t || MealsPlannerBasketConfirmationComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(AnalyticsService)); };
|
|
26616
|
+
MealsPlannerBasketConfirmationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerBasketConfirmationComponent, selectors: [["ng-miam-meals-planner-basket-confirmation"]], inputs: { recipesIds: "recipesIds", budget: "budget" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 24, vars: 3, consts: function () {
|
|
26481
26617
|
var i18n_0;
|
|
26482
26618
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
26483
26619
|
var MSG_EXTERNAL_978176854081714634$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_CONFIRMATION_MEALS_PLANNER_BASKET_CONFIRMATION_COMPONENT_TS_1 = goog.getMsg("Les produits associ\u00E9s ont bien \u00E9t\u00E9 ajout\u00E9s au panier.");
|
|
@@ -26575,7 +26711,7 @@
|
|
|
26575
26711
|
encapsulation: i0.ViewEncapsulation.None,
|
|
26576
26712
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
26577
26713
|
}]
|
|
26578
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }]; }, { recipesIds: [{
|
|
26714
|
+
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: ContextService }, { type: AnalyticsService }]; }, { recipesIds: [{
|
|
26579
26715
|
type: i0.Input
|
|
26580
26716
|
}], budget: [{
|
|
26581
26717
|
type: i0.Input
|
|
@@ -26583,7 +26719,7 @@
|
|
|
26583
26719
|
})();
|
|
26584
26720
|
var templateObject_1$N, templateObject_2$D, templateObject_3$u, templateObject_4$o;
|
|
26585
26721
|
|
|
26586
|
-
var
|
|
26722
|
+
var _b$1;
|
|
26587
26723
|
var _c0$w = ["miamMealsPlannerTopAnchor"];
|
|
26588
26724
|
var _c5$1 = function (a0) { return { "reduced": a0 }; };
|
|
26589
26725
|
function MealsPlannerComponent_div_15_ng_miam_meals_planner_form_1_Template(rf, ctx) {
|
|
@@ -26595,7 +26731,7 @@
|
|
|
26595
26731
|
}
|
|
26596
26732
|
if (rf & 2) {
|
|
26597
26733
|
var ctx_r2 = i0.ɵɵnextContext(2);
|
|
26598
|
-
i0.ɵɵproperty("reduced", ctx_r2.budgettedRecipes.length > 0)("form", ctx_r2.form)("ngClass", i0.ɵɵpureFunction1(
|
|
26734
|
+
i0.ɵɵproperty("originTrace", ctx_r2.eventTrace())("reduced", ctx_r2.budgettedRecipes.length > 0)("form", ctx_r2.form)("loading", ctx_r2.loading)("ngClass", i0.ɵɵpureFunction1(5, _c5$1, ctx_r2.budgettedRecipes.length > 0));
|
|
26599
26735
|
}
|
|
26600
26736
|
}
|
|
26601
26737
|
function MealsPlannerComponent_div_15_ng_miam_meals_planner_result_2_Template(rf, ctx) {
|
|
@@ -26607,7 +26743,7 @@
|
|
|
26607
26743
|
}
|
|
26608
26744
|
if (rf & 2) {
|
|
26609
26745
|
var ctx_r3 = i0.ɵɵnextContext(2);
|
|
26610
|
-
i0.ɵɵproperty("recipes", ctx_r3.budgettedRecipes)("usedBudget", ctx_r3.usedBudget)("maxBudget", ctx_r3.maxBudget)("loading", ctx_r3.loading);
|
|
26746
|
+
i0.ɵɵproperty("originTrace", ctx_r3.eventTrace())("recipes", ctx_r3.budgettedRecipes)("usedBudget", ctx_r3.usedBudget)("maxBudget", ctx_r3.maxBudget)("loading", ctx_r3.loading);
|
|
26611
26747
|
}
|
|
26612
26748
|
}
|
|
26613
26749
|
function MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_preview_3_Template(rf, ctx) {
|
|
@@ -26619,7 +26755,7 @@
|
|
|
26619
26755
|
}
|
|
26620
26756
|
if (rf & 2) {
|
|
26621
26757
|
var ctx_r4 = i0.ɵɵnextContext(2);
|
|
26622
|
-
i0.ɵɵproperty("recipesIds", ctx_r4.addedRecipesIds)("usedBudget", ctx_r4.usedBudget)("maxBudget", ctx_r4.maxBudget)("ngClass", i0.ɵɵpureFunction1(
|
|
26758
|
+
i0.ɵɵproperty("recipesIds", ctx_r4.addedRecipesIds)("usedBudget", ctx_r4.usedBudget)("maxBudget", ctx_r4.maxBudget)("ingredientsRegrouped", ctx_r4.ingredientsRegrouped)("originTrace", ctx_r4.eventTrace())("ngClass", i0.ɵɵpureFunction1(6, _c5$1, ctx_r4.addedRecipesIds.length === 0 && !ctx_r4.catalogMode && !ctx_r4.basketConfirmed));
|
|
26623
26759
|
}
|
|
26624
26760
|
}
|
|
26625
26761
|
function MealsPlannerComponent_div_15_ng_miam_meals_planner_catalog_4_Template(rf, ctx) {
|
|
@@ -26631,7 +26767,7 @@
|
|
|
26631
26767
|
}
|
|
26632
26768
|
if (rf & 2) {
|
|
26633
26769
|
var ctx_r5 = i0.ɵɵnextContext(2);
|
|
26634
|
-
i0.ɵɵproperty("modifiedGuests", ctx_r5.form.value.guestsCount)("remainingBudget", ctx_r5.remainingBudget)("remainingRecipesNumber", ctx_r5.remainingRecipesNumber);
|
|
26770
|
+
i0.ɵɵproperty("modifiedGuests", ctx_r5.form.value.guestsCount)("originTrace", ctx_r5.eventTrace())("remainingBudget", ctx_r5.remainingBudget)("remainingRecipesNumber", ctx_r5.remainingRecipesNumber)("excludedRecipesIds", ctx_r5.excludedRecipesIds);
|
|
26635
26771
|
}
|
|
26636
26772
|
}
|
|
26637
26773
|
function MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_confirmation_5_Template(rf, ctx) {
|
|
@@ -26640,17 +26776,17 @@
|
|
|
26640
26776
|
}
|
|
26641
26777
|
if (rf & 2) {
|
|
26642
26778
|
var ctx_r6 = i0.ɵɵnextContext(2);
|
|
26643
|
-
i0.ɵɵproperty("recipesIds", ctx_r6.addedRecipesIds)("budget", ctx_r6.usedBudget);
|
|
26779
|
+
i0.ɵɵproperty("recipesIds", ctx_r6.addedRecipesIds)("originTrace", ctx_r6.eventTrace())("budget", ctx_r6.usedBudget);
|
|
26644
26780
|
}
|
|
26645
26781
|
}
|
|
26646
26782
|
function MealsPlannerComponent_div_15_Template(rf, ctx) {
|
|
26647
26783
|
if (rf & 1) {
|
|
26648
26784
|
i0.ɵɵelementStart(0, "div", 13);
|
|
26649
|
-
i0.ɵɵtemplate(1, MealsPlannerComponent_div_15_ng_miam_meals_planner_form_1_Template, 1,
|
|
26650
|
-
i0.ɵɵtemplate(2, MealsPlannerComponent_div_15_ng_miam_meals_planner_result_2_Template, 1,
|
|
26651
|
-
i0.ɵɵtemplate(3, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_preview_3_Template, 1,
|
|
26652
|
-
i0.ɵɵtemplate(4, MealsPlannerComponent_div_15_ng_miam_meals_planner_catalog_4_Template, 1,
|
|
26653
|
-
i0.ɵɵtemplate(5, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_confirmation_5_Template, 1,
|
|
26785
|
+
i0.ɵɵtemplate(1, MealsPlannerComponent_div_15_ng_miam_meals_planner_form_1_Template, 1, 7, "ng-miam-meals-planner-form", 14);
|
|
26786
|
+
i0.ɵɵtemplate(2, MealsPlannerComponent_div_15_ng_miam_meals_planner_result_2_Template, 1, 5, "ng-miam-meals-planner-result", 15);
|
|
26787
|
+
i0.ɵɵtemplate(3, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_preview_3_Template, 1, 8, "ng-miam-meals-planner-basket-preview", 16);
|
|
26788
|
+
i0.ɵɵtemplate(4, MealsPlannerComponent_div_15_ng_miam_meals_planner_catalog_4_Template, 1, 5, "ng-miam-meals-planner-catalog", 17);
|
|
26789
|
+
i0.ɵɵtemplate(5, MealsPlannerComponent_div_15_ng_miam_meals_planner_basket_confirmation_5_Template, 1, 3, "ng-miam-meals-planner-basket-confirmation", 18);
|
|
26654
26790
|
i0.ɵɵelementEnd();
|
|
26655
26791
|
}
|
|
26656
26792
|
if (rf & 2) {
|
|
@@ -26660,7 +26796,7 @@
|
|
|
26660
26796
|
i0.ɵɵadvance(1);
|
|
26661
26797
|
i0.ɵɵproperty("ngIf", ctx_r1.budgettedRecipes.length > 0 && ctx_r1.addedRecipesIds.length === 0 && !ctx_r1.catalogMode && !ctx_r1.basketConfirmed);
|
|
26662
26798
|
i0.ɵɵadvance(1);
|
|
26663
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.basketConfirmed);
|
|
26799
|
+
i0.ɵɵproperty("ngIf", ctx_r1.addedRecipesIds.length > 0 && !ctx_r1.catalogMode && !ctx_r1.basketConfirmed);
|
|
26664
26800
|
i0.ɵɵadvance(1);
|
|
26665
26801
|
i0.ɵɵproperty("ngIf", ctx_r1.catalogMode && !ctx_r1.basketConfirmed);
|
|
26666
26802
|
i0.ɵɵadvance(1);
|
|
@@ -26669,13 +26805,13 @@
|
|
|
26669
26805
|
}
|
|
26670
26806
|
var _c6$4 = function (a0) { return { "hidden": a0 }; };
|
|
26671
26807
|
var recipeIncludes$5 = ['recipe-provider', 'sponsors'];
|
|
26672
|
-
var recipeSparseFields$5 = (
|
|
26808
|
+
var recipeSparseFields$5 = (_b$1 = {
|
|
26673
26809
|
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
26674
|
-
'resting-time'
|
|
26810
|
+
'resting-time'], recipeIncludes$5),
|
|
26675
26811
|
sponsors: ['logo-url']
|
|
26676
26812
|
},
|
|
26677
|
-
|
|
26678
|
-
|
|
26813
|
+
_b$1['recipe-provider'] = ['name'],
|
|
26814
|
+
_b$1);
|
|
26679
26815
|
var MealsPlannerComponent = /** @class */ (function (_super) {
|
|
26680
26816
|
__extends(MealsPlannerComponent, _super);
|
|
26681
26817
|
function MealsPlannerComponent(fb, cdr, analyticsService, contextService, groceriesListsService, recipesService, basketsService, posService) {
|
|
@@ -26689,11 +26825,14 @@
|
|
|
26689
26825
|
_this.basketsService = basketsService;
|
|
26690
26826
|
_this.posService = posService;
|
|
26691
26827
|
_this.budgettedRecipes = [];
|
|
26828
|
+
_this.budgettedRecipesPrices = {};
|
|
26692
26829
|
_this.addedRecipesIds = [];
|
|
26693
26830
|
_this.icon = exports.Icon;
|
|
26694
26831
|
_this.catalogMode = false;
|
|
26695
26832
|
_this.basketConfirmed = false;
|
|
26696
26833
|
_this.loading = false;
|
|
26834
|
+
_this.ingredientsRegrouped = false;
|
|
26835
|
+
_this.timeOnStart = Date.now();
|
|
26697
26836
|
// Progress bar
|
|
26698
26837
|
_this.usedBudget = 0;
|
|
26699
26838
|
_this.maxBudget = 0;
|
|
@@ -26702,16 +26841,19 @@
|
|
|
26702
26841
|
}
|
|
26703
26842
|
MealsPlannerComponent.prototype.ngOnInit = function () {
|
|
26704
26843
|
this.initForm();
|
|
26844
|
+
this.pageview();
|
|
26705
26845
|
this.subscriptions.push(this.initRecipesPricing());
|
|
26706
26846
|
};
|
|
26707
26847
|
MealsPlannerComponent.prototype.ngOnChanges = function () {
|
|
26708
26848
|
this.cdr.detectChanges();
|
|
26709
26849
|
};
|
|
26710
26850
|
MealsPlannerComponent.prototype.initForm = function () {
|
|
26851
|
+
var storedForm = JSON.parse(sessionStorage.getItem('miam-meals-planner-form'));
|
|
26852
|
+
sessionStorage.removeItem('miam-meals-planner-form');
|
|
26711
26853
|
this.form = this.fb.group({
|
|
26712
|
-
budget: new i3.FormControl(undefined, [i3.Validators.required, i3.Validators.min(1)]),
|
|
26713
|
-
guestsCount: new i3.FormControl(0, i3.Validators.min(1)),
|
|
26714
|
-
recipesCount: new i3.FormControl(this.contextService.antiInflation ? 0 : 4, i3.Validators.min(1))
|
|
26854
|
+
budget: new i3.FormControl((storedForm === null || storedForm === void 0 ? void 0 : storedForm.budget) || undefined, [i3.Validators.required, i3.Validators.min(1)]),
|
|
26855
|
+
guestsCount: new i3.FormControl((storedForm === null || storedForm === void 0 ? void 0 : storedForm.guestsCount) || 0, i3.Validators.min(1)),
|
|
26856
|
+
recipesCount: new i3.FormControl((storedForm === null || storedForm === void 0 ? void 0 : storedForm.recipesCount) || (this.contextService.antiInflation ? 0 : 4), i3.Validators.min(1))
|
|
26715
26857
|
});
|
|
26716
26858
|
this.cdr.detectChanges();
|
|
26717
26859
|
};
|
|
@@ -26727,7 +26869,10 @@
|
|
|
26727
26869
|
this.recipesService.plan(inputs.budget, inputs.guestsCount, inputs.recipesCount, recipeIncludes$5, recipeSparseFields$5).pipe(operators.switchMap(function (recipes) {
|
|
26728
26870
|
_this.budgettedRecipes = []; // Refresh the result view
|
|
26729
26871
|
_this.cdr.detectChanges();
|
|
26730
|
-
_this.budgettedRecipes = recipes
|
|
26872
|
+
_this.budgettedRecipes = recipes.map(function (r) {
|
|
26873
|
+
r.modifiedGuests = inputs.guestsCount;
|
|
26874
|
+
return r;
|
|
26875
|
+
});
|
|
26731
26876
|
_this.loading = false;
|
|
26732
26877
|
_this.cdr.detectChanges();
|
|
26733
26878
|
return _this.fetchRecipesPricing();
|
|
@@ -26742,24 +26887,38 @@
|
|
|
26742
26887
|
MealsPlannerComponent.prototype.ngOnDestroy = function () {
|
|
26743
26888
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
26744
26889
|
};
|
|
26745
|
-
MealsPlannerComponent.prototype.currentPath = function () { return 'miam/meals-planner'; };
|
|
26890
|
+
MealsPlannerComponent.prototype.currentPath = function () { return 'miam/recipes/meals-planner'; };
|
|
26746
26891
|
MealsPlannerComponent.prototype.addRecipes = function () {
|
|
26747
26892
|
var _this = this;
|
|
26748
26893
|
this.loading = true;
|
|
26749
26894
|
this.cdr.detectChanges();
|
|
26895
|
+
var previousUsedBudget = this.usedBudget;
|
|
26896
|
+
var basketInitialized = false;
|
|
26750
26897
|
this.subscriptions.push(this.groceriesListsService.appendRecipesToList(this.budgettedRecipes.filter(function (r) { return r === null || r === void 0 ? void 0 : r.id; }).map(function (r) { return ({ id: r.id, guests: r.modifiedGuests }); }), // remove empty recipes
|
|
26751
26898
|
this.eventTrace()).pipe(operators.take(1), operators.switchMap(function () {
|
|
26752
26899
|
_this.addedRecipesIds = _this.budgettedRecipes.filter(function (r) { return r === null || r === void 0 ? void 0 : r.id; }).map(function (r) { return r.id; });
|
|
26900
|
+
return _this.basketsService.basketPreview$.pipe(operators.take(2));
|
|
26901
|
+
}), operators.switchMap(function (basketPreviewLines) {
|
|
26902
|
+
if (basketInitialized) {
|
|
26903
|
+
_this.fetchBasketPreviewPricing(basketPreviewLines);
|
|
26904
|
+
_this.ingredientsRegrouped = previousUsedBudget !== _this.usedBudget;
|
|
26905
|
+
return _this.basketsService.basketPreview$;
|
|
26906
|
+
}
|
|
26907
|
+
basketInitialized = true;
|
|
26908
|
+
return rxjs.of(null);
|
|
26909
|
+
}), operators.switchMap(function (basketPreviewLines) {
|
|
26910
|
+
if (basketPreviewLines !== null) {
|
|
26911
|
+
if (!_this.containsSomeAddedRecipe(basketPreviewLines)) {
|
|
26912
|
+
return _this.fetchBudgetValues();
|
|
26913
|
+
}
|
|
26914
|
+
return rxjs.of(_this.fetchBasketPreviewPricing(basketPreviewLines));
|
|
26915
|
+
}
|
|
26916
|
+
return rxjs.of(null);
|
|
26917
|
+
})).subscribe(function () {
|
|
26753
26918
|
_this.scrollToTop();
|
|
26754
26919
|
_this.loading = false;
|
|
26755
26920
|
_this.cdr.detectChanges();
|
|
26756
|
-
|
|
26757
|
-
}), operators.switchMap(function (basketPreviewLines) {
|
|
26758
|
-
if (!_this.containsSomeAddedRecipe(basketPreviewLines)) {
|
|
26759
|
-
return _this.fetchBudgetValues();
|
|
26760
|
-
}
|
|
26761
|
-
return rxjs.of(_this.fetchBasketPreviewPricing(basketPreviewLines));
|
|
26762
|
-
})).subscribe());
|
|
26921
|
+
}));
|
|
26763
26922
|
};
|
|
26764
26923
|
MealsPlannerComponent.prototype.containsSomeAddedRecipe = function (basketPreviewLines) {
|
|
26765
26924
|
var containsSomeAddedRecipeId = false;
|
|
@@ -26779,6 +26938,7 @@
|
|
|
26779
26938
|
_this.usedBudget += +basketPreviewLine.price;
|
|
26780
26939
|
}
|
|
26781
26940
|
});
|
|
26941
|
+
this.usedBudget = Math.round(this.usedBudget * 100) / 100;
|
|
26782
26942
|
this.cdr.detectChanges();
|
|
26783
26943
|
};
|
|
26784
26944
|
MealsPlannerComponent.prototype.initRecipesPricing = function () {
|
|
@@ -26794,9 +26954,10 @@
|
|
|
26794
26954
|
return rxjs.of([]);
|
|
26795
26955
|
}
|
|
26796
26956
|
var requests = [];
|
|
26957
|
+
this.budgettedRecipesPrices = {};
|
|
26797
26958
|
this.budgettedRecipes.forEach(function (recipe) {
|
|
26798
26959
|
if (recipe) {
|
|
26799
|
-
requests.push(_this.recipesService.getPricing(recipe.id, _this.pos.id, _this.pricebookKey, _this.form.value.guestsCount).pipe(operators.skipWhile(function (result) { return !(result === null || result === void 0 ? void 0 : result.price); })));
|
|
26960
|
+
requests.push(_this.recipesService.getPricing(recipe.id, _this.pos.id, _this.pricebookKey, _this.form.value.guestsCount).pipe(operators.skipWhile(function (result) { return !(result === null || result === void 0 ? void 0 : result.price); }), operators.tap(function (pricing) { return _this.budgettedRecipesPrices[recipe.id] = pricing.price; })));
|
|
26800
26961
|
}
|
|
26801
26962
|
});
|
|
26802
26963
|
return requests.length > 0 ? rxjs.forkJoin(requests) : rxjs.of([]);
|
|
@@ -26833,9 +26994,26 @@
|
|
|
26833
26994
|
MealsPlannerComponent.prototype.openBasketConfirmation = function () {
|
|
26834
26995
|
this.recipeToChangeIndex = null;
|
|
26835
26996
|
this.basketConfirmed = true;
|
|
26997
|
+
this.sendConfirmationEvent();
|
|
26836
26998
|
this.scrollToTop();
|
|
26837
26999
|
this.cdr.detectChanges();
|
|
26838
27000
|
};
|
|
27001
|
+
MealsPlannerComponent.prototype.sendConfirmationEvent = function () {
|
|
27002
|
+
this.analyticsService.sendEventWhenReady(this.analyticsService.EVENT_MEALS_PLANNER_CONFIRMED, this.path(), {
|
|
27003
|
+
budget_user: this.form.get('budget').value,
|
|
27004
|
+
budget_planner: this.usedBudget,
|
|
27005
|
+
recipes_count: this.form.get('recipesCount').value,
|
|
27006
|
+
guests: this.form.get('guestsCount').value,
|
|
27007
|
+
uses_count: this.updateUsesCount(),
|
|
27008
|
+
time_passed: (Date.now() - this.timeOnStart) / 1000
|
|
27009
|
+
});
|
|
27010
|
+
};
|
|
27011
|
+
MealsPlannerComponent.prototype.updateUsesCount = function () {
|
|
27012
|
+
var oldCount = parseInt(localStorage.getItem('miam-meals-planner-uses-count'));
|
|
27013
|
+
var newCount = Number.isNaN(oldCount) ? 1 : oldCount + 1;
|
|
27014
|
+
localStorage.setItem('miam-meals-planner-uses-count', newCount.toString());
|
|
27015
|
+
return newCount;
|
|
27016
|
+
};
|
|
26839
27017
|
MealsPlannerComponent.prototype.scrollToTop = function () {
|
|
26840
27018
|
if (this.topAnchor) {
|
|
26841
27019
|
this.topAnchor.nativeElement.scrollIntoView();
|
|
@@ -26843,14 +27021,16 @@
|
|
|
26843
27021
|
};
|
|
26844
27022
|
Object.defineProperty(MealsPlannerComponent.prototype, "remainingBudget", {
|
|
26845
27023
|
get: function () {
|
|
26846
|
-
var
|
|
26847
|
-
|
|
26848
|
-
|
|
26849
|
-
|
|
26850
|
-
|
|
26851
|
-
|
|
26852
|
-
|
|
26853
|
-
|
|
27024
|
+
var _a;
|
|
27025
|
+
var recipeToChangeId = (_a = this.budgettedRecipes[this.recipeToChangeIndex]) === null || _a === void 0 ? void 0 : _a.id;
|
|
27026
|
+
var remainingBudget = this.maxBudget - this.usedBudget;
|
|
27027
|
+
if (recipeToChangeId) {
|
|
27028
|
+
remainingBudget += this.budgettedRecipesPrices[recipeToChangeId];
|
|
27029
|
+
}
|
|
27030
|
+
if (remainingBudget > 0) {
|
|
27031
|
+
return remainingBudget;
|
|
27032
|
+
}
|
|
27033
|
+
return 0;
|
|
26854
27034
|
},
|
|
26855
27035
|
enumerable: false,
|
|
26856
27036
|
configurable: true
|
|
@@ -26866,6 +27046,13 @@
|
|
|
26866
27046
|
enumerable: false,
|
|
26867
27047
|
configurable: true
|
|
26868
27048
|
});
|
|
27049
|
+
Object.defineProperty(MealsPlannerComponent.prototype, "excludedRecipesIds", {
|
|
27050
|
+
get: function () {
|
|
27051
|
+
return this.budgettedRecipes.filter(function (recipe) { return recipe; }).map(function (recipe) { return recipe.id; });
|
|
27052
|
+
},
|
|
27053
|
+
enumerable: false,
|
|
27054
|
+
configurable: true
|
|
27055
|
+
});
|
|
26869
27056
|
return MealsPlannerComponent;
|
|
26870
27057
|
}(EventTracerComponent));
|
|
26871
27058
|
MealsPlannerComponent.ɵfac = function MealsPlannerComponent_Factory(t) { return new (t || MealsPlannerComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(AnalyticsService), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(BasketsService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
|
|
@@ -26894,7 +27081,7 @@
|
|
|
26894
27081
|
else {
|
|
26895
27082
|
i18n_3 = $localize(templateObject_2$E || (templateObject_2$E = __makeTemplateObject([":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"], [":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"])));
|
|
26896
27083
|
}
|
|
26897
|
-
return [[1, "miam-meals-planner-anchor"], ["miamMealsPlannerTopAnchor", ""], [1, "miam-meals-planner"], [1, "miam-meals-planner__header"], [1, "miam-meals-planner__header__breadcrumb", 3, "ngClass"], ["href", "/"], ["width", "18", "height", "18", "primaryColor", "#1F3543", 3, "iconName"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], [1, "inactive", 3, "href"], i18n_1, ["href", "javascript:void(0)", 1, "active"], i18n_3, ["class", "miam-meals-planner__content", 4, "ngIf"], [1, "miam-meals-planner__content"], [3, "reduced", "form", "ngClass", "submitted", 4, "ngIf"], [3, "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog", 4, "ngIf"], [3, "recipesIds", "usedBudget", "maxBudget", "ngClass", "closed", 4, "ngIf"], [3, "modifiedGuests", "remainingBudget", "remainingRecipesNumber", "editRecipe", "canceled", 4, "ngIf"], [3, "recipesIds", "budget", 4, "ngIf"], [3, "reduced", "form", "ngClass", "submitted"], [3, "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog"], [3, "recipesIds", "usedBudget", "maxBudget", "ngClass", "closed"], [3, "modifiedGuests", "remainingBudget", "remainingRecipesNumber", "editRecipe", "canceled"], [3, "recipesIds", "budget"]];
|
|
27084
|
+
return [[1, "miam-meals-planner-anchor"], ["miamMealsPlannerTopAnchor", ""], [1, "miam-meals-planner"], [1, "miam-meals-planner__header"], [1, "miam-meals-planner__header__breadcrumb", 3, "ngClass"], ["href", "/"], ["width", "18", "height", "18", "primaryColor", "#1F3543", 3, "iconName"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], [1, "inactive", 3, "href"], i18n_1, ["href", "javascript:void(0)", 1, "active"], i18n_3, ["class", "miam-meals-planner__content", 4, "ngIf"], [1, "miam-meals-planner__content"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted", 4, "ngIf"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog", 4, "ngIf"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed", 4, "ngIf"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled", 4, "ngIf"], [3, "recipesIds", "originTrace", "budget", 4, "ngIf"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled"], [3, "recipesIds", "originTrace", "budget"]];
|
|
26898
27085
|
}, template: function MealsPlannerComponent_Template(rf, ctx) {
|
|
26899
27086
|
if (rf & 1) {
|
|
26900
27087
|
i0.ɵɵelement(0, "div", 0, 1);
|
|
@@ -26935,7 +27122,7 @@
|
|
|
26935
27122
|
i0.ɵɵadvance(4);
|
|
26936
27123
|
i0.ɵɵproperty("ngIf", ctx.form);
|
|
26937
27124
|
}
|
|
26938
|
-
}, directives: [i2$1.NgClass, IconComponent, i2$1.NgIf, MealsPlannerFormComponent, MealsPlannerResultComponent, MealsPlannerBasketPreviewComponent, MealsPlannerCatalogComponent, MealsPlannerBasketConfirmationComponent], styles: [".miam-meals-planner{border-bottom:1px solid #d9dde1;display:flex;flex-direction:column;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb{align-items:center;background:#fff;border-bottom:1px solid #d9dde1;display:flex;padding:24px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb.hidden{display:none}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a{font-size:14px;font-weight:500;line-height:150%;margin:0 4px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.inactive{color:#1f3543}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.active{color:var(--m-color-primary);font-weight:900}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right{transform:rotate(-90deg)}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right .icon-container svg path:last-child{fill:#1f3543}.miam-meals-planner .miam-meals-planner__content{display:flex;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:1px solid #d9dde1;max-width:300px}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview,.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-result{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview.reduced{width:0}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 80px;width:100%}@media (max-width:1023px){.miam-meals-planner .miam-meals-planner__header{display:none}.miam-meals-planner .miam-meals-planner__content{flex-direction:column}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:unset;max-width:unset}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 15px}}.miam-meals-planner .miam-meals-planner__catalog{padding:16px}"], encapsulation: 2, changeDetection: 0 });
|
|
27125
|
+
}, directives: [i2$1.NgClass, IconComponent, i2$1.NgIf, MealsPlannerFormComponent, MealsPlannerResultComponent, MealsPlannerBasketPreviewComponent, MealsPlannerCatalogComponent, MealsPlannerBasketConfirmationComponent], styles: [".miam-meals-planner{border-bottom:1px solid #d9dde1;display:flex;flex-direction:column;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb{align-items:center;background:#fff;border-bottom:1px solid #d9dde1;display:flex;padding:24px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb.hidden{display:none}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a{font-size:14px;font-weight:500;line-height:150%;margin:0 4px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.inactive{color:#1f3543}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.active{color:var(--m-color-primary);font-weight:900}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right{transform:rotate(-90deg)}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right .icon-container svg path:last-child{fill:#1f3543}.miam-meals-planner .miam-meals-planner__content{display:flex;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:1px solid #d9dde1;max-width:300px}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview,.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-result{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview.reduced{width:0}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-catalog{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 80px;width:100%}@media (max-width:1023px){.miam-meals-planner .miam-meals-planner__header{display:none}.miam-meals-planner .miam-meals-planner__content{flex-direction:column}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:unset;max-width:unset}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 15px}}.miam-meals-planner .miam-meals-planner__catalog{padding:16px}"], encapsulation: 2, changeDetection: 0 });
|
|
26939
27126
|
/*@__PURE__*/ (function () {
|
|
26940
27127
|
i0.ɵsetClassMetadata(MealsPlannerComponent, [{
|
|
26941
27128
|
type: i0.Component,
|
|
@@ -27208,7 +27395,7 @@
|
|
|
27208
27395
|
request = request.clone({
|
|
27209
27396
|
setHeaders: {
|
|
27210
27397
|
'miam-origin': context.origin,
|
|
27211
|
-
'miam-front-version': '6.3.
|
|
27398
|
+
'miam-front-version': '6.3.4',
|
|
27212
27399
|
'miam-front-type': 'web',
|
|
27213
27400
|
'miam-api-version': '4.7.0'
|
|
27214
27401
|
}
|