ng-miam 3.4.0 → 3.4.4

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.
@@ -6,7 +6,9 @@ export declare class Ingredient extends Resource {
6
6
  unit: string;
7
7
  active: boolean;
8
8
  'forced-eans': any[];
9
+ picture: string;
9
10
  };
10
11
  relationships: any;
11
12
  get quantity(): string;
13
+ get picture(): string;
12
14
  }
@@ -8,6 +8,7 @@ interface SimplifiedIngredient {
8
8
  name: string;
9
9
  qty: number;
10
10
  unit: string;
11
+ picture: string;
11
12
  }
12
13
  export declare class Recipe extends Resource {
13
14
  attributes: {
@@ -31,6 +31,7 @@ export declare class ContextService {
31
31
  videoRecipesEnabled: boolean;
32
32
  articlesInCatalogEnabled: boolean;
33
33
  hookCallback: (isLogged: any, isPosValid: any) => boolean;
34
+ defaultIngredientPicture: string;
34
35
  private CORSIssues;
35
36
  private isSmallScreen$;
36
37
  miam: {
@@ -72,6 +73,7 @@ export declare class ContextService {
72
73
  display: (id: any, previewAllowed?: boolean, previewMode?: boolean) => void;
73
74
  hidden: import("@angular/core").EventEmitter<boolean>;
74
75
  search: (provider: any, query: any) => Observable<import("../_models").Recipe[]>;
76
+ setDefaultIngredientPicture: (url: string) => void;
75
77
  };
76
78
  analytics: {
77
79
  init: (gaKey: string, optimizeKey?: string) => void;
@@ -1,7 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class ToastrService {
3
3
  constructor();
4
- info(message: any, title?: any, options?: any): void;
4
+ info(message: any, title?: any, options?: {}): void;
5
5
  private injectJquery;
6
6
  private injectScript;
7
7
  private injectCss;
@@ -16,7 +16,7 @@ export declare class BasketPreviewLineComponent implements OnInit, OnDestroy {
16
16
  protected posService: PointOfSalesService;
17
17
  protected userService: UserService;
18
18
  private contextService;
19
- private elementRef;
19
+ elementRef: ElementRef;
20
20
  line: BasketPreviewLine;
21
21
  uniqueLine: boolean;
22
22
  blockStates: BehaviorSubject<{
@@ -4,6 +4,7 @@ import { Icon } from '../../_types/icon.enum';
4
4
  import { ContextService, GroceriesListsService, PointOfSalesService, RecipeEventsService, UserService } from '../../_services';
5
5
  import { BehaviorSubject, Subscription } from 'rxjs';
6
6
  import { MediaMatcher } from '@angular/cdk/layout';
7
+ import { Ingredient } from '../../_models';
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class RecipeDetailsComponent implements OnChanges, AfterViewChecked {
9
10
  cdr: ChangeDetectorRef;
@@ -14,12 +15,14 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
14
15
  private recipeEventsService;
15
16
  contextService: ContextService;
16
17
  recipe: Recipe;
17
- forceIngredientsStepstoggle: boolean;
18
+ forceIngredientsStepstoggle: any;
18
19
  previewAllowed: boolean;
20
+ ingredientsPictures: boolean;
19
21
  recipeAdded: EventEmitter<void>;
20
22
  recipeChanged: EventEmitter<void>;
21
23
  recipeError: EventEmitter<void>;
22
24
  topContainerImg: ElementRef;
25
+ mainContainer: ElementRef;
23
26
  isMobile: boolean;
24
27
  tab: number;
25
28
  showDetail: boolean;
@@ -32,11 +35,15 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
32
35
  playerWidth: any;
33
36
  playerHeight: any;
34
37
  showVideo: any;
38
+ scrollListenerInitialised: boolean;
35
39
  protected subscriptions: Subscription[];
36
40
  constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher, groceriesListsService: GroceriesListsService, userService: UserService, posService: PointOfSalesService, recipeEventsService: RecipeEventsService, contextService: ContextService);
37
- onScroll($event: any): void;
38
41
  ngOnChanges(): void;
39
42
  ngAfterViewChecked(): void;
43
+ /**
44
+ * Init the listener on scroll so the modal can hide the close icon
45
+ */
46
+ initScrollListener(): void;
40
47
  changeActiveStep(index: number): void;
41
48
  addRecipe(): void;
42
49
  addRecipeActionOK(): void;
@@ -47,6 +54,7 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
47
54
  shareRecipe(event: Event): void;
48
55
  toggleAddon(): void;
49
56
  toggleShowIngredient(isShowed: boolean): void;
57
+ ingredientPicture(ingredient: Ingredient): string;
50
58
  static ɵfac: i0.ɵɵFactoryDef<RecipeDetailsComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsComponent, "ng-miam-recipe-details", never, { "recipe": "recipe"; "forceIngredientsStepstoggle": "forceIngredientsStepstoggle"; "previewAllowed": "previewAllowed"; }, { "recipeAdded": "recipeAdded"; "recipeChanged": "recipeChanged"; "recipeError": "recipeError"; }, never, never>;
59
+ 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>;
52
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-miam",
3
- "version": "3.4.0",
3
+ "version": "3.4.4",
4
4
  "description": "Angular library to facilitate the interactions with Miam API",
5
5
  "author": "Cesar Tonnoir <cesar.tonnoir@miam.tech>",
6
6
  "repository": {