webc-miam 8.1.1 → 8.2.0
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/interfaces/miam-interface.ts +27 -2
- package/main-es2015.js +1 -1
- package/main-es5.js +1 -1
- package/package.json +2 -2
- package/webc-miam-de.js +1 -1
- package/webc-miam-en.js +1 -1
- package/webc-miam-es.js +1 -1
- package/webc-miam-fr.js +1 -1
- package/webc-miam-it.js +1 -1
- package/webc-miam-nl.js +1 -1
- package/webc-miam-pt.js +1 -1
- package/webc-miam-ro.js +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
1
2
|
import { Observable } from 'rxjs';
|
|
2
3
|
import { ComparableProduct } from './comparable-product';
|
|
3
4
|
|
|
4
|
-
export interface MiamInterface
|
|
5
|
+
export interface MiamInterface {
|
|
5
6
|
/**
|
|
6
7
|
* Method to call when the user begins the payment procedure (typically when they click
|
|
7
8
|
* on a "Confirm my cart" button)
|
|
@@ -54,6 +55,10 @@ export interface MiamInterface {
|
|
|
54
55
|
* @returns A BehaviorSubject that emits the current number of recipes in Miam's Basket
|
|
55
56
|
*/
|
|
56
57
|
recipeCount: () => Observable<number>;
|
|
58
|
+
/**
|
|
59
|
+
* Opens the preview by calling the `openBasket` method of the `recipesService`.
|
|
60
|
+
*/
|
|
61
|
+
openPreview: () => void;
|
|
57
62
|
};
|
|
58
63
|
|
|
59
64
|
basketSync: {
|
|
@@ -83,7 +88,7 @@ export interface MiamInterface {
|
|
|
83
88
|
*
|
|
84
89
|
* @param total The total price of the cart paid
|
|
85
90
|
*/
|
|
86
|
-
|
|
91
|
+
handlePayment: (total: number) => void;
|
|
87
92
|
};
|
|
88
93
|
|
|
89
94
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -116,6 +121,10 @@ export interface MiamInterface {
|
|
|
116
121
|
* @param antiInflation if you want to use the anti inflation
|
|
117
122
|
*/
|
|
118
123
|
enableMealsPlanner: (url: string, antiInflation?: boolean) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Call to enable guests input on my-meals cards
|
|
126
|
+
*/
|
|
127
|
+
enableGuestsInputOnMyMeals: () => void;
|
|
119
128
|
};
|
|
120
129
|
|
|
121
130
|
// ---------------------------------------------------------------------------------------------------
|
|
@@ -152,6 +161,10 @@ export interface MiamInterface {
|
|
|
152
161
|
* An observable that emits a value when the recipe-modal is closed
|
|
153
162
|
*/
|
|
154
163
|
hidden: Observable<boolean>;
|
|
164
|
+
/**
|
|
165
|
+
* An EventEmitter that emits a value when the "Add all ingredients" CTA on recipe-details is clicked
|
|
166
|
+
*/
|
|
167
|
+
addAllIngredientsCTAWasClicked: EventEmitter<{ ingredientsAdded: number; ingredientsTotal: number }>;
|
|
155
168
|
/**
|
|
156
169
|
* Call with an url of a picture to change the default picture displayed if an ingredient doesn't have a picture
|
|
157
170
|
* and if ingredients picture have been enabled with recipes.shouldDisplayIngredientPicturesOnRecipeCards(true)
|
|
@@ -253,6 +266,12 @@ export interface MiamInterface {
|
|
|
253
266
|
setFavoriteItems: (favoriteProductIds: string[]) => Observable<object>;
|
|
254
267
|
};
|
|
255
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Call with the height in px of your website's header when it is sticky so Mealz can offset its sticky components
|
|
271
|
+
* If not called, any sticky components from Mealz may appear not stick correctly below your header
|
|
272
|
+
*/
|
|
273
|
+
setStickyHeaderHeight: (height: number) => void;
|
|
274
|
+
|
|
256
275
|
// ---------------------------------------------------------------------------------------------------
|
|
257
276
|
|
|
258
277
|
/**
|
|
@@ -261,4 +280,10 @@ export interface MiamInterface {
|
|
|
261
280
|
* @param url of the new icon
|
|
262
281
|
*/
|
|
263
282
|
overrideIcon: (icon, url: string) => void;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Pass a callback that returns the default scroll container of the page so mealz modal can block the scroll when opened
|
|
286
|
+
* Default callback returns document.body
|
|
287
|
+
*/
|
|
288
|
+
setDefaultScrollElementGetter: (callback: () => HTMLElement) => void;
|
|
264
289
|
}
|