@open-tender/utils 0.5.67 → 0.5.69
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/dist/cjs/hooks/useMenuItem.d.ts +1 -0
- package/dist/cjs/hooks/useOrderItem.d.ts +1 -0
- package/dist/cjs/utils/cart.d.ts +2 -0
- package/dist/cjs/utils/cart.js +5 -2
- package/dist/cjs/utils/menu.d.ts +2 -0
- package/dist/esm/hooks/useMenuItem.d.ts +1 -0
- package/dist/esm/hooks/useOrderItem.d.ts +1 -0
- package/dist/esm/utils/cart.d.ts +2 -0
- package/dist/esm/utils/cart.js +5 -2
- package/dist/esm/utils/menu.d.ts +2 -0
- package/package.json +2 -2
|
@@ -36,6 +36,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
36
36
|
list_name: string | null;
|
|
37
37
|
list_id: string | null;
|
|
38
38
|
menu_position: number | null;
|
|
39
|
+
related_meal_item: number | null;
|
|
39
40
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
40
41
|
cals: number | null;
|
|
41
42
|
groups: import("@open-tender/types").CartItemGroups;
|
|
@@ -23,6 +23,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
23
23
|
list_name: string | null;
|
|
24
24
|
list_id: string | null;
|
|
25
25
|
menu_position: number | null;
|
|
26
|
+
related_meal_item: number | null;
|
|
26
27
|
allergens: string[];
|
|
27
28
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
28
29
|
cals: number | null;
|
package/dist/cjs/utils/cart.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
27
27
|
list_name: string | null;
|
|
28
28
|
list_id: string | null;
|
|
29
29
|
menu_position: number | null;
|
|
30
|
+
related_meal_item: number | null;
|
|
30
31
|
allergens: string[];
|
|
31
32
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
32
33
|
cals: number | null;
|
|
@@ -125,6 +126,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
125
126
|
list_name: string | null;
|
|
126
127
|
list_id: string | null;
|
|
127
128
|
menu_position: number | null;
|
|
129
|
+
related_meal_item: number | null;
|
|
128
130
|
allergens: string[];
|
|
129
131
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
130
132
|
cals: number | null;
|
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -114,7 +114,9 @@ const nutritionKeys = [
|
|
|
114
114
|
'sugars',
|
|
115
115
|
'total_carbs',
|
|
116
116
|
'total_fat',
|
|
117
|
-
'trans_fat'
|
|
117
|
+
'trans_fat',
|
|
118
|
+
'calories_from_fat',
|
|
119
|
+
'serving_weight'
|
|
118
120
|
];
|
|
119
121
|
const calcNutrition = (item) => {
|
|
120
122
|
const { nutritionalInfo, groups } = item;
|
|
@@ -326,7 +328,8 @@ const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints = false
|
|
|
326
328
|
excludeFromBuilder: (_c = item.exclude_from_builder) !== null && _c !== void 0 ? _c : false,
|
|
327
329
|
list_id: item.list_id,
|
|
328
330
|
list_name: item.list_name,
|
|
329
|
-
menu_position: item.menu_position
|
|
331
|
+
menu_position: item.menu_position,
|
|
332
|
+
related_meal_item: item.related_meal_item
|
|
330
333
|
};
|
|
331
334
|
const pricedItem = (0, exports.calcPrices)(orderItem);
|
|
332
335
|
return pricedItem;
|
package/dist/cjs/utils/menu.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export declare const makeOtherMenuSections: (displayedSections: MenuDisplayedSec
|
|
|
55
55
|
list_name: string | null;
|
|
56
56
|
list_id: string | null;
|
|
57
57
|
index?: number | undefined;
|
|
58
|
+
related_meal_item: number | null;
|
|
58
59
|
}[];
|
|
59
60
|
}[];
|
|
60
61
|
export declare const makeFlatCategories: (categories: MenuCategories) => {
|
|
@@ -104,6 +105,7 @@ export declare const makeFlatCategories: (categories: MenuCategories) => {
|
|
|
104
105
|
list_name: string | null;
|
|
105
106
|
list_id: string | null;
|
|
106
107
|
index?: number | undefined;
|
|
108
|
+
related_meal_item: number | null;
|
|
107
109
|
}[];
|
|
108
110
|
app_image_url: string | null;
|
|
109
111
|
appearance: import("@open-tender/types").MenuCategoryAppearance;
|
|
@@ -36,6 +36,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
36
36
|
list_name: string | null;
|
|
37
37
|
list_id: string | null;
|
|
38
38
|
menu_position: number | null;
|
|
39
|
+
related_meal_item: number | null;
|
|
39
40
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
40
41
|
cals: number | null;
|
|
41
42
|
groups: import("@open-tender/types").CartItemGroups;
|
|
@@ -23,6 +23,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
23
23
|
list_name: string | null;
|
|
24
24
|
list_id: string | null;
|
|
25
25
|
menu_position: number | null;
|
|
26
|
+
related_meal_item: number | null;
|
|
26
27
|
allergens: string[];
|
|
27
28
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
28
29
|
cals: number | null;
|
package/dist/esm/utils/cart.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
27
27
|
list_name: string | null;
|
|
28
28
|
list_id: string | null;
|
|
29
29
|
menu_position: number | null;
|
|
30
|
+
related_meal_item: number | null;
|
|
30
31
|
allergens: string[];
|
|
31
32
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
32
33
|
cals: number | null;
|
|
@@ -125,6 +126,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
125
126
|
list_name: string | null;
|
|
126
127
|
list_id: string | null;
|
|
127
128
|
menu_position: number | null;
|
|
129
|
+
related_meal_item: number | null;
|
|
128
130
|
allergens: string[];
|
|
129
131
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
130
132
|
cals: number | null;
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -103,7 +103,9 @@ const nutritionKeys = [
|
|
|
103
103
|
'sugars',
|
|
104
104
|
'total_carbs',
|
|
105
105
|
'total_fat',
|
|
106
|
-
'trans_fat'
|
|
106
|
+
'trans_fat',
|
|
107
|
+
'calories_from_fat',
|
|
108
|
+
'serving_weight'
|
|
107
109
|
];
|
|
108
110
|
export const calcNutrition = (item) => {
|
|
109
111
|
const { nutritionalInfo, groups } = item;
|
|
@@ -311,7 +313,8 @@ export const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints
|
|
|
311
313
|
excludeFromBuilder: (_c = item.exclude_from_builder) !== null && _c !== void 0 ? _c : false,
|
|
312
314
|
list_id: item.list_id,
|
|
313
315
|
list_name: item.list_name,
|
|
314
|
-
menu_position: item.menu_position
|
|
316
|
+
menu_position: item.menu_position,
|
|
317
|
+
related_meal_item: item.related_meal_item
|
|
315
318
|
};
|
|
316
319
|
const pricedItem = calcPrices(orderItem);
|
|
317
320
|
return pricedItem;
|
package/dist/esm/utils/menu.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export declare const makeOtherMenuSections: (displayedSections: MenuDisplayedSec
|
|
|
55
55
|
list_name: string | null;
|
|
56
56
|
list_id: string | null;
|
|
57
57
|
index?: number | undefined;
|
|
58
|
+
related_meal_item: number | null;
|
|
58
59
|
}[];
|
|
59
60
|
}[];
|
|
60
61
|
export declare const makeFlatCategories: (categories: MenuCategories) => {
|
|
@@ -104,6 +105,7 @@ export declare const makeFlatCategories: (categories: MenuCategories) => {
|
|
|
104
105
|
list_name: string | null;
|
|
105
106
|
list_id: string | null;
|
|
106
107
|
index?: number | undefined;
|
|
108
|
+
related_meal_item: number | null;
|
|
107
109
|
}[];
|
|
108
110
|
app_image_url: string | null;
|
|
109
111
|
appearance: import("@open-tender/types").MenuCategoryAppearance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.69",
|
|
4
4
|
"description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"typescript": "^4.8.2"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@open-tender/types": "^0.4.
|
|
60
|
+
"@open-tender/types": "^0.4.176",
|
|
61
61
|
"@reduxjs/toolkit": "^1.8.5",
|
|
62
62
|
"react": "^18.2.0"
|
|
63
63
|
},
|