@open-tender/utils 0.4.25 → 0.4.27
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 -3
|
@@ -40,6 +40,7 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
|
|
|
40
40
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
41
41
|
points: number | null;
|
|
42
42
|
quantity: number;
|
|
43
|
+
shorthand: string | null;
|
|
43
44
|
shortDescription: string | null;
|
|
44
45
|
shortName: string;
|
|
45
46
|
slug: string;
|
package/dist/cjs/utils/cart.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
40
40
|
points: number | null;
|
|
41
41
|
price: number;
|
|
42
42
|
quantity: number;
|
|
43
|
+
shorthand: string | null;
|
|
43
44
|
shortDescription: string | null;
|
|
44
45
|
shortName: string;
|
|
45
46
|
slug: string;
|
|
@@ -127,6 +128,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
127
128
|
points: number | null;
|
|
128
129
|
price: number;
|
|
129
130
|
quantity: number;
|
|
131
|
+
shorthand: string | null;
|
|
130
132
|
shortDescription: string | null;
|
|
131
133
|
shortName: string;
|
|
132
134
|
slug: string;
|
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -229,6 +229,7 @@ const makeOrderItemGroups = (optionGroups, isEdit, soldOut = []) => {
|
|
|
229
229
|
points: o.points || 0,
|
|
230
230
|
price: parseFloat(o.price),
|
|
231
231
|
quantity: quantity,
|
|
232
|
+
shorthand: o.shorthand,
|
|
232
233
|
shortDescription: o.short_description,
|
|
233
234
|
shortName: o.short_name,
|
|
234
235
|
slug: o.slug,
|
|
@@ -283,6 +284,7 @@ const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints = false
|
|
|
283
284
|
points: hasPoints ? item.points || null : null,
|
|
284
285
|
price: parseFloat(item.price),
|
|
285
286
|
quantity: item.min_quantity || 1 * item.increment,
|
|
287
|
+
shorthand: item.shorthand,
|
|
286
288
|
shortDescription: item.short_description,
|
|
287
289
|
shortName: item.short_name,
|
|
288
290
|
similarItems: item.similar_items,
|
|
@@ -40,6 +40,7 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
|
|
|
40
40
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
41
41
|
points: number | null;
|
|
42
42
|
quantity: number;
|
|
43
|
+
shorthand: string | null;
|
|
43
44
|
shortDescription: string | null;
|
|
44
45
|
shortName: string;
|
|
45
46
|
slug: string;
|
package/dist/esm/utils/cart.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
40
40
|
points: number | null;
|
|
41
41
|
price: number;
|
|
42
42
|
quantity: number;
|
|
43
|
+
shorthand: string | null;
|
|
43
44
|
shortDescription: string | null;
|
|
44
45
|
shortName: string;
|
|
45
46
|
slug: string;
|
|
@@ -127,6 +128,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
127
128
|
points: number | null;
|
|
128
129
|
price: number;
|
|
129
130
|
quantity: number;
|
|
131
|
+
shorthand: string | null;
|
|
130
132
|
shortDescription: string | null;
|
|
131
133
|
shortName: string;
|
|
132
134
|
slug: string;
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -214,6 +214,7 @@ const makeOrderItemGroups = (optionGroups, isEdit, soldOut = []) => {
|
|
|
214
214
|
points: o.points || 0,
|
|
215
215
|
price: parseFloat(o.price),
|
|
216
216
|
quantity: quantity,
|
|
217
|
+
shorthand: o.shorthand,
|
|
217
218
|
shortDescription: o.short_description,
|
|
218
219
|
shortName: o.short_name,
|
|
219
220
|
slug: o.slug,
|
|
@@ -268,6 +269,7 @@ export const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints
|
|
|
268
269
|
points: hasPoints ? item.points || null : null,
|
|
269
270
|
price: parseFloat(item.price),
|
|
270
271
|
quantity: item.min_quantity || 1 * item.increment,
|
|
272
|
+
shorthand: item.shorthand,
|
|
271
273
|
shortDescription: item.short_description,
|
|
272
274
|
shortName: item.short_name,
|
|
273
275
|
similarItems: item.similar_items,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.27",
|
|
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,6 @@
|
|
|
36
36
|
"private": false,
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@emotion/react": "^11.10.4",
|
|
39
|
-
"@open-tender/types": "^0.4.47",
|
|
40
39
|
"@reduxjs/toolkit": "^1.8.5",
|
|
41
40
|
"@types/google.maps": "^3.53.5",
|
|
42
41
|
"@types/jest": "^29.5.11",
|
|
@@ -58,7 +57,7 @@
|
|
|
58
57
|
"typescript": "^4.8.2"
|
|
59
58
|
},
|
|
60
59
|
"peerDependencies": {
|
|
61
|
-
"@open-tender/types": "^0.4.
|
|
60
|
+
"@open-tender/types": "^0.4.48",
|
|
62
61
|
"@reduxjs/toolkit": "^1.8.5",
|
|
63
62
|
"react": "^18.2.0"
|
|
64
63
|
},
|