ng-miam 3.7.2 → 3.9.0

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.
Files changed (70) hide show
  1. package/bundles/ng-miam.umd.js +2183 -1668
  2. package/bundles/ng-miam.umd.js.map +1 -1
  3. package/bundles/ng-miam.umd.min.js +2 -2
  4. package/bundles/ng-miam.umd.min.js.map +1 -1
  5. package/esm2015/lib/_components/addon-link/addon-link.component.js +14 -11
  6. package/esm2015/lib/_components/counter-input/counter-input.component.js +1 -8
  7. package/esm2015/lib/_components/icon/icon.component.js +605 -406
  8. package/esm2015/lib/_components/like-button/like-button.component.js +1 -1
  9. package/esm2015/lib/_components/recipe-filters/recipe-filters.component.js +7 -6
  10. package/esm2015/lib/_components/recipe-pricing/recipe-pricing.component.js +9 -4
  11. package/esm2015/lib/_services/baskets.service.js +7 -3
  12. package/esm2015/lib/_services/context.service.js +14 -1
  13. package/esm2015/lib/_services/groceries-lists.service.js +6 -3
  14. package/esm2015/lib/_services/recipes.service.js +7 -3
  15. package/esm2015/lib/_types/icon.enum.js +5 -2
  16. package/esm2015/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.js +3 -3
  17. package/esm2015/lib/_web-components/catalog-recipe-card/catalog-recipe-card.component.js +3 -3
  18. package/esm2015/lib/_web-components/drawer/drawer.component.js +9 -8
  19. package/esm2015/lib/_web-components/index.js +3 -4
  20. package/esm2015/lib/_web-components/list-scan/basket-preview/basket-preview.component.js +57 -52
  21. package/esm2015/lib/_web-components/list-scan/files-inputs/files-inputs.component.js +142 -0
  22. package/esm2015/lib/_web-components/list-scan/ingredients-list/ingredients-list.component.js +47 -53
  23. package/esm2015/lib/_web-components/list-scan/list-scan.component.js +56 -27
  24. package/esm2015/lib/_web-components/list-scan/list-scan.module.js +13 -6
  25. package/esm2015/lib/_web-components/modal/index.js +3 -0
  26. package/esm2015/lib/_web-components/modal/modal.component.js +18 -15
  27. package/esm2015/lib/_web-components/modal/modal.module.js +43 -0
  28. package/esm2015/lib/_web-components/order-button/order-button.component.js +1 -1
  29. package/esm2015/lib/_web-components/recipe-card/recipe-card.component.js +5 -5
  30. package/esm2015/lib/_web-components/recipe-details/index.js +7 -0
  31. package/esm2015/lib/_web-components/{recipe-addon → recipe-details/recipe-addon}/recipe-addon.component.js +5 -5
  32. package/esm2015/lib/_web-components/recipe-details/recipe-details-infos/recipe-details-infos.component.js +248 -0
  33. package/esm2015/lib/_web-components/recipe-details/recipe-details-ingredients/recipe-details-ingredients.component.js +108 -0
  34. package/esm2015/lib/_web-components/recipe-details/recipe-details-steps/recipe-details-steps.component.js +101 -0
  35. package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +179 -619
  36. package/esm2015/lib/_web-components/recipe-details/recipe-details.module.js +86 -0
  37. package/esm2015/lib/_web-components/recipe-form/recipe-form.component.js +2 -2
  38. package/esm2015/lib/_web-components/recipe-helper/recipe-helper.component.js +7 -6
  39. package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +22 -38
  40. package/esm2015/lib/_web-components/web-components.module.js +60 -65
  41. package/fesm2015/ng-miam.js +1892 -1420
  42. package/fesm2015/ng-miam.js.map +1 -1
  43. package/lib/_components/counter-input/counter-input.component.d.ts +0 -1
  44. package/lib/_components/recipe-filters/recipe-filters.component.d.ts +3 -2
  45. package/lib/_components/recipe-pricing/recipe-pricing.component.d.ts +2 -1
  46. package/lib/_services/baskets.service.d.ts +1 -0
  47. package/lib/_services/context.service.d.ts +6 -0
  48. package/lib/_services/groceries-lists.service.d.ts +1 -1
  49. package/lib/_types/icon.enum.d.ts +5 -2
  50. package/lib/_web-components/drawer/drawer.component.d.ts +3 -2
  51. package/lib/_web-components/index.d.ts +2 -3
  52. package/lib/_web-components/list-scan/basket-preview/basket-preview.component.d.ts +2 -2
  53. package/lib/_web-components/list-scan/files-inputs/files-inputs.component.d.ts +21 -0
  54. package/lib/_web-components/list-scan/ingredients-list/ingredients-list.component.d.ts +1 -2
  55. package/lib/_web-components/list-scan/list-scan.component.d.ts +5 -2
  56. package/lib/_web-components/list-scan/list-scan.module.d.ts +8 -6
  57. package/lib/_web-components/modal/index.d.ts +2 -0
  58. package/lib/_web-components/modal/modal.component.d.ts +3 -1
  59. package/lib/_web-components/modal/modal.module.d.ts +11 -0
  60. package/lib/_web-components/recipe-details/index.d.ts +6 -0
  61. package/lib/_web-components/{recipe-addon → recipe-details/recipe-addon}/recipe-addon.component.d.ts +2 -2
  62. package/lib/_web-components/recipe-details/recipe-details-infos/recipe-details-infos.component.d.ts +24 -0
  63. package/lib/_web-components/recipe-details/recipe-details-ingredients/recipe-details-ingredients.component.d.ts +18 -0
  64. package/lib/_web-components/recipe-details/recipe-details-steps/recipe-details-steps.component.d.ts +16 -0
  65. package/lib/_web-components/recipe-details/recipe-details.component.d.ts +16 -23
  66. package/lib/_web-components/recipe-details/recipe-details.module.d.ts +18 -0
  67. package/lib/_web-components/recipe-helper/recipe-helper.component.d.ts +3 -2
  68. package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts +0 -3
  69. package/lib/_web-components/web-components.module.d.ts +38 -39
  70. package/package.json +1 -1
