ng-miam 9.1.26 → 9.1.28
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 +41 -20
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +1 -1
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_services/analytics.service.js +5 -2
- package/esm2015/lib/_services/context.service.js +14 -5
- package/esm2015/lib/_services/recipes.service.js +14 -6
- package/esm2015/lib/_types/builded/mealz-interface.js +1 -1
- package/esm2015/lib/_types/builded/mealz-internal-interface.js +1 -1
- package/esm2015/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.js +3 -2
- package/esm2015/lib/_web-components/recipe-cards/recipe-card-cta/recipe-card-cta.component.js +3 -2
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +6 -6
- package/esm2015/lib/environments/version.js +2 -2
- package/fesm2015/ng-miam.js +40 -18
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/analytics.service.d.ts.map +1 -1
- package/lib/_services/context.service.d.ts.map +1 -1
- package/lib/_services/recipes.service.d.ts +5 -2
- package/lib/_services/recipes.service.d.ts.map +1 -1
- package/lib/_types/builded/mealz-interface.d.ts +1 -1
- package/lib/_types/builded/mealz-interface.d.ts.map +1 -1
- package/lib/_types/builded/mealz-internal-interface.d.ts +2 -2
- package/lib/_types/builded/mealz-internal-interface.d.ts.map +1 -1
- package/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.d.ts.map +1 -1
- package/lib/_web-components/recipe-cards/recipe-card-cta/recipe-card-cta.component.d.ts.map +1 -1
- package/lib/environments/version.d.ts +1 -1
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -3651,7 +3651,7 @@
|
|
|
3651
3651
|
EventJourney["EMPTY"] = "";
|
|
3652
3652
|
})(EventJourney || (EventJourney = {}));
|
|
3653
3653
|
|
|
3654
|
-
var VERSION =
|
|
3654
|
+
var VERSION = "9.1.28"; // TODO: replace by ##VERSION## and update it in the CI/CD
|
|
3655
3655
|
|
|
3656
3656
|
var ContextRegistryService = /** @class */ (function () {
|
|
3657
3657
|
function ContextRegistryService() {
|
|
@@ -3763,7 +3763,10 @@
|
|
|
3763
3763
|
var _this = this;
|
|
3764
3764
|
var detectedJourney = journey !== null && journey !== void 0 ? journey : detectJourney();
|
|
3765
3765
|
actions.forEach(function (action) {
|
|
3766
|
-
_this.sendEvent('recipe.add', action.params.eventTrace.originPath, {
|
|
3766
|
+
_this.sendEvent('recipe.add', action.params.eventTrace.originPath, {
|
|
3767
|
+
recipe_id: action.params.recipeId,
|
|
3768
|
+
category_id: action.params.eventTrace.props.category_id
|
|
3769
|
+
}, detectedJourney);
|
|
3767
3770
|
});
|
|
3768
3771
|
};
|
|
3769
3772
|
AnalyticsService.prototype.sendUpdateGuestsEvents = function (actions, journey) {
|
|
@@ -5489,23 +5492,23 @@
|
|
|
5489
5492
|
// Open modal showing recipe details
|
|
5490
5493
|
RecipesService.prototype.display = function (recipeId, _e) {
|
|
5491
5494
|
var _this = this;
|
|
5492
|
-
var _f = _e.previewAllowed, previewAllowed = _f === void 0 ? true : _f, _g = _e.guests, guests = _g === void 0 ? null : _g, _h = _e.previewMode, previewMode = _h === void 0 ? false : _h, _j = _e.displayGuests, displayGuests = _j === void 0 ? true : _j, _k = _e.helpButtonAllowed, helpButtonAllowed = _k === void 0 ? true : _k;
|
|
5495
|
+
var _f = _e.previewAllowed, previewAllowed = _f === void 0 ? true : _f, _g = _e.guests, guests = _g === void 0 ? null : _g, _h = _e.previewMode, previewMode = _h === void 0 ? false : _h, _j = _e.displayGuests, displayGuests = _j === void 0 ? true : _j, _k = _e.helpButtonAllowed, helpButtonAllowed = _k === void 0 ? true : _k, _l = _e.eventTrace, eventTrace = _l === void 0 ? { originPath: '', props: {} } : _l;
|
|
5493
5496
|
if (!recipeId) {
|
|
5494
5497
|
return;
|
|
5495
5498
|
}
|
|
5496
5499
|
this.get(recipeId, { include: ['ingredients', 'recipe-steps', 'recipe-type', 'sponsors', 'tags', 'recipe-provider'] })
|
|
5497
5500
|
.pipe(operators.skipWhile(function (recipe) { return recipe.is_loading; }))
|
|
5498
5501
|
.subscribe(function (recipe) {
|
|
5499
|
-
_this.displayObject(recipe, { previewAllowed: previewAllowed, guests: guests, previewMode: previewMode, displayGuests: displayGuests, helpButtonAllowed: helpButtonAllowed });
|
|
5502
|
+
_this.displayObject(recipe, { previewAllowed: previewAllowed, guests: guests, previewMode: previewMode, displayGuests: displayGuests, helpButtonAllowed: helpButtonAllowed, eventTrace: eventTrace });
|
|
5500
5503
|
});
|
|
5501
5504
|
};
|
|
5502
5505
|
RecipesService.prototype.displayObject = function (recipe, _e) {
|
|
5503
|
-
var _f = _e.previewAllowed, previewAllowed = _f === void 0 ? true : _f, _g = _e.guests, guests = _g === void 0 ? null : _g, _h = _e.previewMode, previewMode = _h === void 0 ? false : _h, _j = _e.wasAdded, wasAdded = _j === void 0 ? false : _j, _k = _e.displayGuests, displayGuests = _k === void 0 ? true : _k, _l = _e.helpButtonAllowed, helpButtonAllowed = _l === void 0 ? true : _l;
|
|
5506
|
+
var _f = _e.previewAllowed, previewAllowed = _f === void 0 ? true : _f, _g = _e.guests, guests = _g === void 0 ? null : _g, _h = _e.previewMode, previewMode = _h === void 0 ? false : _h, _j = _e.wasAdded, wasAdded = _j === void 0 ? false : _j, _k = _e.displayGuests, displayGuests = _k === void 0 ? true : _k, _l = _e.helpButtonAllowed, helpButtonAllowed = _l === void 0 ? true : _l, _m = _e.eventTrace, eventTrace = _m === void 0 ? { originPath: '', props: {} } : _m;
|
|
5504
5507
|
if (!recipe) {
|
|
5505
5508
|
return;
|
|
5506
5509
|
}
|
|
5507
5510
|
recipe.modifiedGuests = guests || +recipe.guests;
|
|
5508
|
-
this.displayedRecipe$.next({ previewAllowed: previewAllowed, recipe: recipe, previewMode: previewMode, wasAdded: wasAdded, displayGuests: displayGuests, helpButtonAllowed: helpButtonAllowed });
|
|
5511
|
+
this.displayedRecipe$.next({ previewAllowed: previewAllowed, recipe: recipe, previewMode: previewMode, wasAdded: wasAdded, displayGuests: displayGuests, helpButtonAllowed: helpButtonAllowed, eventTrace: eventTrace });
|
|
5509
5512
|
};
|
|
5510
5513
|
RecipesService.prototype.openBasket = function (analyticsPath) {
|
|
5511
5514
|
if (analyticsPath === void 0) { analyticsPath = ''; }
|
|
@@ -5515,7 +5518,15 @@
|
|
|
5515
5518
|
RecipesService.prototype.openRecipeDetails = function (recipeId, guests, initialTabIndex, path, categoryId) {
|
|
5516
5519
|
if (path === void 0) { path = ''; }
|
|
5517
5520
|
if (categoryId === void 0) { categoryId = null; }
|
|
5518
|
-
this.display(recipeId, {
|
|
5521
|
+
this.display(recipeId, {
|
|
5522
|
+
previewAllowed: true,
|
|
5523
|
+
previewMode: false,
|
|
5524
|
+
guests: guests,
|
|
5525
|
+
eventTrace: {
|
|
5526
|
+
originPath: path,
|
|
5527
|
+
props: Object.assign({ recipe_id: recipeId }, (categoryId ? { category_id: categoryId } : {}))
|
|
5528
|
+
}
|
|
5529
|
+
});
|
|
5519
5530
|
this.recipeDetailsTabIndex$.next(initialTabIndex);
|
|
5520
5531
|
this.analyticsService.sendEvent('recipe.display', path, { recipe_id: recipeId, category_id: categoryId });
|
|
5521
5532
|
};
|
|
@@ -8233,10 +8244,12 @@
|
|
|
8233
8244
|
recipes: {
|
|
8234
8245
|
hidden: this.recipesService.hidden,
|
|
8235
8246
|
addAllIngredientsCTAWasClicked: this.addAllProductsWasClicked,
|
|
8236
|
-
openDetails: function (recipeId, guests, initialTabIndex, path, categoryId) {
|
|
8247
|
+
openDetails: function (recipeId, guests, initialTabIndex, path, plannerOrCategoryId, categoryId) {
|
|
8237
8248
|
if (path === void 0) { path = ''; }
|
|
8249
|
+
if (plannerOrCategoryId === void 0) { plannerOrCategoryId = null; }
|
|
8238
8250
|
if (categoryId === void 0) { categoryId = null; }
|
|
8239
|
-
|
|
8251
|
+
var resolvedCategoryId = typeof plannerOrCategoryId === 'string' ? plannerOrCategoryId : categoryId;
|
|
8252
|
+
return _this.recipesService.openRecipeDetails(recipeId, guests, initialTabIndex, path, resolvedCategoryId);
|
|
8240
8253
|
},
|
|
8241
8254
|
setDefaultIngredientPicture: function (url) { return _this.defaultIngredientPicture = url; },
|
|
8242
8255
|
setDefaultRecipePicture: function (url) { return _this.defaultRecipePicture = url; },
|
|
@@ -8429,14 +8442,20 @@
|
|
|
8429
8442
|
logLevel: this.logLevel$
|
|
8430
8443
|
},
|
|
8431
8444
|
recipes: {
|
|
8432
|
-
openDetails: function (recipeId, guests, initialTabIndex, path, categoryId) {
|
|
8445
|
+
openDetails: function (recipeId, guests, initialTabIndex, path, plannerOrCategoryId, categoryId) {
|
|
8433
8446
|
if (path === void 0) { path = ''; }
|
|
8447
|
+
if (plannerOrCategoryId === void 0) { plannerOrCategoryId = null; }
|
|
8434
8448
|
if (categoryId === void 0) { categoryId = null; }
|
|
8435
|
-
|
|
8449
|
+
var resolvedCategoryId = typeof plannerOrCategoryId === 'string' ? plannerOrCategoryId : categoryId;
|
|
8450
|
+
return _this.recipesService.openRecipeDetails(recipeId, guests, initialTabIndex, path, resolvedCategoryId);
|
|
8436
8451
|
},
|
|
8437
|
-
updateRecipeLike: function (recipeLikeId, recipeId, isPast, path) {
|
|
8452
|
+
updateRecipeLike: function (recipeLikeId, recipeId, isPast, path, categoryId) {
|
|
8438
8453
|
if (path === void 0) { path = ''; }
|
|
8439
|
-
|
|
8454
|
+
if (categoryId === void 0) { categoryId = null; }
|
|
8455
|
+
var eventTrace = {
|
|
8456
|
+
originPath: path,
|
|
8457
|
+
props: Object.assign({ recipe_id: recipeId }, (categoryId ? { category_id: categoryId } : {}))
|
|
8458
|
+
};
|
|
8440
8459
|
var recipeLike = _this.recipeLikesService.prepareRecipeLikeForUpdate(recipeId, recipeLikeId, isPast);
|
|
8441
8460
|
_this.recipeLikesService.updateLike(recipeId, recipeLike, eventTrace);
|
|
8442
8461
|
},
|
|
@@ -20939,7 +20958,8 @@
|
|
|
20939
20958
|
previewAllowed: this.previewAllowed,
|
|
20940
20959
|
guests: this.recipe.modifiedGuests,
|
|
20941
20960
|
displayGuests: this.displayGuests,
|
|
20942
|
-
helpButtonAllowed: this.helpButtonAllowed
|
|
20961
|
+
helpButtonAllowed: this.helpButtonAllowed,
|
|
20962
|
+
eventTrace: this.eventTrace
|
|
20943
20963
|
});
|
|
20944
20964
|
this.analyticsService.sendEvent('recipe.display', this.path, {
|
|
20945
20965
|
recipe_id: this.recipe.id,
|
|
@@ -21445,7 +21465,8 @@
|
|
|
21445
21465
|
previewAllowed: this.previewAllowed,
|
|
21446
21466
|
guests: this.recipe.modifiedGuests,
|
|
21447
21467
|
displayGuests: this.displayGuests,
|
|
21448
|
-
helpButtonAllowed: this.helpButtonAllowed
|
|
21468
|
+
helpButtonAllowed: this.helpButtonAllowed,
|
|
21469
|
+
eventTrace: this.eventTrace
|
|
21449
21470
|
});
|
|
21450
21471
|
this.displayed.emit();
|
|
21451
21472
|
this.analyticsService.sendEvent('recipe.display', this.path, {
|
|
@@ -29208,7 +29229,7 @@
|
|
|
29208
29229
|
}
|
|
29209
29230
|
if (rf & 2) {
|
|
29210
29231
|
var ctx_r5 = i0__namespace.ɵɵnextContext(2);
|
|
29211
|
-
i0__namespace.ɵɵproperty("recipeId", ctx_r5.recipe.id)("guestNumber", ctx_r5.recipe.modifiedGuests)("previewAllowed", ctx_r5.previewAllowed)("stepsOnLeftSide", ctx_r5.detailsStepsOnLeftSide)("moreRecipesImageURL", ctx_r5.detailsMoreRecipesImageURL)("pricingGuestsText", ctx_r5.detailsPricingGuestsText)("displayGuests", ctx_r5.displayGuestsInDetails)("helpButtonAllowed", ctx_r5.helpButtonAllowedInDetails);
|
|
29232
|
+
i0__namespace.ɵɵproperty("recipeId", ctx_r5.recipe.id)("guestNumber", ctx_r5.recipe.modifiedGuests)("originTrace", ctx_r5.eventTrace)("previewAllowed", ctx_r5.previewAllowed)("stepsOnLeftSide", ctx_r5.detailsStepsOnLeftSide)("moreRecipesImageURL", ctx_r5.detailsMoreRecipesImageURL)("pricingGuestsText", ctx_r5.detailsPricingGuestsText)("displayGuests", ctx_r5.displayGuestsInDetails)("helpButtonAllowed", ctx_r5.helpButtonAllowedInDetails);
|
|
29212
29233
|
}
|
|
29213
29234
|
}
|
|
29214
29235
|
function RecipeModalComponent_ng_miam_modal_0_ng_miam_store_locator_11_Template(rf, ctx) {
|
|
@@ -29234,7 +29255,7 @@
|
|
|
29234
29255
|
i0__namespace.ɵɵpipe(6, "async");
|
|
29235
29256
|
i0__namespace.ɵɵtemplate(7, RecipeModalComponent_ng_miam_modal_0_div_7_Template, 2, 6, "div", 4);
|
|
29236
29257
|
i0__namespace.ɵɵpipe(8, "async");
|
|
29237
|
-
i0__namespace.ɵɵtemplate(9, RecipeModalComponent_ng_miam_modal_0_ng_miam_recipe_details_9_Template, 2,
|
|
29258
|
+
i0__namespace.ɵɵtemplate(9, RecipeModalComponent_ng_miam_modal_0_ng_miam_recipe_details_9_Template, 2, 9, "ng-miam-recipe-details", 5);
|
|
29238
29259
|
i0__namespace.ɵɵpipe(10, "async");
|
|
29239
29260
|
i0__namespace.ɵɵtemplate(11, RecipeModalComponent_ng_miam_modal_0_ng_miam_store_locator_11_Template, 1, 1, "ng-miam-store-locator", 6);
|
|
29240
29261
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -29365,8 +29386,8 @@
|
|
|
29365
29386
|
RecipeModalComponent.prototype.listenToRecipeDisplayed = function () {
|
|
29366
29387
|
var _this = this;
|
|
29367
29388
|
this.subscriptions.push(this.recipesService.displayedRecipe$.subscribe(function (result) {
|
|
29368
|
-
var _a;
|
|
29369
|
-
_this.registerTrace({ originPath: '', props: { recipe_id: (
|
|
29389
|
+
var _a, _b;
|
|
29390
|
+
_this.registerTrace((_a = result === null || result === void 0 ? void 0 : result.eventTrace) !== null && _a !== void 0 ? _a : { originPath: '', props: { recipe_id: (_b = result === null || result === void 0 ? void 0 : result.recipe) === null || _b === void 0 ? void 0 : _b.id } });
|
|
29370
29391
|
if (!(result === null || result === void 0 ? void 0 : result.recipe)) {
|
|
29371
29392
|
_this.handleEmptyRecipe(result);
|
|
29372
29393
|
}
|
|
@@ -29494,7 +29515,7 @@
|
|
|
29494
29515
|
return RecipeModalComponent;
|
|
29495
29516
|
}());
|
|
29496
29517
|
RecipeModalComponent.ɵfac = function RecipeModalComponent_Factory(t) { return new (t || RecipeModalComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(PrintService), i0__namespace.ɵɵdirectiveInject(BasketTransferService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService), i0__namespace.ɵɵdirectiveInject(ProductReplacementService), i0__namespace.ɵɵdirectiveInject(PointOfSalesService), i0__namespace.ɵɵdirectiveInject(StoreLocatorService), i0__namespace.ɵɵdirectiveInject(BasketTransferService)); };
|
|
29497
|
-
RecipeModalComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], inputs: { detailsStepsOnLeftSide: "detailsStepsOnLeftSide", detailsMoreRecipesImageURL: "detailsMoreRecipesImageURL", detailsPricingGuestsText: "detailsPricingGuestsText" }, outputs: { hasChangesOnClose: "hasChangesOnClose" }, decls: 3, vars: 3, consts: [["modalStyle", "right", 3, "display", "noHeaderMode", "confirmButtonDisabled", "cancelButtonDisabled", "cancelButtonIsLoading", "placeOrderFooter", "redirectToCartFooter", "totalPrice", "title", "miam-recipe-modal__basket-preview-modal", "ngClass", "displayChange", "close", "cancel", "confirm", 4, "ngIf"], ["modalStyle", "right", 3, "noHeaderMode", "display", "cancelButtonDisabled", "cancelButtonIsLoading", "close", 4, "ngIf"], ["modalStyle", "right", 3, "display", "noHeaderMode", "confirmButtonDisabled", "cancelButtonDisabled", "cancelButtonIsLoading", "placeOrderFooter", "redirectToCartFooter", "totalPrice", "title", "ngClass", "displayChange", "close", "cancel", "confirm"], ["header", "", 4, "ngIf"], ["class", "miam-wrapper-preview", 3, "hidden", 4, "ngIf"], [3, "recipeId", "guestNumber", "previewAllowed", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError", "closeDetails", 4, "ngIf"], [3, "originTrace", 4, "ngIf"], ["header", ""], [1, "miam-wrapper-preview"], [3, "recipeId", "displayItemsUnitaryPrice", "isStoreLocatorDisplayed", "originTrace"], [3, "recipeId", "guestNumber", "previewAllowed", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError", "closeDetails"], ["details", ""], [3, "originTrace"], ["modalStyle", "right", 3, "noHeaderMode", "display", "cancelButtonDisabled", "cancelButtonIsLoading", "close"], [3, "addProductMode", "originTrace", "selected"], [3, "basketEntry", "loadOnSelect", "originTrace", "selected"]], template: function RecipeModalComponent_Template(rf, ctx) {
|
|
29518
|
+
RecipeModalComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], inputs: { detailsStepsOnLeftSide: "detailsStepsOnLeftSide", detailsMoreRecipesImageURL: "detailsMoreRecipesImageURL", detailsPricingGuestsText: "detailsPricingGuestsText" }, outputs: { hasChangesOnClose: "hasChangesOnClose" }, decls: 3, vars: 3, consts: [["modalStyle", "right", 3, "display", "noHeaderMode", "confirmButtonDisabled", "cancelButtonDisabled", "cancelButtonIsLoading", "placeOrderFooter", "redirectToCartFooter", "totalPrice", "title", "miam-recipe-modal__basket-preview-modal", "ngClass", "displayChange", "close", "cancel", "confirm", 4, "ngIf"], ["modalStyle", "right", 3, "noHeaderMode", "display", "cancelButtonDisabled", "cancelButtonIsLoading", "close", 4, "ngIf"], ["modalStyle", "right", 3, "display", "noHeaderMode", "confirmButtonDisabled", "cancelButtonDisabled", "cancelButtonIsLoading", "placeOrderFooter", "redirectToCartFooter", "totalPrice", "title", "ngClass", "displayChange", "close", "cancel", "confirm"], ["header", "", 4, "ngIf"], ["class", "miam-wrapper-preview", 3, "hidden", 4, "ngIf"], [3, "recipeId", "guestNumber", "originTrace", "previewAllowed", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError", "closeDetails", 4, "ngIf"], [3, "originTrace", 4, "ngIf"], ["header", ""], [1, "miam-wrapper-preview"], [3, "recipeId", "displayItemsUnitaryPrice", "isStoreLocatorDisplayed", "originTrace"], [3, "recipeId", "guestNumber", "originTrace", "previewAllowed", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError", "closeDetails"], ["details", ""], [3, "originTrace"], ["modalStyle", "right", 3, "noHeaderMode", "display", "cancelButtonDisabled", "cancelButtonIsLoading", "close"], [3, "addProductMode", "originTrace", "selected"], [3, "basketEntry", "loadOnSelect", "originTrace", "selected"]], template: function RecipeModalComponent_Template(rf, ctx) {
|
|
29498
29519
|
if (rf & 1) {
|
|
29499
29520
|
i0__namespace.ɵɵtemplate(0, RecipeModalComponent_ng_miam_modal_0_Template, 12, 32, "ng-miam-modal", 0);
|
|
29500
29521
|
i0__namespace.ɵɵtemplate(1, RecipeModalComponent_ng_miam_modal_1_Template, 2, 6, "ng-miam-modal", 1);
|