webc-miam 10.3.0 → 10.3.2

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.
@@ -7,9 +7,9 @@ import { Tag } from '../../_models/tag';
7
7
  import { ProductCategory, ProductPrice, RecipeDisplay } from '../../_services';
8
8
  import { RecipeInBasketPreview } from '../../_services/basket-utils.service';
9
9
  import { Product } from '../../_services/new-recipe-details.service';
10
+ import { BasicPreference } from '../../_services/preferences.service';
10
11
  import { ProductPlanner, ProductPlannerCategory } from '../../_services/recipe-details-products-planner.service';
11
12
  import { BasketEntryToReplace } from '../../_services/replace-item.service';
12
- import { BasicPreference } from '../../_services/preferences.service';
13
13
  import { EventJourney } from '../event-journey.enum';
14
14
  import { EventTrace } from '../event-trace';
15
15
 
@@ -64,7 +64,7 @@ export interface MealzInternalInterface {
64
64
  /**
65
65
  * Observable that emits the full state of the basket preview including open state and active tab
66
66
  */
67
- basketPreviewState$: Observable<{ isOpen: boolean, activeTabIndex?: number }>;
67
+ basketPreviewState$: Observable<{ isOpen: boolean; activeTabIndex?: number }>;
68
68
 
69
69
  /**
70
70
  * Emits the list of recipes in the basket.
@@ -281,6 +281,11 @@ export interface MealzInternalInterface {
281
281
  */
282
282
  openDetails: (recipeId: string, guests: number, initialTabIndex?: number, analyticsPath?: string, categoryId?: string) => void;
283
283
 
284
+ /**
285
+ * Loads and setups a recipe
286
+ */
287
+ loadAndSetupRecipe: (recipeId: string, guests?: number) => Observable<void>;
288
+
284
289
  /**
285
290
  * Method to open replace item view
286
291
  */
@@ -289,7 +294,7 @@ export interface MealzInternalInterface {
289
294
  /**
290
295
  * Method to update guest number
291
296
  */
292
- updateGuests: (eventTrace: EventTrace) => void;
297
+ updateGuests: (eventTrace: EventTrace, guests?: number) => void;
293
298
 
294
299
  /**
295
300
  * Method to add all ingredients from recipe to basket
@@ -514,6 +519,11 @@ export interface MealzInternalInterface {
514
519
  */
515
520
  currentPos: () => Observable<PointOfSale>;
516
521
 
522
+ /**
523
+ * Checks if the point of sale has been initialized
524
+ */
525
+ posWasInitialized: () => Observable<boolean>;
526
+
517
527
  /**
518
528
  * Loads the point of sale data for the given pos id
519
529
  */
@@ -592,7 +602,7 @@ export interface MealzInternalInterface {
592
602
  /**
593
603
  * Opens the store locator
594
604
  */
595
- open: () => void
605
+ open: () => void;
596
606
 
597
607
  /**
598
608
  * Opens the store locator / indicator warning modal
@@ -737,8 +747,15 @@ export interface MealzInternalInterface {
737
747
  autocomplete: (query: string) => Observable<DocumentCollection<Tag>>;
738
748
  };
739
749
 
750
+ /**
751
+ * Set up a callback which Mealz will call before adding a recipe to the user's cart
752
+ *
753
+ * @param needLogin if true, Mealz will ask for login
754
+ * @param needPos if true, Mealz will ask for a pos
755
+ * @returns Observable<boolean> true if the operation can continue, false otherwise
756
+ */
740
757
  hook: {
741
- hookCallback: () => Observable<boolean>;
758
+ hookCallback: (needLogin?: boolean, needPos?: boolean) => Observable<boolean>;
742
759
  };
743
760
 
744
761
  noSupplier: {