@open-tender/utils 0.4.80 → 0.4.82
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 +3 -2
- 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 +3 -2
- package/package.json +2 -2
|
@@ -34,6 +34,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
34
34
|
upsellItems: number[];
|
|
35
35
|
list_name: string | null;
|
|
36
36
|
list_id: string | null;
|
|
37
|
+
menu_position: number | null;
|
|
37
38
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
38
39
|
cals: number | null;
|
|
39
40
|
groups: import("@open-tender/types").CartItemGroups;
|
|
@@ -22,6 +22,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
22
22
|
upsellItems: number[];
|
|
23
23
|
list_name: string | null;
|
|
24
24
|
list_id: string | null;
|
|
25
|
+
menu_position: number | null;
|
|
25
26
|
allergens: string[];
|
|
26
27
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
27
28
|
cals: number | null;
|
package/dist/cjs/utils/cart.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
26
26
|
upsellItems: number[];
|
|
27
27
|
list_name: string | null;
|
|
28
28
|
list_id: string | null;
|
|
29
|
+
menu_position: number | null;
|
|
29
30
|
allergens: string[];
|
|
30
31
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
31
32
|
cals: number | null;
|
|
@@ -120,6 +121,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
120
121
|
upsellItems: number[];
|
|
121
122
|
list_name: string | null;
|
|
122
123
|
list_id: string | null;
|
|
124
|
+
menu_position: number | null;
|
|
123
125
|
allergens: string[];
|
|
124
126
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
125
127
|
cals: number | null;
|
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -283,7 +283,7 @@ const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints = false
|
|
|
283
283
|
id: item.id,
|
|
284
284
|
imageUrl: item.large_image_url,
|
|
285
285
|
increment: item.increment,
|
|
286
|
-
index:
|
|
286
|
+
//index: null,
|
|
287
287
|
ingredients: item.ingredients,
|
|
288
288
|
isSoldOut: isSoldOut,
|
|
289
289
|
madeFor: simpleItem ? simpleItem.made_for || null : null,
|
|
@@ -310,7 +310,8 @@ const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints = false
|
|
|
310
310
|
itemShape: (_b = item.item_shape) !== null && _b !== void 0 ? _b : null,
|
|
311
311
|
excludeFromBuilder: (_c = item.exclude_from_builder) !== null && _c !== void 0 ? _c : false,
|
|
312
312
|
list_id: item.list_id,
|
|
313
|
-
list_name: item.list_name
|
|
313
|
+
list_name: item.list_name,
|
|
314
|
+
menu_position: item.menu_position
|
|
314
315
|
};
|
|
315
316
|
const pricedItem = (0, exports.calcPrices)(orderItem);
|
|
316
317
|
return pricedItem;
|
|
@@ -34,6 +34,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
34
34
|
upsellItems: number[];
|
|
35
35
|
list_name: string | null;
|
|
36
36
|
list_id: string | null;
|
|
37
|
+
menu_position: number | null;
|
|
37
38
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
38
39
|
cals: number | null;
|
|
39
40
|
groups: import("@open-tender/types").CartItemGroups;
|
|
@@ -22,6 +22,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
22
22
|
upsellItems: number[];
|
|
23
23
|
list_name: string | null;
|
|
24
24
|
list_id: string | null;
|
|
25
|
+
menu_position: number | null;
|
|
25
26
|
allergens: string[];
|
|
26
27
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
27
28
|
cals: number | null;
|
package/dist/esm/utils/cart.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
26
26
|
upsellItems: number[];
|
|
27
27
|
list_name: string | null;
|
|
28
28
|
list_id: string | null;
|
|
29
|
+
menu_position: number | null;
|
|
29
30
|
allergens: string[];
|
|
30
31
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
31
32
|
cals: number | null;
|
|
@@ -120,6 +121,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
120
121
|
upsellItems: number[];
|
|
121
122
|
list_name: string | null;
|
|
122
123
|
list_id: string | null;
|
|
124
|
+
menu_position: number | null;
|
|
123
125
|
allergens: string[];
|
|
124
126
|
allergens_list?: import("@open-tender/types").MenuItemAllergens | undefined;
|
|
125
127
|
cals: number | null;
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -268,7 +268,7 @@ export const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints
|
|
|
268
268
|
id: item.id,
|
|
269
269
|
imageUrl: item.large_image_url,
|
|
270
270
|
increment: item.increment,
|
|
271
|
-
index:
|
|
271
|
+
//index: null,
|
|
272
272
|
ingredients: item.ingredients,
|
|
273
273
|
isSoldOut: isSoldOut,
|
|
274
274
|
madeFor: simpleItem ? simpleItem.made_for || null : null,
|
|
@@ -295,7 +295,8 @@ export const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints
|
|
|
295
295
|
itemShape: (_b = item.item_shape) !== null && _b !== void 0 ? _b : null,
|
|
296
296
|
excludeFromBuilder: (_c = item.exclude_from_builder) !== null && _c !== void 0 ? _c : false,
|
|
297
297
|
list_id: item.list_id,
|
|
298
|
-
list_name: item.list_name
|
|
298
|
+
list_name: item.list_name,
|
|
299
|
+
menu_position: item.menu_position
|
|
299
300
|
};
|
|
300
301
|
const pricedItem = calcPrices(orderItem);
|
|
301
302
|
return pricedItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.82",
|
|
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",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"private": false,
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@emotion/react": "^11.10.4",
|
|
39
|
-
"@open-tender/types": "^0.4.
|
|
39
|
+
"@open-tender/types": "^0.4.113",
|
|
40
40
|
"@reduxjs/toolkit": "^1.8.5",
|
|
41
41
|
"@types/google.maps": "^3.53.5",
|
|
42
42
|
"@types/jest": "^29.5.11",
|