@open-tender/utils 0.4.88 → 0.4.90
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/useMenuItem.js +2 -1
- 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/menu.d.ts +2 -0
- package/dist/esm/hooks/useMenuItem.d.ts +1 -0
- package/dist/esm/hooks/useMenuItem.js +2 -1
- 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/menu.d.ts +2 -0
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
14
14
|
hasTags: boolean;
|
|
15
15
|
hasAllergens: boolean;
|
|
16
16
|
hasGroups: boolean;
|
|
17
|
+
pos_ext_id: string | null;
|
|
17
18
|
sizeGroup: import("@open-tender/types").CartItemGroup | null | undefined;
|
|
18
19
|
sizeSelected: boolean;
|
|
19
20
|
nonSizeGroups: import("@open-tender/types").CartItemGroup[] | null;
|
|
@@ -6,7 +6,7 @@ const useMenuItem = (builtItem, auth, lookup, cartId, displaySettings) => {
|
|
|
6
6
|
const signature = (0, utils_1.makeItemSignature)(builtItem);
|
|
7
7
|
const favoriteId = lookup && signature ? lookup[signature] : null;
|
|
8
8
|
const { calories: showCals = false, tags: showTags = false, allergens: showAllergens = false, madeFor: showMadeFor = true, notes: showNotes = true } = displaySettings || {};
|
|
9
|
-
const { description, quantity, price, totalPrice, cals, totalCals, totalPoints, tags, allergens, groups, ingredients, totalAllergens } = builtItem;
|
|
9
|
+
const { description, quantity, price, totalPrice, cals, totalCals, totalPoints, tags, allergens, groups, ingredients, totalAllergens, pos_ext_id } = builtItem;
|
|
10
10
|
const hasTags = showTags && Array.isArray(tags) && tags.length ? true : false;
|
|
11
11
|
const hasAllergens = showAllergens && Array.isArray(allergens) && allergens.length ? true : false;
|
|
12
12
|
const hasTagsAllergens = hasTags || hasAllergens ? true : false;
|
|
@@ -53,6 +53,7 @@ const useMenuItem = (builtItem, auth, lookup, cartId, displaySettings) => {
|
|
|
53
53
|
hasTags,
|
|
54
54
|
hasAllergens,
|
|
55
55
|
hasGroups,
|
|
56
|
+
pos_ext_id,
|
|
56
57
|
sizeGroup,
|
|
57
58
|
sizeSelected,
|
|
58
59
|
nonSizeGroups,
|
|
@@ -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/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;
|
|
@@ -14,6 +14,7 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
|
|
|
14
14
|
hasTags: boolean;
|
|
15
15
|
hasAllergens: boolean;
|
|
16
16
|
hasGroups: boolean;
|
|
17
|
+
pos_ext_id: string | null;
|
|
17
18
|
sizeGroup: import("@open-tender/types").CartItemGroup | null | undefined;
|
|
18
19
|
sizeSelected: boolean;
|
|
19
20
|
nonSizeGroups: import("@open-tender/types").CartItemGroup[] | null;
|
|
@@ -3,7 +3,7 @@ export const useMenuItem = (builtItem, auth, lookup, cartId, displaySettings) =>
|
|
|
3
3
|
const signature = makeItemSignature(builtItem);
|
|
4
4
|
const favoriteId = lookup && signature ? lookup[signature] : null;
|
|
5
5
|
const { calories: showCals = false, tags: showTags = false, allergens: showAllergens = false, madeFor: showMadeFor = true, notes: showNotes = true } = displaySettings || {};
|
|
6
|
-
const { description, quantity, price, totalPrice, cals, totalCals, totalPoints, tags, allergens, groups, ingredients, totalAllergens } = builtItem;
|
|
6
|
+
const { description, quantity, price, totalPrice, cals, totalCals, totalPoints, tags, allergens, groups, ingredients, totalAllergens, pos_ext_id } = builtItem;
|
|
7
7
|
const hasTags = showTags && Array.isArray(tags) && tags.length ? true : false;
|
|
8
8
|
const hasAllergens = showAllergens && Array.isArray(allergens) && allergens.length ? true : false;
|
|
9
9
|
const hasTagsAllergens = hasTags || hasAllergens ? true : false;
|
|
@@ -50,6 +50,7 @@ export const useMenuItem = (builtItem, auth, lookup, cartId, displaySettings) =>
|
|
|
50
50
|
hasTags,
|
|
51
51
|
hasAllergens,
|
|
52
52
|
hasGroups,
|
|
53
|
+
pos_ext_id,
|
|
53
54
|
sizeGroup,
|
|
54
55
|
sizeSelected,
|
|
55
56
|
nonSizeGroups,
|
|
@@ -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/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.90",
|
|
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.127",
|
|
40
40
|
"@reduxjs/toolkit": "^1.8.5",
|
|
41
41
|
"@types/google.maps": "^3.53.5",
|
|
42
42
|
"@types/jest": "^29.5.11",
|