@open-tender/utils 0.1.121 → 0.1.122

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 CHANGED
Binary file
@@ -8,8 +8,8 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
8
8
  showImage: boolean;
9
9
  showDescription: boolean;
10
10
  hasCals: boolean;
11
- hasIngredients: boolean | "" | null;
12
- hasInfo: boolean | "" | null;
11
+ hasIngredients: boolean;
12
+ hasInfo: boolean;
13
13
  allergenAlert: boolean;
14
14
  bgStyle: {
15
15
  backgroundImage: string;
@@ -21,7 +21,7 @@ const useModifier = (group, option, levels = [], toggleOption, incrementOption,
21
21
  const cals = showCals ? option.cals : null;
22
22
  const allergens = showAllergens ? option.allergens : [];
23
23
  const tags = showTags ? option.tags : [];
24
- const hasIngredients = option.ingredients && option.ingredients.length > 0;
24
+ const hasIngredients = option.ingredients && option.ingredients.length > 0 ? true : false;
25
25
  const hasCals = cals !== null;
26
26
  const itemAllergens = allergens && allergens.length
27
27
  ? allergens.filter(allergen => allergenAlerts.includes(allergen))
@@ -154,7 +154,7 @@ const makeWelcome = (welcome) => {
154
154
  };
155
155
  const makeItem = (item) => {
156
156
  const { mobile } = item;
157
- return Object.assign(Object.assign({}, mobile), { padding: (0, exports.remsToPixels)(mobile.padding), imagePadding: (0, exports.remsToPixels)(mobile.imagePadding), maxWidth: (0, exports.remsToPixels)(mobile.maxWidth), imageMinHeight: (0, exports.remsToPixels)(mobile.imageMinHeight), imageMaxHeight: (0, exports.remsToPixels)(mobile.imageMaxHeight) });
157
+ return Object.assign(Object.assign({}, mobile), { imageMargin: boxRemsToPixels(mobile.imageMargin), imageMaxHeight: (0, exports.remsToPixels)(mobile.imageMaxHeight), imageMinHeight: (0, exports.remsToPixels)(mobile.imageMinHeight), imagePadding: (0, exports.remsToPixels)(mobile.imagePadding), imagePaddingAll: boxRemsToPixels(mobile.imagePaddingAll), maxWidth: (0, exports.remsToPixels)(mobile.maxWidth), padding: (0, exports.remsToPixels)(mobile.padding) });
158
158
  };
159
159
  const makeCategories = (categories) => {
160
160
  const { mobile } = categories;
@@ -8,8 +8,8 @@ export declare const useModifier: (group: CartItemGroup, option: CartItemOption,
8
8
  showImage: boolean;
9
9
  showDescription: boolean;
10
10
  hasCals: boolean;
11
- hasIngredients: boolean | "" | null;
12
- hasInfo: boolean | "" | null;
11
+ hasIngredients: boolean;
12
+ hasInfo: boolean;
13
13
  allergenAlert: boolean;
14
14
  bgStyle: {
15
15
  backgroundImage: string;
@@ -18,7 +18,7 @@ export const useModifier = (group, option, levels = [], toggleOption, incrementO
18
18
  const cals = showCals ? option.cals : null;
19
19
  const allergens = showAllergens ? option.allergens : [];
20
20
  const tags = showTags ? option.tags : [];
21
- const hasIngredients = option.ingredients && option.ingredients.length > 0;
21
+ const hasIngredients = option.ingredients && option.ingredients.length > 0 ? true : false;
22
22
  const hasCals = cals !== null;
23
23
  const itemAllergens = allergens && allergens.length
24
24
  ? allergens.filter(allergen => allergenAlerts.includes(allergen))
@@ -145,7 +145,7 @@ const makeWelcome = (welcome) => {
145
145
  };
146
146
  const makeItem = (item) => {
147
147
  const { mobile } = item;
148
- return Object.assign(Object.assign({}, mobile), { padding: remsToPixels(mobile.padding), imagePadding: remsToPixels(mobile.imagePadding), maxWidth: remsToPixels(mobile.maxWidth), imageMinHeight: remsToPixels(mobile.imageMinHeight), imageMaxHeight: remsToPixels(mobile.imageMaxHeight) });
148
+ return Object.assign(Object.assign({}, mobile), { imageMargin: boxRemsToPixels(mobile.imageMargin), imageMaxHeight: remsToPixels(mobile.imageMaxHeight), imageMinHeight: remsToPixels(mobile.imageMinHeight), imagePadding: remsToPixels(mobile.imagePadding), imagePaddingAll: boxRemsToPixels(mobile.imagePaddingAll), maxWidth: remsToPixels(mobile.maxWidth), padding: remsToPixels(mobile.padding) });
149
149
  };
150
150
  const makeCategories = (categories) => {
151
151
  const { mobile } = categories;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.1.121",
3
+ "version": "0.1.122",
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",