@open-tender/utils 0.4.22 → 0.4.24

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/.DS_Store ADDED
Binary file
@@ -6,7 +6,6 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
6
6
  displayPrice: string;
7
7
  displayCals: number | null;
8
8
  totalPoints: number | null;
9
- totalAllergens: string[];
10
9
  auth: Auth | null;
11
10
  favoriteId: number | null;
12
11
  isIncomplete: boolean;
@@ -39,17 +39,12 @@ const useMenuItem = (builtItem, auth, lookup, cartId, displaySettings) => {
39
39
  const hasIngredients = ingredients && ingredients.length > 0;
40
40
  const hasCals = displayCals !== null;
41
41
  const hasInfo = hasCals || hasIngredients;
42
- const modifiersAllergens = currentOptions.reduce((t, o) => {
43
- return [...t, ...o.allergens];
44
- }, []);
45
- const totalAllergens = [...new Set(allergens.concat(modifiersAllergens))];
46
42
  return Object.assign(Object.assign({}, builtItem), { description,
47
43
  tags,
48
44
  allergens,
49
45
  displayPrice,
50
46
  displayCals,
51
47
  totalPoints,
52
- totalAllergens,
53
48
  auth,
54
49
  favoriteId,
55
50
  isIncomplete,
@@ -6,7 +6,6 @@ export declare const useMenuItem: (builtItem: CartItem, auth: Auth | null, looku
6
6
  displayPrice: string;
7
7
  displayCals: number | null;
8
8
  totalPoints: number | null;
9
- totalAllergens: string[];
10
9
  auth: Auth | null;
11
10
  favoriteId: number | null;
12
11
  isIncomplete: boolean;
@@ -36,17 +36,12 @@ export const useMenuItem = (builtItem, auth, lookup, cartId, displaySettings) =>
36
36
  const hasIngredients = ingredients && ingredients.length > 0;
37
37
  const hasCals = displayCals !== null;
38
38
  const hasInfo = hasCals || hasIngredients;
39
- const modifiersAllergens = currentOptions.reduce((t, o) => {
40
- return [...t, ...o.allergens];
41
- }, []);
42
- const totalAllergens = [...new Set(allergens.concat(modifiersAllergens))];
43
39
  return Object.assign(Object.assign({}, builtItem), { description,
44
40
  tags,
45
41
  allergens,
46
42
  displayPrice,
47
43
  displayCals,
48
44
  totalPoints,
49
- totalAllergens,
50
45
  auth,
51
46
  favoriteId,
52
47
  isIncomplete,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.4.22",
3
+ "version": "0.4.24",
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.34",
39
+ "@open-tender/types": "^0.4.46",
40
40
  "@reduxjs/toolkit": "^1.8.5",
41
41
  "@types/google.maps": "^3.53.5",
42
42
  "@types/jest": "^29.5.11",