@open-tender/utils 0.5.19 → 0.5.20
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/useModifier.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 +2 -0
- package/dist/esm/hooks/useMenuItem.d.ts +1 -0
- package/dist/esm/hooks/useModifier.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 +2 -0
- package/package.json +2 -2
|
@@ -56,6 +56,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
56
56
|
shortDescription: string | null;
|
|
57
57
|
shortName: string;
|
|
58
58
|
slug: string;
|
|
59
|
+
suspend_until: number | null;
|
|
59
60
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
60
61
|
totalCals: number | null;
|
|
61
62
|
totalPrice: number | null;
|
|
@@ -47,6 +47,7 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
|
|
|
47
47
|
shortDescription: string | null;
|
|
48
48
|
shortName: string;
|
|
49
49
|
slug: string;
|
|
50
|
+
suspend_until: number | null;
|
|
50
51
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
51
52
|
totalAllergens: string[];
|
|
52
53
|
totalCals: number | null;
|
|
@@ -45,6 +45,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
45
45
|
shortDescription: string | null;
|
|
46
46
|
shortName: string;
|
|
47
47
|
slug: string;
|
|
48
|
+
suspend_until: number | null;
|
|
48
49
|
tags: string[];
|
|
49
50
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
50
51
|
totalAllergens: string[];
|
package/dist/cjs/utils/cart.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
50
50
|
shortDescription: string | null;
|
|
51
51
|
shortName: string;
|
|
52
52
|
slug: string;
|
|
53
|
+
suspend_until: number | null;
|
|
53
54
|
tags: string[];
|
|
54
55
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
55
56
|
totalAllergens: string[];
|
|
@@ -147,6 +148,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
147
148
|
shortDescription: string | null;
|
|
148
149
|
shortName: string;
|
|
149
150
|
slug: string;
|
|
151
|
+
suspend_until: number | null;
|
|
150
152
|
tags: string[];
|
|
151
153
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
152
154
|
totalAllergens: string[];
|
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -237,6 +237,7 @@ const makeOrderItemGroups = (optionGroups, isEdit, soldOut = [], requestedAt = n
|
|
|
237
237
|
ingredients: o.ingredients,
|
|
238
238
|
isDefault: o.opt_is_default,
|
|
239
239
|
isSoldOut: isSoldOut,
|
|
240
|
+
suspend_until: o.suspend_until,
|
|
240
241
|
max: isSoldOut ? 0 : o.max_quantity,
|
|
241
242
|
min: o.min_quantity,
|
|
242
243
|
name: o.name,
|
|
@@ -301,6 +302,7 @@ const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints = false
|
|
|
301
302
|
//index: null,
|
|
302
303
|
ingredients: item.ingredients,
|
|
303
304
|
isSoldOut: isSoldOut,
|
|
305
|
+
suspend_until: item.suspend_until,
|
|
304
306
|
madeFor: simpleItem ? simpleItem.made_for || null : null,
|
|
305
307
|
max: item.max_quantity,
|
|
306
308
|
min: item.min_quantity,
|
|
@@ -56,6 +56,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
56
56
|
shortDescription: string | null;
|
|
57
57
|
shortName: string;
|
|
58
58
|
slug: string;
|
|
59
|
+
suspend_until: number | null;
|
|
59
60
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
60
61
|
totalCals: number | null;
|
|
61
62
|
totalPrice: number | null;
|
|
@@ -47,6 +47,7 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
|
|
|
47
47
|
shortDescription: string | null;
|
|
48
48
|
shortName: string;
|
|
49
49
|
slug: string;
|
|
50
|
+
suspend_until: number | null;
|
|
50
51
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
51
52
|
totalAllergens: string[];
|
|
52
53
|
totalCals: number | null;
|
|
@@ -45,6 +45,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
45
45
|
shortDescription: string | null;
|
|
46
46
|
shortName: string;
|
|
47
47
|
slug: string;
|
|
48
|
+
suspend_until: number | null;
|
|
48
49
|
tags: string[];
|
|
49
50
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
50
51
|
totalAllergens: string[];
|
package/dist/esm/utils/cart.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
50
50
|
shortDescription: string | null;
|
|
51
51
|
shortName: string;
|
|
52
52
|
slug: string;
|
|
53
|
+
suspend_until: number | null;
|
|
53
54
|
tags: string[];
|
|
54
55
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
55
56
|
totalAllergens: string[];
|
|
@@ -147,6 +148,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
147
148
|
shortDescription: string | null;
|
|
148
149
|
shortName: string;
|
|
149
150
|
slug: string;
|
|
151
|
+
suspend_until: number | null;
|
|
150
152
|
tags: string[];
|
|
151
153
|
tags_list?: import("@open-tender/types").MenuItemTags | undefined;
|
|
152
154
|
totalAllergens: string[];
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -222,6 +222,7 @@ const makeOrderItemGroups = (optionGroups, isEdit, soldOut = [], requestedAt = n
|
|
|
222
222
|
ingredients: o.ingredients,
|
|
223
223
|
isDefault: o.opt_is_default,
|
|
224
224
|
isSoldOut: isSoldOut,
|
|
225
|
+
suspend_until: o.suspend_until,
|
|
225
226
|
max: isSoldOut ? 0 : o.max_quantity,
|
|
226
227
|
min: o.min_quantity,
|
|
227
228
|
name: o.name,
|
|
@@ -286,6 +287,7 @@ export const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints
|
|
|
286
287
|
//index: null,
|
|
287
288
|
ingredients: item.ingredients,
|
|
288
289
|
isSoldOut: isSoldOut,
|
|
290
|
+
suspend_until: item.suspend_until,
|
|
289
291
|
madeFor: simpleItem ? simpleItem.made_for || null : null,
|
|
290
292
|
max: item.max_quantity,
|
|
291
293
|
min: item.min_quantity,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.20",
|
|
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.140",
|
|
61
61
|
"@reduxjs/toolkit": "^1.8.5",
|
|
62
62
|
"react": "^18.2.0"
|
|
63
63
|
},
|