Updated View Templates
Catalog
Recipe Card
3.X
var recipeCardTemplate: (@Composable() (recipe: Recipe, vmRecipe: RecipeViewModel, look: () -> Unit, buy: () -> Unit) -> Unit)?4.X
interface RecipeCardSuccess {
@Composable
fun Content(params: RecipeCardSuccessParams)
}where
data class RecipeCardSuccessParams(
val recipe: Recipe,
val recipeTitle: String,
val recipePicture: String,
val isInShelve: Boolean,
val goToDetail: () -> Unit,
val guest: `MutableStateFlow<Int>`,
val isInCart: Boolean,
val isSponsor: Boolean,
val sponsorLogo: String?,
val likeIsEnabled: Boolean
)
Recipe Card Loading
3.X
var recipeLoaderTemplate: (@Composable() () -> Unit)?4.X
interface RecipeCardLoading {
@Composable
fun Content()
}
Catalog Loading
3.X
var CatalogResultPageLoadingTemplate: (@Composable() () -> Unit)?4.X
interface _Loading {
@Composable
fun Content()
}
Catalog Categories Empty
3.X
var CatalogCategoriesEmptyTemplate: (@Composable() (action: () -> Unit,) -> Unit)?4.X
Removed
Catalog Search
3.X
var CatalogSearchTemplate: (@Composable() (currentSearchValue: String, updateResearch: (newSearchValue: String) -> Unit,
closeDialog: () -> Unit, goToResultPage: () -> Unit) -> Unit)?4.X
interface CatalogSuccessSearch {
@Composable
fun Content(params: CatalogSuccessSearchParameters)
}where
data class CatalogSuccessSearchParameters(
val onClose: () -> Unit,
val updateSearch: (String) -> Unit,
val onApply: () -> Unit,
)
Catalog Category
3.X
var CatalogCategoryTemplate: (@Composable() (context: Context, category: Package, recipesID: List<String>,
goToCategoryPage: (category: Package) -> Unit) -> Unit)?4.X
interface CatalogCategoriesPageCategory {
@Composable
fun Content(param: CatalogCategoriesPageCategoryParameters)
}where
data class CatalogCategoriesPageCategoryParameters(
val category: Package,
val recipesId: `List<String>`,
val goToCategoryPage: (category: Package) -> Unit
)
Catalog Header
3.X
var CatalogHeader: (@Composable() (openFilter: () -> Unit, openSearch: () -> Unit, openPreferences: () -> Unit, goToFavorite: () -> Unit,
goBackTOCatalog: () -> Unit, getActiveFilterCount: () -> Int, isMainPage: Boolean, isFavorite: Boolean) -> Unit)?4.X
Removed
Catalog Toolbar
3.X
Added in 4.04.X
interface CatalogSuccessToolbar {
@Composable
fun Content(params: CatalogSuccessToolbarParameters)
}where
data class CatalogSuccessToolbarParameters(
val content: CatalogContent,
val openFilter: () -> Unit,
val openSearch: () -> Unit,
val goToFavorite: () -> Unit,
val openPreferences: () -> Unit,
val getActiveFilterCount: () -> Int,
val goToBack: () -> Unit
)
My Meal Button
3.X
var myMealButtonSuccessViewTemplate: (@Composable() (
recipeCount: Int, onclick: () -> Unit) -> Unit)?4.X
interface CatalogFloating {
@Composable
fun Content(params: CatalogFloatingParameters)
}where
data class CatalogFloatingParameters(
val onClickAction: () -> Unit
)
Recipes List Title
3.X
var CatalogPageTitleTemplate: (@Composable() (parameters: CatalogPageTitleTemplateParameters,) -> Unit)?4.X
Removed
Recipes Category List Title
3.X
var CatalogCategoryTitleTemplate: (@Composable() (parameters: CatalogPageTitleTemplateParameters,) -> Unit)?4.X
Removed
Recipes Search Title
3.X
var CatalogSearchTitleTemplate: (@Composable() (parameters: CatalogPageTitleTemplateParameters,) -> Unit)?4.X
Removed
Catalog Favorites Empty
3.X
var CatalogFavoritEmptyTemplate: (@Composable() (returnToCatalog: () -> Unit) -> Unit)?4.X
Removed
Catalog Search Results Empty
3.X
var CatalogSearchResultEmptyTemplate: (@Composable() (returnToCatalog: () -> Unit, pageTitle: String) -> Unit)?4.X
Removed
Filters
Filters View
3.X
var CatalogFilterTemplate: (@Composable() (difficulties: List<CatalogFilterOptions>, costs: List<CatalogFilterOptions>,
times: List<CatalogFilterOptions>, onCostFilterChanged: (option: CatalogFilterOptions) -> Unit,
onTimeFilterChanged: (option: CatalogFilterOptions) -> Unit, onDifficultyChanged: (option: CatalogFilterOptions) -> Unit,
clearFilter: () -> Unit, goToFilterResult: () -> Unit, closeDialog: () -> Unit,) -> Unit)?4.X
interface FilterSuccess {
@Composable
fun Content(params: FilterSuccessParameters)
}where
data class FilterSuccessParameters(
val difficulties: `List<CatalogFilterOptions>`,
val costs: `List<CatalogFilterOptions>`,
val times: `List<CatalogFilterOptions>`,
val onCostFilterChanged: (option: CatalogFilterOptions) -> Unit,
val onTimeFilterChanged: (option: CatalogFilterOptions) -> Unit,
val onDifficultyChanged: (option: CatalogFilterOptions) -> Unit,
val clearFilter: () -> Unit,
val closeDialog: () -> Unit,
val applyAndGo: () -> Unit,
val numberOfResult: Int
)
Favorites
Success
3.X
favoritesSuccessViewTemplate: (([Recipe], @escaping () -> Void) -> AnyView)?4.X
interface LazyListLoader {
@Composable
fun Content(params: LazyListLoaderParameters)
}where
class LazyListLoaderParameters(val isFetching: Boolean)
Empty
3.X
var emptyFavoritePage: (@Composable() (visitCatalog: () -> Unit,) -> Unit)?4.X
interface EmptyPage {
@Composable
fun Content(params: EmptyPageParameters)
}
My Meals
Action Column
3.X
var myMealRecipeExpendableAction: (@Composable() (isExpended: Boolean, expend: () -> Unit, removeRecipe: () -> Unit,) -> Unit)?4.X
Removed
Loading
3.X
var myMealLoaderTemplate: (@Composable() () -> Unit)?4.X
interface _Loading {
@Composable
fun Content()
}
Empty
3.X
var myMealEmptyTemplate: (@Composable() (onButtonClickedWhenEmpty: () -> Unit) -> Unit)?4.X
interface EmptyPage {
@Composable
fun Content(params: EmptyPageParameters)
}
Preferences
Loading
3.X
var PreferencesLoadingTemplate: (@Composable() () -> Unit)?4.X
interface _Loading {
@Composable
fun Content()
}
Search Result Row
3.X
var SearchResultRowPreferencesTemplate: (@Composable() (select: () -> Unit, name: String,) -> Unit)?4.X
interface PreferencesSearchResultRow {
@Composable
fun Content(param: PreferencesSearchResultRowParameters)
}where
data class PreferencesSearchResultRowParameters(
val name: String,
val select: () -> Unit
)
Footer
3.X
var PreferencesFooterTemplate: (@Composable() (closePref: () -> Unit, applyPref: () -> Unit, recipesFound: Int) -> Unit)?4.X
interface PreferencesFooter {
@Composable
fun Content(params: PreferencesFooterParameters)
}where
data class PreferencesFooterParameters(
val recipesFound: Int,
val closePref: () -> Unit,
val applyPref: () -> Unit
)
Search
3.X
var SearchPreferencesTemplate: (@Composable() (
back: () -> Unit, text: TextFieldValue, onChange: (value: TextFieldValue) -> Unit) -> Unit)?4.X
interface PreferencesSearchField {
@Composable
fun Content(param: PreferencesSearchFieldParameters)
}where
data class PreferencesSearchFieldParameters(
val back: () -> Unit,
val onChange: (value: String) -> Unit
)
Diet
3.X
var DietPreferencesSectionTemplate: (@Composable() (dietsTag: List<CheckableTag>, togglePreference: (tagIdToToogle: String) -> Unit) -> Unit)?4.X
interface PreferencesDietSection {
@Composable
fun Content(params: PreferencesDietSectionParameters)
}where
data class PreferencesDietSectionParameters(
val dietsTag: `List<CheckableTag>`,
val togglePreference: (tagIdToToggle: String) -> Unit
)
Equipment
3.X
var EquipmentPreferencesSectionTemplate: (@Composable() (
equipmentsTag: List<CheckableTag>, togglePreference: (tagIdToToogle: String) -> Unit) -> Unit)?4.X
interface PreferencesEquipmentSection {
@Composable
fun Content(params: PreferencesEquipmentSectionParameters)
}where
data class PreferencesEquipmentSectionParameters(
val equipmentsTag: `List<CheckableTag>`,
val togglePreference: (tagIdToToggle: String) -> Unit
)
Guest
3.X
var GuestPreferencesSectionTemplate: (@Composable() (guests: Int?, guestChanged: (count: Int) -> Unit) -> Unit)?4.X
interface PreferencesGuestSection {
@Composable
fun Content(params: PreferencesGuestSectionParameters)
}where
data class PreferencesGuestSectionParameters(
val guests: Int?,
val guestChanged: (count: Int) -> Unit
)
Ingredients
3.X
var IngredientPreferencesSectionTemplate: (@Composable() (
ingredientsTag: List<CheckableTag>, togglePreference: (tagIdToToogle: String) -> Unit,
back: () -> Unit, goToSearch: () -> Unit) -> Unit)?4.X
interface PreferencesIngredientSection {
@Composable
fun Content(params: PreferencesIngredientSectionParameters)
}where
data class PreferencesIngredientSectionParameters(
val ingredientsTag: `List<CheckableTag>`,
val togglePreference: (tagIdToToggle: String) -> Unit,
val goToSearch: () -> Unit
)
Search Loading
3.X
var SearchPreferencesLoadingTemplate: (@Composable() () -> Unit)?4.X
interface _Loading {
@Composable
fun Content()
}
Search Empty
3.X
var SearchPreferencesEmptyTemplate: (@Composable() () -> Unit)?4.X
interface EmptyPage {
@Composable
fun Content(params: EmptyPageParameters)
}
Item Selector
Current Product
3.X
var currentProductTemplate: (@Composable() (selectedItem: BasketPreviewLine) -> Unit)?4.X
interface ItemSelectorSelectedItem {
@Composable
fun Content(params: ItemSelectorSelectedItemParameters)
}where
data class ItemSelectorSelectedItemParameters(val selectedItem: Item)
Product Options
3.X
var productOptionListTemplate: (@Composable() (options: List<BasketPreviewLine>, choose: (index: Int) -> Unit) -> Unit)?4.X
interface ItemSelectorSuccess {
@Composable
fun Content(params: ItemSelectorSuccessParameters)
}where
data class ItemSelectorSuccessParameters(
val items: `List<Item>`,
val previous: () -> Unit,
val select: (Item) -> Unit
)
Loading
3.X
var itemSelectorLoadingTemplate: (@Composable() (back: () -> Unit) -> Unit)?4.X
interface _Loading {
@Composable
fun Content()
}
Empty
3.X
var itemSelectorEmptyTemplate: (@Composable() (back: () -> Unit) -> Unit)?4.X
interface EmptyPage {
@Composable
fun Content(params: EmptyPageParameters)
}
Recipe Details
Title
3.X
recipeDetailsTitleBarTemplate: ((Bool, String) -> AnyView)?4.X
Removed
Header
3.X
var recipeDetailHeaderTemplate: (@Composable() (closeDetail: () -> Unit, recipe: Recipe) -> Unit)?4.X
interface RecipeDetailHeader {
@Composable
fun Content(params: RecipeDetailHeaderParameters)
}where
data class RecipeDetailHeaderParameters(
val title: String,
val closeDialogue: () -> Unit
)
Ingredients
3.X
var recipeDetailIngredientTemplate: (@Composable() (recipe: Recipe, vmRecipe: RecipeViewModel) -> Unit)?4.X
interface Ingredients {
@Composable
fun Content(params: IngredientsParameters)
}where
data class IngredientsParameters(
val ingredients: `List<Ingredient>`,
val guestsCount: Int,
val defaultRecipeGuest: Int
)
Steps
3.X
var recipeDetailStepsTemplate: (@Composable() (steps: List<RecipeStep>,vmRecipe: RecipeViewModel) -> Unit)?4.X
interface RecipeDetailSteps {
@Composable
fun Content(params: RecipeDetailStepsParamters)
}where
data class RecipeDetailStepsParamters(
val steps: `List<RecipeStep>`
)
Footer
3.X
var recipeDetailFooterTemplate: (@Composable() (recipe: Recipe, vmRecipe: RecipeViewModel, look: () -> Unit,
buy: () -> Unit) -> Unit)? = null4.X
interface RecipeDetailSuccessFooter {
@Composable
fun Content(params: RecipeDetailSuccessFooterParameters)
}where
data class RecipeDetailSuccessFooterParameters(
val price: `StateFlow<Double>`,
val priceStatus: ComponentUiState,
val ingredientsStatus: IngredientStatus,
val isButtonLock: `StateFlow<Boolean>`,
val onConfirm: () -> Unit
)
Products have moved to The Recipe Details
Product Success
3.X
Added in 4.04.X
interface ProductSuccess {
@Composable
fun Content(params: ProductSuccessParameters)
}where
data class ProductSuccessParameters(
val productName: String,
val productBrand: String,
val productQuantity: Int,
val productCapacityVolume: String,
val productUnit: String,
val productPrice: String,
val productImage: String,
val ingredientName: String,
val ingredientQuantity: String,
val ingredientUnit: String,
val guestsCount: `MutableStateFlow<Int>`,
val defaultRecipeGuest: Int,
val numberOfRecipeConcernsByProduct: Int,
val isLocked: Boolean,
val isSponsored: Boolean,
val isInBasket: Boolean,
val ean: String,
val replaceProduct: () -> Unit,
val ignoreProduct: () -> Unit,
val addProduct: () -> Unit,
val updateProductQuantity: (Int) -> Unit
)```
Ignored Product
3.X
Added in 4.04.X
interface ProductIgnore {
@Composable
fun Content(params: ProductIgnoreParameters)
}where
data class ProductIgnoreParameters(
val ingredientName: String,
val ingredientQuantity: String,
val ingredientUnit: String,
val guestsCount: `MutableStateFlow<Int>`,
val defaultRecipeGuest: Int,
val chooseProduct: () -> Unit
)