@@ -23,7 +23,6 @@ export declare class CounterInputComponent implements OnDestroy, OnChanges {
23
23
  decrement(event: Event): void;
24
24
  prevent(event: Event): void;
25
25
  updateValue(): void;
26
- private focus;
27
26
  static ɵfac: i0.ɵɵFactoryDef<CounterInputComponent, never>;
28
27
  static ɵcmp: i0.ɵɵComponentDefWithMeta<CounterInputComponent, "ng-miam-counter-input", never, { "counter": "counter"; "minRange": "minRange"; "maxRange": "maxRange"; }, { "counterChange": "counterChange"; "selected": "selected"; }, never, never>;
29
28
  }
@@ -1,6 +1,6 @@
1
1
  import { MediaMatcher } from '@angular/cdk/layout';
2
2
  import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, OnDestroy } from '@angular/core';
3
- import { UserService } from '../../_services';
3
+ import { ContextService, UserService } from '../../_services';
4
4
  import { Icon } from '../../_types/icon.enum';
5
5
  import { RecipeFilters } from '../../_types/recipe-filters';
6
6
  import * as i0 from "@angular/core";
@@ -8,6 +8,7 @@ export declare class RecipeFiltersComponent implements OnInit, OnChanges, OnDest
8
8
  private cdr;
9
9
  mediaMatcher: MediaMatcher;
10
10
  usersService: UserService;
11
+ private context;
11
12
  filters: RecipeFilters;
12
13
  mobileFixed: boolean;
13
14
  filterToRemove: string;
@@ -23,7 +24,7 @@ export declare class RecipeFiltersComponent implements OnInit, OnChanges, OnDest
23
24
  isLogged: boolean;
24
25
  hasChildren: boolean;
25
26
  private subscriptions;
26
- constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher, usersService: UserService);
27
+ constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher, usersService: UserService, context: ContextService);
27
28
  ngOnInit(): void;
28
29
  ngOnChanges(): void;
29
30
  ngOnDestroy(): void;
@@ -11,6 +11,7 @@ export declare class RecipePricingComponent implements OnChanges, OnInit, OnDest
11
11
  private basketsService;
12
12
  recipe: Recipe;
13
13
  serves: number;
14
+ guestsText: string;
14
15
  pricing: RecipePricing;
15
16
  loading: boolean;
16
17
  integerPart: string;
@@ -27,5 +28,5 @@ export declare class RecipePricingComponent implements OnChanges, OnInit, OnDest
27
28
  private extractPricing;
28
29
  private format;
29
30
  static ɵfac: i0.ɵɵFactoryDef<RecipePricingComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipePricingComponent, "ng-miam-recipe-pricing", never, { "recipe": "recipe"; "serves": "serves"; }, {}, never, never>;
31
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipePricingComponent, "ng-miam-recipe-pricing", never, { "recipe": "recipe"; "serves": "serves"; "guestsText": "guestsText"; }, {}, never, never>;
31
32
  }
