ng-miam 6.4.13 → 7.0.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.
- package/bundles/ng-miam.umd.js +8539 -10855
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +2 -2
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_components/abstracts/event-tracer.component.js +3 -2
- package/esm2015/lib/_components/accordion/accordion.component.js +75 -0
- package/esm2015/lib/_components/components.module.js +27 -21
- package/esm2015/lib/_components/counter-input/counter-input.component.js +86 -76
- package/esm2015/lib/_components/icon/icon.component.js +1 -1
- package/esm2015/lib/_components/index.js +5 -5
- package/esm2015/lib/_components/like-button/like-button.component.js +1 -1
- package/esm2015/lib/_components/list-input/list-input.component.js +5 -5
- package/esm2015/lib/_components/loader/loader.component.js +1 -1
- package/esm2015/lib/_components/meals-planner-link/meals-planner-link.component.js +3 -3
- package/esm2015/lib/_components/modal/modal.component.js +155 -137
- package/esm2015/lib/_components/product-card/product-card.component.js +333 -0
- package/esm2015/lib/_components/products-picker/products-picker.component.js +155 -0
- package/esm2015/lib/_components/progress-tracker/progress-tracker.component.js +1 -1
- package/esm2015/lib/_components/recipe-filters/recipe-filters.component.js +166 -217
- package/esm2015/lib/_components/recipe-pricing/recipe-pricing.component.js +55 -35
- package/esm2015/lib/_components/slider-tabs/slider-tabs.component.js +84 -0
- package/esm2015/lib/_components/sponsor-blocks/sponsor-image-and-text-block/sponsor-image-and-text-block.component.js +1 -1
- package/esm2015/lib/_components/sponsor-blocks/sponsor-text-and-image-block/sponsor-text-and-image-block.component.js +1 -1
- package/esm2015/lib/_components/tabs/tabs.component.js +48 -88
- package/esm2015/lib/_components/toaster/toaster.component.js +48 -84
- package/esm2015/lib/_components/tooltipable-content/tooltipable-content.component.js +1 -1
- package/esm2015/lib/_models/basket-entry.js +33 -49
- package/esm2015/lib/_models/basket-preview-line.js +5 -5
- package/esm2015/lib/_models/basket.js +15 -12
- package/esm2015/lib/_models/item.js +2 -2
- package/esm2015/lib/_models/recipe.js +2 -15
- package/esm2015/lib/_models/user.js +1 -1
- package/esm2015/lib/_services/analytics.service.js +24 -5
- package/esm2015/lib/_services/baskets-synchronizing/baskets-comparator.service.js +1 -10
- package/esm2015/lib/_services/baskets-synchronizing/baskets-synchronizer.service.js +15 -15
- package/esm2015/lib/_services/baskets.service.js +478 -60
- package/esm2015/lib/_services/context.service.js +22 -35
- package/esm2015/lib/_services/index.js +3 -5
- package/esm2015/lib/_services/interceptor.service.js +2 -2
- package/esm2015/lib/_services/items.service.js +27 -4
- package/esm2015/lib/_services/recipe-details.service.js +198 -0
- package/esm2015/lib/_services/recipe-likes.service.js +1 -1
- package/esm2015/lib/_services/recipes.service.js +24 -53
- package/esm2015/lib/_services/scrolling.service.js +17 -0
- package/esm2015/lib/_services/toaster.service.js +4 -5
- package/esm2015/lib/_services/user.service.js +2 -2
- package/esm2015/lib/_types/basket-action-type.enum.js +11 -0
- package/esm2015/lib/_types/basket-action.js +2 -0
- package/esm2015/lib/_types/basket-stats.js +2 -0
- package/esm2015/lib/_types/builded/miam-interface.js +1 -1
- package/esm2015/lib/_types/event-trace.js +5 -0
- package/esm2015/lib/_types/items-comparator.js +1 -10
- package/esm2015/lib/_types/recipe-filters.js +1 -1
- package/esm2015/lib/_types/toaster.js +1 -1
- package/esm2015/lib/_utils/directives/index.js +2 -1
- package/esm2015/lib/_utils/directives/reach-top.directive.js +33 -0
- package/esm2015/lib/_utils/pipes/readable-float-number/readable-float-number.pipe.js +8 -2
- package/esm2015/lib/_utils/utils.module.js +12 -8
- package/esm2015/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.js +140 -118
- package/esm2015/lib/_web-components/basket-preview/basket-preview-disabled/basket-preview-disabled.component.js +2 -2
- package/esm2015/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.js +125 -444
- package/esm2015/lib/_web-components/basket-preview/replace-item/replace-item.component.js +211 -108
- package/esm2015/lib/_web-components/index.js +1 -4
- package/esm2015/lib/_web-components/list-scan/basket-preview/basket-preview.component.js +11 -14
- package/esm2015/lib/_web-components/list-scan/files-inputs/files-inputs.component.js +13 -13
- package/esm2015/lib/_web-components/list-scan/ingredients-list/ingredients-list.component.js +6 -6
- package/esm2015/lib/_web-components/list-scan/list-scan.component.js +10 -10
- package/esm2015/lib/_web-components/list-scan/overlay-button/overlay-button.component.js +23 -11
- package/esm2015/lib/_web-components/meals-planner/meals-planner-basket-confirmation/meals-planner-basket-confirmation.component.js +1 -1
- package/esm2015/lib/_web-components/meals-planner/meals-planner-catalog/meals-planner-catalog.component.js +1 -1
- package/esm2015/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.js +7 -7
- package/esm2015/lib/_web-components/meals-planner/meals-planner-result/meals-planner-result.component.js +5 -5
- package/esm2015/lib/_web-components/meals-planner/meals-planner.component.js +16 -20
- package/esm2015/lib/_web-components/planner-side-menu/planner-side-menu.component.js +4 -53
- package/esm2015/lib/_web-components/recipe-cards/add-recipe-card/add-recipe-card.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-cards/index.js +1 -3
- package/esm2015/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.js +326 -404
- package/esm2015/lib/_web-components/recipe-cards/recipe-card-cta/recipe-card-cta.component.js +50 -146
- package/esm2015/lib/_web-components/recipe-cards/recipe-cards.module.js +3 -15
- package/esm2015/lib/_web-components/recipe-catalog/catalog-article-card/catalog-article-card.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.js +35 -29
- package/esm2015/lib/_web-components/recipe-catalog/catalog-header/catalog-header.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.js +27 -31
- package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +98 -100
- package/esm2015/lib/_web-components/recipe-creation/recipe-form/recipe-form.component.js +2 -2
- package/esm2015/lib/_web-components/recipe-creation/recipe-stepper/recipe-stepper.component.js +7 -7
- package/esm2015/lib/_web-components/recipe-creation/tags-creator/tags-creator.component.js +4 -4
- package/esm2015/lib/_web-components/recipe-creation/tags-selector/tags-selector.component.js +8 -8
- package/esm2015/lib/_web-components/recipe-details/recipe-addon/recipe-addon.component.js +7 -3
- package/esm2015/lib/_web-components/recipe-details/recipe-details-infos/recipe-details-infos.component.js +57 -358
- package/esm2015/lib/_web-components/recipe-details/recipe-details-ingredients/recipe-details-ingredients.component.js +59 -122
- package/esm2015/lib/_web-components/recipe-details/recipe-details-steps/recipe-details-steps.component.js +51 -72
- package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +313 -363
- package/esm2015/lib/_web-components/recipe-details/recipe-details.module.js +8 -4
- package/esm2015/lib/_web-components/recipe-details/sponsor-storytelling/sponsor-storytelling.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-helper/recipe-helper.component.js +89 -113
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +78 -69
- package/esm2015/lib/_web-components/recipe-tags/recipe-tags.component.js +5 -5
- package/esm2015/lib/_web-components/toaster-stack/toaster-stack.component.js +8 -4
- package/esm2015/lib/_web-components/web-components.module.js +3 -19
- package/esm2015/lib/ng-miam.module.js +5 -7
- package/fesm2015/ng-miam.js +5165 -6973
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_components/abstracts/event-tracer.component.d.ts +2 -1
- package/lib/_components/accordion/accordion.component.d.ts +23 -0
- package/lib/_components/components.module.d.ts +38 -36
- package/lib/_components/counter-input/counter-input.component.d.ts +12 -14
- package/lib/_components/index.d.ts +4 -4
- package/lib/_components/modal/modal.component.d.ts +18 -18
- package/lib/_components/product-card/product-card.component.d.ts +40 -0
- package/lib/_components/products-picker/products-picker.component.d.ts +17 -0
- package/lib/_components/recipe-pricing/recipe-pricing.component.d.ts +12 -8
- package/lib/_components/slider-tabs/slider-tabs.component.d.ts +16 -0
- package/lib/_components/tabs/tabs.component.d.ts +11 -11
- package/lib/_components/toaster/toaster.component.d.ts +4 -2
- package/lib/_models/basket-entry.d.ts +16 -20
- package/lib/_models/basket-preview-line.d.ts +1 -0
- package/lib/_models/basket.d.ts +12 -5
- package/lib/_models/item.d.ts +1 -1
- package/lib/_models/recipe.d.ts +0 -5
- package/lib/_models/user.d.ts +0 -1
- package/lib/_services/analytics.service.d.ts +8 -22
- package/lib/_services/baskets-synchronizing/baskets-comparator.service.d.ts +0 -5
- package/lib/_services/baskets-synchronizing/baskets-synchronizer.service.d.ts +3 -6
- package/lib/_services/baskets.service.d.ts +137 -18
- package/lib/_services/context.service.d.ts +2 -4
- package/lib/_services/index.d.ts +2 -4
- package/lib/_services/items.service.d.ts +9 -2
- package/lib/_services/recipe-details.service.d.ts +84 -0
- package/lib/_services/recipe-likes.service.d.ts +2 -1
- package/lib/_services/recipes.service.d.ts +10 -14
- package/lib/_services/scrolling.service.d.ts +8 -0
- package/lib/_services/toaster.service.d.ts +1 -1
- package/lib/_types/basket-action-type.enum.d.ts +9 -0
- package/lib/_types/basket-action.d.ts +14 -0
- package/lib/_types/basket-stats.d.ts +5 -0
- package/lib/_types/builded/miam-interface.d.ts +16 -25
- package/lib/_types/event-trace.d.ts +22 -0
- package/lib/_types/items-comparator.d.ts +0 -5
- package/lib/_types/recipe-filters.d.ts +0 -2
- package/lib/_types/toaster.d.ts +1 -1
- package/lib/_utils/directives/index.d.ts +1 -0
- package/lib/_utils/directives/reach-top.directive.d.ts +13 -0
- package/lib/_utils/pipes/readable-float-number/readable-float-number.pipe.d.ts +1 -1
- package/lib/_utils/utils.module.d.ts +2 -2
- package/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.d.ts +9 -8
- package/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.d.ts +11 -9
- package/lib/_web-components/basket-preview/replace-item/replace-item.component.d.ts +27 -20
- package/lib/_web-components/index.d.ts +0 -3
- package/lib/_web-components/list-scan/basket-preview/basket-preview.component.d.ts +1 -2
- package/lib/_web-components/list-scan/files-inputs/files-inputs.component.d.ts +6 -5
- package/lib/_web-components/list-scan/ingredients-list/ingredients-list.component.d.ts +3 -3
- package/lib/_web-components/list-scan/list-scan.component.d.ts +3 -3
- package/lib/_web-components/list-scan/overlay-button/overlay-button.component.d.ts +8 -6
- package/lib/_web-components/meals-planner/meals-planner.component.d.ts +2 -3
- package/lib/_web-components/recipe-cards/index.d.ts +0 -2
- package/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.d.ts +58 -17
- package/lib/_web-components/recipe-cards/recipe-card-cta/recipe-card-cta.component.d.ts +5 -12
- package/lib/_web-components/recipe-cards/recipe-cards.module.d.ts +7 -9
- package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts +8 -6
- package/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.d.ts +7 -4
- package/lib/_web-components/recipe-catalog/recipe-catalog.component.d.ts +2 -3
- package/lib/_web-components/recipe-details/recipe-addon/recipe-addon.component.d.ts +5 -2
- package/lib/_web-components/recipe-details/recipe-details-infos/recipe-details-infos.component.d.ts +6 -18
- package/lib/_web-components/recipe-details/recipe-details-ingredients/recipe-details-ingredients.component.d.ts +6 -13
- package/lib/_web-components/recipe-details/recipe-details-steps/recipe-details-steps.component.d.ts +2 -10
- package/lib/_web-components/recipe-details/recipe-details.component.d.ts +29 -36
- package/lib/_web-components/recipe-details/recipe-details.module.d.ts +2 -1
- package/lib/_web-components/recipe-helper/recipe-helper.component.d.ts +2 -6
- package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts +11 -9
- package/lib/_web-components/toaster-stack/toaster-stack.component.d.ts +5 -2
- package/lib/_web-components/web-components.module.d.ts +23 -29
- package/miam-style.css +1 -1
- package/package.json +1 -1
- package/esm2015/lib/_components/abstracts/abstract-recipe-card.component.js +0 -130
- package/esm2015/lib/_components/skeleton/skeleton.component.js +0 -70
- package/esm2015/lib/_components/tabs/tab-body.component.js +0 -30
- package/esm2015/lib/_components/tabs/tab-item.component.js +0 -36
- package/esm2015/lib/_components/tabs/tab-label.component.js +0 -30
- package/esm2015/lib/_models/groceries-entry.js +0 -42
- package/esm2015/lib/_models/groceries-list.js +0 -36
- package/esm2015/lib/_services/counter.service.js +0 -20
- package/esm2015/lib/_services/groceries-entries.service.js +0 -21
- package/esm2015/lib/_services/groceries-lists.service.js +0 -240
- package/esm2015/lib/_services/recipe-events.service.js +0 -63
- package/esm2015/lib/_types/skeleton.enum.js +0 -7
- package/esm2015/lib/_web-components/drawer/drawer.component.js +0 -273
- package/esm2015/lib/_web-components/pos-card/pos-card.component.js +0 -207
- package/esm2015/lib/_web-components/pos-selection/pos-selection.component.js +0 -283
- package/esm2015/lib/_web-components/recipe-cards/catalog-recipe-card/catalog-recipe-card.component.js +0 -632
- package/esm2015/lib/_web-components/recipe-cards/suggestion-card/suggestion-card.component.js +0 -144
- package/lib/_components/abstracts/abstract-recipe-card.component.d.ts +0 -49
- package/lib/_components/skeleton/skeleton.component.d.ts +0 -11
- package/lib/_components/tabs/tab-body.component.d.ts +0 -8
- package/lib/_components/tabs/tab-item.component.d.ts +0 -11
- package/lib/_components/tabs/tab-label.component.d.ts +0 -8
- package/lib/_models/groceries-entry.d.ts +0 -20
- package/lib/_models/groceries-list.d.ts +0 -30
- package/lib/_services/counter.service.d.ts +0 -10
- package/lib/_services/groceries-entries.service.d.ts +0 -10
- package/lib/_services/groceries-lists.service.d.ts +0 -68
- package/lib/_services/recipe-events.service.d.ts +0 -23
- package/lib/_types/skeleton.enum.d.ts +0 -5
- package/lib/_web-components/drawer/drawer.component.d.ts +0 -37
- package/lib/_web-components/pos-card/pos-card.component.d.ts +0 -24
- package/lib/_web-components/pos-selection/pos-selection.component.d.ts +0 -38
- package/lib/_web-components/recipe-cards/catalog-recipe-card/catalog-recipe-card.component.d.ts +0 -49
- package/lib/_web-components/recipe-cards/suggestion-card/suggestion-card.component.d.ts +0 -42
package/esm2015/lib/_web-components/recipe-cards/suggestion-card/suggestion-card.component.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { Component, ViewEncapsulation, ChangeDetectorRef, ChangeDetectionStrategy, Input, ViewChild, ElementRef } from '@angular/core';
|
|
2
|
-
import { AbstractRecipeCardComponent } from '../../../_components/abstracts/abstract-recipe-card.component';
|
|
3
|
-
import { RecipesService, RecipeEventsService, GroceriesListsService, ContextService } from '../../../_services';
|
|
4
|
-
import { of } from 'rxjs';
|
|
5
|
-
import { catchError, skipWhile, switchMap, take } from 'rxjs/operators';
|
|
6
|
-
import { RecipeCardComponent } from '../recipe-card/recipe-card.component';
|
|
7
|
-
import { AnalyticsService } from '../../../_services/analytics.service';
|
|
8
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
import * as i1 from "../../../_services";
|
|
11
|
-
import * as i2 from "../../../_services/analytics.service";
|
|
12
|
-
import * as i3 from "@angular/common";
|
|
13
|
-
import * as i4 from "../recipe-card/recipe-card.component";
|
|
14
|
-
const _c0 = ["recipeCard"];
|
|
15
|
-
function SuggestionCardComponent_ng_miam_recipe_card_0_Template(rf, ctx) { if (rf & 1) {
|
|
16
|
-
const _r3 = i0.ɵɵgetCurrentView();
|
|
17
|
-
i0.ɵɵelementStart(0, "ng-miam-recipe-card", 1, 2);
|
|
18
|
-
i0.ɵɵlistener("guestsChanged", function SuggestionCardComponent_ng_miam_recipe_card_0_Template_ng_miam_recipe_card_guestsChanged_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.guestsChanged(); });
|
|
19
|
-
i0.ɵɵelementEnd();
|
|
20
|
-
} if (rf & 2) {
|
|
21
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
22
|
-
i0.ɵɵproperty("recipe", ctx_r0.recipe)("headerText", ctx_r0.headerText)("displayPricing", ctx_r0.displayPricing)("displayAddedOnPicture", ctx_r0.displayAddedOnPicture)("originTrace", ctx_r0.eventTrace());
|
|
23
|
-
} }
|
|
24
|
-
const recipeIncludes = ['recipe-provider', 'sponsors'];
|
|
25
|
-
const recipeSparseFields = {
|
|
26
|
-
recipes: ['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
27
|
-
'resting-time', ...recipeIncludes],
|
|
28
|
-
sponsors: ['logo-url'],
|
|
29
|
-
['recipe-provider']: ['name']
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* This is an angular component design to be a web component
|
|
33
|
-
* that's why we use onPushStrategie with the changeDetetectorRef
|
|
34
|
-
* to avoid common issue
|
|
35
|
-
* guide -> https://netbasal.com/a-comprehensive-guide-to-angular-onpush-change-detection-strategy-5bac493074a4
|
|
36
|
-
* and alsow we use ShadowDom to protect style of our component
|
|
37
|
-
* and alsow style of the parent aplication that will use it
|
|
38
|
-
* doc -> https://angular.io/api/core/ViewEncapsulation
|
|
39
|
-
*/
|
|
40
|
-
export class SuggestionCardComponent extends AbstractRecipeCardComponent {
|
|
41
|
-
constructor(cdr, recipeService, groceriesListsService, contextService, analyticsService, recipeEventsService, element) {
|
|
42
|
-
super(cdr, recipeService, recipeEventsService, groceriesListsService, contextService, analyticsService, element);
|
|
43
|
-
this.cdr = cdr;
|
|
44
|
-
this.recipeService = recipeService;
|
|
45
|
-
this.groceriesListsService = groceriesListsService;
|
|
46
|
-
this.contextService = contextService;
|
|
47
|
-
this.analyticsService = analyticsService;
|
|
48
|
-
this.recipeEventsService = recipeEventsService;
|
|
49
|
-
this.element = element;
|
|
50
|
-
this.isEmpty = false;
|
|
51
|
-
this.eventsGroupId = uuidv4();
|
|
52
|
-
// as the template creates a recipe card, the recipe card send the events
|
|
53
|
-
this.sendShowEventOnScroll = false;
|
|
54
|
-
}
|
|
55
|
-
ngOnChanges(simpleChanges) {
|
|
56
|
-
if ((simpleChanges.productIds && !this.randomModeEnable) || !this.recipe) {
|
|
57
|
-
this.loadRecipe();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
// Only send show event if the recipe has changed while the card was in viewport
|
|
61
|
-
sendShowEvent() {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
// If recipe already in basket, update the number of guests so that the pricing gets updated as well
|
|
65
|
-
// (display = false so that the recipe details don't show up)
|
|
66
|
-
guestsChanged() {
|
|
67
|
-
this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).pipe(switchMap(recipeIsInList => {
|
|
68
|
-
if (recipeIsInList) {
|
|
69
|
-
return this.groceriesListsService.appendRecipeToList(this.recipe.id, this.recipe.modifiedGuests, this.eventTrace())
|
|
70
|
-
.pipe(take(1));
|
|
71
|
-
}
|
|
72
|
-
})).subscribe(() => this.cdr.detectChanges()));
|
|
73
|
-
}
|
|
74
|
-
loadRecipe() {
|
|
75
|
-
this.subscriptions.push(this.fetchRecipes().pipe(skipWhile(results => !results), catchError(err => {
|
|
76
|
-
this.hide.emit();
|
|
77
|
-
return of(err);
|
|
78
|
-
})).subscribe(results => this.processResults(results)));
|
|
79
|
-
}
|
|
80
|
-
fetchRecipes() {
|
|
81
|
-
if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes.includes('ingredients')) {
|
|
82
|
-
recipeIncludes.push('ingredients');
|
|
83
|
-
recipeSparseFields.recipes.push('ingredients');
|
|
84
|
-
recipeSparseFields['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
|
|
85
|
-
}
|
|
86
|
-
if (this.randomModeEnable) {
|
|
87
|
-
return this.recipeService.getRandom(recipeIncludes, recipeSparseFields);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
return this.recipeService.getSuggestion(this.productIds, this.eventsGroupId, recipeIncludes, recipeSparseFields);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// If the recipe is in basket, will show number of guests as defined in the basket
|
|
94
|
-
// Otherwise, will show default number of guests for the recipe
|
|
95
|
-
processResults(recipes) {
|
|
96
|
-
this.isEmpty = (!recipes || recipes.length === 0);
|
|
97
|
-
if (!this.isEmpty) {
|
|
98
|
-
// get the first recipe and shallow copy it to permit to send event and do not disturb any other component
|
|
99
|
-
// if ressource is cached without copy another load will get the attributes
|
|
100
|
-
this.recipe = recipes[0].shallowCopyWithEvents(this.recipeEventsService.ORIGIN_SUGGESTION, this.eventsGroupId);
|
|
101
|
-
// Update guests from list only if recipe is in list
|
|
102
|
-
this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).subscribe(isInList => {
|
|
103
|
-
if (isInList) {
|
|
104
|
-
this.recipe.modifiedGuests = this.groceriesListsService.guestsForRecipe(this.recipe) || +this.recipe.guests;
|
|
105
|
-
this.recipeCard.cdr.markForCheck();
|
|
106
|
-
}
|
|
107
|
-
}));
|
|
108
|
-
this.recipeCard.cdr.markForCheck();
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
this.hide.emit();
|
|
112
|
-
}
|
|
113
|
-
this.cdr.detectChanges();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
SuggestionCardComponent.ɵfac = function SuggestionCardComponent_Factory(t) { return new (t || SuggestionCardComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.RecipesService), i0.ɵɵdirectiveInject(i1.GroceriesListsService), i0.ɵɵdirectiveInject(i1.ContextService), i0.ɵɵdirectiveInject(i2.AnalyticsService), i0.ɵɵdirectiveInject(i1.RecipeEventsService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
117
|
-
SuggestionCardComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SuggestionCardComponent, selectors: [["ng-miam-suggestion-card"]], viewQuery: function SuggestionCardComponent_Query(rf, ctx) { if (rf & 1) {
|
|
118
|
-
i0.ɵɵviewQuery(_c0, true);
|
|
119
|
-
} if (rf & 2) {
|
|
120
|
-
var _t;
|
|
121
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCard = _t.first);
|
|
122
|
-
} }, inputs: { randomModeEnable: "randomModeEnable", productIds: "productIds" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "recipe", "headerText", "displayPricing", "displayAddedOnPicture", "originTrace", "guestsChanged", 4, "ngIf"], [3, "recipe", "headerText", "displayPricing", "displayAddedOnPicture", "originTrace", "guestsChanged"], ["recipeCard", ""]], template: function SuggestionCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
123
|
-
i0.ɵɵtemplate(0, SuggestionCardComponent_ng_miam_recipe_card_0_Template, 2, 5, "ng-miam-recipe-card", 0);
|
|
124
|
-
} if (rf & 2) {
|
|
125
|
-
i0.ɵɵproperty("ngIf", !ctx.isEmpty);
|
|
126
|
-
} }, directives: [i3.NgIf, i4.RecipeCardComponent], styles: [""], encapsulation: 2, changeDetection: 0 });
|
|
127
|
-
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(SuggestionCardComponent, [{
|
|
128
|
-
type: Component,
|
|
129
|
-
args: [{
|
|
130
|
-
selector: 'ng-miam-suggestion-card',
|
|
131
|
-
templateUrl: './suggestion-card.component.html',
|
|
132
|
-
styleUrls: ['./suggestion-card.component.scss'],
|
|
133
|
-
encapsulation: ViewEncapsulation.None,
|
|
134
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
135
|
-
}]
|
|
136
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.RecipesService }, { type: i1.GroceriesListsService }, { type: i1.ContextService }, { type: i2.AnalyticsService }, { type: i1.RecipeEventsService }, { type: i0.ElementRef }]; }, { randomModeEnable: [{
|
|
137
|
-
type: Input
|
|
138
|
-
}], productIds: [{
|
|
139
|
-
type: Input
|
|
140
|
-
}], recipeCard: [{
|
|
141
|
-
type: ViewChild,
|
|
142
|
-
args: ['recipeCard']
|
|
143
|
-
}] }); })();
|
|
144
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VnZ2VzdGlvbi1jYXJkL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GVcIlxuICBbaGVhZGVyVGV4dF09J2hlYWRlclRleHQnXG4gIFtkaXNwbGF5UHJpY2luZ109XCJkaXNwbGF5UHJpY2luZ1wiXG4gIFtkaXNwbGF5QWRkZWRPblBpY3R1cmVdPVwiZGlzcGxheUFkZGVkT25QaWN0dXJlXCJcbiAgW29yaWdpblRyYWNlXT1cImV2ZW50VHJhY2UoKVwiXG4gIChndWVzdHNDaGFuZ2VkKT1cImd1ZXN0c0NoYW5nZWQoKVwiXG4+PC9uZy1taWFtLXJlY2lwZS1jYXJkPlxuIl19
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import { SimplifiedIngredient } from '../../_models';
|
|
4
|
-
import { Recipe } from '../../_models/recipe';
|
|
5
|
-
import { RecipesService, GroceriesListsService, ContextService, RecipeEventsService } from '../../_services';
|
|
6
|
-
import { AnalyticsService, CustomProperties } from '../../_services/analytics.service';
|
|
7
|
-
import { Icon } from '../../_types/icon.enum';
|
|
8
|
-
import { Skeleton } from '../../_types/skeleton.enum';
|
|
9
|
-
import { EventTracerComponent } from './event-tracer.component';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
export declare abstract class AbstractRecipeCardComponent extends EventTracerComponent implements OnDestroy, AfterViewInit {
|
|
12
|
-
cdr: ChangeDetectorRef;
|
|
13
|
-
recipeService: RecipesService;
|
|
14
|
-
recipeEventsService: RecipeEventsService;
|
|
15
|
-
groceriesListsService: GroceriesListsService;
|
|
16
|
-
contextService: ContextService;
|
|
17
|
-
protected analyticsService: AnalyticsService;
|
|
18
|
-
protected element: ElementRef<HTMLElement>;
|
|
19
|
-
headerText: string;
|
|
20
|
-
displayPricing: boolean;
|
|
21
|
-
displayGuests: boolean;
|
|
22
|
-
helpButtonAllowed: boolean;
|
|
23
|
-
displayAddedOnPicture: boolean;
|
|
24
|
-
hide: EventEmitter<void>;
|
|
25
|
-
recipe: Recipe;
|
|
26
|
-
hovered: boolean;
|
|
27
|
-
icon: typeof Icon;
|
|
28
|
-
skeleton: typeof Skeleton;
|
|
29
|
-
isPriceDisplayed: boolean;
|
|
30
|
-
addButtonLoading: boolean;
|
|
31
|
-
protected analyticsEventSent: boolean;
|
|
32
|
-
protected subscriptions: Subscription[];
|
|
33
|
-
protected sendShowEventsOnScroll: boolean;
|
|
34
|
-
constructor(cdr: ChangeDetectorRef, recipeService: RecipesService, recipeEventsService: RecipeEventsService, groceriesListsService: GroceriesListsService, contextService: ContextService, analyticsService: AnalyticsService, element: ElementRef<HTMLElement>);
|
|
35
|
-
onScroll(): void;
|
|
36
|
-
currentPath(): string;
|
|
37
|
-
ngAfterViewInit(): void;
|
|
38
|
-
ngOnDestroy(): void;
|
|
39
|
-
toggleHelper(): void;
|
|
40
|
-
openCalendar(event: Event): void;
|
|
41
|
-
shareRecipe(event: Event): void;
|
|
42
|
-
isInViewport(): boolean;
|
|
43
|
-
sendShowEvent(): boolean;
|
|
44
|
-
displayPrice(): void;
|
|
45
|
-
ingredientPicture(ingredient: SimplifiedIngredient): string;
|
|
46
|
-
protected currentProps(): CustomProperties;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDef<AbstractRecipeCardComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<AbstractRecipeCardComponent, "ng-component", never, { "headerText": "headerText"; "displayPricing": "displayPricing"; "displayGuests": "displayGuests"; "helpButtonAllowed": "helpButtonAllowed"; "displayAddedOnPicture": "displayAddedOnPicture"; }, { "hide": "hide"; }, never, never>;
|
|
49
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Icon } from '../../_types/icon.enum';
|
|
2
|
-
import { Skeleton } from '../../_types/skeleton.enum';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SkeletonComponent {
|
|
5
|
-
type: Skeleton;
|
|
6
|
-
icon: typeof Icon;
|
|
7
|
-
skeleton: typeof Skeleton;
|
|
8
|
-
constructor();
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDef<SkeletonComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<SkeletonComponent, "ng-miam-skeleton", never, { "type": "type"; }, {}, never, never>;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TabBodyComponent {
|
|
4
|
-
bodyContent: TemplateRef<any>;
|
|
5
|
-
constructor();
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDef<TabBodyComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<TabBodyComponent, "ng-miam-tab-body", never, {}, {}, never, ["*"]>;
|
|
8
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TabBodyComponent } from './tab-body.component';
|
|
2
|
-
import { TabLabelComponent } from './tab-label.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TabItemComponent {
|
|
5
|
-
label: string;
|
|
6
|
-
bodyComponent: TabBodyComponent;
|
|
7
|
-
labelComponent: TabLabelComponent;
|
|
8
|
-
constructor();
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDef<TabItemComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<TabItemComponent, "ng-miam-tab-item", never, { "label": "label"; }, {}, ["bodyComponent", "labelComponent"], ["*"]>;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TabLabelComponent {
|
|
4
|
-
labelContent: TemplateRef<any>;
|
|
5
|
-
constructor();
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDef<TabLabelComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<TabLabelComponent, "ng-miam-tab-label", never, {}, {}, never, ["*"]>;
|
|
8
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Resource } from 'ngx-jsonapi';
|
|
2
|
-
export declare class GroceriesEntry extends Resource {
|
|
3
|
-
attributes: {
|
|
4
|
-
name: string;
|
|
5
|
-
'capacity-volume': number;
|
|
6
|
-
'capacity-unit': string;
|
|
7
|
-
'capacity-factor': string;
|
|
8
|
-
status: string;
|
|
9
|
-
'recipe-ids': string[];
|
|
10
|
-
};
|
|
11
|
-
get status(): string;
|
|
12
|
-
set status(st: string);
|
|
13
|
-
get name(): string;
|
|
14
|
-
set name(n: string);
|
|
15
|
-
get recipesIds(): (string | number)[];
|
|
16
|
-
get volume(): number;
|
|
17
|
-
set volume(v: number);
|
|
18
|
-
get unit(): string;
|
|
19
|
-
set unit(u: string);
|
|
20
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { DocumentCollection, Resource } from 'ngx-jsonapi';
|
|
2
|
-
import { GroceriesEntry } from './groceries-entry';
|
|
3
|
-
import { Recipe } from './recipe';
|
|
4
|
-
export declare class GroceriesList extends Resource {
|
|
5
|
-
attributes: {
|
|
6
|
-
name: string;
|
|
7
|
-
'created-at': string;
|
|
8
|
-
'updated-at': string;
|
|
9
|
-
entries: any[];
|
|
10
|
-
'recipes-ids': string[];
|
|
11
|
-
'recipes-infos': {
|
|
12
|
-
id: string;
|
|
13
|
-
guests?: string;
|
|
14
|
-
}[];
|
|
15
|
-
'search-options': {};
|
|
16
|
-
settings: {};
|
|
17
|
-
'user-id': string;
|
|
18
|
-
'append-recipes': boolean;
|
|
19
|
-
};
|
|
20
|
-
relationships: {
|
|
21
|
-
'groceries-entries': DocumentCollection<GroceriesEntry>;
|
|
22
|
-
};
|
|
23
|
-
get recipeInfos(): {
|
|
24
|
-
id: string;
|
|
25
|
-
guests?: string;
|
|
26
|
-
}[];
|
|
27
|
-
get entries(): DocumentCollection<GroceriesEntry>;
|
|
28
|
-
hasRecipe(recipeId: string): boolean;
|
|
29
|
-
guestsForRecipe(recipe: Recipe): number;
|
|
30
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ApplicationRef } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CounterService {
|
|
5
|
-
private app;
|
|
6
|
-
counterNumber: BehaviorSubject<number>;
|
|
7
|
-
constructor(app: ApplicationRef);
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDef<CounterService, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDef<CounterService>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Service } from 'ngx-jsonapi';
|
|
2
|
-
import { GroceriesEntry } from '../_models/groceries-entry';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class GroceriesEntriesService extends Service<GroceriesEntry> {
|
|
5
|
-
resource: typeof GroceriesEntry;
|
|
6
|
-
type: string;
|
|
7
|
-
constructor();
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDef<GroceriesEntriesService, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDef<GroceriesEntriesService>;
|
|
10
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Service } from 'ngx-jsonapi';
|
|
3
|
-
import { Observable, BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { Recipe } from '../_models';
|
|
5
|
-
import { GroceriesList } from '../_models/groceries-list';
|
|
6
|
-
import { AnalyticsService, EventTrace } from './analytics.service';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class GroceriesListsService extends Service<GroceriesList> {
|
|
9
|
-
private miamBasketURL;
|
|
10
|
-
private http;
|
|
11
|
-
private analyticsService;
|
|
12
|
-
resource: typeof GroceriesList;
|
|
13
|
-
type: string;
|
|
14
|
-
recipeWasAdded$: BehaviorSubject<{
|
|
15
|
-
id: string;
|
|
16
|
-
guests?: string;
|
|
17
|
-
}[]>;
|
|
18
|
-
recipeWasDeleted$: BehaviorSubject<{
|
|
19
|
-
id: string;
|
|
20
|
-
guests?: string;
|
|
21
|
-
}[]>;
|
|
22
|
-
recipesToRemove: BehaviorSubject<{
|
|
23
|
-
id: string;
|
|
24
|
-
eventTrace: EventTrace;
|
|
25
|
-
}[]>;
|
|
26
|
-
isRemovingRecipes: boolean;
|
|
27
|
-
private _list$;
|
|
28
|
-
private saveOperationType;
|
|
29
|
-
private currentSubscription;
|
|
30
|
-
private listIsFetching;
|
|
31
|
-
constructor(miamBasketURL: string, http: HttpClient, analyticsService: AnalyticsService);
|
|
32
|
-
/**
|
|
33
|
-
* We want list$ to be a singleton that always returns the same list, so it is fetched only when necessary.
|
|
34
|
-
* At any point in time the list can be fetched via the refreshCurrentList function (if we want to fetch it on startup to save time later)
|
|
35
|
-
* But if refreshCurrentList is not called, the list will only be fetched the 1st time it is needed
|
|
36
|
-
*/
|
|
37
|
-
get list$(): BehaviorSubject<GroceriesList>;
|
|
38
|
-
takeFirstList(): Observable<GroceriesList>;
|
|
39
|
-
recipeIsInList(recipeId: string): Observable<boolean>;
|
|
40
|
-
guestsForRecipe(recipe: Recipe): number;
|
|
41
|
-
refreshCurrentList(): BehaviorSubject<GroceriesList>;
|
|
42
|
-
resetList(eventTrace?: EventTrace): Observable<GroceriesList>;
|
|
43
|
-
appendRecipeToList(recipeId: string, guests: number, eventTrace: EventTrace, openBasket?: boolean): Observable<object>;
|
|
44
|
-
appendRecipesToList(recipes: {
|
|
45
|
-
id: string;
|
|
46
|
-
guests: number;
|
|
47
|
-
}[], eventTrace: EventTrace, openBasket?: boolean): Observable<object>;
|
|
48
|
-
private addOrUpdateRecipeInList;
|
|
49
|
-
removeRecipeFromList(recipeId: string, eventTrace: EventTrace): void;
|
|
50
|
-
updateRecipeGuests(recipeId: string, guests: number, eventTrace: EventTrace): Observable<GroceriesList>;
|
|
51
|
-
addEntriesFromPicture(file: File, include?: any[], disableIngredientsMatching?: boolean): Observable<GroceriesList>;
|
|
52
|
-
/**
|
|
53
|
-
* Will create a temporary list and set it in _list$. The list won't be marked as current and thus
|
|
54
|
-
* will not be reused
|
|
55
|
-
*/
|
|
56
|
-
createTemporaryList(): void;
|
|
57
|
-
emptyRecipesToRemove(): void;
|
|
58
|
-
/**
|
|
59
|
-
* save() returns an object that isn't a resource so methods aren't attached, so we have to do a little trick
|
|
60
|
-
* @param res result of the save
|
|
61
|
-
* @returns correct GroceriesList with the right attributes & methods
|
|
62
|
-
*/
|
|
63
|
-
private afterSave;
|
|
64
|
-
private saveList;
|
|
65
|
-
private assignList;
|
|
66
|
-
static ɵfac: i0.ɵɵFactoryDef<GroceriesListsService, never>;
|
|
67
|
-
static ɵprov: i0.ɵɵInjectableDef<GroceriesListsService>;
|
|
68
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Recipe } from '../_models';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class RecipeEventsService {
|
|
5
|
-
private http;
|
|
6
|
-
suggestionUrl: string;
|
|
7
|
-
ORIGIN_SUGGESTION: string;
|
|
8
|
-
ORIGIN_CATALOG: string;
|
|
9
|
-
ACTION_PROPOSED: string;
|
|
10
|
-
ACTION_SHOWN: string;
|
|
11
|
-
ACTION_DISPLAYED: string;
|
|
12
|
-
ACTION_ADDED: string;
|
|
13
|
-
ACTION_PUSHED: string;
|
|
14
|
-
private eventQueue;
|
|
15
|
-
private willAlreadyProcess;
|
|
16
|
-
private QUEUE_REFRESH_TIME_MS;
|
|
17
|
-
constructor(http: HttpClient);
|
|
18
|
-
enqueueEvent(recipe: Recipe, action: string): void;
|
|
19
|
-
processQueue(): void;
|
|
20
|
-
sendEvent(recipe: Recipe, action: string): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDef<RecipeEventsService, never>;
|
|
22
|
-
static ɵprov: i0.ɵɵInjectableDef<RecipeEventsService>;
|
|
23
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { OnInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
2
|
-
import { BasketsService, GroceriesListsService, BasketStats, ContextService, SuppliersService } from '../../_services';
|
|
3
|
-
import { PointOfSalesService } from '../../_services/point-of-sales.service';
|
|
4
|
-
import { PointOfSale } from '../../_models/point-of-sale';
|
|
5
|
-
import { AnalyticsService } from '../../_services/analytics.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class DrawerComponent implements OnInit, OnDestroy {
|
|
8
|
-
private cdr;
|
|
9
|
-
private listsService;
|
|
10
|
-
private posService;
|
|
11
|
-
private basketsService;
|
|
12
|
-
private analyticsService;
|
|
13
|
-
private context;
|
|
14
|
-
private supplierService;
|
|
15
|
-
expand: boolean;
|
|
16
|
-
recipesCount: number;
|
|
17
|
-
jiggle: boolean;
|
|
18
|
-
valid: boolean;
|
|
19
|
-
loading: boolean;
|
|
20
|
-
pos: PointOfSale;
|
|
21
|
-
basketStats: BasketStats;
|
|
22
|
-
currency: import("rxjs").Observable<string>;
|
|
23
|
-
private subscriptions;
|
|
24
|
-
constructor(cdr: ChangeDetectorRef, listsService: GroceriesListsService, posService: PointOfSalesService, basketsService: BasketsService, analyticsService: AnalyticsService, context: ContextService, supplierService: SuppliersService);
|
|
25
|
-
ngOnInit(): void;
|
|
26
|
-
ngOnDestroy(): void;
|
|
27
|
-
onKeydownHandler(event: KeyboardEvent): void;
|
|
28
|
-
clickout(event: any): void;
|
|
29
|
-
toggleExpand(): void;
|
|
30
|
-
order(): void;
|
|
31
|
-
private show;
|
|
32
|
-
private hide;
|
|
33
|
-
private doJiggle;
|
|
34
|
-
private assessValid;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDef<DrawerComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<DrawerComponent, "ng-miam-drawer", never, {}, {}, never, never>;
|
|
37
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { OnInit, ChangeDetectorRef, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
-
import { PointOfSale } from '../../_models/point-of-sale';
|
|
3
|
-
import { BasketCompletion } from '../../_models/basket';
|
|
4
|
-
import { BasketsService, GroceriesListsService } from '../../_services';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class PosCardComponent implements OnInit, OnDestroy {
|
|
7
|
-
cdr: ChangeDetectorRef;
|
|
8
|
-
private listsService;
|
|
9
|
-
private basketsService;
|
|
10
|
-
pos: PointOfSale;
|
|
11
|
-
selected: boolean;
|
|
12
|
-
hoverText: string;
|
|
13
|
-
select: EventEmitter<PointOfSale>;
|
|
14
|
-
completion: BasketCompletion;
|
|
15
|
-
gaugeColor: string;
|
|
16
|
-
gaugeSize: string;
|
|
17
|
-
private subscriptions;
|
|
18
|
-
constructor(cdr: ChangeDetectorRef, listsService: GroceriesListsService, basketsService: BasketsService);
|
|
19
|
-
ngOnInit(): void;
|
|
20
|
-
ngOnDestroy(): void;
|
|
21
|
-
private calculateGauge;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDef<PosCardComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<PosCardComponent, "ng-miam-pos-card", never, { "pos": "pos"; "selected": "selected"; "hoverText": "hoverText"; }, { "select": "select"; }, never, never>;
|
|
24
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { OnInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
2
|
-
import { PointOfSalesService } from '../../_services/point-of-sales.service';
|
|
3
|
-
import { PointOfSale } from '../../_models/point-of-sale';
|
|
4
|
-
import { PosCardComponent } from '../pos-card/pos-card.component';
|
|
5
|
-
import { ContextService } from '../../_services/context.service';
|
|
6
|
-
import { AnalyticsService } from '../../_services/analytics.service';
|
|
7
|
-
import { Icon } from '../../_types/icon.enum';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class PosSelectionComponent implements OnInit, OnDestroy {
|
|
10
|
-
private cdr;
|
|
11
|
-
private contextService;
|
|
12
|
-
posService: PointOfSalesService;
|
|
13
|
-
private analyticsService;
|
|
14
|
-
blockTitle: string;
|
|
15
|
-
selectedPosCard: PosCardComponent;
|
|
16
|
-
expand: boolean;
|
|
17
|
-
loading: boolean;
|
|
18
|
-
replacing: boolean;
|
|
19
|
-
address: string;
|
|
20
|
-
sorryCaption: string;
|
|
21
|
-
selectedPos: PointOfSale;
|
|
22
|
-
candidatePos: PointOfSale[];
|
|
23
|
-
corsIssues: boolean;
|
|
24
|
-
icon: typeof Icon;
|
|
25
|
-
private subscriptions;
|
|
26
|
-
constructor(cdr: ChangeDetectorRef, contextService: ContextService, posService: PointOfSalesService, analyticsService: AnalyticsService);
|
|
27
|
-
ngOnInit(): void;
|
|
28
|
-
ngOnDestroy(): void;
|
|
29
|
-
toggle(): void;
|
|
30
|
-
show(): void;
|
|
31
|
-
hide(): void;
|
|
32
|
-
startReplace(): void;
|
|
33
|
-
replace(pos: PointOfSale): void;
|
|
34
|
-
endReplace(): void;
|
|
35
|
-
searchAddress(): any;
|
|
36
|
-
static ɵfac: i0.ɵɵFactoryDef<PosSelectionComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<PosSelectionComponent, "ng-miam-pos-selection", never, { "blockTitle": "blockTitle"; }, {}, never, never>;
|
|
38
|
-
}
|
package/lib/_web-components/recipe-cards/catalog-recipe-card/catalog-recipe-card.component.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnInit, ElementRef, EventEmitter, AfterViewInit } from '@angular/core';
|
|
2
|
-
import { RecipesService, GroceriesListsService, ContextService, RecipeEventsService, UserService } from '../../../_services';
|
|
3
|
-
import { AnalyticsService } from '../../../_services/analytics.service';
|
|
4
|
-
import { RecipeCardComponent } from '../recipe-card/recipe-card.component';
|
|
5
|
-
import { Recipe } from '../../../_models';
|
|
6
|
-
import { RecipeCardCtaComponent } from '../recipe-card-cta/recipe-card-cta.component';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* This is an angular component design to be a web component
|
|
10
|
-
* that's why we use onPushStrategie with the changeDetetectorRef
|
|
11
|
-
* to avoid common issue
|
|
12
|
-
* guide -> https://netbasal.com/a-comprehensive-guide-to-angular-onpush-change-detection-strategy-5bac493074a4
|
|
13
|
-
* and alsow we use ShadowDom to protect style of our component
|
|
14
|
-
* and alsow style of the parent aplication that will use it
|
|
15
|
-
* doc -> https://angular.io/api/core/ViewEncapsulation
|
|
16
|
-
*/
|
|
17
|
-
export declare class CatalogRecipeCardComponent extends RecipeCardComponent implements OnInit, AfterViewInit {
|
|
18
|
-
cdr: ChangeDetectorRef;
|
|
19
|
-
recipeService: RecipesService;
|
|
20
|
-
recipeEventsService: RecipeEventsService;
|
|
21
|
-
groceriesListsService: GroceriesListsService;
|
|
22
|
-
userService: UserService;
|
|
23
|
-
contextService: ContextService;
|
|
24
|
-
analyticsService: AnalyticsService;
|
|
25
|
-
element: ElementRef<HTMLElement>;
|
|
26
|
-
private eventsGroupId;
|
|
27
|
-
private observer;
|
|
28
|
-
displayPricing: boolean;
|
|
29
|
-
displayAddedOnPicture: boolean;
|
|
30
|
-
addRecipeMode: boolean;
|
|
31
|
-
replaceMode: boolean;
|
|
32
|
-
actionTriggered: EventEmitter<string>;
|
|
33
|
-
removeFromMealsPlanner: EventEmitter<null>;
|
|
34
|
-
addToMealsPlanner: EventEmitter<Recipe>;
|
|
35
|
-
openCatalog: EventEmitter<null>;
|
|
36
|
-
cardType: string;
|
|
37
|
-
moreActions: ElementRef<HTMLElement>;
|
|
38
|
-
cta: RecipeCardCtaComponent;
|
|
39
|
-
actionsOpened: boolean;
|
|
40
|
-
constructor(cdr: ChangeDetectorRef, recipeService: RecipesService, recipeEventsService: RecipeEventsService, groceriesListsService: GroceriesListsService, userService: UserService, contextService: ContextService, analyticsService: AnalyticsService, element: ElementRef<HTMLElement>);
|
|
41
|
-
ngOnInit(): void;
|
|
42
|
-
ngAfterViewInit(): void;
|
|
43
|
-
initIntersectionObserver(): void;
|
|
44
|
-
updateGuests(count: any): void;
|
|
45
|
-
toggleMoreActions(event: any): void;
|
|
46
|
-
closeMoreActions(): void;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDef<CatalogRecipeCardComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<CatalogRecipeCardComponent, "ng-miam-catalog-recipe-card", never, { "displayPricing": "displayPricing"; "displayAddedOnPicture": "displayAddedOnPicture"; "addRecipeMode": "addRecipeMode"; "replaceMode": "replaceMode"; }, { "actionTriggered": "actionTriggered"; "removeFromMealsPlanner": "removeFromMealsPlanner"; "addToMealsPlanner": "addToMealsPlanner"; "openCatalog": "openCatalog"; }, never, never>;
|
|
49
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnChanges, SimpleChanges, ElementRef } from '@angular/core';
|
|
2
|
-
import { AbstractRecipeCardComponent } from '../../../_components/abstracts/abstract-recipe-card.component';
|
|
3
|
-
import { RecipesService, RecipeEventsService, GroceriesListsService, ContextService } from '../../../_services';
|
|
4
|
-
import { RecipeCardComponent } from '../recipe-card/recipe-card.component';
|
|
5
|
-
import { AnalyticsService } from '../../../_services/analytics.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* This is an angular component design to be a web component
|
|
9
|
-
* that's why we use onPushStrategie with the changeDetetectorRef
|
|
10
|
-
* to avoid common issue
|
|
11
|
-
* guide -> https://netbasal.com/a-comprehensive-guide-to-angular-onpush-change-detection-strategy-5bac493074a4
|
|
12
|
-
* and alsow we use ShadowDom to protect style of our component
|
|
13
|
-
* and alsow style of the parent aplication that will use it
|
|
14
|
-
* doc -> https://angular.io/api/core/ViewEncapsulation
|
|
15
|
-
*/
|
|
16
|
-
export declare class SuggestionCardComponent extends AbstractRecipeCardComponent implements OnChanges {
|
|
17
|
-
cdr: ChangeDetectorRef;
|
|
18
|
-
recipeService: RecipesService;
|
|
19
|
-
groceriesListsService: GroceriesListsService;
|
|
20
|
-
contextService: ContextService;
|
|
21
|
-
protected analyticsService: AnalyticsService;
|
|
22
|
-
recipeEventsService: RecipeEventsService;
|
|
23
|
-
protected element: ElementRef<HTMLElement>;
|
|
24
|
-
randomModeEnable: boolean;
|
|
25
|
-
productIds: {
|
|
26
|
-
id: string;
|
|
27
|
-
hasHighWeight?: boolean;
|
|
28
|
-
}[];
|
|
29
|
-
isEmpty: boolean;
|
|
30
|
-
private eventsGroupId;
|
|
31
|
-
protected sendShowEventOnScroll: boolean;
|
|
32
|
-
recipeCard: RecipeCardComponent;
|
|
33
|
-
constructor(cdr: ChangeDetectorRef, recipeService: RecipesService, groceriesListsService: GroceriesListsService, contextService: ContextService, analyticsService: AnalyticsService, recipeEventsService: RecipeEventsService, element: ElementRef<HTMLElement>);
|
|
34
|
-
ngOnChanges(simpleChanges: SimpleChanges): void;
|
|
35
|
-
sendShowEvent(): boolean;
|
|
36
|
-
guestsChanged(): void;
|
|
37
|
-
private loadRecipe;
|
|
38
|
-
private fetchRecipes;
|
|
39
|
-
private processResults;
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDef<SuggestionCardComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<SuggestionCardComponent, "ng-miam-suggestion-card", never, { "randomModeEnable": "randomModeEnable"; "productIds": "productIds"; }, {}, never, never>;
|
|
42
|
-
}
|