ng-miam 8.0.8 → 8.0.10
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 +20 -14
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +1 -1
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_components/addon-link/addon-link.component.js +1 -1
- package/esm2015/lib/_services/interceptor.service.js +2 -2
- package/esm2015/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.js +18 -13
- package/esm2015/lib/_web-components/recipe-details/recipe-addon/recipe-addon.component.js +1 -1
- package/fesm2015/ng-miam.js +19 -14
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/interceptor.service.d.ts.map +1 -1
- package/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.d.ts +2 -1
- package/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.d.ts.map +1 -1
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -6661,7 +6661,7 @@
|
|
|
6661
6661
|
i0__namespace.ɵɵadvance(1);
|
|
6662
6662
|
i0__namespace.ɵɵproperty("ngIf", ctx.recipe == null ? null : ctx.recipe.sponsorLogoUrl);
|
|
6663
6663
|
}
|
|
6664
|
-
}, directives: [i2__namespace$1.NgIf], styles: [".miam-addon-link{flex-direction:row;padding:12px 16px;font-size:16px}.miam-addon-link
|
|
6664
|
+
}, directives: [i2__namespace$1.NgIf], styles: [".miam-addon-link{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px 16px;font-size:16px}.miam-addon-link .miam-addon-link__info{display:flex;flex-direction:column;flex:1;justify-content:space-between;align-items:flex-start}.miam-addon-link .miam-addon-link__info .miam-addon-link__sponsor-name{white-space:nowrap}.miam-addon-link .miam-addon-link__info .miam-addon-link__link{color:var(--m-color-primary);cursor:pointer;-webkit-tap-highlight-color:transparent;white-space:nowrap;margin-top:8px}.miam-addon-link .miam-addon-link__logo{width:auto;height:48px;justify-content:flex-end;display:flex;order:2;align-items:center;padding-left:16px}.miam-addon-link .miam-addon-link__logo img{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}"], encapsulation: 2, changeDetection: 0 });
|
|
6665
6665
|
(function () {
|
|
6666
6666
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(AddonLinkComponent, [{
|
|
6667
6667
|
type: i0.Component,
|
|
@@ -8286,7 +8286,7 @@
|
|
|
8286
8286
|
request = request.clone({
|
|
8287
8287
|
setHeaders: {
|
|
8288
8288
|
'miam-origin': this.context.origin.value,
|
|
8289
|
-
'miam-front-version': '8.0.
|
|
8289
|
+
'miam-front-version': '8.0.9',
|
|
8290
8290
|
'miam-front-type': 'web',
|
|
8291
8291
|
'miam-api-version': '4.7.0'
|
|
8292
8292
|
}
|
|
@@ -16819,14 +16819,20 @@
|
|
|
16819
16819
|
MealsPlannerFormComponent.prototype.ngOnDestroy = function () {
|
|
16820
16820
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
16821
16821
|
};
|
|
16822
|
-
MealsPlannerFormComponent.prototype.currentPath = function () {
|
|
16822
|
+
MealsPlannerFormComponent.prototype.currentPath = function () {
|
|
16823
|
+
return '';
|
|
16824
|
+
};
|
|
16825
|
+
MealsPlannerFormComponent.prototype.hasPos = function () {
|
|
16826
|
+
var _this = this;
|
|
16827
|
+
return this.posService.posWasInitialized().pipe(operators.take(1), operators.tap(function (posWasInitialized) { return _this.context.hookCallback(true, posWasInitialized); }));
|
|
16828
|
+
};
|
|
16823
16829
|
MealsPlannerFormComponent.prototype.fetchRecipesNumbers = function () {
|
|
16824
16830
|
var _this = this;
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
return _this.recipesService.maxPlannableRecipes(_this.form.value.budget, _this.form.value.guestsCount, logged ? false : undefined).pipe(operators.tap(function (maxRecipes) {
|
|
16831
|
+
return this.hasPos().pipe(operators.switchMap(function (hasPos) {
|
|
16832
|
+
if (!hasPos || !_this.form.value.guestsCount || !_this.form.value.budget) {
|
|
16833
|
+
return rxjs.of(null);
|
|
16834
|
+
}
|
|
16835
|
+
return _this.userService.isLogged$.asObservable().pipe(operators.take(2)).pipe(operators.switchMap(function (logged) { return _this.recipesService.maxPlannableRecipes(_this.form.value.budget, _this.form.value.guestsCount, logged ? false : undefined).pipe(operators.tap(function (maxRecipes) {
|
|
16830
16836
|
var numbers = [];
|
|
16831
16837
|
for (var i = 1; i <= maxRecipes; i++) {
|
|
16832
16838
|
numbers.push(i);
|
|
@@ -16836,7 +16842,7 @@
|
|
|
16836
16842
|
_this.updateRecipesCount(maxRecipes);
|
|
16837
16843
|
}
|
|
16838
16844
|
_this.noRecipesAvailable = maxRecipes < 1;
|
|
16839
|
-
}));
|
|
16845
|
+
})); }));
|
|
16840
16846
|
}));
|
|
16841
16847
|
};
|
|
16842
16848
|
MealsPlannerFormComponent.prototype.submit = function () {
|
|
@@ -16847,9 +16853,9 @@
|
|
|
16847
16853
|
]).subscribe(function (res) {
|
|
16848
16854
|
var isHookOk = _this.context.hookCallback(res[0], res[1]);
|
|
16849
16855
|
sessionStorage.setItem('miam-meals-planner-form', JSON.stringify({
|
|
16850
|
-
budget:
|
|
16851
|
-
guestsCount:
|
|
16852
|
-
recipesCount:
|
|
16856
|
+
budget: +_this.form.get('budget').value,
|
|
16857
|
+
guestsCount: +_this.form.get('guestsCount').value,
|
|
16858
|
+
recipesCount: +_this.form.get('recipesCount').value,
|
|
16853
16859
|
}));
|
|
16854
16860
|
if (isHookOk) {
|
|
16855
16861
|
sessionStorage.removeItem('miam-meals-planner-form');
|
|
@@ -16862,7 +16868,7 @@
|
|
|
16862
16868
|
}));
|
|
16863
16869
|
};
|
|
16864
16870
|
MealsPlannerFormComponent.prototype.updateView = function () {
|
|
16865
|
-
if (
|
|
16871
|
+
if (+this.form.get('budget').value > 999) {
|
|
16866
16872
|
this.form.get('budget').patchValue(999);
|
|
16867
16873
|
}
|
|
16868
16874
|
this.cdr.detectChanges();
|
|
@@ -23423,7 +23429,7 @@
|
|
|
23423
23429
|
var _r1 = i0__namespace.ɵɵreference(2);
|
|
23424
23430
|
i0__namespace.ɵɵproperty("ngIf", !ctx.loading)("ngIfElse", _r1);
|
|
23425
23431
|
}
|
|
23426
|
-
}, directives: [i2__namespace$1.NgIf, IconComponent, SponsorStorytellingComponent, LoaderComponent], pipes: [SafePipe], styles: [".miam-recipe-addon{height:100%;width:100%;display:flex;flex-direction:column}.miam-recipe-addon .miam-recipe-addon__header{padding:
|
|
23432
|
+
}, directives: [i2__namespace$1.NgIf, IconComponent, SponsorStorytellingComponent, LoaderComponent], pipes: [SafePipe], styles: [".miam-recipe-addon{height:100%;width:100%;display:flex;flex-direction:column}.miam-recipe-addon .miam-recipe-addon__header{padding:16px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 8px 28px rgba(0,0,0,.07)}.miam-recipe-addon .miam-recipe-addon__header button{max-width:150px;padding:0;color:var(--m-color-black);font-weight:700;font-size:19px;background-color:transparent;border:none}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon{margin:0;height:16px;transform:rotate(90deg) scale(1.5)}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon svg path{fill:var(--m-color-black)}.miam-recipe-addon .miam-recipe-addon__header button ng-miam-icon svg path:first-of-type{fill:transparent}.miam-recipe-addon .miam-recipe-addon__header button:hover{background-color:transparent;border:none}.miam-recipe-addon .miam-recipe-addon__header button:hover ng-miam-icon svg path{fill:var(--m-color-black)}.miam-recipe-addon .miam-recipe-addon__header button:hover ng-miam-icon svg path:first-of-type{fill:transparent}.miam-recipe-addon .miam-recipe-addon__header button span{margin-left:8px}.miam-recipe-addon .miam-recipe-addon__header img{height:25px}.miam-recipe-addon .miam-recipe-addon__content{background-color:#fff}.miam-recipe-addon .miam-recipe-addon__content .miam-recipe-addon__content__iframe{height:calc(100dvh - 98px);width:100%}.miam-recipe-addon__loader{height:100%;width:100%;display:flex;justify-content:center;align-items:center}"], encapsulation: 2, changeDetection: 0 });
|
|
23427
23433
|
(function () {
|
|
23428
23434
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeAddonComponent, [{
|
|
23429
23435
|
type: i0.Component,
|