@@ -33,6 +33,7 @@ export declare class BasketsService extends Service<Basket> {
33
33
  basketStats$: BehaviorSubject<BasketStats>;
34
34
  basketIsFetching: boolean;
35
35
  basketPreviewIsCalculating: boolean;
36
+ basketInitCalled: boolean;
36
37
  private _entries$;
37
38
  /**
38
39
  * We want basket$ to be a singleton that always returns the same basket, so it is fetched only when necessary.
@@ -31,9 +31,11 @@ export declare class ContextService {
31
31
  icons: IconOverride[];
32
32
  videoRecipesEnabled: boolean;
33
33
  articlesInCatalogEnabled: boolean;
34
+ tagsOnRecipesEnabled: boolean;
34
35
  hookCallback: (isLogged: any, isPosValid: any) => boolean;
35
36
  displayIngredientPicturesOnRecipeCards: boolean;
36
37
  defaultIngredientPicture: string;
38
+ globalScrollableElement: HTMLElement;
37
39
  private CORSIssues;
38
40
  private isSmallScreen$;
39
41
  private basketWrapper;
@@ -66,6 +68,7 @@ export declare class ContextService {
66
68
  enableVideoRecipes: () => void;
67
69
  enableArticlesInCatalog: () => void;
68
70
  enableUserPreferences: () => void;
71
+ enableTagsOnRecipes: () => void;
69
72
  };
70
73
  hook: {
71
74
  setHookCallback: (callback: (isLogged: any, isPosValid: any) => boolean) => void;
@@ -99,6 +102,9 @@ export declare class ContextService {
99
102
  device: MediaMatcher;
100
103
  isSmallScreen$: Observable<boolean>;
101
104
  };
105
+ view: {
106
+ setGlobalScrollableElement: (element: HTMLElement) => void;
107
+ };
102
108
  /**
103
109
  * Override two times 'll not be considered
104
110
  * @param icon have to be a knowed icon name see section 'Custom icons' in read me
@@ -38,7 +38,7 @@ export declare class GroceriesListsService extends Service<GroceriesList> {
38
38
  removeRecipeFromList(recipeId: string): Observable<GroceriesList>;
39
39
  updateRecipeGuests(recipeId: string, guests: number): Observable<GroceriesList>;
40
40
  removeRecipesFromList(): Observable<GroceriesList>;
41
- addEntriesFromPicture(file: File, include?: any[]): Observable<GroceriesList>;
41
+ addEntriesFromPicture(file: File, include?: any[], disableIngredientsMatching?: boolean): Observable<GroceriesList>;
42
42
  private saveList;
43
43
  private assignList;
44
44
  static ɵfac: i0.ɵɵFactoryDef<GroceriesListsService, never>;
@@ -5,7 +5,7 @@ export declare enum Icon {
5
5
  CostHight = 3,
6
6
  CostMedium = 4,
7
7
  CostLow = 5,
8
- DifficultyHight = 6,
8
+ DifficultyHigh = 6,
9
9
  DifficultyMedium = 7,
10
10
  DifficultyLow = 8,
11
11
  Heart = 9,
@@ -55,5 +55,8 @@ export declare enum Icon {
55
55
  DrawerHorizontalCloseBar = 53,
56
56
  Video = 54,
57
57
  Cross = 55,
58
- Ingredients = 56
58
+ Ingredients = 56,
59
+ CheckboxChecked = 57,
60
+ CheckboxUnchecked = 58,
61
+ Upload = 59
59
62
  }
@@ -1,5 +1,5 @@
1
1
  import { OnInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
2
- import { BasketsService, GroceriesListsService, BasketStats } from '../../_services';
2
+ import { BasketsService, GroceriesListsService, BasketStats, ContextService } from '../../_services';
3
3
  import { PointOfSalesService } from '../../_services/point-of-sales.service';
4
4
  import { PointOfSale } from '../../_models/point-of-sale';
5
5
  import { AnalyticsService } from '../../_services/analytics.service';
@@ -10,6 +10,7 @@ export declare class DrawerComponent implements OnInit, OnDestroy {
10
10
  private posService;
11
11
  private basketsService;
12
12
  private analyticsService;
13
+ private context;
13
14
  expand: boolean;
14
15
  recipesCount: number;
15
16
  jiggle: boolean;
@@ -18,7 +19,7 @@ export declare class DrawerComponent implements OnInit, OnDestroy {
18
19
  pos: PointOfSale;
19
20
  basketStats: BasketStats;
20
21
  private subscriptions;
21
- constructor(cdr: ChangeDetectorRef, listsService: GroceriesListsService, posService: PointOfSalesService, basketsService: BasketsService, analyticsService: AnalyticsService);
22
+ constructor(cdr: ChangeDetectorRef, listsService: GroceriesListsService, posService: PointOfSalesService, basketsService: BasketsService, analyticsService: AnalyticsService, context: ContextService);
22
23
  ngOnInit(): void;
23
24
  ngOnDestroy(): void;
24
25
  onKeydownHandler(event: KeyboardEvent): void;
@@ -9,7 +9,7 @@ export * from './drawer/drawer.component';
9
9
  export * from './favorite-page/favorite-page.component';
10
10
  export * from './list-scan';
11
11
  export * from './loader';
12
- export * from './modal/modal.component';
12
+ export * from './modal';
13
13
  export * from './order-button/order-button.component';
14
14
  export * from './personal-recipes/personal-recipes.component';
15
15
  export * from './planner/planner.component';
@@ -17,10 +17,9 @@ export * from './planner-calendar/planner-calendar.component';
17
17
  export * from './planner-side-menu/planner-side-menu.component';
18
18
  export * from './pos-card/pos-card.component';
19
19
  export * from './pos-selection/pos-selection.component';
20
- export * from './recipe-addon/recipe-addon.component';
21
20
  export * from './recipe-card/recipe-card.component';
22
21
  export * from './recipe-catalog/recipe-catalog.component';
23
- export * from './recipe-details/recipe-details.component';
22
+ export * from './recipe-details';
24
23
  export * from './recipe-form/recipe-form.component';
25
24
  export * from './recipe-helper/recipe-helper.component';
26
25
  export * from './recipe-stepper/recipe-stepper.component';
@@ -7,12 +7,12 @@ import * as i0 from "@angular/core";
7
7
  export declare class ListScanBasketPreviewComponent implements OnInit, OnDestroy {
8
8
  private cdr;
9
9
  private basketsService;
10
- overlay: any;
11
10
  entries: GroceriesEntry[];
12
11
  closed: EventEmitter<any>;
13
12
  icon: typeof Icon;
14
13
  lines: BasketPreviewLine[];
15
14
  unavailable: BasketEntry[];
15
+ replaceItemCurrentLine: BasketPreviewLine;
16
16
  private subscriptions;
17
17
  constructor(cdr: ChangeDetectorRef, basketsService: BasketsService);
18
18
  ngOnInit(): void;
@@ -21,5 +21,5 @@ export declare class ListScanBasketPreviewComponent implements OnInit, OnDestroy
21
21
  deleteEntry(line: BasketPreviewLine): void;
22
22
  toggleReplacing(line: BasketPreviewLine): void;
23
23
  static ɵfac: i0.ɵɵFactoryDef<ListScanBasketPreviewComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDefWithMeta<ListScanBasketPreviewComponent, "ng-miam-list-scan-basket-preview", never, { "overlay": "overlay"; "entries": "entries"; }, { "closed": "closed"; }, never, never>;
24
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<ListScanBasketPreviewComponent, "ng-miam-list-scan-basket-preview", never, { "entries": "entries"; }, { "closed": "closed"; }, never, never>;
25
25
  }
@@ -0,0 +1,21 @@
1
+ import { MediaMatcher } from '@angular/cdk/layout';
2
+ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
3
+ import { GroceriesEntry } from '../../../_models/groceries-entry';
4
+ import { GroceriesListsService } from '../../../_services';
5
+ import { Icon } from '../../../_types/icon.enum';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ListScanFilesInputsComponent {
8
+ private cdr;
9
+ private mediaMatcher;
10
+ private listsService;
11
+ overlay: boolean;
12
+ disableIngredientsMatching: boolean;
13
+ entriesAdded: EventEmitter<GroceriesEntry[]>;
14
+ icon: typeof Icon;
15
+ loading: boolean;
16
+ isMobile: boolean;
17
+ constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher, listsService: GroceriesListsService);
18
+ sendFile(event: any): void;
19
+ static ɵfac: i0.ɵɵFactoryDef<ListScanFilesInputsComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<ListScanFilesInputsComponent, "ng-miam-list-scan-files-inputs", never, { "overlay": "overlay"; "disableIngredientsMatching": "disableIngredientsMatching"; }, { "entriesAdded": "entriesAdded"; }, never, never>;
21
+ }
@@ -6,7 +6,6 @@ import * as i0 from "@angular/core";
6
6
  export declare class ListScanIngredientsListComponent implements OnDestroy {
7
7
  private cdr;
8
8
  private basketsService;
9
- overlay: boolean;
10
9
  entries: GroceriesEntry[];
11
10
  closed: EventEmitter<any>;
12
11
  confirmed: EventEmitter<any>;
@@ -18,5 +17,5 @@ export declare class ListScanIngredientsListComponent implements OnDestroy {
18
17
  cancel(): void;
19
18
  confirm(): void;
20
19
  static ɵfac: i0.ɵɵFactoryDef<ListScanIngredientsListComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDefWithMeta<ListScanIngredientsListComponent, "ng-miam-list-scan-ingredients-list", never, { "overlay": "overlay"; "entries": "entries"; }, { "closed": "closed"; "confirmed": "confirmed"; }, never, never>;
20
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<ListScanIngredientsListComponent, "ng-miam-list-scan-ingredients-list", never, { "entries": "entries"; }, { "closed": "closed"; "confirmed": "confirmed"; }, never, never>;
22
21
  }
@@ -1,9 +1,12 @@
1
- import { ChangeDetectorRef } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
2
  import { GroceriesEntry } from '../../_models/groceries-entry';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ListScanComponent {
5
5
  private cdr;
6
+ floatingButton: boolean;
6
7
  overlay: boolean;
8
+ disableIngredientsMatching: boolean;
9
+ close: EventEmitter<void>;
7
10
  entries: GroceriesEntry[];
8
11
  ingredientsShown: boolean;
9
12
  basketPreviewShown: boolean;
@@ -13,5 +16,5 @@ export declare class ListScanComponent {
13
16
  showBasketPreview(): void;
14
17
  hideBasketPreview(): void;
15
18
  static ɵfac: i0.ɵɵFactoryDef<ListScanComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDefWithMeta<ListScanComponent, "ng-miam-list-scan", never, { "overlay": "overlay"; }, {}, never, never>;
19
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<ListScanComponent, "ng-miam-list-scan", never, { "floatingButton": "floatingButton"; "overlay": "overlay"; "disableIngredientsMatching": "disableIngredientsMatching"; }, { "close": "close"; }, never, never>;
17
20
  }
@@ -4,13 +4,15 @@ import * as i1 from "./list-scan.component";
4
4
  import * as i2 from "./overlay-button/overlay-button.component";
5
5
  import * as i3 from "./ingredients-list/ingredients-list.component";
6
6
  import * as i4 from "./basket-preview/basket-preview.component";
7
- import * as i5 from "@angular/common";
8
- import * as i6 from "@angular/forms";
9
- import * as i7 from "../../_components/components.module";
10
- import * as i8 from "../basket-preview/basket-preview.module";
11
- import * as i9 from "../loader/loader.module";
7
+ import * as i5 from "./files-inputs/files-inputs.component";
8
+ import * as i6 from "@angular/common";
9
+ import * as i7 from "@angular/forms";
10
+ import * as i8 from "../../_components/components.module";
11
+ import * as i9 from "../basket-preview/basket-preview.module";
12
+ import * as i10 from "../loader/loader.module";
13
+ import * as i11 from "../modal/modal.module";
12
14
  export declare class ListScanModule {
13
15
  constructor(injector: Injector);
14
- static ɵmod: i0.ɵɵNgModuleDefWithMeta<ListScanModule, [typeof i1.ListScanComponent, typeof i2.ListScanOverlayButtonComponent, typeof i3.ListScanIngredientsListComponent, typeof i4.ListScanBasketPreviewComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.ComponentsModule, typeof i8.BasketPreviewModule, typeof i9.LoaderModule], [typeof i1.ListScanComponent]>;
16
+ static ɵmod: i0.ɵɵNgModuleDefWithMeta<ListScanModule, [typeof i1.ListScanComponent, typeof i2.ListScanOverlayButtonComponent, typeof i3.ListScanIngredientsListComponent, typeof i4.ListScanBasketPreviewComponent, typeof i5.ListScanFilesInputsComponent], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.ComponentsModule, typeof i9.BasketPreviewModule, typeof i10.LoaderModule, typeof i11.ModalModule], [typeof i1.ListScanComponent]>;
15
17
  static ɵinj: i0.ɵɵInjectorDef<ListScanModule>;
16
18
  }
@@ -0,0 +1,2 @@
1
+ export * from './modal.module';
2
+ export * from './modal.component';
@@ -1,10 +1,12 @@
1
1
  import { MediaMatcher } from '@angular/cdk/layout';
2
2
  import { OnChanges, EventEmitter, ChangeDetectorRef } from '@angular/core';
3
+ import { ContextService } from '../../_services';
3
4
  import { Icon } from '../../_types/icon.enum';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class ModalComponent implements OnChanges {
6
7
  private cdr;
7
8
  private mediaMatcher;
9
+ private context;
8
10
  title: string;
9
11
  expanded: boolean;
10
12
  confirmButtonText: string;
@@ -18,7 +20,7 @@ export declare class ModalComponent implements OnChanges {
18
20
  icon: typeof Icon;
19
21
  scrollPosition: number;
20
22
  isMobile: boolean;
21
- constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher);
23
+ constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher, context: ContextService);
22
24
  ngOnChanges(): void;
23
25
  onClose(): void;
24
26
  onCancel(): void;
@@ -0,0 +1,11 @@
1
+ import { Injector } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./modal.component";
4
+ import * as i2 from "@angular/common";
5
+ import * as i3 from "@angular/forms";
6
+ import * as i4 from "../../_components/components.module";
7
+ export declare class ModalModule {
8
+ constructor(injector: Injector);
9
+ static ɵmod: i0.ɵɵNgModuleDefWithMeta<ModalModule, [typeof i1.ModalComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.ComponentsModule], [typeof i1.ModalComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDef<ModalModule>;
11
+ }
@@ -0,0 +1,6 @@
1
+ export * from './recipe-details.module';
2
+ export * from './recipe-details.component';
3
+ export * from './recipe-addon/recipe-addon.component';
4
+ export * from './recipe-details-ingredients/recipe-details-ingredients.component';
5
+ export * from './recipe-details-steps/recipe-details-steps.component';
6
+ export * from './recipe-details-infos/recipe-details-infos.component';
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { Icon } from '../../_types/icon.enum';
3
- import { Recipe } from '../../_models';
2
+ import { Icon } from '../../../_types/icon.enum';
3
+ import { Recipe } from '../../../_models';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class RecipeAddonComponent {
6
6
  recipe: Recipe;
@@ -0,0 +1,24 @@
1
+ import { ChangeDetectorRef, OnChanges } from '@angular/core';
2
+ import { Tag } from '../../../_models';
3
+ import { Recipe } from '../../../_models/recipe';
4
+ import { Icon } from '../../../_types/icon.enum';
5
+ import * as i0 from "@angular/core";
6
+ export declare class RecipeDetailsInfosComponent implements OnChanges {
7
+ cdr: ChangeDetectorRef;
8
+ recipe: Recipe;
9
+ displayTags: boolean;
10
+ displayTagsIcons: boolean;
11
+ icon: typeof Icon;
12
+ tags: Tag[];
13
+ tagTypeOrder: string[];
14
+ showAdditionalInfos: boolean;
15
+ constructor(cdr: ChangeDetectorRef);
16
+ ngOnChanges(): void;
17
+ orderTags(): void;
18
+ tagClass(tag: Tag): {
19
+ [x: string]: boolean;
20
+ };
21
+ toggleAdditionalInfos(): void;
22
+ static ɵfac: i0.ɵɵFactoryDef<RecipeDetailsInfosComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsInfosComponent, "ng-miam-recipe-details-infos", never, { "recipe": "recipe"; "displayTags": "displayTags"; "displayTagsIcons": "displayTagsIcons"; }, {}, never, never>;
24
+ }
@@ -0,0 +1,18 @@
1
+ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
+ import { Recipe } from '../../../_models/recipe';
3
+ import { ContextService } from '../../../_services';
4
+ import { SimplifiedIngredient } from '../../../_models';
5
+ import * as i0 from "@angular/core";
6
+ export declare class RecipeDetailsIngredientsComponent {
7
+ cdr: ChangeDetectorRef;
8
+ contextService: ContextService;
9
+ recipe: Recipe;
10
+ ingredientsPictures: boolean;
11
+ recipeChanged: EventEmitter<void>;
12
+ ingredientsChecked: {};
13
+ constructor(cdr: ChangeDetectorRef, contextService: ContextService);
14
+ updateGuests(guests: any): void;
15
+ ingredientPicture(ingredient: SimplifiedIngredient): string;
16
+ static ɵfac: i0.ɵɵFactoryDef<RecipeDetailsIngredientsComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsIngredientsComponent, "ng-miam-recipe-details-ingredients", never, { "recipe": "recipe"; "ingredientsPictures": "ingredientsPictures"; }, { "recipeChanged": "recipeChanged"; }, never, never>;
18
+ }
@@ -0,0 +1,16 @@
1
+ import { ChangeDetectorRef, OnChanges } from '@angular/core';
2
+ import { Recipe } from '../../../_models/recipe';
3
+ import { Icon } from '../../../_types/icon.enum';
4
+ import * as i0 from "@angular/core";
5
+ export declare class RecipeDetailsStepsComponent implements OnChanges {
6
+ cdr: ChangeDetectorRef;
7
+ recipe: Recipe;
8
+ steps: any[];
9
+ activeStep: number;
10
+ icon: typeof Icon;
11
+ constructor(cdr: ChangeDetectorRef);
12
+ ngOnChanges(): void;
13
+ changeActiveStep(index: number): void;
14
+ static ɵfac: i0.ɵɵFactoryDef<RecipeDetailsStepsComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsStepsComponent, "ng-miam-recipe-details-steps", never, { "recipe": "recipe"; }, {}, never, never>;
16
+ }
@@ -1,24 +1,23 @@
1
1
  import { ChangeDetectorRef, EventEmitter, OnChanges, AfterViewChecked, ElementRef } from '@angular/core';
2
2
  import { Recipe } from '../../_models/recipe';
3
3
  import { Icon } from '../../_types/icon.enum';
4
- import { ContextService, GroceriesListsService, PointOfSalesService, RecipeEventsService, UserService } from '../../_services';
5
- import { BehaviorSubject, Subscription } from 'rxjs';
4
+ import { ContextService, GroceriesListsService, PointOfSalesService, RecipeEventsService, RecipesService, UserService } from '../../_services';
5
+ import { Subscription } from 'rxjs';
6
6
  import { MediaMatcher } from '@angular/cdk/layout';
7
- import { SimplifiedIngredient } from '../../_models';
8
7
  import * as i0 from "@angular/core";
9
8
  export declare class RecipeDetailsComponent implements OnChanges, AfterViewChecked {
10
9
  cdr: ChangeDetectorRef;
11
- private mediaMatcher;
10
+ recipeService: RecipesService;
12
11
  groceriesListsService: GroceriesListsService;
13
12
  userService: UserService;
14
13
  protected posService: PointOfSalesService;
15
14
  private recipeEventsService;
15
+ private mediaMatcher;
16
16
  contextService: ContextService;
17
17
  recipe: Recipe;
18
- forceIngredientsStepstoggle: boolean;
19
18
  previewAllowed: boolean;
20
19
  ingredientsPictures: boolean;
21
- displayTags: boolean;
20
+ forceDisplayTags: any;
22
21
  displayTagsIcons: boolean;
23
22
  displayPricing: boolean;
24
23
  displayAddedOnPicture: boolean;
@@ -27,30 +26,28 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
27
26
  recipeError: EventEmitter<void>;
28
27
  primaryButtonClicked$: EventEmitter<boolean>;
29
28
  topContainerImg: ElementRef;
30
- mainContainer: ElementRef;
31
- isMobile: boolean;
32
29
  tab: number;
30
+ isMobile: boolean;
31
+ displayTags: boolean;
33
32
  showDetail: boolean;
34
- steps: any[];
35
- activeStep: number;
36
33
  icon: typeof Icon;
37
- ingredientsChecked: {};
38
- showIngredient: boolean;
39
- closeIconhidden: BehaviorSubject<boolean>;
40
34
  playerWidth: any;
41
35
  playerHeight: any;
42
36
  showVideo: any;
43
- scrollListenerInitialised: boolean;
44
37
  addButtonLoading: boolean;
38
+ titleInHeader: boolean;
39
+ title: HTMLElement;
40
+ content: HTMLElement;
41
+ private intersectionObserver;
45
42
  protected subscriptions: Subscription[];
46
- constructor(cdr: ChangeDetectorRef, mediaMatcher: MediaMatcher, groceriesListsService: GroceriesListsService, userService: UserService, posService: PointOfSalesService, recipeEventsService: RecipeEventsService, contextService: ContextService);
43
+ constructor(cdr: ChangeDetectorRef, recipeService: RecipesService, groceriesListsService: GroceriesListsService, userService: UserService, posService: PointOfSalesService, recipeEventsService: RecipeEventsService, mediaMatcher: MediaMatcher, contextService: ContextService);
47
44
  ngOnChanges(): void;
48
45
  ngAfterViewChecked(): void;
49
46
  /**
50
47
  * Init the listener on scroll so the modal can hide the close icon
51
48
  */
52
- initScrollListener(): void;
53
- changeActiveStep(index: number): void;
49
+ initScrollListenerOnTitle(): void;
50
+ toggleTitleInHeader(): void;
54
51
  /**
55
52
  * Add recipe to list on primary button click and emit true if the recipe is added, false if recipe is not added
56
53
  * so lib users can decide that primaryButtonClicked$.emit(false) removes the recipe for example
@@ -59,14 +56,10 @@ export declare class RecipeDetailsComponent implements OnChanges, AfterViewCheck
59
56
  addRecipe(): void;
60
57
  addRecipeActionOK(): void;
61
58
  addRecipeActionKO(): void;
62
- updateGuests(guests: any): void;
63
59
  print(): void;
64
- openCalendar(event: Event): void;
65
- shareRecipe(event: Event): void;
66
60
  toggleAddon(): void;
67
- toggleShowIngredient(isShowed: boolean): void;
61
+ toggleHelper(): void;
68
62
  toggleButtonLoader(value: boolean): void;
69
- ingredientPicture(ingredient: SimplifiedIngredient): string;
70
63
  static ɵfac: i0.ɵɵFactoryDef<RecipeDetailsComponent, never>;
71
- static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsComponent, "ng-miam-recipe-details", never, { "recipe": "recipe"; "forceIngredientsStepstoggle": "forceIngredientsStepstoggle"; "previewAllowed": "previewAllowed"; "ingredientsPictures": "ingredientsPictures"; "displayTags": "displayTags"; "displayTagsIcons": "displayTagsIcons"; "displayPricing": "displayPricing"; "displayAddedOnPicture": "displayAddedOnPicture"; }, { "recipeAdded": "recipeAdded"; "recipeChanged": "recipeChanged"; "recipeError": "recipeError"; }, never, never>;
64
+ static ɵcmp: i0.ɵɵComponentDefWithMeta<RecipeDetailsComponent, "ng-miam-recipe-details", never, { "recipe": "recipe"; "previewAllowed": "previewAllowed"; "ingredientsPictures": "ingredientsPictures"; "forceDisplayTags": "forceDisplayTags"; "displayTagsIcons": "displayTagsIcons"; "displayPricing": "displayPricing"; "displayAddedOnPicture": "displayAddedOnPicture"; }, { "recipeAdded": "recipeAdded"; "recipeChanged": "recipeChanged"; "recipeError": "recipeError"; }, never, never>;
72
65
  }
@@ -0,0 +1,18 @@
1
+ import { Injector } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./recipe-details-ingredients/recipe-details-ingredients.component";
4
+ import * as i2 from "./recipe-details.component";
5
+ import * as i3 from "./recipe-addon/recipe-addon.component";
6
+ import * as i4 from "./recipe-details-steps/recipe-details-steps.component";
7
+ import * as i5 from "./recipe-details-infos/recipe-details-infos.component";
8
+ import * as i6 from "@angular/common";
9
+ import * as i7 from "@angular/forms";
10
+ import * as i8 from "../../_utils/utils.module";
11
+ import * as i9 from "../../_components/components.module";
12
+ import * as i10 from "../loader/loader.module";
13
+ import * as i11 from "@angular/youtube-player";
14
+ export declare class RecipeDetailsModule {
15
+ constructor(injector: Injector);
16
+ static ɵmod: i0.ɵɵNgModuleDefWithMeta<RecipeDetailsModule, [typeof i1.RecipeDetailsIngredientsComponent, typeof i2.RecipeDetailsComponent, typeof i3.RecipeAddonComponent, typeof i4.RecipeDetailsStepsComponent, typeof i5.RecipeDetailsInfosComponent], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.UtilsModule, typeof i9.ComponentsModule, typeof i10.LoaderModule, typeof i11.YouTubePlayerModule], [typeof i1.RecipeDetailsIngredientsComponent, typeof i2.RecipeDetailsComponent, typeof i3.RecipeAddonComponent, typeof i4.RecipeDetailsStepsComponent, typeof i5.RecipeDetailsInfosComponent]>;
17
+ static ɵinj: i0.ɵɵInjectorDef<RecipeDetailsModule>;
18
+ }
@@ -1,20 +1,21 @@
1
1
  import { MediaMatcher } from '@angular/cdk/layout';
2
2
  import { EventEmitter, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';
3
3
  import { Subscription } from 'rxjs';
4
- import { RecipesService } from '../../_services';
4
+ import { ContextService, RecipesService } from '../../_services';
5
5
  import { Icon } from '../../_types/icon.enum';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class RecipeHelperComponent implements OnInit, OnDestroy {
8
8
  private cdr;
9
9
  private recipesService;
10
10
  private mediaMatcher;
11
+ private context;
11
12
  stringDetailLocation: string;
12
13
  close: EventEmitter<any>;
13
14
  icon: typeof Icon;
14
15
  isMobile: boolean;
15
16
  isDisplayed: boolean;
16
17
  protected subscriptions: Subscription[];
17
- constructor(cdr: ChangeDetectorRef, recipesService: RecipesService, mediaMatcher: MediaMatcher);
18
+ constructor(cdr: ChangeDetectorRef, recipesService: RecipesService, mediaMatcher: MediaMatcher, context: ContextService);
18
19
  ngOnInit(): void;
19
20
  onClose(): void;
20
21
  ngOnDestroy(): void;
@@ -2,7 +2,6 @@ import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
2
2
  import { Recipe } from '../../_models';
3
3
  import { GroceriesListsService, RecipesService } from '../../_services';
4
4
  import { PrintService } from '../../_services/print.service';
5
- import { RecipeDetailsComponent } from '../recipe-details/recipe-details.component';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class RecipeModalComponent implements OnInit {
8
7
  private cdr;
@@ -14,9 +13,7 @@ export declare class RecipeModalComponent implements OnInit {
14
13
  show: boolean;
15
14
  previewMode: boolean;
16
15
  previewAllowed: boolean;
17
- closeIconhidden: boolean;
18
16
  private detailsComponent;
19
- set content(content: RecipeDetailsComponent);
20
17
  constructor(cdr: ChangeDetectorRef, recipesService: RecipesService, printService: PrintService, elRef: ElementRef, groceriesListsService: GroceriesListsService);
21
18
  ngOnInit(): void;
22
19
  hide(): void;