@open-tender/utils 0.4.84 → 0.4.85
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/cjs/utils/menu.d.ts +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/dist/esm/utils/menu.d.ts +2 -0
- package/package.json +3 -4
|
@@ -48,6 +48,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
48
48
|
name: string;
|
|
49
49
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
50
50
|
points: number | null;
|
|
51
|
+
pos_ext_id: string | null;
|
|
51
52
|
price: number;
|
|
52
53
|
quantity: number;
|
|
53
54
|
shorthand: string | null;
|
|
@@ -40,6 +40,7 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
|
|
|
40
40
|
name: string;
|
|
41
41
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
42
42
|
points: number | null;
|
|
43
|
+
pos_ext_id: string | null;
|
|
43
44
|
quantity: number;
|
|
44
45
|
shorthand: string | null;
|
|
45
46
|
shortDescription: string | null;
|
|
@@ -37,6 +37,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
37
37
|
name: string;
|
|
38
38
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
39
39
|
points: number | null;
|
|
40
|
+
pos_ext_id: string | null;
|
|
40
41
|
price: number;
|
|
41
42
|
quantity: number;
|
|
42
43
|
shorthand: string | null;
|
package/dist/cjs/utils/cart.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
42
42
|
name: string;
|
|
43
43
|
nutritionalInfo: NutritionalInfo | null;
|
|
44
44
|
points: number | null;
|
|
45
|
+
pos_ext_id: string | null;
|
|
45
46
|
price: number;
|
|
46
47
|
quantity: number;
|
|
47
48
|
shorthand: string | null;
|
|
@@ -137,6 +138,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
137
138
|
name: string;
|
|
138
139
|
nutritionalInfo: NutritionalInfo | null;
|
|
139
140
|
points: number | null;
|
|
141
|
+
pos_ext_id: string | null;
|
|
140
142
|
price: number;
|
|
141
143
|
quantity: number;
|
|
142
144
|
shorthand: string | null;
|
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -229,6 +229,7 @@ const makeOrderItemGroups = (optionGroups, isEdit, soldOut = []) => {
|
|
|
229
229
|
name: o.name,
|
|
230
230
|
nutritionalInfo: o.nutritional_info,
|
|
231
231
|
points: o.points || 0,
|
|
232
|
+
pos_ext_id: o.pos_ext_id,
|
|
232
233
|
price: parseFloat(o.price),
|
|
233
234
|
quantity: quantity,
|
|
234
235
|
shorthand: o.shorthand,
|
|
@@ -293,6 +294,7 @@ const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints = false
|
|
|
293
294
|
notes: simpleItem ? simpleItem.notes || null : null,
|
|
294
295
|
nutritionalInfo: item.nutritional_info,
|
|
295
296
|
points: hasPoints ? item.points || null : null,
|
|
297
|
+
pos_ext_id: item.pos_ext_id,
|
|
296
298
|
price: parseFloat(item.price),
|
|
297
299
|
quantity: item.min_quantity || 1 * item.increment,
|
|
298
300
|
shorthand: item.shorthand,
|
package/dist/cjs/utils/menu.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare const makeOtherMenuSections: (displayedSections: MenuDisplayedSec
|
|
|
35
35
|
plu: string | null;
|
|
36
36
|
points: number | null;
|
|
37
37
|
pos_display_color: string | null;
|
|
38
|
+
pos_ext_id: string | null;
|
|
38
39
|
price: string;
|
|
39
40
|
sales_tax_override: `${number}.${number}` | null;
|
|
40
41
|
short_description: string | null;
|
|
@@ -83,6 +84,7 @@ export declare const makeFlatCategories: (categories: MenuCategories) => {
|
|
|
83
84
|
plu: string | null;
|
|
84
85
|
points: number | null;
|
|
85
86
|
pos_display_color: string | null;
|
|
87
|
+
pos_ext_id: string | null;
|
|
86
88
|
price: string;
|
|
87
89
|
sales_tax_override: `${number}.${number}` | null;
|
|
88
90
|
short_description: string | null;
|
|
@@ -48,6 +48,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
48
48
|
name: string;
|
|
49
49
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
50
50
|
points: number | null;
|
|
51
|
+
pos_ext_id: string | null;
|
|
51
52
|
price: number;
|
|
52
53
|
quantity: number;
|
|
53
54
|
shorthand: string | null;
|
|
@@ -40,6 +40,7 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
|
|
|
40
40
|
name: string;
|
|
41
41
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
42
42
|
points: number | null;
|
|
43
|
+
pos_ext_id: string | null;
|
|
43
44
|
quantity: number;
|
|
44
45
|
shorthand: string | null;
|
|
45
46
|
shortDescription: string | null;
|
|
@@ -37,6 +37,7 @@ export declare const useOrderItem: (orderItem: CartItem, favorite?: MenuItemFavo
|
|
|
37
37
|
name: string;
|
|
38
38
|
nutritionalInfo: import("@open-tender/types").NutritionalInfo | null;
|
|
39
39
|
points: number | null;
|
|
40
|
+
pos_ext_id: string | null;
|
|
40
41
|
price: number;
|
|
41
42
|
quantity: number;
|
|
42
43
|
shorthand: string | null;
|
package/dist/esm/utils/cart.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const rehydrateCart: (menuItems: MenuItems, simpleCartItems: Simp
|
|
|
42
42
|
name: string;
|
|
43
43
|
nutritionalInfo: NutritionalInfo | null;
|
|
44
44
|
points: number | null;
|
|
45
|
+
pos_ext_id: string | null;
|
|
45
46
|
price: number;
|
|
46
47
|
quantity: number;
|
|
47
48
|
shorthand: string | null;
|
|
@@ -137,6 +138,7 @@ export declare const combineCarts: (cart: Cart, guestCart: Cart, cartOwner: Cart
|
|
|
137
138
|
name: string;
|
|
138
139
|
nutritionalInfo: NutritionalInfo | null;
|
|
139
140
|
points: number | null;
|
|
141
|
+
pos_ext_id: string | null;
|
|
140
142
|
price: number;
|
|
141
143
|
quantity: number;
|
|
142
144
|
shorthand: string | null;
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -214,6 +214,7 @@ const makeOrderItemGroups = (optionGroups, isEdit, soldOut = []) => {
|
|
|
214
214
|
name: o.name,
|
|
215
215
|
nutritionalInfo: o.nutritional_info,
|
|
216
216
|
points: o.points || 0,
|
|
217
|
+
pos_ext_id: o.pos_ext_id,
|
|
217
218
|
price: parseFloat(o.price),
|
|
218
219
|
quantity: quantity,
|
|
219
220
|
shorthand: o.shorthand,
|
|
@@ -278,6 +279,7 @@ export const makeOrderItem = (item, isEdit, soldOut = [], simpleItem, hasPoints
|
|
|
278
279
|
notes: simpleItem ? simpleItem.notes || null : null,
|
|
279
280
|
nutritionalInfo: item.nutritional_info,
|
|
280
281
|
points: hasPoints ? item.points || null : null,
|
|
282
|
+
pos_ext_id: item.pos_ext_id,
|
|
281
283
|
price: parseFloat(item.price),
|
|
282
284
|
quantity: item.min_quantity || 1 * item.increment,
|
|
283
285
|
shorthand: item.shorthand,
|
package/dist/esm/utils/menu.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare const makeOtherMenuSections: (displayedSections: MenuDisplayedSec
|
|
|
35
35
|
plu: string | null;
|
|
36
36
|
points: number | null;
|
|
37
37
|
pos_display_color: string | null;
|
|
38
|
+
pos_ext_id: string | null;
|
|
38
39
|
price: string;
|
|
39
40
|
sales_tax_override: `${number}.${number}` | null;
|
|
40
41
|
short_description: string | null;
|
|
@@ -83,6 +84,7 @@ export declare const makeFlatCategories: (categories: MenuCategories) => {
|
|
|
83
84
|
plu: string | null;
|
|
84
85
|
points: number | null;
|
|
85
86
|
pos_display_color: string | null;
|
|
87
|
+
pos_ext_id: string | null;
|
|
86
88
|
price: string;
|
|
87
89
|
sales_tax_override: `${number}.${number}` | null;
|
|
88
90
|
short_description: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.85",
|
|
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.118",
|
|
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.121",
|
|
62
61
|
"@reduxjs/toolkit": "^1.8.5",
|
|
63
62
|
"react": "^18.2.0"
|
|
64
63
|
},
|
|
@@ -66,5 +65,5 @@
|
|
|
66
65
|
"date-fns": "^2.29.3",
|
|
67
66
|
"date-fns-tz": "^1.3.7"
|
|
68
67
|
},
|
|
69
|
-
"packageManager": "yarn@1.22.22
|
|
68
|
+
"packageManager": "yarn@1.22.22"
|
|
70
69
|
}
|