ng-miam 3.7.3 → 3.7.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.
@@ -26,6 +26,7 @@ export declare class ListInputComponent {
26
26
  fillListInput: FormControl;
27
27
  mousseDownOnButton: boolean;
28
28
  private previousQuantities;
29
+ private readonly maxSelectionNumber;
29
30
  constructor(ingredientService: IngredientsService, fb: FormBuilder, cdr: ChangeDetectorRef);
30
31
  delete(index: number): void;
31
32
  submit(): void;
@@ -37,6 +38,23 @@ export declare class ListInputComponent {
37
38
  isQuantityReviewed(unitName: any): Observable<boolean>;
38
39
  trackByIndex(index: number, el: any): string;
39
40
  uploadIngredientPicture(files: any, ingForm: any): void;
41
+ /**
42
+ * filter using the input the possible ingredient name the user might want
43
+ * @param index
44
+ */
45
+ getFilteredNameFromIndex(index: number): Array<string>;
46
+ /**
47
+ * filter using the input the possible unit the user might want
48
+ * @param index
49
+ */
50
+ getFilteredUnitsFromIndex(index: number): Array<string>;
51
+ /**
52
+ * Generic method to filter the name and the unit
53
+ * @param input user input
54
+ * @param possibleSelection possible selection to display to the user
55
+ * @private
56
+ */
57
+ private filterPossibleSelectionFromInput;
40
58
  static ɵfac: i0.ɵɵFactoryDef<ListInputComponent, never>;
41
59
  static ɵcmp: i0.ɵɵComponentDefWithMeta<ListInputComponent, "ng-miam-list-input", never, { "hint": "hint"; "placeholder": "placeholder"; "label": "label"; "instructions": "instructions"; "ingredientMode": "ingredientMode"; "list": "list"; "ingredientsPictures": "ingredientsPictures"; }, { "deleteId": "deleteId"; "orderHasChanged": "orderHasChanged"; }, never, never>;
42
60
  }
@@ -5,6 +5,7 @@ import { RecipeProviderService } from './recipe-provider.service';
5
5
  import { BehaviorSubject, Observable } from 'rxjs';
6
6
  import { AnalyticsService } from './analytics.service';
7
7
  import { UserService } from './user.service';
8
+ import { UserFavoriteItemsService } from './user-favorite-items.service';
8
9
  import { Icon } from '../_types/icon.enum';
9
10
  import { RecipesService } from './recipes.service';
10
11
  import { MediaMatcher, BreakpointObserver } from '@angular/cdk/layout';
@@ -21,6 +22,7 @@ export declare class ContextService {
21
22
  private listsService;
22
23
  private basketsService;
23
24
  private userService;
25
+ private userFavoriteItemsService;
24
26
  private recipesProvidersService;
25
27
  private analyticsService;
26
28
  private recipesService;
@@ -96,6 +98,7 @@ export declare class ContextService {
96
98
  setToken: (token: any, forbidProfiling?: boolean, initBasket?: boolean) => Observable<any>;
97
99
  loadWithExtId: (id: any, forbidProfiling?: boolean, initBasket?: boolean) => Observable<any>;
98
100
  reset: () => void;
101
+ setFavoriteItems: (favoriteProductIds: any) => Observable<any>;
99
102
  device: MediaMatcher;
100
103
  isSmallScreen$: Observable<boolean>;
101
104
  };
@@ -106,7 +109,7 @@ export declare class ContextService {
106
109
  */
107
110
  overrideIcon: (icon: any, url: any) => void;
108
111
  };
109
- constructor(posService: PointOfSalesService, listsService: GroceriesListsService, basketsService: BasketsService, userService: UserService, recipesProvidersService: RecipeProviderService, analyticsService: AnalyticsService, recipesService: RecipesService, mediaMatcher: MediaMatcher, suppliersService: SuppliersService, breakpointObserver: BreakpointObserver);
112
+ constructor(posService: PointOfSalesService, listsService: GroceriesListsService, basketsService: BasketsService, userService: UserService, userFavoriteItemsService: UserFavoriteItemsService, recipesProvidersService: RecipeProviderService, analyticsService: AnalyticsService, recipesService: RecipesService, mediaMatcher: MediaMatcher, suppliersService: SuppliersService, breakpointObserver: BreakpointObserver);
110
113
  setCORSIssueState(value: boolean): void;
111
114
  getCORSIssuesState(): Observable<boolean>;
112
115
  getOverrideIconUrl(icon: Icon): string;
@@ -11,6 +11,8 @@ export declare class IngredientsService extends Service<Ingredient> {
11
11
  constructor(http: HttpClient);
12
12
  resource: typeof Ingredient;
13
13
  type: string;
14
+ getReviewedNames(): string[];
15
+ getReviewedUnits(): string[];
14
16
  private fetchReviewedNames;
15
17
  private fetchReviewedUnits;
16
18
  /**
@@ -0,0 +1,12 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { Observable } from "rxjs";
3
+ import { SuppliersService } from '.';
4
+ import * as i0 from "@angular/core";
5
+ export declare class UserFavoriteItemsService {
6
+ private http;
7
+ private suppliersService;
8
+ constructor(http: HttpClient, suppliersService: SuppliersService);
9
+ set_from_ext_ids(favoriteProductIds: any): Observable<any>;
10
+ static ɵfac: i0.ɵɵFactoryDef<UserFavoriteItemsService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDef<UserFavoriteItemsService>;
12
+ }
@@ -31,7 +31,6 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
31
31
  isMobile: boolean;
32
32
  tab: number;
33
33
  showDetail: boolean;
34
- steps: any[];
35
34
  activeStep: number;
36
35
  icon: typeof Icon;
37
36
  ingredientsChecked: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-miam",
3
- "version": "3.7.3",
3
+ "version": "3.7.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": {