@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 +0 -0
- package/dist/cjs/hooks/useModifier.d.ts +2 -2
- package/dist/cjs/hooks/useModifier.js +1 -1
- package/dist/cjs/utils/theme.js +1 -1
- package/dist/esm/hooks/useModifier.d.ts +2 -2
- package/dist/esm/hooks/useModifier.js +1 -1
- package/dist/esm/utils/theme.js +1 -1
- package/package.json +1 -1
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
|
|
12
|
-
hasInfo: boolean
|
|
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))
|
package/dist/cjs/utils/theme.js
CHANGED
|
@@ -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), {
|
|
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
|
|
12
|
-
hasInfo: boolean
|
|
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))
|
package/dist/esm/utils/theme.js
CHANGED
|
@@ -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), {
|
|
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