webc-miam 10.0.4 → 10.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.
@@ -44,6 +44,12 @@ export interface MealzInternalInterface {
44
44
  */
45
45
  recipePricesInBasket$: () => Observable<{ id: string; price: string }[]>;
46
46
 
47
+ /**
48
+ * Gets the guests count for a recipe
49
+ * @param recipeId
50
+ */
51
+ guestsForRecipe: (recipeId: string) => number;
52
+
47
53
  /**
48
54
  * Removes a recipe from the basket.
49
55
  */
@@ -71,21 +77,43 @@ export interface MealzInternalInterface {
71
77
  entries$: () => Observable<BasketEntry[]>;
72
78
 
73
79
  /**
74
- * transfer basket to supplier
80
+ * Refresh the current basket state and emit updated basket
75
81
  */
82
+ refreshCurrentBasket: () => Observable<Basket>;
76
83
 
77
- transfer: () => void;
84
+ /**
85
+ * if false, don't show the product section in the basket preview
86
+ */
87
+
88
+ displayProductsInBasket: () => boolean;
78
89
 
79
90
  /**
80
91
  * Emits the list of basket-entries to add to retailer cart
81
92
  */
82
93
  updateRetailerBasketFromPlanner: () => void;
94
+ };
83
95
 
96
+ basketTransfer: {
84
97
  /**
85
- * if false, don't show the product section in the basket preview
98
+ * Exposes the transfer-in-progress state
86
99
  */
100
+ basketIsBeingTransferred: BehaviorSubject<boolean>;
87
101
 
88
- displayProductsInBasket: () => boolean;
102
+ /**
103
+ * Abort the transfer (reloads basket)
104
+ */
105
+ abortTransfer: () => Observable<void>;
106
+
107
+ /**
108
+ * Navigate to the transfer URL stored in session
109
+ */
110
+ navigateToTransferUrl: () => void;
111
+
112
+ /**
113
+ * transfer basket to supplier
114
+ */
115
+
116
+ transfer: () => void;
89
117
  };
90
118
 
91
119
  // ---------------------------------------------------------------------------------------------------
@@ -465,6 +493,11 @@ export interface MealzInternalInterface {
465
493
  * Removes a product from the basket
466
494
  */
467
495
  removeProduct: (basketEntry: BasketEntry, path: string) => void;
496
+
497
+ /**
498
+ * Checks if a product is being updated
499
+ */
500
+ entryIsBeingUpdated: (entryId: string) => Observable<boolean>;
468
501
  };
469
502
 
470
503
  // ---------------------------------------------------------------------------------------------------
@@ -586,6 +619,11 @@ export interface MealzInternalInterface {
586
619
  */
587
620
  open: () => void;
588
621
 
622
+ /**
623
+ * Closes the product addition modal
624
+ */
625
+ close: () => void;
626
+
589
627
  /**
590
628
  * Emits an observable that notifies subscribers when a product has been added.
591
629
  */