webc-miam 6.5.0 → 7.0.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.
@@ -91,6 +91,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
91
91
  THE SOFTWARE.
92
92
 
93
93
 
94
+ @babel/runtime
95
+ MIT
96
+ MIT License
97
+
98
+ Copyright (c) 2014-present Sebastian McKenzie and other contributors
99
+
100
+ Permission is hereby granted, free of charge, to any person obtaining
101
+ a copy of this software and associated documentation files (the
102
+ "Software"), to deal in the Software without restriction, including
103
+ without limitation the rights to use, copy, modify, merge, publish,
104
+ distribute, sublicense, and/or sell copies of the Software, and to
105
+ permit persons to whom the Software is furnished to do so, subject to
106
+ the following conditions:
107
+
108
+ The above copyright notice and this permission notice shall be
109
+ included in all copies or substantial portions of the Software.
110
+
111
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
112
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
113
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
114
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
115
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
116
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
117
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
118
+
119
+
94
120
  @mattlewis92/dom-autoscroller
95
121
  MIT
96
122
  The MIT License (MIT)
@@ -265,12 +291,27 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
265
291
 
266
292
  date-fns
267
293
  MIT
268
- Copyright (C) 2020 Sasha Koss and Lesha Koss
294
+ MIT License
295
+
296
+ Copyright (c) 2021 Sasha Koss and Lesha Koss https://kossnocorp.mit-license.org
269
297
 
270
- # License
298
+ Permission is hereby granted, free of charge, to any person obtaining a copy
299
+ of this software and associated documentation files (the "Software"), to deal
300
+ in the Software without restriction, including without limitation the rights
301
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
302
+ copies of the Software, and to permit persons to whom the Software is
303
+ furnished to do so, subject to the following conditions:
271
304
 
272
- date-fns is licensed under the [MIT license](http://kossnocorp.mit-license.org).
273
- Read more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).
305
+ The above copyright notice and this permission notice shall be included in all
306
+ copies or substantial portions of the Software.
307
+
308
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
309
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
310
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
311
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
312
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
313
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
314
+ SOFTWARE.
274
315
 
275
316
 
276
317
  duration-fns
@@ -30,16 +30,25 @@ export interface MiamInterface {
30
30
  */
31
31
  basketIsReady$: Observable<boolean>;
32
32
  /**
33
- * Fetch the first GroceriesList & Basket early (before any action requires it on Miam's
33
+ * Fetch the first Basket early (before any action requires it on Miam's
34
34
  * side), so you can start the basket-sync earlier
35
35
  */
36
36
  initialize: () => void;
37
+ /**
38
+ * Resets Miam's basket : empties all products & recipes added by the user
39
+ * /!\ We heavily recommend not to use this method except in the console for testing purposes /!\
40
+ */
41
+ reset: () => void;
37
42
  /**
38
43
  * If you have different price tables (or pricebooks) for the same point of sale, you can call this
39
44
  * method to make Miam know on which pricebook you are using
40
45
  * For example, prices can be different depending on if the user chose home delivery or drive-in
41
46
  */
42
- updatePricebook: (pricebookName: string) => void;
47
+ updatePricebook: (pricebookName: string) => Observable<void>;
48
+ /**
49
+ * @returns A BehaviorSubject that emits the current number of recipes in Miam's Basket
50
+ */
51
+ recipeCount: () => Observable<number>;
43
52
  };
44
53
 
45
54
  basketSync: {
@@ -65,7 +74,7 @@ export interface MiamInterface {
65
74
  retailerBasketChanged: (comparableProducts: ComparableProduct[]) => void;
66
75
  /**
67
76
  * Call to notify Miam that the user's cart was paid
68
- * Miam then refreshes the groceries-list and basket for the next user's cart
77
+ * Miam then refreshes the basket for the next user's cart
69
78
  *
70
79
  * @param total The total price of the cart paid
71
80
  */
@@ -120,20 +129,6 @@ export interface MiamInterface {
120
129
 
121
130
  // ---------------------------------------------------------------------------------------------------
122
131
 
123
- list: {
124
- /**
125
- * Resets Miam's GroceriesList & empties all products & recipes added by the user
126
- * /!\ We heavily recommend not to use this method outside of the web console for testing purposes /!\
127
- */
128
- reset: () => void;
129
- /**
130
- * @returns A BehaviorSubject that emits the current number of recipes in Miam's GroceriesList
131
- */
132
- recipeCount: () => Observable<number>;
133
- };
134
-
135
- // ---------------------------------------------------------------------------------------------------
136
-
137
132
  pos: {
138
133
  /**
139
134
  * Call to inform Miam of the point of sale the user is currently on. Do not forget to call the method
@@ -151,10 +146,6 @@ export interface MiamInterface {
151
146
  * An observable that emits a value when the recipe-modal is closed
152
147
  */
153
148
  hidden: Observable<boolean>;
154
- /**
155
- * If called with a parameter to true, recipe-details will show a picture next to the ingredients
156
- */
157
- shouldDisplayIngredientPicturesOnRecipeCards: (should: boolean) => void;
158
149
  /**
159
150
  * Call with an url of a picture to change the default picture displayed if an ingredient doesn't have a picture
160
151
  * and if ingredients picture have been enabled with recipes.shouldDisplayIngredientPicturesOnRecipeCards(true)
@@ -179,6 +170,11 @@ export interface MiamInterface {
179
170
  * If called, adding a recipe to Miam's basket will display a confirmation toaster
180
171
  */
181
172
  showConfirmationToaster: () => void;
173
+
174
+ /**
175
+ * @param should if set to true, the recipe-cards will display the ingredients of their recipe
176
+ */
177
+ shouldDisplayIngredientPicturesOnRecipeCards: (should: boolean) => void;
182
178
  };
183
179
 
184
180
  // ---------------------------------------------------------------------------------------------------