ng-miam 3.4.6 → 3.5.2
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/bundles/ng-miam.umd.js +844 -668
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +1 -1
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_components/abstracts/abstract-recipe-card.component.js +13 -3
- package/esm2015/lib/_models/index.js +2 -1
- package/esm2015/lib/_models/ingredient.js +3 -3
- package/esm2015/lib/_models/recipe.js +2 -1
- package/esm2015/lib/_models/tag.js +22 -0
- package/esm2015/lib/_services/groceries-lists.service.js +10 -13
- package/esm2015/lib/_services/index.js +2 -1
- package/esm2015/lib/_services/recipes.service.js +13 -8
- package/esm2015/lib/_services/tags.service.js +29 -0
- package/esm2015/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.js +2 -2
- package/esm2015/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.js +162 -172
- package/esm2015/lib/_web-components/basket-preview/replace-item/replace-item.component.js +23 -34
- package/esm2015/lib/_web-components/catalog-list/catalog-list.component.js +2 -2
- package/esm2015/lib/_web-components/catalog-recipe-card/catalog-recipe-card.component.js +97 -85
- package/esm2015/lib/_web-components/order-button/order-button.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-card/recipe-card.component.js +96 -81
- package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +268 -194
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +3 -3
- package/esm2015/lib/_web-components/recipes-history/recipes-history.component.js +4 -2
- package/fesm2015/ng-miam.js +787 -654
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_components/abstracts/abstract-recipe-card.component.d.ts +2 -0
- package/lib/_models/index.d.ts +1 -0
- package/lib/_models/ingredient.d.ts +1 -1
- package/lib/_models/tag.d.ts +15 -0
- package/lib/_services/context.service.d.ts +1 -1
- package/lib/_services/groceries-lists.service.d.ts +2 -2
- package/lib/_services/index.d.ts +1 -0
- package/lib/_services/recipes.service.d.ts +4 -2
- package/lib/_services/tags.service.d.ts +14 -0
- package/lib/_web-components/basket-preview/replace-item/replace-item.component.d.ts +1 -2
- package/lib/_web-components/recipe-card/recipe-card.component.d.ts +1 -1
- package/lib/_web-components/recipe-details/recipe-details.component.d.ts +6 -2
- package/package.json +1 -1
|
@@ -25,6 +25,7 @@ export declare abstract class AbstractRecipeCardComponent implements OnDestroy {
|
|
|
25
25
|
icon: typeof Icon;
|
|
26
26
|
skeleton: typeof Skeleton;
|
|
27
27
|
isPriceDisplayed: boolean;
|
|
28
|
+
addButtonLoading: boolean;
|
|
28
29
|
protected analyticsEventSent: boolean;
|
|
29
30
|
protected subscriptions: Subscription[];
|
|
30
31
|
constructor(cdr: ChangeDetectorRef, recipeService: RecipesService, recipeEventsService: RecipeEventsService, groceriesListsService: GroceriesListsService, userService: UserService, posService: PointOfSalesService, contextService: ContextService, analyticsService: AnalyticsService, element: ElementRef);
|
|
@@ -35,6 +36,7 @@ export declare abstract class AbstractRecipeCardComponent implements OnDestroy {
|
|
|
35
36
|
toggleHelper(): void;
|
|
36
37
|
openCalendar(event: Event): void;
|
|
37
38
|
shareRecipe(event: Event): void;
|
|
39
|
+
toggleButtonLoader(value: boolean): void;
|
|
38
40
|
protected initIngredientsString(): void;
|
|
39
41
|
isInViewport(): boolean;
|
|
40
42
|
sendShowEvent(eventType?: string): boolean;
|
package/lib/_models/index.d.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Resource, DocumentResource } from 'ngx-jsonapi';
|
|
2
|
+
import { Recipe } from './recipe';
|
|
3
|
+
export declare class Tag extends Resource {
|
|
4
|
+
attributes: {
|
|
5
|
+
'tag-type-id': string;
|
|
6
|
+
name: string;
|
|
7
|
+
'icon-url': string;
|
|
8
|
+
'picture-url': string;
|
|
9
|
+
};
|
|
10
|
+
relationships: {
|
|
11
|
+
recipe: DocumentResource<Recipe>;
|
|
12
|
+
};
|
|
13
|
+
get tagType(): string;
|
|
14
|
+
get name(): string;
|
|
15
|
+
}
|
|
@@ -45,7 +45,7 @@ export declare class ContextService {
|
|
|
45
45
|
};
|
|
46
46
|
list: {
|
|
47
47
|
reset: () => import("rxjs").Subscription;
|
|
48
|
-
addRecipe: (recipeId: any, guests: any) => Observable<
|
|
48
|
+
addRecipe: (recipeId: any, guests: any) => Observable<object>;
|
|
49
49
|
hasRecipe: (recipeId: any) => Observable<boolean>;
|
|
50
50
|
};
|
|
51
51
|
pos: {
|
|
@@ -15,8 +15,8 @@ export declare class GroceriesListsService extends Service<GroceriesList> {
|
|
|
15
15
|
constructor(miamBasketURL: string, http: HttpClient, analyticsService: AnalyticsService);
|
|
16
16
|
refreshCurrentList(): Observable<GroceriesList>;
|
|
17
17
|
resetList(): Observable<GroceriesList>;
|
|
18
|
-
appendRecipeToList(recipeId: string, guests: number, openBasket?: boolean): Observable<
|
|
19
|
-
removeRecipeFromList(recipeId: string): Observable<
|
|
18
|
+
appendRecipeToList(recipeId: string, guests: number, openBasket?: boolean): Observable<object>;
|
|
19
|
+
removeRecipeFromList(recipeId: string): Observable<object>;
|
|
20
20
|
updateRecipeGuests(recipeId: string, guests: number): Observable<GroceriesList>;
|
|
21
21
|
removeRecipesFromList(): Observable<GroceriesList>;
|
|
22
22
|
addEntriesFromPicture(file: File, include?: any[]): Observable<GroceriesList>;
|
package/lib/_services/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { RecipePricing } from '../_models/recipe-pricing';
|
|
|
15
15
|
import { SponsorService } from './sponsor.service';
|
|
16
16
|
import { PointOfSalesService } from './point-of-sales.service';
|
|
17
17
|
import { PackageService } from './package.service';
|
|
18
|
+
import { TagsService } from './tags.service';
|
|
18
19
|
import * as i0 from "@angular/core";
|
|
19
20
|
interface RecipeDisplay {
|
|
20
21
|
previewAllowed: boolean;
|
|
@@ -34,6 +35,7 @@ export declare class RecipesService extends Service<Recipe> {
|
|
|
34
35
|
private recipeEventsService;
|
|
35
36
|
private sponsorService;
|
|
36
37
|
private packageService;
|
|
38
|
+
private tagsService;
|
|
37
39
|
resource: typeof Recipe;
|
|
38
40
|
type: string;
|
|
39
41
|
displayedRecipe$: BehaviorSubject<RecipeDisplay>;
|
|
@@ -43,9 +45,9 @@ export declare class RecipesService extends Service<Recipe> {
|
|
|
43
45
|
private randomSeed;
|
|
44
46
|
private pageNumber;
|
|
45
47
|
private recipes;
|
|
46
|
-
constructor(http: HttpClient, providerService: RecipeProviderService, statusService: RecipeStatusService, typeService: RecipeTypeService, suppliersService: SuppliersService, posService: PointOfSalesService, listsService: GroceriesListsService, ingredientsService: IngredientsService, recipeStepsService: RecipeStepsService, recipeEventsService: RecipeEventsService, sponsorService: SponsorService, packageService: PackageService);
|
|
48
|
+
constructor(http: HttpClient, providerService: RecipeProviderService, statusService: RecipeStatusService, typeService: RecipeTypeService, suppliersService: SuppliersService, posService: PointOfSalesService, listsService: GroceriesListsService, ingredientsService: IngredientsService, recipeStepsService: RecipeStepsService, recipeEventsService: RecipeEventsService, sponsorService: SponsorService, packageService: PackageService, tagsService: TagsService);
|
|
47
49
|
loadRecipes(): Observable<Recipe[]>;
|
|
48
|
-
getOrCreate(recipe: any, openBasket?: boolean): Observable<
|
|
50
|
+
getOrCreate(recipe: any, openBasket?: boolean): Observable<object>;
|
|
49
51
|
getRandom(page?: {
|
|
50
52
|
number: number;
|
|
51
53
|
size: number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Service } from 'ngx-jsonapi';
|
|
3
|
+
import { Tag } from '../_models/tag';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TagsService extends Service<Tag> {
|
|
7
|
+
private http;
|
|
8
|
+
resource: typeof Tag;
|
|
9
|
+
type: string;
|
|
10
|
+
constructor(http: HttpClient);
|
|
11
|
+
autocomplete(searchStr: string): Observable<any>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDef<TagsService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDef<TagsService>;
|
|
14
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, EventEmitter,
|
|
1
|
+
import { OnInit, EventEmitter, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { BasketPreviewLine } from '../../../_models/basket-preview-line';
|
|
3
3
|
import { Item } from '../../../_models/item';
|
|
4
4
|
import { Icon } from '../../../_types/icon.enum';
|
|
@@ -15,7 +15,6 @@ export declare class ReplaceItemComponent implements OnInit {
|
|
|
15
15
|
currentItem: any;
|
|
16
16
|
icon: typeof Icon;
|
|
17
17
|
constructor(cdr: ChangeDetectorRef, basketsService: BasketsService, analyticsService: AnalyticsService);
|
|
18
|
-
itemsListElement: ElementRef;
|
|
19
18
|
ngOnInit(): void;
|
|
20
19
|
onClose(): void;
|
|
21
20
|
onSelectItem(item: Item): void;
|
|
@@ -24,7 +24,7 @@ export declare class RecipeCardComponent extends AbstractRecipeCardComponent imp
|
|
|
24
24
|
guestsChanged: EventEmitter<number>;
|
|
25
25
|
isloaded: boolean;
|
|
26
26
|
cardType: string;
|
|
27
|
-
primaryButtonClicked$: EventEmitter<
|
|
27
|
+
primaryButtonClicked$: EventEmitter<boolean>;
|
|
28
28
|
constructor(cdr: ChangeDetectorRef, recipeService: RecipesService, recipeEventsService: RecipeEventsService, groceriesListsService: GroceriesListsService, userService: UserService, pointOfSalesService: PointOfSalesService, contextService: ContextService, analyticsService: AnalyticsService, element: ElementRef);
|
|
29
29
|
ngOnChanges(): void;
|
|
30
30
|
recipeWasLoaded(): void;
|
|
@@ -18,10 +18,12 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
|
|
|
18
18
|
forceIngredientsStepstoggle: any;
|
|
19
19
|
previewAllowed: boolean;
|
|
20
20
|
ingredientsPictures: boolean;
|
|
21
|
+
displayTags: boolean;
|
|
22
|
+
displayTagsIcons: boolean;
|
|
21
23
|
recipeAdded: EventEmitter<void>;
|
|
22
24
|
recipeChanged: EventEmitter<void>;
|
|
23
25
|
recipeError: EventEmitter<void>;
|
|
24
|
-
primaryButtonClicked$: EventEmitter<
|
|
26
|
+
primaryButtonClicked$: EventEmitter<boolean>;
|
|
25
27
|
topContainerImg: ElementRef;
|
|
26
28
|
mainContainer: ElementRef;
|
|
27
29
|
isMobile: boolean;
|
|
@@ -37,6 +39,7 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
|
|
|
37
39
|
playerHeight: any;
|
|
38
40
|
showVideo: any;
|
|
39
41
|
scrollListenerInitialised: boolean;
|
|
42
|
+
addButtonLoading: boolean;
|
|
40
43
|
protected subscriptions: Subscription[];
|
|
41
44
|
constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher, groceriesListsService: GroceriesListsService, userService: UserService, posService: PointOfSalesService, recipeEventsService: RecipeEventsService, contextService: ContextService);
|
|
42
45
|
ngOnChanges(): void;
|
|
@@ -56,7 +59,8 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
|
|
|
56
59
|
shareRecipe(event: Event): void;
|
|
57
60
|
toggleAddon(): void;
|
|
58
61
|
toggleShowIngredient(isShowed: boolean): void;
|
|
62
|
+
toggleButtonLoader(value: boolean): void;
|
|
59
63
|
ingredientPicture(ingredient: SimplifiedIngredient): string;
|
|
60
64
|
static ɵfac: i0.ɵɵFactoryDef<RecipeDetailsComponent, never>;
|
|
61
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsComponent, "ng-miam-recipe-details", never, { "recipe": "recipe"; "forceIngredientsStepstoggle": "forceIngredientsStepstoggle"; "previewAllowed": "previewAllowed"; "ingredientsPictures": "ingredientsPictures"; }, { "recipeAdded": "recipeAdded"; "recipeChanged": "recipeChanged"; "recipeError": "recipeError"; }, never, never>;
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsComponent, "ng-miam-recipe-details", never, { "recipe": "recipe"; "forceIngredientsStepstoggle": "forceIngredientsStepstoggle"; "previewAllowed": "previewAllowed"; "ingredientsPictures": "ingredientsPictures"; "displayTags": "displayTags"; "displayTagsIcons": "displayTagsIcons"; }, { "recipeAdded": "recipeAdded"; "recipeChanged": "recipeChanged"; "recipeError": "recipeError"; }, never, never>;
|
|
62
66
|
}
|