@lyxa.ai/types 1.4.230 → 1.4.232
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/README.md
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isGroceryFamilyItemType = isGroceryFamilyItemType;
|
|
4
4
|
exports.getProductDietariesByItemType = getProductDietariesByItemType;
|
|
5
5
|
const enum_1 = require("../enum");
|
|
6
|
-
const GROCERY_FAMILY_ITEM_TYPES = [enum_1.ItemType.GROCERY, enum_1.ItemType.PET];
|
|
6
|
+
const GROCERY_FAMILY_ITEM_TYPES = [enum_1.ItemType.GROCERY, enum_1.ItemType.PET, enum_1.ItemType.WELLNESS, enum_1.ItemType.ELECTRONICS, enum_1.ItemType.BEAUTY];
|
|
7
7
|
function isGroceryFamilyItemType(itemType) {
|
|
8
8
|
return GROCERY_FAMILY_ITEM_TYPES.includes(itemType);
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-methods.js","sourceRoot":"/","sources":["utilities/shared/common-methods.ts"],"names":[],"mappings":";;AAIA,0DAEC;AAED,sEAmBC;AA3BD,kCAAuD;AAEvD,MAAM,yBAAyB,GAAe,CAAC,eAAQ,CAAC,OAAO,EAAE,eAAQ,CAAC,GAAG,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"common-methods.js","sourceRoot":"/","sources":["utilities/shared/common-methods.ts"],"names":[],"mappings":";;AAIA,0DAEC;AAED,sEAmBC;AA3BD,kCAAuD;AAEvD,MAAM,yBAAyB,GAAe,CAAC,eAAQ,CAAC,OAAO,EAAE,eAAQ,CAAC,GAAG,EAAE,eAAQ,CAAC,QAAQ,EAAE,eAAQ,CAAC,WAAW,EAAE,eAAQ,CAAC,MAAM,CAAU,CAAC;AAElJ,SAAgB,uBAAuB,CAAC,QAAkB;IACtD,OAAO,yBAAyB,CAAC,QAA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AE,sFAAsF,EAAE,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,yBAAkB,CAAC,OAAO,EAAE;SACrK,CAAC;IACN,CAAC;AACL,CAAC","sourcesContent":["import { ItemType, ProductDietaryType } from \"../enum\";\n\nconst GROCERY_FAMILY_ITEM_TYPES: ItemType[] = [ItemType.GROCERY, ItemType.PET, ItemType.WELLNESS, ItemType.ELECTRONICS, ItemType.BEAUTY] as const;\n\nexport function isGroceryFamilyItemType(itemType: ItemType): boolean {\n return GROCERY_FAMILY_ITEM_TYPES.includes(itemType);\n}\n\nexport function getProductDietariesByItemType(itemType: ItemType): { icon: string, label: string, productDietaryType: ProductDietaryType }[] {\n if (isGroceryFamilyItemType(itemType)) {\n return [\n { icon: '', label: 'Gluten Free', productDietaryType: ProductDietaryType.GLUTEN_FREE },\n { icon: '', label: 'Lactose Free', productDietaryType: ProductDietaryType.LACTOSE_FREE },\n { icon: '', label: 'Low Cal', productDietaryType: ProductDietaryType.LOW_CAL },\n { icon: 'https://storage.googleapis.com/lyxa-global/product-dietary-icons/vegetarian.png', label: 'Vegetarian', productDietaryType: ProductDietaryType.VEGETARIAN },\n { icon: 'https://storage.googleapis.com/lyxa-global/product-dietary-icons/vegan.png', label: 'Vegan', productDietaryType: ProductDietaryType.VEGAN },\n { icon: '', label: 'Keto', productDietaryType: ProductDietaryType.KETO },\n { icon: '', label: 'High Protein', productDietaryType: ProductDietaryType.HIGH_PROTEIN }\n ];\n } else {\n return [\n { icon: 'https://storage.googleapis.com/lyxa-global/product-dietary-icons/vegetarian.png', label: 'Vegeterian', productDietaryType: ProductDietaryType.VEGETARIAN },\n { icon: 'https://storage.googleapis.com/lyxa-global/product-dietary-icons/vegan.png', label: 'Vegan', productDietaryType: ProductDietaryType.VEGAN },\n { icon: 'https://storage.googleapis.com/lyxa-global/product-dietary-icons/glutenFree.png', label: 'Gluten Free', productDietaryType: ProductDietaryType.GLUTEN_FREE },\n { icon: 'https://storage.googleapis.com/lyxa-global/product-dietary-icons/allergyFriendly.png', label: 'Low Cal', productDietaryType: ProductDietaryType.LOW_CAL }\n ];\n }\n}"]}
|