ng-miam 8.1.2 → 8.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ng-miam.umd.js +1203 -711
- 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 +19 -16
- package/esm2015/lib/_components/modal/modal.component.js +28 -52
- package/esm2015/lib/_components/product-card/product-card.component.js +84 -71
- package/esm2015/lib/_components/products-picker/products-picker.component.js +46 -44
- package/esm2015/lib/_models/point-of-sale.js +9 -2
- package/esm2015/lib/_services/basket-actions.service.js +74 -0
- package/esm2015/lib/_services/basket-transfer.service.js +119 -0
- package/esm2015/lib/_services/baskets-synchronizing/baskets-comparator.service.js +25 -7
- package/esm2015/lib/_services/baskets-synchronizing/baskets-synchronizer.service.js +11 -4
- package/esm2015/lib/_services/baskets.service.js +17 -4
- package/esm2015/lib/_services/context.service.js +15 -2
- package/esm2015/lib/_services/index.js +2 -1
- package/esm2015/lib/_services/interceptor.service.js +2 -2
- package/esm2015/lib/_services/recipe-details.service.js +186 -69
- package/esm2015/lib/_services/user.service.js +2 -2
- package/esm2015/lib/_types/builded/miam-interface.js +1 -1
- package/esm2015/lib/_utils/directives/index.js +2 -1
- package/esm2015/lib/_utils/directives/load-on-scroll.directive.js +47 -0
- package/esm2015/lib/_utils/utils.module.js +10 -6
- package/esm2015/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.js +180 -152
- package/esm2015/lib/_web-components/basket-preview/replace-item/replace-item.component.js +18 -12
- package/esm2015/lib/_web-components/meals-planner/meals-planner-form/meals-planner-form.component.js +18 -13
- package/esm2015/lib/_web-components/meals-planner/meals-planner.component.js +22 -23
- package/esm2015/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.js +12 -13
- package/esm2015/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.js +98 -82
- package/esm2015/lib/_web-components/recipe-details/recipe-addon/recipe-addon.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +145 -137
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +8 -4
- package/esm2015/lib/ng-miam.module.js +4 -2
- package/fesm2015/ng-miam.js +1101 -650
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_components/components.module.d.ts +2 -1
- package/lib/_components/components.module.d.ts.map +1 -1
- package/lib/_components/modal/modal.component.d.ts +7 -6
- package/lib/_components/modal/modal.component.d.ts.map +1 -1
- package/lib/_components/product-card/product-card.component.d.ts +10 -9
- package/lib/_components/product-card/product-card.component.d.ts.map +1 -1
- package/lib/_models/point-of-sale.d.ts +3 -0
- package/lib/_models/point-of-sale.d.ts.map +1 -1
- package/lib/_services/basket-actions.service.d.ts +51 -0
- package/lib/_services/basket-actions.service.d.ts.map +1 -0
- package/lib/_services/basket-transfer.service.d.ts +31 -0
- package/lib/_services/basket-transfer.service.d.ts.map +1 -0
- package/lib/_services/baskets-synchronizing/baskets-comparator.service.d.ts +1 -1
- package/lib/_services/baskets-synchronizing/baskets-comparator.service.d.ts.map +1 -1
- package/lib/_services/baskets-synchronizing/baskets-synchronizer.service.d.ts.map +1 -1
- package/lib/_services/baskets.service.d.ts +6 -1
- package/lib/_services/baskets.service.d.ts.map +1 -1
- package/lib/_services/context.service.d.ts +2 -0
- package/lib/_services/context.service.d.ts.map +1 -1
- package/lib/_services/index.d.ts +1 -0
- package/lib/_services/index.d.ts.map +1 -1
- package/lib/_services/recipe-details.service.d.ts +30 -10
- package/lib/_services/recipe-details.service.d.ts.map +1 -1
- package/lib/_types/builded/miam-interface.d.ts +6 -0
- package/lib/_types/builded/miam-interface.d.ts.map +1 -1
- package/lib/_utils/directives/index.d.ts +1 -0
- package/lib/_utils/directives/index.d.ts.map +1 -1
- package/lib/_utils/directives/load-on-scroll.directive.d.ts +18 -0
- package/lib/_utils/directives/load-on-scroll.directive.d.ts.map +1 -0
- package/lib/_utils/utils.module.d.ts +2 -1
- package/lib/_utils/utils.module.d.ts.map +1 -1
- package/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.d.ts +2 -1
- package/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.d.ts.map +1 -1
- package/lib/_web-components/basket-preview/replace-item/replace-item.component.d.ts +1 -2
- package/lib/_web-components/basket-preview/replace-item/replace-item.component.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/lib/_web-components/meals-planner/meals-planner.component.d.ts +6 -7
- package/lib/_web-components/meals-planner/meals-planner.component.d.ts.map +1 -1
- package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts +3 -3
- package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts.map +1 -1
- package/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.d.ts +6 -14
- package/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.d.ts.map +1 -1
- package/lib/_web-components/recipe-details/recipe-details.component.d.ts +4 -3
- package/lib/_web-components/recipe-details/recipe-details.component.d.ts.map +1 -1
- package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts.map +1 -1
- package/lib/ng-miam.module.d.ts.map +1 -1
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -597,7 +597,8 @@
|
|
|
597
597
|
distance: 0.0,
|
|
598
598
|
address: '',
|
|
599
599
|
latitude: '',
|
|
600
|
-
longitude: ''
|
|
600
|
+
longitude: '',
|
|
601
|
+
'ext-id': ''
|
|
601
602
|
};
|
|
602
603
|
_this.relationships = {
|
|
603
604
|
supplier: new i2.DocumentResource(),
|
|
@@ -628,6 +629,16 @@
|
|
|
628
629
|
enumerable: false,
|
|
629
630
|
configurable: true
|
|
630
631
|
});
|
|
632
|
+
Object.defineProperty(PointOfSale.prototype, "extId", {
|
|
633
|
+
get: function () {
|
|
634
|
+
return this.attributes['ext-id'];
|
|
635
|
+
},
|
|
636
|
+
set: function (id) {
|
|
637
|
+
this.attributes['ext-id'] = id;
|
|
638
|
+
},
|
|
639
|
+
enumerable: false,
|
|
640
|
+
configurable: true
|
|
641
|
+
});
|
|
631
642
|
return PointOfSale;
|
|
632
643
|
}(i2.Resource));
|
|
633
644
|
|
|
@@ -2418,7 +2429,7 @@
|
|
|
2418
2429
|
_this.initRoles();
|
|
2419
2430
|
return rxjs.forkJoin([
|
|
2420
2431
|
_this.initProvider(),
|
|
2421
|
-
_this.initSupplier()
|
|
2432
|
+
_this.initSupplier(),
|
|
2422
2433
|
]);
|
|
2423
2434
|
}));
|
|
2424
2435
|
};
|
|
@@ -3659,6 +3670,18 @@
|
|
|
3659
3670
|
enumerable: false,
|
|
3660
3671
|
configurable: true
|
|
3661
3672
|
});
|
|
3673
|
+
Object.defineProperty(BasketsService.prototype, "waitForBasketEntries", {
|
|
3674
|
+
/**
|
|
3675
|
+
* To use when needing to be sure that basket was fetched before doing an action that doesn't need to stay subscribed to basket$
|
|
3676
|
+
* This method is meant to be an equivalent of basket$.value but asynchronous
|
|
3677
|
+
*/
|
|
3678
|
+
get: function () {
|
|
3679
|
+
var _this = this;
|
|
3680
|
+
return this._entries$.pipe(operators.skipWhile(function (b) { return !b || !_this.basketInitCalled; }), operators.take(1));
|
|
3681
|
+
},
|
|
3682
|
+
enumerable: false,
|
|
3683
|
+
configurable: true
|
|
3684
|
+
});
|
|
3662
3685
|
/** ************************************** QUEUE UTILS TO LOCK MORE ACTIONS OR DISPLAY LOADERS ************************************** **/
|
|
3663
3686
|
// Util method to avoid repeating too much for the next 6 methods
|
|
3664
3687
|
BasketsService.prototype.subjectContainsRecipeId = function (subject, type, recipeId) {
|
|
@@ -3847,11 +3870,18 @@
|
|
|
3847
3870
|
* Fetches the BasketEntry for an ingredient if it exists
|
|
3848
3871
|
* Returns a fake BasketEntry with id = -1 if it doesn't exist
|
|
3849
3872
|
*/
|
|
3850
|
-
BasketsService.prototype.basketEntryFromIngredient = function (ingredientId) {
|
|
3873
|
+
BasketsService.prototype.basketEntryFromIngredient = function (ingredientId, guests, onlyQuantity) {
|
|
3851
3874
|
var _this = this;
|
|
3875
|
+
if (onlyQuantity === void 0) { onlyQuantity = false; }
|
|
3852
3876
|
return this.waitForBasket.pipe(operators.switchMap(function (basket) {
|
|
3853
|
-
var url = environment$1.miamAPI + "/api/v1/baskets/" + basket.id + "/basket-entries/from-ingredient?ingredient_id=" + ingredientId;
|
|
3854
|
-
|
|
3877
|
+
var url = environment$1.miamAPI + "/api/v1/baskets/" + basket.id + "/basket-entries/from-ingredient?ingredient_id=" + ingredientId + "&guests=" + guests;
|
|
3878
|
+
if (onlyQuantity) {
|
|
3879
|
+
url += "&fields[basket-entries]=quantity";
|
|
3880
|
+
}
|
|
3881
|
+
else {
|
|
3882
|
+
url += '&include=selected-item';
|
|
3883
|
+
}
|
|
3884
|
+
return _this.http.get(url);
|
|
3855
3885
|
}), operators.skipWhile(function (result) { return result.is_loading || !result; }), operators.map(function (res) {
|
|
3856
3886
|
var entry = _this.basketEntriesService.new();
|
|
3857
3887
|
entry.fill(res);
|
|
@@ -4469,12 +4499,17 @@
|
|
|
4469
4499
|
* from Miam's basket, and create ItemsComparators for entries whose extId hasn't got an ItemsComparator yet.
|
|
4470
4500
|
* Then check for items to remove from Miam's basket & send update event to Miam
|
|
4471
4501
|
*/
|
|
4472
|
-
BasketsComparatorService.prototype.initBasketComparator = function (firstMiamBasket, firstRetailerBasket) {
|
|
4502
|
+
BasketsComparatorService.prototype.initBasketComparator = function (firstMiamBasket, firstRetailerBasket, fromRetailer) {
|
|
4473
4503
|
this.extIdToItemsComparator = {};
|
|
4474
4504
|
this.updateRetailerProducts(firstRetailerBasket);
|
|
4475
4505
|
this.updateEntriesFromMiam(firstMiamBasket);
|
|
4476
4506
|
this.addEntriesFromMiam(firstMiamBasket);
|
|
4477
|
-
|
|
4507
|
+
if (fromRetailer) {
|
|
4508
|
+
return this.resolveFromRetailer();
|
|
4509
|
+
}
|
|
4510
|
+
else {
|
|
4511
|
+
return this.resolveFromMiam(firstMiamBasket);
|
|
4512
|
+
}
|
|
4478
4513
|
};
|
|
4479
4514
|
// -----------------------------------------------------------------------------------------------------------------------------
|
|
4480
4515
|
// ------------------------------------------------------ Coming from Miam -----------------------------------------------------
|
|
@@ -4487,12 +4522,18 @@
|
|
|
4487
4522
|
BasketsComparatorService.prototype.updateReceivedFromMiam = function (miamBasket) {
|
|
4488
4523
|
var _this = this;
|
|
4489
4524
|
// eslint-disable-next-line no-console
|
|
4490
|
-
console.debug("[Miam] update received from Miam\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) {
|
|
4525
|
+
console.debug("[Miam] update received from Miam\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) {
|
|
4526
|
+
var _a;
|
|
4527
|
+
return ({
|
|
4528
|
+
id: e.id,
|
|
4529
|
+
extId: (_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id'],
|
|
4530
|
+
quantity: e.attributes.quantity
|
|
4531
|
+
});
|
|
4532
|
+
})) + "\n - current comparison: " + JSON.stringify(Object.keys(this.extIdToItemsComparator).map(function (key) { return ({ id: key, MQ: _this.extIdToItemsComparator[key].miamQuantity, RQ: _this.extIdToItemsComparator[key].retailerQuantity }); })));
|
|
4491
4533
|
// Note: MQ means Miam Quantity and RQ means Retailer Quantity but this makes the logs more compact and thus readable
|
|
4492
4534
|
this.updateEntriesFromMiam(miamBasket);
|
|
4493
4535
|
this.addEntriesFromMiam(miamBasket);
|
|
4494
|
-
|
|
4495
|
-
return toPushToRetailer;
|
|
4536
|
+
return this.resolveFromMiam(miamBasket);
|
|
4496
4537
|
};
|
|
4497
4538
|
/**
|
|
4498
4539
|
* For every entry in Miam's basket whose associated extId has an ItemsComparator, update the comparator with the entry
|
|
@@ -4536,7 +4577,14 @@
|
|
|
4536
4577
|
BasketsComparatorService.prototype.resolveFromMiam = function (miamBasket) {
|
|
4537
4578
|
var _this = this;
|
|
4538
4579
|
// eslint-disable-next-line no-console
|
|
4539
|
-
console.debug("[Miam] resolve from Miam basket\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) {
|
|
4580
|
+
console.debug("[Miam] resolve from Miam basket\n - " + JSON.stringify(miamBasket === null || miamBasket === void 0 ? void 0 : miamBasket.map(function (e) {
|
|
4581
|
+
var _a;
|
|
4582
|
+
return ({
|
|
4583
|
+
id: e.id,
|
|
4584
|
+
extId: (_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id'],
|
|
4585
|
+
quantity: e.attributes.quantity
|
|
4586
|
+
});
|
|
4587
|
+
})) + "\n - current comparison: " + JSON.stringify(Object.keys(this.extIdToItemsComparator).map(function (key) { return ({ id: key, MQ: _this.extIdToItemsComparator[key].miamQuantity, RQ: _this.extIdToItemsComparator[key].retailerQuantity }); })));
|
|
4540
4588
|
// Note: MQ means Miam Quantity and RQ means Retailer Quantity but this makes the logs more compact and thus readable
|
|
4541
4589
|
var toPushToRetailer = [];
|
|
4542
4590
|
Object.keys(this.extIdToItemsComparator).forEach(function (extId) {
|
|
@@ -4706,9 +4754,16 @@
|
|
|
4706
4754
|
if (!this.isReady()) {
|
|
4707
4755
|
return;
|
|
4708
4756
|
}
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4757
|
+
if (sessionStorage.getItem('_miam/basketActionInterrupted') === 'true') {
|
|
4758
|
+
var itemsToPush = this.comparatorService.initBasketComparator(this.firstMiamBasket, this.firstRetailerBasket, false);
|
|
4759
|
+
this.sendUpdateToRetailer(itemsToPush);
|
|
4760
|
+
sessionStorage.removeItem('_miam/basketActionInterrupted');
|
|
4761
|
+
}
|
|
4762
|
+
else {
|
|
4763
|
+
this.isProcessingRetailerEvent = true;
|
|
4764
|
+
var toRemoveFromMiam = this.comparatorService.initBasketComparator(this.firstMiamBasket, this.firstRetailerBasket, true);
|
|
4765
|
+
this.sendUpdateToMiam(toRemoveFromMiam);
|
|
4766
|
+
}
|
|
4712
4767
|
};
|
|
4713
4768
|
/**
|
|
4714
4769
|
* @returns true is first baskets have been received for Miam & retailer
|
|
@@ -4837,6 +4892,14 @@
|
|
|
4837
4892
|
this.videoRecipesEnabled = false;
|
|
4838
4893
|
this.articlesInCatalogEnabled = false;
|
|
4839
4894
|
this.tagsOnRecipesEnabled = false;
|
|
4895
|
+
this.hookCallback = function (isLogged, isPosValid) {
|
|
4896
|
+
console.warn('[Miam] hookCallback (used to force user login) not set');
|
|
4897
|
+
return false;
|
|
4898
|
+
};
|
|
4899
|
+
this.forcePosCallback = function (posExtId) {
|
|
4900
|
+
console.warn('[Miam] forcePosCallback (used to force selected shop) not set');
|
|
4901
|
+
return false;
|
|
4902
|
+
};
|
|
4840
4903
|
this.defaultIngredientPicture = 'https://storage.googleapis.com/assets.miam.tech/generic/images/default-ingredient-picture.svg';
|
|
4841
4904
|
this.globalScrollableElement = document.body;
|
|
4842
4905
|
this.isSmallScreen$ = new rxjs.BehaviorSubject(false);
|
|
@@ -4925,6 +4988,9 @@
|
|
|
4925
4988
|
hook: {
|
|
4926
4989
|
setHookCallback: function (callback) {
|
|
4927
4990
|
_this.hookCallback = callback;
|
|
4991
|
+
},
|
|
4992
|
+
setForcePosCallback: function (callback) {
|
|
4993
|
+
_this.forcePosCallback = callback;
|
|
4928
4994
|
}
|
|
4929
4995
|
},
|
|
4930
4996
|
pos: {
|
|
@@ -5040,8 +5106,10 @@
|
|
|
5040
5106
|
else {
|
|
5041
5107
|
_this.icons.push({ icon: icon, url: url });
|
|
5042
5108
|
}
|
|
5043
|
-
}
|
|
5109
|
+
},
|
|
5110
|
+
setDefaultScrollElementGetter: function (callback) { return _this.defaultScrollElementGetter = callback; }
|
|
5044
5111
|
};
|
|
5112
|
+
this.defaultScrollElementGetter = function () { return document.body; };
|
|
5045
5113
|
this.isSmallScreen$.next(!this.mediaMatcher.matchMedia(SMALL_SCREEN_BP).matches);
|
|
5046
5114
|
this.breakpointObserver.observe(SMALL_SCREEN_BP).subscribe(function (BPChange) { return _this.isSmallScreen$.next(!BPChange.matches); });
|
|
5047
5115
|
this.icons = [];
|
|
@@ -6632,22 +6700,24 @@
|
|
|
6632
6700
|
function AddonLinkComponent_ng_template_3_Template(rf, ctx) {
|
|
6633
6701
|
if (rf & 1) {
|
|
6634
6702
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
6635
|
-
i0__namespace.ɵɵ
|
|
6703
|
+
i0__namespace.ɵɵelementStart(1, "span");
|
|
6704
|
+
i0__namespace.ɵɵi18n(2, 6);
|
|
6705
|
+
i0__namespace.ɵɵelementEnd();
|
|
6706
|
+
i0__namespace.ɵɵelementStart(3, "span", 7);
|
|
6707
|
+
i0__namespace.ɵɵtext(4);
|
|
6636
6708
|
i0__namespace.ɵɵelementEnd();
|
|
6637
|
-
i0__namespace.ɵɵelementStart(2, "span");
|
|
6638
|
-
i0__namespace.ɵɵtext(3);
|
|
6639
6709
|
i0__namespace.ɵɵelementEnd();
|
|
6640
6710
|
}
|
|
6641
6711
|
if (rf & 2) {
|
|
6642
6712
|
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
6643
|
-
i0__namespace.ɵɵadvance(
|
|
6644
|
-
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.recipe.sponsorName, "
|
|
6713
|
+
i0__namespace.ɵɵadvance(4);
|
|
6714
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.recipe.sponsorName, "");
|
|
6645
6715
|
}
|
|
6646
6716
|
}
|
|
6647
6717
|
function AddonLinkComponent_span_5_Template(rf, ctx) {
|
|
6648
6718
|
if (rf & 1) {
|
|
6649
6719
|
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
6650
|
-
i0__namespace.ɵɵelementStart(0, "span",
|
|
6720
|
+
i0__namespace.ɵɵelementStart(0, "span", 8);
|
|
6651
6721
|
i0__namespace.ɵɵlistener("click", function AddonLinkComponent_span_5_Template_span_click_0_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.showAddon.emit(); });
|
|
6652
6722
|
i0__namespace.ɵɵtext(1, " En savoir plus ");
|
|
6653
6723
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -6655,14 +6725,15 @@
|
|
|
6655
6725
|
}
|
|
6656
6726
|
function AddonLinkComponent_div_6_Template(rf, ctx) {
|
|
6657
6727
|
if (rf & 1) {
|
|
6658
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
6659
|
-
i0__namespace.ɵɵelement(1, "img",
|
|
6728
|
+
i0__namespace.ɵɵelementStart(0, "div", 9);
|
|
6729
|
+
i0__namespace.ɵɵelement(1, "img", 10);
|
|
6660
6730
|
i0__namespace.ɵɵelementEnd();
|
|
6661
6731
|
}
|
|
6662
6732
|
if (rf & 2) {
|
|
6663
6733
|
var ctx_r4 = i0__namespace.ɵɵnextContext();
|
|
6664
6734
|
i0__namespace.ɵɵadvance(1);
|
|
6665
6735
|
i0__namespace.ɵɵpropertyInterpolate("src", ctx_r4.recipe.sponsorLogoUrl, i0__namespace.ɵɵsanitizeUrl);
|
|
6736
|
+
i0__namespace.ɵɵproperty("alt", ctx_r4.recipe.sponsorName + " logo");
|
|
6666
6737
|
}
|
|
6667
6738
|
}
|
|
6668
6739
|
var AddonLinkComponent = /** @class */ (function () {
|
|
@@ -6680,22 +6751,22 @@
|
|
|
6680
6751
|
AddonLinkComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AddonLinkComponent, selectors: [["ng-miam-addon-link"]], inputs: { recipe: "recipe", hasStorytelling: "hasStorytelling" }, outputs: { showAddon: "showAddon" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 7, vars: 4, consts: function () {
|
|
6681
6752
|
var i18n_0;
|
|
6682
6753
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
6683
|
-
var
|
|
6684
|
-
i18n_0 =
|
|
6754
|
+
var MSG_EXTERNAL_346178670015862382$$LIB__COMPONENTS_ADDON_LINK_ADDON_LINK_COMPONENT_TS__1 = goog.getMsg("Cette recette vous est propos\u00E9e par notre partenaire");
|
|
6755
|
+
i18n_0 = MSG_EXTERNAL_346178670015862382$$LIB__COMPONENTS_ADDON_LINK_ADDON_LINK_COMPONENT_TS__1;
|
|
6685
6756
|
}
|
|
6686
6757
|
else {
|
|
6687
|
-
i18n_0 = $localize(templateObject_1$H || (templateObject_1$H = __makeTemplateObject([":\
|
|
6758
|
+
i18n_0 = $localize(templateObject_1$H || (templateObject_1$H = __makeTemplateObject([":\u241F592a6ddb645d9971d03862cb6b8b323a3d9a0be2\u241F346178670015862382:Cette recette vous est propos\u00E9e par notre partenaire"], [":\u241F592a6ddb645d9971d03862cb6b8b323a3d9a0be2\u241F346178670015862382:Cette recette vous est propos\u00E9e par notre partenaire"])));
|
|
6688
6759
|
}
|
|
6689
|
-
return [[1, "miam-addon-link"], [1, "miam-addon-link__info"], [4, "ngIf", "ngIfElse"], ["sponsorsedLink", ""], ["class", "miam-addon-link__link", 3, "click", 4, "ngIf"], ["class", "miam-addon-link__logo", 4, "ngIf"], i18n_0, [1, "miam-addon-link__link", 3, "click"], [1, "miam-addon-link__logo"], [3, "src"]];
|
|
6760
|
+
return [[1, "miam-addon-link"], [1, "miam-addon-link__info"], [4, "ngIf", "ngIfElse"], ["sponsorsedLink", ""], ["class", "miam-addon-link__link", 3, "click", 4, "ngIf"], ["class", "miam-addon-link__logo", 4, "ngIf"], i18n_0, [1, "miam-addon-link__sponsor-name"], [1, "miam-addon-link__link", 3, "click"], [1, "miam-addon-link__logo"], [3, "src", "alt"]];
|
|
6690
6761
|
}, template: function AddonLinkComponent_Template(rf, ctx) {
|
|
6691
6762
|
if (rf & 1) {
|
|
6692
6763
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
6693
6764
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
6694
6765
|
i0__namespace.ɵɵtemplate(2, AddonLinkComponent_span_2_Template, 2, 1, "span", 2);
|
|
6695
|
-
i0__namespace.ɵɵtemplate(3, AddonLinkComponent_ng_template_3_Template,
|
|
6766
|
+
i0__namespace.ɵɵtemplate(3, AddonLinkComponent_ng_template_3_Template, 5, 1, "ng-template", null, 3, i0__namespace.ɵɵtemplateRefExtractor);
|
|
6696
6767
|
i0__namespace.ɵɵtemplate(5, AddonLinkComponent_span_5_Template, 2, 0, "span", 4);
|
|
6697
6768
|
i0__namespace.ɵɵelementEnd();
|
|
6698
|
-
i0__namespace.ɵɵtemplate(6, AddonLinkComponent_div_6_Template, 2,
|
|
6769
|
+
i0__namespace.ɵɵtemplate(6, AddonLinkComponent_div_6_Template, 2, 2, "div", 5);
|
|
6699
6770
|
i0__namespace.ɵɵelementEnd();
|
|
6700
6771
|
}
|
|
6701
6772
|
if (rf & 2) {
|
|
@@ -6707,7 +6778,7 @@
|
|
|
6707
6778
|
i0__namespace.ɵɵadvance(1);
|
|
6708
6779
|
i0__namespace.ɵɵproperty("ngIf", ctx.recipe == null ? null : ctx.recipe.sponsorLogoUrl);
|
|
6709
6780
|
}
|
|
6710
|
-
}, directives: [i2__namespace$1.NgIf], styles: [".miam-addon-link{flex-direction:row;padding:12px 16px;font-size:16px}.miam-addon-link
|
|
6781
|
+
}, 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 });
|
|
6711
6782
|
(function () {
|
|
6712
6783
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(AddonLinkComponent, [{
|
|
6713
6784
|
type: i0.Component,
|
|
@@ -7202,6 +7273,55 @@
|
|
|
7202
7273
|
}] });
|
|
7203
7274
|
})();
|
|
7204
7275
|
|
|
7276
|
+
var LoadOnScrollDirective = /** @class */ (function () {
|
|
7277
|
+
function LoadOnScrollDirective(el) {
|
|
7278
|
+
this.el = el;
|
|
7279
|
+
this.marginRoot = '0px'; // https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#rootmargin
|
|
7280
|
+
this.threshold = 0; // 0 <= x < 1;
|
|
7281
|
+
this.isLoading = false;
|
|
7282
|
+
this.loadMore = new i0.EventEmitter();
|
|
7283
|
+
this.emitted = false;
|
|
7284
|
+
}
|
|
7285
|
+
LoadOnScrollDirective.prototype.ngOnInit = function () {
|
|
7286
|
+
this.intersectionObserver();
|
|
7287
|
+
};
|
|
7288
|
+
LoadOnScrollDirective.prototype.ngAfterViewInit = function () {
|
|
7289
|
+
this.observer.observe(this.el.nativeElement);
|
|
7290
|
+
};
|
|
7291
|
+
LoadOnScrollDirective.prototype.intersectionObserver = function () {
|
|
7292
|
+
var _this = this;
|
|
7293
|
+
var options = {
|
|
7294
|
+
root: null,
|
|
7295
|
+
rootMargin: this.marginRoot,
|
|
7296
|
+
threshold: this.threshold,
|
|
7297
|
+
};
|
|
7298
|
+
this.observer = new IntersectionObserver(function (entries) {
|
|
7299
|
+
if (entries[0].isIntersecting && !_this.isLoading) {
|
|
7300
|
+
_this.loadMore.emit();
|
|
7301
|
+
}
|
|
7302
|
+
}, options);
|
|
7303
|
+
};
|
|
7304
|
+
return LoadOnScrollDirective;
|
|
7305
|
+
}());
|
|
7306
|
+
LoadOnScrollDirective.ɵfac = function LoadOnScrollDirective_Factory(t) { return new (t || LoadOnScrollDirective)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef)); };
|
|
7307
|
+
LoadOnScrollDirective.ɵdir = i0__namespace.ɵɵdefineDirective({ type: LoadOnScrollDirective, selectors: [["", "ngMiamLoadOnScroll", ""]], inputs: { marginRoot: "marginRoot", threshold: "threshold", isLoading: "isLoading" }, outputs: { loadMore: "loadMore" } });
|
|
7308
|
+
(function () {
|
|
7309
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LoadOnScrollDirective, [{
|
|
7310
|
+
type: i0.Directive,
|
|
7311
|
+
args: [{
|
|
7312
|
+
selector: '[ngMiamLoadOnScroll]'
|
|
7313
|
+
}]
|
|
7314
|
+
}], function () { return [{ type: i0__namespace.ElementRef }]; }, { marginRoot: [{
|
|
7315
|
+
type: i0.Input
|
|
7316
|
+
}], threshold: [{
|
|
7317
|
+
type: i0.Input
|
|
7318
|
+
}], isLoading: [{
|
|
7319
|
+
type: i0.Input
|
|
7320
|
+
}], loadMore: [{
|
|
7321
|
+
type: i0.Output
|
|
7322
|
+
}] });
|
|
7323
|
+
})();
|
|
7324
|
+
|
|
7205
7325
|
var _c0$s = ["counterInput"];
|
|
7206
7326
|
function CounterInputComponent_img_3_Template(rf, ctx) {
|
|
7207
7327
|
if (rf & 1) {
|
|
@@ -7414,7 +7534,7 @@
|
|
|
7414
7534
|
i0__namespace.ɵɵelementEnd();
|
|
7415
7535
|
}
|
|
7416
7536
|
}
|
|
7417
|
-
var _c4$
|
|
7537
|
+
var _c4$5 = function (a0, a1) { return { "image-container-mode": a0, "dragover-mode": a1 }; };
|
|
7418
7538
|
var DragDropInputComponent = /** @class */ (function () {
|
|
7419
7539
|
function DragDropInputComponent(cdr) {
|
|
7420
7540
|
this.cdr = cdr;
|
|
@@ -7542,7 +7662,7 @@
|
|
|
7542
7662
|
}
|
|
7543
7663
|
if (rf & 2) {
|
|
7544
7664
|
var _r1 = i0__namespace.ɵɵreference(3);
|
|
7545
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(6, _c4$
|
|
7665
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(6, _c4$5, ctx.imageUrl, ctx.isDragover && !ctx.imageUrl));
|
|
7546
7666
|
i0__namespace.ɵɵadvance(1);
|
|
7547
7667
|
i0__namespace.ɵɵproperty("ngIf", !ctx.photoMode && !ctx.bigImageWarning)("ngIfElse", _r1);
|
|
7548
7668
|
i0__namespace.ɵɵadvance(5);
|
|
@@ -7688,15 +7808,81 @@
|
|
|
7688
7808
|
}], function () { return [{ type: i1__namespace.HttpClient }]; }, null);
|
|
7689
7809
|
})();
|
|
7690
7810
|
|
|
7811
|
+
var BasketActionsService = /** @class */ (function () {
|
|
7812
|
+
function BasketActionsService(context, userService, posService, basketsService, recipesService) {
|
|
7813
|
+
this.context = context;
|
|
7814
|
+
this.userService = userService;
|
|
7815
|
+
this.posService = posService;
|
|
7816
|
+
this.basketsService = basketsService;
|
|
7817
|
+
this.recipesService = recipesService;
|
|
7818
|
+
this.shouldExecuteBasketAction = new rxjs.BehaviorSubject(undefined);
|
|
7819
|
+
this.subscriptions = new rxjs.Subscription();
|
|
7820
|
+
this.subscriptions.add(this.canExecuteStoredMethod().subscribe());
|
|
7821
|
+
}
|
|
7822
|
+
/**
|
|
7823
|
+
* Stores the method and its arguments if the user is not logged in or doesn't have a PoS Set
|
|
7824
|
+
*/
|
|
7825
|
+
BasketActionsService.prototype.storeMethodIfCallbackNeeded = function (method) {
|
|
7826
|
+
var _this = this;
|
|
7827
|
+
return this.isLoggedAndHasPos().pipe(operators.take(1), operators.map(function (res) {
|
|
7828
|
+
if ((!res[0] || !res[1])) {
|
|
7829
|
+
localStorage.setItem('_miam/storeCallbackMethod', JSON.stringify(method));
|
|
7830
|
+
}
|
|
7831
|
+
return _this.context.hookCallback(res[0], res[1]);
|
|
7832
|
+
}));
|
|
7833
|
+
};
|
|
7834
|
+
/**
|
|
7835
|
+
* Executes a stored method if the user is logged in and has a PoS.
|
|
7836
|
+
*/
|
|
7837
|
+
BasketActionsService.prototype.canExecuteStoredMethod = function () {
|
|
7838
|
+
var _this = this;
|
|
7839
|
+
return this.basketsService.waitForBasketEntries.pipe(operators.switchMap(function () { return _this.isLoggedAndHasPos().pipe(operators.skipWhile(function (res) { return !res[0] || !res[1]; }), operators.take(1), operators.map(function () { return _this.getStoredMethod(); })); }));
|
|
7840
|
+
};
|
|
7841
|
+
/**
|
|
7842
|
+
* Check if the user is logged in and has a point of sale.
|
|
7843
|
+
*/
|
|
7844
|
+
BasketActionsService.prototype.isLoggedAndHasPos = function () {
|
|
7845
|
+
return rxjs.combineLatest([
|
|
7846
|
+
this.userService.isLogged$,
|
|
7847
|
+
this.posService.posWasInitialized()
|
|
7848
|
+
]);
|
|
7849
|
+
};
|
|
7850
|
+
/**
|
|
7851
|
+
* Executes the stored method by retrieving the stored data from local storage,
|
|
7852
|
+
* parsing it, and iterating over each request. Depending on the method name,
|
|
7853
|
+
* either adds recipes to the basket or ingredients to the basket.
|
|
7854
|
+
*/
|
|
7855
|
+
BasketActionsService.prototype.getStoredMethod = function () {
|
|
7856
|
+
if (localStorage.getItem('_miam/storeCallbackMethod')) {
|
|
7857
|
+
var parsedStoredData = JSON.parse(localStorage.getItem('_miam/storeCallbackMethod'));
|
|
7858
|
+
this.shouldExecuteBasketAction.next(parsedStoredData);
|
|
7859
|
+
this.recipesService.display(parsedStoredData.arguments.recipeId, { previewAllowed: true, previewMode: false }, { originPath: '', props: {} });
|
|
7860
|
+
localStorage.removeItem('_miam/storeCallbackMethod');
|
|
7861
|
+
}
|
|
7862
|
+
};
|
|
7863
|
+
return BasketActionsService;
|
|
7864
|
+
}());
|
|
7865
|
+
BasketActionsService.ɵfac = function BasketActionsService_Factory(t) { return new (t || BasketActionsService)(i0__namespace.ɵɵinject(ContextService), i0__namespace.ɵɵinject(UserService), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(BasketsService), i0__namespace.ɵɵinject(RecipesService)); };
|
|
7866
|
+
BasketActionsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: BasketActionsService, factory: BasketActionsService.ɵfac, providedIn: 'root' });
|
|
7867
|
+
(function () {
|
|
7868
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasketActionsService, [{
|
|
7869
|
+
type: i0.Injectable,
|
|
7870
|
+
args: [{
|
|
7871
|
+
providedIn: 'root'
|
|
7872
|
+
}]
|
|
7873
|
+
}], function () { return [{ type: ContextService }, { type: UserService }, { type: PointOfSalesService }, { type: BasketsService }, { type: RecipesService }]; }, null);
|
|
7874
|
+
})();
|
|
7875
|
+
|
|
7691
7876
|
var RecipeDetailsService = /** @class */ (function () {
|
|
7692
|
-
function RecipeDetailsService(basketsService, recipeService, analyticsService,
|
|
7877
|
+
function RecipeDetailsService(basketsService, recipeService, analyticsService, ignoredBasketsService, basketActionsService, contextService, posService, itemsService) {
|
|
7693
7878
|
this.basketsService = basketsService;
|
|
7694
7879
|
this.recipeService = recipeService;
|
|
7695
7880
|
this.analyticsService = analyticsService;
|
|
7696
|
-
this.posService = posService;
|
|
7697
|
-
this.userService = userService;
|
|
7698
7881
|
this.ignoredBasketsService = ignoredBasketsService;
|
|
7882
|
+
this.basketActionsService = basketActionsService;
|
|
7699
7883
|
this.contextService = contextService;
|
|
7884
|
+
this.posService = posService;
|
|
7885
|
+
this.itemsService = itemsService;
|
|
7700
7886
|
this.productsByCategory = {
|
|
7701
7887
|
toPickProducts: [],
|
|
7702
7888
|
oftenIgnoredProducts: [],
|
|
@@ -7704,6 +7890,8 @@
|
|
|
7704
7890
|
};
|
|
7705
7891
|
this.products = [];
|
|
7706
7892
|
this.allIngredientsToBasketLoading$ = new rxjs.BehaviorSubject(false);
|
|
7893
|
+
this.ingredientToBasketLoading$ = new rxjs.BehaviorSubject(false);
|
|
7894
|
+
this.updateIngredientFromBasketLoading$ = new rxjs.BehaviorSubject(false);
|
|
7707
7895
|
this.productsLoading$ = new rxjs.BehaviorSubject(false);
|
|
7708
7896
|
this.recipeLoading$ = new rxjs.BehaviorSubject(false);
|
|
7709
7897
|
this.basketEntryToReplace$ = new rxjs.BehaviorSubject(null);
|
|
@@ -7712,9 +7900,12 @@
|
|
|
7712
7900
|
this.onlyShowPreparation = false;
|
|
7713
7901
|
this.productsByCategory$ = new rxjs.BehaviorSubject(this.productsByCategory);
|
|
7714
7902
|
this.products$ = new rxjs.BehaviorSubject(this.products);
|
|
7903
|
+
this.recipePrice = { remaining: 0, inBasket: 0 };
|
|
7904
|
+
this.subscriptions = new rxjs.Subscription();
|
|
7715
7905
|
this.initDefaultState();
|
|
7716
7906
|
this.listenBasketPreview();
|
|
7717
7907
|
this.resetOnHide();
|
|
7908
|
+
this.executeActionFromStorage();
|
|
7718
7909
|
}
|
|
7719
7910
|
Object.defineProperty(RecipeDetailsService.prototype, "remainingBasketEntries", {
|
|
7720
7911
|
get: function () {
|
|
@@ -7768,6 +7959,13 @@
|
|
|
7768
7959
|
enumerable: false,
|
|
7769
7960
|
configurable: true
|
|
7770
7961
|
});
|
|
7962
|
+
Object.defineProperty(RecipeDetailsService.prototype, "ingredientToBasketLoading", {
|
|
7963
|
+
set: function (isLoading) {
|
|
7964
|
+
this.ingredientToBasketLoading$.next(isLoading);
|
|
7965
|
+
},
|
|
7966
|
+
enumerable: false,
|
|
7967
|
+
configurable: true
|
|
7968
|
+
});
|
|
7771
7969
|
Object.defineProperty(RecipeDetailsService.prototype, "allIngredientsToBasketLoading", {
|
|
7772
7970
|
set: function (isLoading) {
|
|
7773
7971
|
this.allIngredientsToBasketLoading$.next(isLoading);
|
|
@@ -7775,6 +7973,13 @@
|
|
|
7775
7973
|
enumerable: false,
|
|
7776
7974
|
configurable: true
|
|
7777
7975
|
});
|
|
7976
|
+
Object.defineProperty(RecipeDetailsService.prototype, "updateIngredientFromBasketLoading", {
|
|
7977
|
+
set: function (isLoading) {
|
|
7978
|
+
this.updateIngredientFromBasketLoading$.next(isLoading);
|
|
7979
|
+
},
|
|
7980
|
+
enumerable: false,
|
|
7981
|
+
configurable: true
|
|
7982
|
+
});
|
|
7778
7983
|
RecipeDetailsService.prototype.initDefaultState = function () {
|
|
7779
7984
|
this.productsByCategory = {
|
|
7780
7985
|
toPickProducts: [],
|
|
@@ -7782,23 +7987,43 @@
|
|
|
7782
7987
|
unavailableProducts: []
|
|
7783
7988
|
};
|
|
7784
7989
|
this.products = [];
|
|
7990
|
+
this.recipePrice = {
|
|
7991
|
+
remaining: 0,
|
|
7992
|
+
inBasket: 0
|
|
7993
|
+
};
|
|
7785
7994
|
this.totalProducts = 0;
|
|
7786
7995
|
this.allIngredientsToBasketLoading$.next(false);
|
|
7996
|
+
this.ingredientToBasketLoading$.next(false);
|
|
7997
|
+
this.updateIngredientFromBasketLoading$.next(false);
|
|
7787
7998
|
this.productsLoading$.next(false);
|
|
7788
7999
|
this.recipeLoading$.next(false);
|
|
7789
8000
|
this.basketEntryToReplace$.next(null);
|
|
7790
8001
|
this.productsByCategory$.next(this.productsByCategory);
|
|
7791
8002
|
this.products$.next(this.products);
|
|
7792
8003
|
};
|
|
8004
|
+
RecipeDetailsService.prototype.executeActionFromStorage = function () {
|
|
8005
|
+
var _this = this;
|
|
8006
|
+
this.productsByCategory$.pipe(operators.skipWhile(function (products) { return products.toPickProducts.length === 0; }), operators.take(1), operators.switchMap(function () { return _this.basketActionsService.shouldExecuteBasketAction.pipe(operators.skipWhile(function (method) { return !method; })); })).subscribe(function (parsedMethod) {
|
|
8007
|
+
if (parsedMethod.method === 'addRecipeToBasket') {
|
|
8008
|
+
_this.recipe.modifiedGuests = parsedMethod.arguments.guests || _this.recipe.modifiedGuests;
|
|
8009
|
+
_this.addAllIngredientsToBasket(parsedMethod.arguments.eventTrace);
|
|
8010
|
+
}
|
|
8011
|
+
});
|
|
8012
|
+
};
|
|
7793
8013
|
RecipeDetailsService.prototype.resetOnHide = function () {
|
|
7794
8014
|
var _this = this;
|
|
7795
8015
|
var previousRecipe = this.recipe;
|
|
7796
|
-
this.recipeService.displayedRecipe$.subscribe(function (toDisplay) {
|
|
8016
|
+
this.subscriptions.add(this.recipeService.displayedRecipe$.subscribe(function (toDisplay) {
|
|
7797
8017
|
if ((toDisplay === null || toDisplay === void 0 ? void 0 : toDisplay.recipe) && toDisplay.recipe.id !== (previousRecipe === null || previousRecipe === void 0 ? void 0 : previousRecipe.id)) {
|
|
7798
8018
|
previousRecipe = toDisplay.recipe;
|
|
7799
|
-
_this.
|
|
8019
|
+
_this.posService.posWasInitialized().pipe(operators.take(1)).subscribe(function (hasPos) {
|
|
8020
|
+
var isHookOk = _this.contextService.hookCallback(true, hasPos);
|
|
8021
|
+
if (isHookOk) {
|
|
8022
|
+
_this.initDefaultState();
|
|
8023
|
+
}
|
|
8024
|
+
});
|
|
7800
8025
|
}
|
|
7801
|
-
});
|
|
8026
|
+
}));
|
|
7802
8027
|
};
|
|
7803
8028
|
/**
|
|
7804
8029
|
* Sets the products by category.
|
|
@@ -7812,32 +8037,25 @@
|
|
|
7812
8037
|
*/
|
|
7813
8038
|
RecipeDetailsService.prototype.setProductsByCategory = function () {
|
|
7814
8039
|
var _this = this;
|
|
7815
|
-
this.
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
8040
|
+
this.subscriptions.add(this.fetchProductPrices().subscribe(function (prices) {
|
|
8041
|
+
_this.totalProducts = _this.products.length;
|
|
8042
|
+
_this.productsByCategory = {
|
|
8043
|
+
toPickProducts: [],
|
|
8044
|
+
oftenIgnoredProducts: [],
|
|
8045
|
+
unavailableProducts: []
|
|
8046
|
+
};
|
|
8047
|
+
_this.recipePrice = {
|
|
8048
|
+
remaining: 0,
|
|
8049
|
+
inBasket: 0
|
|
8050
|
+
};
|
|
8051
|
+
_this.categorizeProducts(prices);
|
|
8052
|
+
}));
|
|
8053
|
+
};
|
|
8054
|
+
RecipeDetailsService.prototype.calculateProductPrice = function (product, price) {
|
|
8055
|
+
product.price = {
|
|
8056
|
+
unit: +price.toFixed(2),
|
|
8057
|
+
total: +(price * product.basketEntry.quantity).toFixed(2)
|
|
7820
8058
|
};
|
|
7821
|
-
// Iterate over each product in the entriesWithIngredients array
|
|
7822
|
-
this.products.forEach(function (product) {
|
|
7823
|
-
var basketEntry = product.basketEntry;
|
|
7824
|
-
var id = basketEntry.id, selectedItem = basketEntry.selectedItem, status = basketEntry.status;
|
|
7825
|
-
// Check if the product is ignored
|
|
7826
|
-
_this.isIngredientIgnored(product);
|
|
7827
|
-
// Check if the product is unavailable
|
|
7828
|
-
if (id === '-1' && !selectedItem) {
|
|
7829
|
-
_this.productsByCategory.unavailableProducts.push(product);
|
|
7830
|
-
}
|
|
7831
|
-
// Check if the product is often ignored based on groceriesEntryStatus
|
|
7832
|
-
else if (status === 'often_deleted') {
|
|
7833
|
-
_this.productsByCategory.oftenIgnoredProducts.push(product);
|
|
7834
|
-
}
|
|
7835
|
-
// Add the product to the toPickProducts category
|
|
7836
|
-
else {
|
|
7837
|
-
_this.productsByCategory.toPickProducts.push(product);
|
|
7838
|
-
}
|
|
7839
|
-
});
|
|
7840
|
-
this.productsByCategory$.next(this.productsByCategory);
|
|
7841
8059
|
};
|
|
7842
8060
|
RecipeDetailsService.prototype.isProductsByCategorySet = function () {
|
|
7843
8061
|
return this.productsByCategory.toPickProducts.length > 0 ||
|
|
@@ -7849,15 +8067,24 @@
|
|
|
7849
8067
|
*
|
|
7850
8068
|
* @return An observable that emits the products in the basket.
|
|
7851
8069
|
*/
|
|
7852
|
-
RecipeDetailsService.prototype.getIngredientsBasketEntries = function () {
|
|
8070
|
+
RecipeDetailsService.prototype.getIngredientsBasketEntries = function (fromInit) {
|
|
7853
8071
|
var _this = this;
|
|
8072
|
+
if (fromInit === void 0) { fromInit = false; }
|
|
7854
8073
|
if (!this.recipe) {
|
|
7855
8074
|
return rxjs.of([]);
|
|
7856
8075
|
}
|
|
7857
|
-
|
|
8076
|
+
if (!fromInit) {
|
|
8077
|
+
this.ingredientToBasketLoading = true;
|
|
8078
|
+
}
|
|
8079
|
+
var basketEntries$ = this.recipe.ingredients.map(function (ingredient) { return _this.basketsService.basketEntryFromIngredient(ingredient.id, _this.recipe.modifiedGuests, !fromInit).pipe(operators.map(function (basketEntry) { return ({ ingredient: ingredient, basketEntry: basketEntry }); })); });
|
|
7858
8080
|
return rxjs.forkJoin(basketEntries$).pipe(operators.tap(function (basketEntriesResult) {
|
|
7859
|
-
|
|
7860
|
-
|
|
8081
|
+
if (fromInit) {
|
|
8082
|
+
_this.products = basketEntriesResult;
|
|
8083
|
+
_this.setProductsByCategory();
|
|
8084
|
+
}
|
|
8085
|
+
else {
|
|
8086
|
+
_this.updatePriceOnGuestChange(basketEntriesResult);
|
|
8087
|
+
}
|
|
7861
8088
|
}), operators.switchMap(function () { return rxjs.of(_this.products); }));
|
|
7862
8089
|
};
|
|
7863
8090
|
RecipeDetailsService.prototype.ingredientRemoved = function (ingredient, eventTrace) {
|
|
@@ -7877,8 +8104,18 @@
|
|
|
7877
8104
|
};
|
|
7878
8105
|
RecipeDetailsService.prototype.addAllIngredientsToBasket = function (eventTrace) {
|
|
7879
8106
|
var _this = this;
|
|
7880
|
-
this.
|
|
7881
|
-
|
|
8107
|
+
this.subscriptions.add(this.canAddProductToBasket({
|
|
8108
|
+
method: 'addRecipeToBasket',
|
|
8109
|
+
arguments: {
|
|
8110
|
+
recipeId: this.recipe.id, guests: this.recipe.modifiedGuests,
|
|
8111
|
+
eventTrace: eventTrace
|
|
8112
|
+
}
|
|
8113
|
+
}, eventTrace).subscribe(function (passed) {
|
|
8114
|
+
if (passed) {
|
|
8115
|
+
_this.allIngredientsToBasketLoading = true;
|
|
8116
|
+
_this.basketsService.addIngredientsToBasket(_this.recipe.id, _this.remainingProducts(), eventTrace);
|
|
8117
|
+
}
|
|
8118
|
+
}));
|
|
7882
8119
|
};
|
|
7883
8120
|
// If the recipe is already in basket, update the number of guests (= append recipe to list again)
|
|
7884
8121
|
RecipeDetailsService.prototype.updateGuests = function (eventTrace) {
|
|
@@ -7893,16 +8130,6 @@
|
|
|
7893
8130
|
});
|
|
7894
8131
|
this.recipeService.displayedRecipeChanged$.next();
|
|
7895
8132
|
};
|
|
7896
|
-
RecipeDetailsService.prototype.remainingProducts = function () {
|
|
7897
|
-
var _this = this;
|
|
7898
|
-
return this.remainingBasketEntries.reduce(function (result, be) {
|
|
7899
|
-
var p = _this.products.find(function (product) { return product.basketEntry.name === be.name; });
|
|
7900
|
-
if (p) {
|
|
7901
|
-
result.push({ ingredientId: p.ingredient.id, entry: p.basketEntry });
|
|
7902
|
-
}
|
|
7903
|
-
return result;
|
|
7904
|
-
}, []);
|
|
7905
|
-
};
|
|
7906
8133
|
RecipeDetailsService.prototype.replaceBasketEntry = function (basketEntry, ignoreSelected) {
|
|
7907
8134
|
this.basketEntryToReplace = {
|
|
7908
8135
|
ingredient: this.products[this.products.findIndex(function (p) { return p.basketEntry.name === basketEntry.name; })].ingredient,
|
|
@@ -7915,18 +8142,60 @@
|
|
|
7915
8142
|
* @param eventTrace needed to add recipe to basket
|
|
7916
8143
|
* @returns [islogged: boolean, posWasInitialized: boolean, recipeIsInBasket: boolean]
|
|
7917
8144
|
*/
|
|
7918
|
-
RecipeDetailsService.prototype.canAddProductToBasket = function (eventTrace) {
|
|
8145
|
+
RecipeDetailsService.prototype.canAddProductToBasket = function (method, eventTrace) {
|
|
7919
8146
|
var _this = this;
|
|
7920
|
-
return
|
|
7921
|
-
|
|
7922
|
-
this.posService.posWasInitialized().pipe(operators.take(1)),
|
|
7923
|
-
this.basketsService.recipeIsInBasket(this.recipe.id).pipe(operators.take(1))
|
|
7924
|
-
]).pipe(operators.tap(function (res) {
|
|
7925
|
-
var isHookOk = _this.contextService.hookCallback(res[0], res[1]);
|
|
7926
|
-
if (isHookOk && !res[2]) {
|
|
8147
|
+
return this.basketActionsService.storeMethodIfCallbackNeeded(method).pipe(operators.switchMap(function (canAdd) { return _this.basketsService.recipeIsInBasket(_this.recipe.id).pipe(operators.take(1), operators.map(function (isInBasket) {
|
|
8148
|
+
if (canAdd && !isInBasket) {
|
|
7927
8149
|
_this.basketsService.addRecipesToBasket([_this.recipe.id], _this.recipe.modifiedGuests, eventTrace, false);
|
|
7928
8150
|
}
|
|
7929
|
-
|
|
8151
|
+
return canAdd;
|
|
8152
|
+
})); }));
|
|
8153
|
+
};
|
|
8154
|
+
RecipeDetailsService.prototype.updateRecipePrice = function (product, ignore) {
|
|
8155
|
+
if (ignore === void 0) { ignore = false; }
|
|
8156
|
+
if (ignore) {
|
|
8157
|
+
this.recipePrice.remaining = this.recipePrice.remaining - product.price.total;
|
|
8158
|
+
}
|
|
8159
|
+
else {
|
|
8160
|
+
this.recipePrice = {
|
|
8161
|
+
remaining: this.recipePrice.remaining + (product.basketEntry.status === 'initial' && product.price.total),
|
|
8162
|
+
inBasket: this.recipePrice.inBasket + (product.basketEntry.status === 'active' && product.price.total)
|
|
8163
|
+
};
|
|
8164
|
+
}
|
|
8165
|
+
};
|
|
8166
|
+
RecipeDetailsService.prototype.unsubscribe = function () {
|
|
8167
|
+
this.subscriptions.unsubscribe();
|
|
8168
|
+
};
|
|
8169
|
+
RecipeDetailsService.prototype.remainingProducts = function () {
|
|
8170
|
+
var _this = this;
|
|
8171
|
+
return this.remainingBasketEntries.reduce(function (result, be) {
|
|
8172
|
+
var p = _this.products.find(function (product) { return product.basketEntry.name === be.name; });
|
|
8173
|
+
if (p) {
|
|
8174
|
+
result.push({ ingredientId: p.ingredient.id, entry: p.basketEntry });
|
|
8175
|
+
}
|
|
8176
|
+
return result;
|
|
8177
|
+
}, []);
|
|
8178
|
+
};
|
|
8179
|
+
RecipeDetailsService.prototype.updatePriceOnGuestChange = function (basketEntriesResult) {
|
|
8180
|
+
var _this = this;
|
|
8181
|
+
this.recipePrice = {
|
|
8182
|
+
remaining: 0,
|
|
8183
|
+
inBasket: 0
|
|
8184
|
+
};
|
|
8185
|
+
basketEntriesResult.forEach(function (product, index) {
|
|
8186
|
+
_this.products[index].basketEntry.quantity = product.basketEntry.quantity;
|
|
8187
|
+
_this.calculateProductPrice(_this.products[index], _this.products[index].price.unit);
|
|
8188
|
+
if (_this.products[index].basketEntry.status === 'initial' || _this.products[index].basketEntry.status === 'active') {
|
|
8189
|
+
_this.updateRecipePrice(_this.products[index]);
|
|
8190
|
+
}
|
|
8191
|
+
});
|
|
8192
|
+
// check if the recipe is in the basket, if not, stop the loading, if yes, loading is stopped on the basketPreview listener
|
|
8193
|
+
this.basketsService.recipeIsInBasket(this.recipe.id).pipe(operators.take(1)).subscribe(function (inBasket) {
|
|
8194
|
+
if (!inBasket) {
|
|
8195
|
+
_this.updateIngredientFromBasketLoading = false;
|
|
8196
|
+
_this.ingredientToBasketLoading = false;
|
|
8197
|
+
}
|
|
8198
|
+
});
|
|
7930
8199
|
};
|
|
7931
8200
|
RecipeDetailsService.prototype.basketEntryForIngredient = function (ingredient) {
|
|
7932
8201
|
return this.products.find(function (p) { return p.ingredient.id === ingredient.id; }).basketEntry;
|
|
@@ -7936,11 +8205,11 @@
|
|
|
7936
8205
|
*/
|
|
7937
8206
|
RecipeDetailsService.prototype.listenBasketPreview = function () {
|
|
7938
8207
|
var _this = this;
|
|
7939
|
-
this.basketsService._basketPreview$.subscribe(function (basketPreviewLines) {
|
|
7940
|
-
var _a;
|
|
8208
|
+
this.subscriptions.add(this.basketsService._basketPreview$.subscribe(function (basketPreviewLines) {
|
|
8209
|
+
var _a, _b;
|
|
7941
8210
|
if (basketPreviewLines) {
|
|
7942
8211
|
var entriesForRecipe_1 = basketPreviewLines.find(function (basketPreviewLine) { var _a; return basketPreviewLine.id === ((_a = _this.recipe) === null || _a === void 0 ? void 0 : _a.id); });
|
|
7943
|
-
if ((_a = entriesForRecipe_1 === null || entriesForRecipe_1 === void 0 ? void 0 : entriesForRecipe_1.entries) === null || _a === void 0 ? void 0 : _a.all) {
|
|
8212
|
+
if (((_b = (_a = entriesForRecipe_1 === null || entriesForRecipe_1 === void 0 ? void 0 : entriesForRecipe_1.entries) === null || _a === void 0 ? void 0 : _a.all) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
7944
8213
|
_this.products.forEach(function (product) {
|
|
7945
8214
|
var _a;
|
|
7946
8215
|
product.basketEntry = (_a = entriesForRecipe_1.entries.all.find(function (basketEntry) { return basketEntry.name === product.basketEntry.name; })) !== null && _a !== void 0 ? _a : product.basketEntry;
|
|
@@ -7948,16 +8217,62 @@
|
|
|
7948
8217
|
_this.setProductsByCategory();
|
|
7949
8218
|
}
|
|
7950
8219
|
}
|
|
7951
|
-
});
|
|
8220
|
+
}));
|
|
7952
8221
|
};
|
|
7953
8222
|
RecipeDetailsService.prototype.isIngredientIgnored = function (product) {
|
|
7954
8223
|
if (this.ignoredBasketsService.isIngredientIgnored(product.ingredient.id)) {
|
|
7955
8224
|
product.basketEntry.status = 'ignored';
|
|
7956
8225
|
}
|
|
7957
8226
|
};
|
|
8227
|
+
RecipeDetailsService.prototype.fetchProductPrices = function () {
|
|
8228
|
+
var _this = this;
|
|
8229
|
+
return rxjs.forkJoin(this.products.map(function (product) { return product.basketEntry.selectedItem
|
|
8230
|
+
? _this.itemsService.getPriceForItem(product.basketEntry.selectedItem.id)
|
|
8231
|
+
: rxjs.of({ price: '0' }); }));
|
|
8232
|
+
};
|
|
8233
|
+
RecipeDetailsService.prototype.categorizeProducts = function (prices) {
|
|
8234
|
+
var _this = this;
|
|
8235
|
+
// Iterate over each product in the entriesWithIngredients array
|
|
8236
|
+
this.products.forEach(function (product, index) {
|
|
8237
|
+
var basketEntry = product.basketEntry;
|
|
8238
|
+
var id = basketEntry.id, selectedItem = basketEntry.selectedItem, status = basketEntry.status;
|
|
8239
|
+
// Check if the product is ignored
|
|
8240
|
+
_this.isIngredientIgnored(product);
|
|
8241
|
+
_this.calculateProductPrice(product, +prices[index].price);
|
|
8242
|
+
_this.correctProductState(product);
|
|
8243
|
+
// Check if the product is unavailable
|
|
8244
|
+
if (id === '-1' && !selectedItem) {
|
|
8245
|
+
_this.productsByCategory.unavailableProducts.push(product);
|
|
8246
|
+
}
|
|
8247
|
+
// Check if the product is often ignored based on groceriesEntryStatus
|
|
8248
|
+
else if (status === 'often_deleted') {
|
|
8249
|
+
_this.productsByCategory.oftenIgnoredProducts.push(product);
|
|
8250
|
+
}
|
|
8251
|
+
// Add the product to the toPickProducts category
|
|
8252
|
+
else {
|
|
8253
|
+
_this.productsByCategory.toPickProducts.push(product);
|
|
8254
|
+
_this.updateRecipePrice(product);
|
|
8255
|
+
}
|
|
8256
|
+
});
|
|
8257
|
+
this.updateIngredientFromBasketLoading = false;
|
|
8258
|
+
this.ingredientToBasketLoading = false;
|
|
8259
|
+
this.productsByCategory$.next(this.productsByCategory);
|
|
8260
|
+
};
|
|
8261
|
+
RecipeDetailsService.prototype.correctProductState = function (product) {
|
|
8262
|
+
if (!['often_deleted', 'deleted', 'ignored'].includes(product.basketEntry.status)) {
|
|
8263
|
+
var _c = product.basketEntry, id = _c.id, selectedItem = _c.selectedItem, recipesIds = _c.recipesIds;
|
|
8264
|
+
if (id === '-1') {
|
|
8265
|
+
product.basketEntry.status = selectedItem ? 'initial' : 'unavailable';
|
|
8266
|
+
}
|
|
8267
|
+
else {
|
|
8268
|
+
var isRecipeActive = recipesIds.includes(+this.recipe.id);
|
|
8269
|
+
product.basketEntry.status = isRecipeActive ? 'active' : 'initial';
|
|
8270
|
+
}
|
|
8271
|
+
}
|
|
8272
|
+
};
|
|
7958
8273
|
return RecipeDetailsService;
|
|
7959
8274
|
}());
|
|
7960
|
-
RecipeDetailsService.ɵfac = function RecipeDetailsService_Factory(t) { return new (t || RecipeDetailsService)(i0__namespace.ɵɵinject(BasketsService), i0__namespace.ɵɵinject(RecipesService), i0__namespace.ɵɵinject(AnalyticsService), i0__namespace.ɵɵinject(
|
|
8275
|
+
RecipeDetailsService.ɵfac = function RecipeDetailsService_Factory(t) { return new (t || RecipeDetailsService)(i0__namespace.ɵɵinject(BasketsService), i0__namespace.ɵɵinject(RecipesService), i0__namespace.ɵɵinject(AnalyticsService), i0__namespace.ɵɵinject(IgnoredIngredientsService), i0__namespace.ɵɵinject(BasketActionsService), i0__namespace.ɵɵinject(ContextService), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(ItemsService)); };
|
|
7961
8276
|
RecipeDetailsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: RecipeDetailsService, factory: RecipeDetailsService.ɵfac, providedIn: 'root' });
|
|
7962
8277
|
(function () {
|
|
7963
8278
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeDetailsService, [{
|
|
@@ -7965,7 +8280,7 @@
|
|
|
7965
8280
|
args: [{
|
|
7966
8281
|
providedIn: 'root'
|
|
7967
8282
|
}]
|
|
7968
|
-
}], function () { return [{ type: BasketsService }, { type: RecipesService }, { type: AnalyticsService }, { type:
|
|
8283
|
+
}], function () { return [{ type: BasketsService }, { type: RecipesService }, { type: AnalyticsService }, { type: IgnoredIngredientsService }, { type: BasketActionsService }, { type: ContextService }, { type: PointOfSalesService }, { type: ItemsService }]; }, null);
|
|
7969
8284
|
})();
|
|
7970
8285
|
|
|
7971
8286
|
var ScrollingService = /** @class */ (function () {
|
|
@@ -8030,6 +8345,119 @@
|
|
|
8030
8345
|
}], function () { return [{ type: SponsorBlockTypeService }]; }, null);
|
|
8031
8346
|
})();
|
|
8032
8347
|
|
|
8348
|
+
var BasketTransferService = /** @class */ (function () {
|
|
8349
|
+
function BasketTransferService(basketsService, contextService, posService, http, userService) {
|
|
8350
|
+
this.basketsService = basketsService;
|
|
8351
|
+
this.contextService = contextService;
|
|
8352
|
+
this.posService = posService;
|
|
8353
|
+
this.http = http;
|
|
8354
|
+
this.userService = userService;
|
|
8355
|
+
this.handleBasketTransfer();
|
|
8356
|
+
}
|
|
8357
|
+
BasketTransferService.prototype.handleBasketTransfer = function () {
|
|
8358
|
+
var _this = this;
|
|
8359
|
+
var transferData = this.getTransferData();
|
|
8360
|
+
if (transferData) {
|
|
8361
|
+
this.basketsService.waitForBasket.pipe(operators.take(1), operators.switchMap(function () { return _this.applyBasketTransfer(transferData); }), operators.switchMap(function () { return _this.basketsService.reloadBasket(); })).subscribe();
|
|
8362
|
+
}
|
|
8363
|
+
};
|
|
8364
|
+
BasketTransferService.prototype.applyBasketTransfer = function (params) {
|
|
8365
|
+
var _this = this;
|
|
8366
|
+
this.setSessionData(params);
|
|
8367
|
+
return this.callHookbackIfNotLogged().pipe(operators.skipWhile(function (isLogged) { return !isLogged; }), operators.switchMap(function () { return _this.forcePosIfUnset(params.posExtId); }), operators.skipWhile(function (isPosSet) { return !isPosSet; }), operators.switchMap(function () {
|
|
8368
|
+
return _this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) {
|
|
8369
|
+
var posId = pos.id;
|
|
8370
|
+
var transferBasketUrl = environment$1.miamAPI + "/api/v1/baskets/transfer?point_of_sale_id=" + posId + "&transferred_basket_token=" + params.basketToken;
|
|
8371
|
+
_this.clearTransferSessionData();
|
|
8372
|
+
sessionStorage.setItem('_miam/basketActionInterrupted', 'true');
|
|
8373
|
+
return _this.http.patch(transferBasketUrl, {}).pipe(operators.switchMap(function () {
|
|
8374
|
+
var getCurrentBasketUrl = environment$1.miamAPI + "/api/v1/baskets/current?point_of_sale_id=" + posId;
|
|
8375
|
+
return _this.http.get(getCurrentBasketUrl, {}).pipe(operators.switchMap(function () {
|
|
8376
|
+
sessionStorage.removeItem('_miam/basketActionInterrupted');
|
|
8377
|
+
return rxjs.of(true);
|
|
8378
|
+
}));
|
|
8379
|
+
}));
|
|
8380
|
+
}));
|
|
8381
|
+
}));
|
|
8382
|
+
};
|
|
8383
|
+
BasketTransferService.prototype.setSessionData = function (params) {
|
|
8384
|
+
var basketTokenFromSession = sessionStorage.getItem('_miam/transferredBasketToken');
|
|
8385
|
+
var posExtIdFromSession = sessionStorage.getItem('_miam/pointOfSaleExtId');
|
|
8386
|
+
var isSessionDataMatching = basketTokenFromSession === params.basketToken && posExtIdFromSession === params.posExtId;
|
|
8387
|
+
if (!isSessionDataMatching) {
|
|
8388
|
+
sessionStorage.setItem('_miam/transferredBasketToken', params.basketToken);
|
|
8389
|
+
sessionStorage.setItem('_miam/posOfSaleExtId', params.posExtId);
|
|
8390
|
+
}
|
|
8391
|
+
};
|
|
8392
|
+
BasketTransferService.prototype.clearTransferSessionData = function () {
|
|
8393
|
+
sessionStorage.removeItem('_miam/transferredBasketToken');
|
|
8394
|
+
sessionStorage.removeItem('_miam/pointOfSaleExtId');
|
|
8395
|
+
};
|
|
8396
|
+
BasketTransferService.prototype.confirmBasket = function () {
|
|
8397
|
+
var _this = this;
|
|
8398
|
+
var posId;
|
|
8399
|
+
this.posService.pos$.asObservable().pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1)).subscribe(function (pos) {
|
|
8400
|
+
posId = pos.id;
|
|
8401
|
+
var getCurrentBasketUrl = environment$1.miamAPI + "/api/v1/baskets/current?point_of_sale_id=" + posId;
|
|
8402
|
+
_this.http.get(getCurrentBasketUrl, {}).subscribe(function () {
|
|
8403
|
+
var startTransferUrl = environment$1.miamAPI + "/api/v1/baskets/start_transfer?point_of_sale_id=" + posId;
|
|
8404
|
+
_this.http.patch(startTransferUrl, {}).subscribe(function (transferResponse) {
|
|
8405
|
+
console.log('PATCH transfer:', transferResponse);
|
|
8406
|
+
_this.http.get(getCurrentBasketUrl, {}).subscribe(function () {
|
|
8407
|
+
var transferUrl = transferResponse['transfer_url'];
|
|
8408
|
+
window.open(transferUrl, '_blank');
|
|
8409
|
+
});
|
|
8410
|
+
});
|
|
8411
|
+
});
|
|
8412
|
+
});
|
|
8413
|
+
};
|
|
8414
|
+
BasketTransferService.prototype.callHookbackIfNotLogged = function () {
|
|
8415
|
+
var _this = this;
|
|
8416
|
+
return rxjs.combineLatest([
|
|
8417
|
+
this.userService.isLogged$,
|
|
8418
|
+
this.posService.posWasInitialized()
|
|
8419
|
+
]).pipe(operators.take(1), operators.map(function (_a) {
|
|
8420
|
+
var _b = __read(_a, 2), isLogged = _b[0], isPosValid = _b[1];
|
|
8421
|
+
return _this.contextService.hookCallback(isLogged, isPosValid);
|
|
8422
|
+
}));
|
|
8423
|
+
};
|
|
8424
|
+
BasketTransferService.prototype.forcePosIfUnset = function (transferPosExtId) {
|
|
8425
|
+
var _this = this;
|
|
8426
|
+
return this.posService.pos$.pipe(operators.map(function (pos) {
|
|
8427
|
+
var posSet = pos && pos.extId === transferPosExtId;
|
|
8428
|
+
if (!posSet) {
|
|
8429
|
+
_this.contextService.forcePosCallback(transferPosExtId);
|
|
8430
|
+
}
|
|
8431
|
+
return posSet;
|
|
8432
|
+
}));
|
|
8433
|
+
};
|
|
8434
|
+
BasketTransferService.prototype.getTransferData = function () {
|
|
8435
|
+
var currentUrl = window.location.href;
|
|
8436
|
+
var urlParams = new URL(currentUrl).searchParams;
|
|
8437
|
+
var basketToken = urlParams.get('transferred_basket_token') || sessionStorage.getItem('_miam/transferredBasketToken');
|
|
8438
|
+
var posExtId = urlParams.get('point_of_sale_ext_id') || sessionStorage.getItem('_miam/posOfSaleExtId');
|
|
8439
|
+
var urlWithoutParams = currentUrl.split('?')[0];
|
|
8440
|
+
history.replaceState({}, document.title, urlWithoutParams);
|
|
8441
|
+
if (basketToken && posExtId) {
|
|
8442
|
+
return { basketToken: basketToken, posExtId: posExtId };
|
|
8443
|
+
}
|
|
8444
|
+
else {
|
|
8445
|
+
return null;
|
|
8446
|
+
}
|
|
8447
|
+
};
|
|
8448
|
+
return BasketTransferService;
|
|
8449
|
+
}());
|
|
8450
|
+
BasketTransferService.ɵfac = function BasketTransferService_Factory(t) { return new (t || BasketTransferService)(i0__namespace.ɵɵinject(BasketsService), i0__namespace.ɵɵinject(ContextService), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(UserService)); };
|
|
8451
|
+
BasketTransferService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: BasketTransferService, factory: BasketTransferService.ɵfac, providedIn: 'root' });
|
|
8452
|
+
(function () {
|
|
8453
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasketTransferService, [{
|
|
8454
|
+
type: i0.Injectable,
|
|
8455
|
+
args: [{
|
|
8456
|
+
providedIn: 'root'
|
|
8457
|
+
}]
|
|
8458
|
+
}], function () { return [{ type: BasketsService }, { type: ContextService }, { type: PointOfSalesService }, { type: i1__namespace.HttpClient }, { type: UserService }]; }, null);
|
|
8459
|
+
})();
|
|
8460
|
+
|
|
8033
8461
|
var environment = {
|
|
8034
8462
|
env: 'prod',
|
|
8035
8463
|
miamAPI: 'https://api.miam.tech',
|
|
@@ -8088,7 +8516,7 @@
|
|
|
8088
8516
|
request = request.clone({
|
|
8089
8517
|
setHeaders: {
|
|
8090
8518
|
'miam-origin': this.context.origin.value,
|
|
8091
|
-
'miam-front-version': '8.1.
|
|
8519
|
+
'miam-front-version': '8.1.4',
|
|
8092
8520
|
'miam-front-type': 'web',
|
|
8093
8521
|
'miam-api-version': '4.7.0'
|
|
8094
8522
|
}
|
|
@@ -8506,7 +8934,7 @@
|
|
|
8506
8934
|
i0__namespace.ɵɵproperty("ngIf", ctx_r3.confirmButtonIsLoading);
|
|
8507
8935
|
}
|
|
8508
8936
|
}
|
|
8509
|
-
var _c4$
|
|
8937
|
+
var _c4$4 = function (a0, a1) { return { "with-header": a0, "without-header": a1 }; };
|
|
8510
8938
|
function ModalComponent_ng_container_0_Template(rf, ctx) {
|
|
8511
8939
|
if (rf & 1) {
|
|
8512
8940
|
var _r14_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -8540,7 +8968,7 @@
|
|
|
8540
8968
|
i0__namespace.ɵɵadvance(1);
|
|
8541
8969
|
i0__namespace.ɵɵproperty("ngClass", ctx_r0.modalStyle);
|
|
8542
8970
|
i0__namespace.ɵɵadvance(2);
|
|
8543
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(5, _c4$
|
|
8971
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(5, _c4$4, !ctx_r0.noHeaderMode, ctx_r0.noHeaderMode));
|
|
8544
8972
|
i0__namespace.ɵɵadvance(3);
|
|
8545
8973
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.title);
|
|
8546
8974
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -8549,9 +8977,10 @@
|
|
|
8549
8977
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.cancelButtonText || ctx_r0.confirmButtonText);
|
|
8550
8978
|
}
|
|
8551
8979
|
}
|
|
8552
|
-
var _c5
|
|
8980
|
+
var _c5 = ["*"];
|
|
8553
8981
|
var ModalComponent = /** @class */ (function () {
|
|
8554
|
-
function ModalComponent() {
|
|
8982
|
+
function ModalComponent(contextService) {
|
|
8983
|
+
this.contextService = contextService;
|
|
8555
8984
|
this.modalStyle = 'center';
|
|
8556
8985
|
this.ctaColor = 'primary';
|
|
8557
8986
|
this.close = new i0.EventEmitter();
|
|
@@ -8563,40 +8992,29 @@
|
|
|
8563
8992
|
this.pagePosition = { x: 0, y: 0 };
|
|
8564
8993
|
this.currentPath = '';
|
|
8565
8994
|
}
|
|
8995
|
+
Object.defineProperty(ModalComponent.prototype, "display", {
|
|
8996
|
+
get: function () {
|
|
8997
|
+
return this._display;
|
|
8998
|
+
},
|
|
8999
|
+
set: function (isDisplayed) {
|
|
9000
|
+
this._display = isDisplayed;
|
|
9001
|
+
var defaultScrollElement = this.contextService.defaultScrollElementGetter();
|
|
9002
|
+
if (isDisplayed) {
|
|
9003
|
+
defaultScrollElement === null || defaultScrollElement === void 0 ? void 0 : defaultScrollElement.classList.add('miam-no-scroll');
|
|
9004
|
+
}
|
|
9005
|
+
else {
|
|
9006
|
+
defaultScrollElement === null || defaultScrollElement === void 0 ? void 0 : defaultScrollElement.classList.remove('miam-no-scroll');
|
|
9007
|
+
}
|
|
9008
|
+
},
|
|
9009
|
+
enumerable: false,
|
|
9010
|
+
configurable: true
|
|
9011
|
+
});
|
|
8566
9012
|
ModalComponent.prototype.ngOnInit = function () {
|
|
8567
9013
|
this.observeNavigation();
|
|
8568
9014
|
};
|
|
8569
9015
|
ModalComponent.prototype.ngOnDestroy = function () {
|
|
8570
9016
|
this.mutationObserver.disconnect();
|
|
8571
9017
|
};
|
|
8572
|
-
ModalComponent.prototype.onScroll = function (event) {
|
|
8573
|
-
if (event.ctrlKey) {
|
|
8574
|
-
return;
|
|
8575
|
-
}
|
|
8576
|
-
if (this.display) {
|
|
8577
|
-
event.preventDefault();
|
|
8578
|
-
this.scrollFirstScrollableElement(event.target, event.deltaX, event.deltaY);
|
|
8579
|
-
}
|
|
8580
|
-
};
|
|
8581
|
-
ModalComponent.prototype.onTouchStart = function (event) {
|
|
8582
|
-
if (this.display) {
|
|
8583
|
-
this.setPagePosition(event);
|
|
8584
|
-
}
|
|
8585
|
-
};
|
|
8586
|
-
ModalComponent.prototype.onTouchMove = function (event) {
|
|
8587
|
-
if (this.display) {
|
|
8588
|
-
event.preventDefault();
|
|
8589
|
-
var deltaX = this.pagePosition.x - event.touches[0].pageX;
|
|
8590
|
-
var deltaY = this.pagePosition.y - event.touches[0].pageY;
|
|
8591
|
-
this.scrollFirstScrollableElement(event.target, deltaX, deltaY);
|
|
8592
|
-
this.setPagePosition(event);
|
|
8593
|
-
}
|
|
8594
|
-
};
|
|
8595
|
-
ModalComponent.prototype.onKeyDown = function (event) {
|
|
8596
|
-
if (this.display) {
|
|
8597
|
-
this.preventDefaultForScrollKeys(event);
|
|
8598
|
-
}
|
|
8599
|
-
};
|
|
8600
9018
|
ModalComponent.prototype.onEscapeDown = function () {
|
|
8601
9019
|
if (this.display) {
|
|
8602
9020
|
this.onClose();
|
|
@@ -8647,7 +9065,7 @@
|
|
|
8647
9065
|
var _this = this;
|
|
8648
9066
|
this.currentPath = window.location.href;
|
|
8649
9067
|
this.mutationObserver = new MutationObserver(function () {
|
|
8650
|
-
if (_this.currentPath !== window.location.href) {
|
|
9068
|
+
if (_this.display && _this.currentPath !== window.location.href) {
|
|
8651
9069
|
_this.onClose();
|
|
8652
9070
|
}
|
|
8653
9071
|
});
|
|
@@ -8664,12 +9082,12 @@
|
|
|
8664
9082
|
};
|
|
8665
9083
|
return ModalComponent;
|
|
8666
9084
|
}());
|
|
8667
|
-
ModalComponent.ɵfac = function ModalComponent_Factory(t) { return new (t || ModalComponent)(); };
|
|
9085
|
+
ModalComponent.ɵfac = function ModalComponent_Factory(t) { return new (t || ModalComponent)(i0__namespace.ɵɵdirectiveInject(ContextService)); };
|
|
8668
9086
|
ModalComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ModalComponent, selectors: [["ng-miam-modal"]], hostBindings: function ModalComponent_HostBindings(rf, ctx) {
|
|
8669
9087
|
if (rf & 1) {
|
|
8670
|
-
i0__namespace.ɵɵlistener("
|
|
9088
|
+
i0__namespace.ɵɵlistener("keydown.escape", function ModalComponent_keydown_escape_HostBindingHandler() { return ctx.onEscapeDown(); }, false, i0__namespace.ɵɵresolveWindow);
|
|
8671
9089
|
}
|
|
8672
|
-
}, inputs: { recipesCount: "recipesCount",
|
|
9090
|
+
}, inputs: { recipesCount: "recipesCount", confirmButtonIsLoading: "confirmButtonIsLoading", cancelButtonIsLoading: "cancelButtonIsLoading", confirmButtonDisabled: "confirmButtonDisabled", cancelButtonDisabled: "cancelButtonDisabled", noHeaderMode: "noHeaderMode", containerElement: "containerElement", title: "title", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", modalStyle: "modalStyle", ctaColor: "ctaColor", display: "display" }, outputs: { close: "close", cancel: "cancel", confirm: "confirm" }, ngContentSelectors: _c5, decls: 1, vars: 1, consts: function () {
|
|
8673
9091
|
var i18n_0;
|
|
8674
9092
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
8675
9093
|
var MSG_EXTERNAL_3775647930168967606$$LIB__COMPONENTS_MODAL_MODAL_COMPONENT_TS___1 = goog.getMsg("Utilis\u00E9 dans ");
|
|
@@ -8695,7 +9113,7 @@
|
|
|
8695
9113
|
if (rf & 2) {
|
|
8696
9114
|
i0__namespace.ɵɵproperty("ngIf", ctx.display);
|
|
8697
9115
|
}
|
|
8698
|
-
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgClass, LoaderComponent], styles: [".miam-modal__container .miam-shadow-overlay{position:fixed;background:var(--miam-ds-color-neutral-black);animation-name:show;animation-duration:.3s;opacity:.6;animation-timing-function:ease-in-out;z-index:var(--m-z-index-modal-overlay);top:0;left:0;width:100vw;height:100dvh;-webkit-tap-highlight-color:transparent}@keyframes show{0%{opacity:0}to{opacity:.6}}.miam-modal__container .miam-modal{z-index:var(--m-z-index-modal);position:fixed;overflow:hidden;background-color:var(--miam-ds-color-background-primary);display:flex;flex-direction:column}@media print{.miam-modal__container .miam-modal{overflow-y:unset!important;position:unset!important;height:unset!important}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__close-icon{display:none}}.miam-modal__container .miam-modal.with-header .miam-modal__content-container .miam-modal__content{margin-top:24px;margin-bottom:24px}.miam-modal__container .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__title{display:none}.miam-modal__container .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{position:absolute;top:0;right:0;z-index:var(--m-z-index-position-absolute-high)}.miam-modal__container .miam-modal .miam-modal__content-container{position:relative;height:100%;display:flex;flex-direction:column;overflow:hidden}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header{display:flex;flex-direction:row;justify-content:space-between}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header .miam-modal__title{font-weight:900;overflow:hidden;text-overflow:ellipsis;align-self:center}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:8px;padding:16px;background:50%/24px no-repeat url(https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg)}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__content__scroll-protection{overflow:hidden;height:100%;display:flex}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__content{width:100%;overflow-y:auto;overflow-x:hidden;scrollbar-color:var(--miam-ds-color-primary-100),var(--miam-ds-color-primary);scrollbar-width:thin;-ms-overflow-style:none;scrollbar-width:none}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__content::-webkit-scrollbar{display:none}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__actions{display:flex;justify-content:flex-end;flex-direction:row}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__actions button+button{margin-left:12px}.miam-modal__container.center .miam-modal{height:auto;min-width:464px;width:600px;max-width:700px;max-height:96dvh;box-sizing:border-box;top:50%;left:50%;right:unset;transform:translate(-50%,-50%);border-radius:8px;background-color:var(--miam-ds-color-neutral-white);padding:24px}.miam-modal__container.right .miam-modal{right:0;animation-name:openRightDrawer}@keyframes openRightDrawer{0%{right:-1200px}to{right:0}}.miam-modal__container.left .miam-modal{left:0;animation-name:openLeftDrawer}@keyframes openLeftDrawer{0%{left:-1200px}to{left:0}}.miam-modal__container.left .miam-modal,.miam-modal__container.right .miam-modal{animation-duration:.5s;animation-timing-function:cubic-bezier(.75,0,.2,1);height:100%;width:1000px;top:0}.miam-modal__container.left .miam-modal .miam-modal__content-container,.miam-modal__container.right .miam-modal .miam-modal__content-container{height:100%;box-sizing:border-box}.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__content,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__content{height:100%;box-sizing:border-box;margin:unset}.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions{padding:24px;border-top:1px solid var(--miam-ds-color-border)}.miam-modal__container.left .miam-modal.with-header .miam-modal__content-container .miam-modal__header,.miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__header{border-bottom:1px solid var(--miam-ds-color-border);padding:24px}.miam-modal__container.left .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon,.miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:unset}.miam-modal__container.left .miam-modal.with-header .miam-modal__content-container .miam-modal__content,.miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__content{padding:24px}.miam-modal__container.left .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon,.miam-modal__container.right .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:24px}.miam-modal__container.left.small-width .miam-modal,.miam-modal__container.right.small-width .miam-modal{min-width:680px;max-width:680px}.miam-modal__container.left.tiny-width .miam-modal,.miam-modal__container.right.tiny-width .miam-modal{min-width:360px;max-width:360px}@media (max-width:1023px){.miam-modal__container.center .miam-modal{min-width:unset;transform:unset;border-radius:unset;padding:unset}.miam-modal__container.center .miam-modal.with-header .miam-modal__content-container .miam-modal__header{border-bottom:1px solid var(--miam-ds-color-border);padding:24px}.miam-modal__container.center .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:unset}.miam-modal__container.center .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:24px}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__content{box-sizing:border-box;height:100%;margin:unset;padding:24px}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions{border-top:1px solid var(--miam-ds-color-border);padding:24px}.miam-modal__container.center .miam-modal,.miam-modal__container.left .miam-modal,.miam-modal__container.left.small-width .miam-modal,.miam-modal__container.left.tiny-width .miam-modal,.miam-modal__container.right .miam-modal,.miam-modal__container.right.small-width .miam-modal,.miam-modal__container.right.tiny-width .miam-modal{max-width:100vw;max-height:100dvh;width:100vw;height:100dvh;top:0;bottom:0;right:0;animation-name:openBottomSheet;animation-duration:.5s;animation-timing-function:cubic-bezier(.075,.82,.165,1)}@keyframes openBottomSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions{flex-direction:column-reverse}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary{background-color:var(--miam-ds-color-primary)}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary{background-color:transparent}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button{margin-left:unset;margin-bottom:12px}}"], encapsulation: 2, changeDetection: 0 });
|
|
9116
|
+
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgClass, LoaderComponent], styles: [".miam-no-scroll{overflow:hidden}.miam-modal__container .miam-shadow-overlay{position:fixed;background:var(--miam-ds-color-neutral-black);animation-name:show;animation-duration:.3s;opacity:.6;animation-timing-function:ease-in-out;z-index:var(--m-z-index-modal-overlay);top:0;left:0;width:100vw;height:100dvh;-webkit-tap-highlight-color:transparent}@keyframes show{0%{opacity:0}to{opacity:.6}}.miam-modal__container .miam-modal{z-index:var(--m-z-index-modal);position:fixed;overflow:hidden;background-color:var(--miam-ds-color-background-primary);display:flex;flex-direction:column}@media print{.miam-modal__container .miam-modal{overflow-y:unset!important;position:unset!important;height:unset!important}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__close-icon{display:none}}.miam-modal__container .miam-modal.with-header .miam-modal__content-container .miam-modal__content{margin-top:24px;margin-bottom:24px}.miam-modal__container .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__title{display:none}.miam-modal__container .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{position:absolute;top:0;right:0;z-index:var(--m-z-index-position-absolute-high)}.miam-modal__container .miam-modal .miam-modal__content-container{position:relative;height:100%;display:flex;flex-direction:column;overflow:hidden}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header{display:flex;flex-direction:row;justify-content:space-between}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header .miam-modal__title{font-weight:900;overflow:hidden;text-overflow:ellipsis;align-self:center}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:8px;padding:16px;background:50%/24px no-repeat url(https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg)}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__content__scroll-protection{overflow:hidden;height:100%;display:flex}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__content{width:100%;overflow-y:auto;overflow-x:hidden;scrollbar-color:var(--miam-ds-color-primary-100),var(--miam-ds-color-primary)}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__actions{display:flex;justify-content:flex-end;flex-direction:row}.miam-modal__container .miam-modal .miam-modal__content-container .miam-modal__actions button+button{margin-left:12px}.miam-modal__container.center .miam-modal{height:auto;min-width:464px;width:600px;max-width:700px;max-height:96dvh;box-sizing:border-box;top:50%;left:50%;right:unset;transform:translate(-50%,-50%);border-radius:8px;background-color:var(--miam-ds-color-neutral-white);padding:24px}.miam-modal__container.right .miam-modal{right:0;animation-name:openRightDrawer}@keyframes openRightDrawer{0%{right:-1200px}to{right:0}}.miam-modal__container.left .miam-modal{left:0;animation-name:openLeftDrawer}@keyframes openLeftDrawer{0%{left:-1200px}to{left:0}}.miam-modal__container.left .miam-modal,.miam-modal__container.right .miam-modal{animation-duration:.5s;animation-timing-function:cubic-bezier(.75,0,.2,1);height:100%;width:1000px;top:0}.miam-modal__container.left .miam-modal .miam-modal__content-container,.miam-modal__container.right .miam-modal .miam-modal__content-container{height:100%;box-sizing:border-box}.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__content,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__content{height:100%;box-sizing:border-box;margin:unset}.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions{padding:24px;border-top:1px solid var(--miam-ds-color-border)}.miam-modal__container.left .miam-modal.with-header .miam-modal__content-container .miam-modal__header,.miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__header{border-bottom:1px solid var(--miam-ds-color-border);padding:24px}.miam-modal__container.left .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon,.miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:unset}.miam-modal__container.left .miam-modal.with-header .miam-modal__content-container .miam-modal__content,.miam-modal__container.right .miam-modal.with-header .miam-modal__content-container .miam-modal__content{padding:16px}.miam-modal__container.left .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon,.miam-modal__container.right .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:24px}.miam-modal__container.left.small-width .miam-modal,.miam-modal__container.right.small-width .miam-modal{min-width:680px;max-width:680px}.miam-modal__container.left.tiny-width .miam-modal,.miam-modal__container.right.tiny-width .miam-modal{min-width:360px;max-width:360px}@media (max-width:1023px){.miam-modal__container.center .miam-modal{min-width:unset;transform:unset;border-radius:unset;padding:unset}.miam-modal__container.center .miam-modal.with-header .miam-modal__content-container .miam-modal__header{border-bottom:1px solid var(--miam-ds-color-border);padding:24px}.miam-modal__container.center .miam-modal.with-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:unset}.miam-modal__container.center .miam-modal.without-header .miam-modal__content-container .miam-modal__header .miam-modal__close-icon{margin:24px}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__content{box-sizing:border-box;height:100%;margin:unset;padding:24px}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions{border-top:1px solid var(--miam-ds-color-border);padding:24px}.miam-modal__container.center .miam-modal,.miam-modal__container.left .miam-modal,.miam-modal__container.left.small-width .miam-modal,.miam-modal__container.left.tiny-width .miam-modal,.miam-modal__container.right .miam-modal,.miam-modal__container.right.small-width .miam-modal,.miam-modal__container.right.tiny-width .miam-modal{max-width:100vw;max-height:100dvh;width:100vw;height:100dvh;top:0;bottom:0;right:0;animation-name:openBottomSheet;animation-duration:.5s;animation-timing-function:cubic-bezier(.075,.82,.165,1)}@keyframes openBottomSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions{flex-direction:column-reverse}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.primary{background-color:var(--miam-ds-color-primary)}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button:hover.secondary{background-color:transparent}.miam-modal__container.center .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.left .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.left.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.left.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.right.small-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button,.miam-modal__container.right.tiny-width .miam-modal .miam-modal__content-container .miam-modal__actions .miam-ds-button+button{margin-left:unset;margin-bottom:12px}}"], encapsulation: 2, changeDetection: 0 });
|
|
8699
9117
|
(function () {
|
|
8700
9118
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ModalComponent, [{
|
|
8701
9119
|
type: i0.Component,
|
|
@@ -8706,9 +9124,7 @@
|
|
|
8706
9124
|
encapsulation: i0.ViewEncapsulation.None,
|
|
8707
9125
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
8708
9126
|
}]
|
|
8709
|
-
}],
|
|
8710
|
-
type: i0.Input
|
|
8711
|
-
}], display: [{
|
|
9127
|
+
}], function () { return [{ type: ContextService }]; }, { recipesCount: [{
|
|
8712
9128
|
type: i0.Input
|
|
8713
9129
|
}], confirmButtonIsLoading: [{
|
|
8714
9130
|
type: i0.Input
|
|
@@ -8738,18 +9154,8 @@
|
|
|
8738
9154
|
type: i0.Output
|
|
8739
9155
|
}], confirm: [{
|
|
8740
9156
|
type: i0.Output
|
|
8741
|
-
}],
|
|
8742
|
-
type: i0.
|
|
8743
|
-
args: ['wheel', ['$event']]
|
|
8744
|
-
}], onTouchStart: [{
|
|
8745
|
-
type: i0.HostListener,
|
|
8746
|
-
args: ['touchstart', ['$event']]
|
|
8747
|
-
}], onTouchMove: [{
|
|
8748
|
-
type: i0.HostListener,
|
|
8749
|
-
args: ['touchmove', ['$event']]
|
|
8750
|
-
}], onKeyDown: [{
|
|
8751
|
-
type: i0.HostListener,
|
|
8752
|
-
args: ['window:keydown', ['$event']]
|
|
9157
|
+
}], display: [{
|
|
9158
|
+
type: i0.Input
|
|
8753
9159
|
}], onEscapeDown: [{
|
|
8754
9160
|
type: i0.HostListener,
|
|
8755
9161
|
args: ['window:keydown.escape']
|
|
@@ -8932,7 +9338,7 @@
|
|
|
8932
9338
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r30.getImportances());
|
|
8933
9339
|
}
|
|
8934
9340
|
}
|
|
8935
|
-
var _c12$
|
|
9341
|
+
var _c12$1 = function (a0) { return { clickable: a0 }; };
|
|
8936
9342
|
function ListInputComponent_ul_4_ng_template_2_li_0_label_17_img_1_Template(rf, ctx) {
|
|
8937
9343
|
if (rf & 1) {
|
|
8938
9344
|
i0__namespace.ɵɵelement(0, "img", 54);
|
|
@@ -8940,7 +9346,7 @@
|
|
|
8940
9346
|
if (rf & 2) {
|
|
8941
9347
|
var row_r26 = i0__namespace.ɵɵnextContext(2).$implicit;
|
|
8942
9348
|
var ctx_r49 = i0__namespace.ɵɵnextContext(3);
|
|
8943
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c12$
|
|
9349
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c12$1, ctx_r49.ingredientsPictures.editable))("src", row_r26.controls.attributes.controls["picture-url"].value, i0__namespace.ɵɵsanitizeUrl);
|
|
8944
9350
|
}
|
|
8945
9351
|
}
|
|
8946
9352
|
function ListInputComponent_ul_4_ng_template_2_li_0_label_17_ng_miam_icon_2_Template(rf, ctx) {
|
|
@@ -9498,7 +9904,7 @@
|
|
|
9498
9904
|
i18n_8 = MSG_EXTERNAL_5233517838396324976$$LIB__COMPONENTS_LIST_INPUT_LIST_INPUT_COMPONENT_TS__9;
|
|
9499
9905
|
}
|
|
9500
9906
|
else {
|
|
9501
|
-
i18n_8 = $localize(templateObject_5$
|
|
9907
|
+
i18n_8 = $localize(templateObject_5$f || (templateObject_5$f = __makeTemplateObject([":\u241F94ad94596b2f40b07222d1e40355a44b6a1af29a\u241F5233517838396324976:Ingr\u00E9dients"], [":\u241F94ad94596b2f40b07222d1e40355a44b6a1af29a\u241F5233517838396324976:Ingr\u00E9dients"])));
|
|
9502
9908
|
}
|
|
9503
9909
|
var i18n_10;
|
|
9504
9910
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -9562,7 +9968,7 @@
|
|
|
9562
9968
|
i18n_25 = MSG_EXTERNAL_8809298342961585850$$LIB__COMPONENTS_LIST_INPUT_LIST_INPUT_COMPONENT_TS__26;
|
|
9563
9969
|
}
|
|
9564
9970
|
else {
|
|
9565
|
-
i18n_25 = $localize(templateObject_13$
|
|
9971
|
+
i18n_25 = $localize(templateObject_13$3 || (templateObject_13$3 = __makeTemplateObject([":\u241Fb4b270d65d094739a4c3233b238db0a8a536dc5e\u241F8809298342961585850:Une ligne correspond \u00E0 une \u00E9tape."], [":\u241Fb4b270d65d094739a4c3233b238db0a8a536dc5e\u241F8809298342961585850:Une ligne correspond \u00E0 une \u00E9tape."])));
|
|
9566
9972
|
}
|
|
9567
9973
|
var i18n_27;
|
|
9568
9974
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -9570,7 +9976,7 @@
|
|
|
9570
9976
|
i18n_27 = MSG_EXTERNAL_2641984252780881638$$LIB__COMPONENTS_LIST_INPUT_LIST_INPUT_COMPONENT_TS__28;
|
|
9571
9977
|
}
|
|
9572
9978
|
else {
|
|
9573
|
-
i18n_27 = $localize(templateObject_14$
|
|
9979
|
+
i18n_27 = $localize(templateObject_14$3 || (templateObject_14$3 = __makeTemplateObject([":\u241F0f9865a02f057092ee28211beb813f850707f3d5\u241F2641984252780881638:Votre image est trop lourde (la taille doit \u00EAtre inf\u00E9rieure \u00E0 500 Ko). Merci d\u2019en ajouter une plus l\u00E9g\u00E8re."], [":\u241F0f9865a02f057092ee28211beb813f850707f3d5\u241F2641984252780881638:Votre image est trop lourde (la taille doit \u00EAtre inf\u00E9rieure \u00E0 500 Ko). Merci d\u2019en ajouter une plus l\u00E9g\u00E8re."])));
|
|
9574
9980
|
}
|
|
9575
9981
|
return [[1, "miam-list-input"], [1, "miam-list-input__list", 3, "formGroup"], ["class", "miam-list-input__list__label", 4, "ngIf"], ["class", "miam-list-input__container m-default-card", "cdkDropList", "", 3, "cdkDropListDropped", 4, "ngIf", "ngIfElse"], ["hintPlaceholder", ""], [1, "miam-list-input__actions"], ["matInput", "", "class", "m-input", "cdkTextareaAutosize", "", "cdkAutosizeMinRows", "4", "cdkAutosizeMaxRows", "4", 3, "formControl", "keydown.enter", 4, "ngIf"], ["matInput", "", "class", "m-input", "cdkTextareaAutosize", "", "cdkAutosizeMinRows", "4", "cdkAutosizeMaxRows", "4", "placeholder", i18n_0, 3, "formControl", "keydown.enter", 4, "ngIf"], ["matInput", "", "class", "m-input", "cdkTextareaAutosize", "", "cdkAutosizeMinRows", "4", "cdkAutosizeMaxRows", "4", "placeholder", i18n_2, 3, "formControl", "keydown.enter", 4, "ngIf"], [1, "m-button-primary", 3, "mousedown", "mouseup"], i18n_4, [1, "miam-list-input__instructions__direction"], ["class", "miam-list-input__actions__instructions", 4, "ngIf"], ["title", i18n_6, "confirmButtonText", "Fermer", "modalStyle", "right", 3, "noHeaderMode", "display", "close", "confirm", 4, "ngIf"], [1, "miam-list-input__list__label"], i18n_8, i18n_10, ["cdkDropList", "", 1, "miam-list-input__container", "m-default-card", 3, "cdkDropListDropped"], [4, "ngIf", "ngIfElse"], ["ingredientRow", ""], ["cdkDrag", "", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["cdkDrag", ""], [3, "formGroup"], [1, "miam-list-input__container__row", "m-default-card"], ["primaryColor", "var(--m-color-grey05)", "cdkDragHandle", "", 1, "miam-list-input__row__grip", 3, "iconName"], ["cdkTextareaAutosize", "true", "cdkAutosizeMinRows", "1", "cdkAutosizeMaxRows", "50", "formControlName", "description", 1, "m-input", 3, "blur"], ["autosize", "cdkTextareaAutosize"], [1, "miam-list-input__row__trash", 3, "iconName", "click"], ["class", "miam-list-input__row__placeholder", 4, "cdkDragPlaceholder"], ["class", "miam-list-input__row__preview m-default-card", 4, "cdkDragPreview"], [1, "miam-list-input__row__placeholder"], [1, "miam-list-input__row__preview", "m-default-card"], ["primaryColor", "var(--m-color-grey05)", "cdkDragHandle", "", 3, "iconName"], [1, "miam-list-input__preview__text", "m-body-typo"], [1, "miam-list-input__container__row", "m-default-card", 3, "formGroupName"], [1, "miam-list-input__row__left"], [1, "miam-list-input__row__right"], [1, "m-input", 3, "ngClass", "ngModel", "formControl"], [3, "value", 4, "ngFor", "ngForOf"], ["maxSize", "4", "autoWidthInput", "", 1, "m-input", 3, "ngModel", "formControl", "ngModelChange"], ["maxSize", "8", "autoWidthInput", "", 1, "m-input", 3, "ngClass", "formControl"], ["class", "miam-list-input__importance", 4, "ngIf"], [1, "miam-list-input__row__controls"], [3, "for", 4, "ngIf"], ["type", "file", "accept", "image/jpeg, image/png, image/webp", 3, "id", "change", 4, "ngIf"], ["primaryColor", "var(--m-color-grey05)", 1, "miam-list-input__row__trash", 3, "iconName", "click"], [3, "value"], [1, "miam-list-input__importance"], ["class", "miam-list-input__importance__radio", 4, "ngFor", "ngForOf"], [1, "miam-list-input__importance__radio"], ["type", "radio", 3, "name", "id", "value", "formControl", "click"], [3, "for"], ["class", "miam-list-input__row__picture", 3, "ngClass", "src", 4, "ngIf"], ["class", "miam-list-input__row__trash", "primaryColor", "var(--m-color-grey05)", 3, "iconName", 4, "ngIf"], [1, "miam-list-input__row__picture", 3, "ngClass", "src"], ["primaryColor", "var(--m-color-grey05)", 1, "miam-list-input__row__trash", 3, "iconName"], ["type", "file", "accept", "image/jpeg, image/png, image/webp", 3, "id", "change"], ["primaryColor", "var(--m-color-grey-text-dark)", "cdkDragHandle", "", 3, "iconName"], [1, "m-body-typo"], [1, "miam-list-input__placeholder", "miam-list-input__container", "m-default-card"], ["primaryColor", "var(--m-color-grey-text-dark)", 3, "width", "height", "iconName"], [1, "miam-list-input__placeholder__hint", "m-body-typo"], i18n_13, [4, "ngIf"], i18n_15, i18n_17, ["matInput", "", "cdkTextareaAutosize", "", "cdkAutosizeMinRows", "4", "cdkAutosizeMaxRows", "4", 1, "m-input", 3, "formControl", "keydown.enter"], ["matInput", "", "cdkTextareaAutosize", "", "cdkAutosizeMinRows", "4", "cdkAutosizeMaxRows", "4", "placeholder", i18n_0, 1, "m-input", 3, "formControl", "keydown.enter"], ["matInput", "", "cdkTextareaAutosize", "", "cdkAutosizeMinRows", "4", "cdkAutosizeMaxRows", "4", "placeholder", i18n_2, 1, "m-input", 3, "formControl", "keydown.enter"], [1, "miam-list-input__actions__instructions"], i18n_19, i18n_21, i18n_23, i18n_25, ["title", i18n_6, "confirmButtonText", "Fermer", "modalStyle", "right", 3, "noHeaderMode", "display", "close", "confirm"], [1, "miam-list-input__picture__warning"], i18n_27];
|
|
9576
9982
|
}, template: function ListInputComponent_Template(rf, ctx) {
|
|
@@ -9655,7 +10061,7 @@
|
|
|
9655
10061
|
type: i0.Output
|
|
9656
10062
|
}] });
|
|
9657
10063
|
})();
|
|
9658
|
-
var templateObject_1$D, templateObject_2$x, templateObject_3$p, templateObject_4$j, templateObject_5$
|
|
10064
|
+
var templateObject_1$D, templateObject_2$x, templateObject_3$p, templateObject_4$j, templateObject_5$f, templateObject_6$c, templateObject_7$9, templateObject_8$7, templateObject_9$6, templateObject_10$4, templateObject_11$4, templateObject_12$3, templateObject_13$3, templateObject_14$3;
|
|
9659
10065
|
|
|
9660
10066
|
var MealsPlannerLinkComponent = /** @class */ (function () {
|
|
9661
10067
|
function MealsPlannerLinkComponent(context) {
|
|
@@ -10407,7 +10813,7 @@
|
|
|
10407
10813
|
i18n_8 = MSG_EXTERNAL_7733455880752157102$$LIB__COMPONENTS_RECIPE_FILTERS_RECIPE_FILTERS_COMPONENT_TS____9;
|
|
10408
10814
|
}
|
|
10409
10815
|
else {
|
|
10410
|
-
i18n_8 = $localize(templateObject_5$
|
|
10816
|
+
i18n_8 = $localize(templateObject_5$e || (templateObject_5$e = __makeTemplateObject([":\u241Fccfd103e2bbd9a80c6d3a226332a77c93c88d871\u241F7733455880752157102:Chef interm\u00E9diaire"], [":\u241Fccfd103e2bbd9a80c6d3a226332a77c93c88d871\u241F7733455880752157102:Chef interm\u00E9diaire"])));
|
|
10411
10817
|
}
|
|
10412
10818
|
var i18n_10;
|
|
10413
10819
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -10471,7 +10877,7 @@
|
|
|
10471
10877
|
i18n_24 = MSG_EXTERNAL_2987005241567363499$$LIB__COMPONENTS_RECIPE_FILTERS_RECIPE_FILTERS_COMPONENT_TS____25;
|
|
10472
10878
|
}
|
|
10473
10879
|
else {
|
|
10474
|
-
i18n_24 = $localize(templateObject_13$
|
|
10880
|
+
i18n_24 = $localize(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject([":\u241F06a1a41b1f201e9c0039e7a5a4a6412a1bc3665f\u241F2987005241567363499:Moins de 30 min"], [":\u241F06a1a41b1f201e9c0039e7a5a4a6412a1bc3665f\u241F2987005241567363499:Moins de 30 min"])));
|
|
10475
10881
|
}
|
|
10476
10882
|
var i18n_26;
|
|
10477
10883
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -10479,7 +10885,7 @@
|
|
|
10479
10885
|
i18n_26 = MSG_EXTERNAL_6215037527102325488$$LIB__COMPONENTS_RECIPE_FILTERS_RECIPE_FILTERS_COMPONENT_TS____27;
|
|
10480
10886
|
}
|
|
10481
10887
|
else {
|
|
10482
|
-
i18n_26 = $localize(templateObject_14$
|
|
10888
|
+
i18n_26 = $localize(templateObject_14$2 || (templateObject_14$2 = __makeTemplateObject([":\u241F1621eb3798ceefdacca0efee8561de66c85229df\u241F6215037527102325488:Moins de 1 h"], [":\u241F1621eb3798ceefdacca0efee8561de66c85229df\u241F6215037527102325488:Moins de 1 h"])));
|
|
10483
10889
|
}
|
|
10484
10890
|
var i18n_28;
|
|
10485
10891
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -10593,7 +10999,7 @@
|
|
|
10593
10999
|
type: i0.Output
|
|
10594
11000
|
}] });
|
|
10595
11001
|
})();
|
|
10596
|
-
var templateObject_1$B, templateObject_2$v, templateObject_3$n, templateObject_4$i, templateObject_5$
|
|
11002
|
+
var templateObject_1$B, templateObject_2$v, templateObject_3$n, templateObject_4$i, templateObject_5$e, templateObject_6$b, templateObject_7$8, templateObject_8$6, templateObject_9$5, templateObject_10$3, templateObject_11$3, templateObject_12$2, templateObject_13$2, templateObject_14$2, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1;
|
|
10597
11003
|
|
|
10598
11004
|
function RecipePricingComponent_div_0_div_10_span_1_Template(rf, ctx) {
|
|
10599
11005
|
if (rf & 1) {
|
|
@@ -12212,7 +12618,7 @@
|
|
|
12212
12618
|
if (rf & 2) {
|
|
12213
12619
|
var ctx_r7 = i0__namespace.ɵɵnextContext(3);
|
|
12214
12620
|
i0__namespace.ɵɵadvance(1);
|
|
12215
|
-
i0__namespace.ɵɵproperty("value", ctx_r7.basketEntry.quantity)("minusLoading", ctx_r7.counterMinusLoading);
|
|
12621
|
+
i0__namespace.ɵɵproperty("value", ctx_r7.product.basketEntry.quantity)("minusLoading", ctx_r7.counterMinusLoading);
|
|
12216
12622
|
}
|
|
12217
12623
|
}
|
|
12218
12624
|
function ProductCardComponent_div_0_ng_container_11_Template(rf, ctx) {
|
|
@@ -12238,7 +12644,7 @@
|
|
|
12238
12644
|
i0__namespace.ɵɵtemplate(13, ProductCardComponent_div_0_ng_container_11_div_13_Template, 3, 0, "div", 17);
|
|
12239
12645
|
i0__namespace.ɵɵelementEnd();
|
|
12240
12646
|
i0__namespace.ɵɵelementStart(14, "button", 18);
|
|
12241
|
-
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_11_Template_button_click_14_listener() { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(2); return ctx_r16.replaceProduct(ctx_r16.basketEntry.status === "initial"); });
|
|
12647
|
+
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_11_Template_button_click_14_listener() { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(2); return ctx_r16.replaceProduct(ctx_r16.product.basketEntry.status === "initial"); });
|
|
12242
12648
|
i0__namespace.ɵɵelementStart(15, "span");
|
|
12243
12649
|
i0__namespace.ɵɵtext(16, "Remplacer");
|
|
12244
12650
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -12260,21 +12666,21 @@
|
|
|
12260
12666
|
if (rf & 2) {
|
|
12261
12667
|
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
12262
12668
|
i0__namespace.ɵɵadvance(3);
|
|
12263
|
-
i0__namespace.ɵɵproperty("src", ctx_r1.basketEntry.selectedItem.attributes.image, i0__namespace.ɵɵsanitizeUrl);
|
|
12669
|
+
i0__namespace.ɵɵproperty("src", ctx_r1.product.basketEntry.selectedItem.attributes.image, i0__namespace.ɵɵsanitizeUrl);
|
|
12264
12670
|
i0__namespace.ɵɵadvance(3);
|
|
12265
|
-
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.basketEntry.selectedItem.attributes.brand, " ");
|
|
12671
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.product.basketEntry.selectedItem.attributes.brand, " ");
|
|
12266
12672
|
i0__namespace.ɵɵadvance(2);
|
|
12267
|
-
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.basketEntry.selectedItem.attributes.name, " ");
|
|
12673
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.product.basketEntry.selectedItem.attributes.name, " ");
|
|
12268
12674
|
i0__namespace.ɵɵadvance(3);
|
|
12269
|
-
i0__namespace.ɵɵtextInterpolate2(" ", i0__namespace.ɵɵpipeBind2(12, 9, ctx_r1.basketEntry.selectedItem.capacityVolume, "1.0-2"), " ", ctx_r1.basketEntry.selectedItem.capacityUnit, " ");
|
|
12675
|
+
i0__namespace.ɵɵtextInterpolate2(" ", i0__namespace.ɵɵpipeBind2(12, 9, ctx_r1.product.basketEntry.selectedItem.capacityVolume, "1.0-2"), " ", ctx_r1.product.basketEntry.selectedItem.capacityUnit, " ");
|
|
12270
12676
|
i0__namespace.ɵɵadvance(2);
|
|
12271
12677
|
i0__namespace.ɵɵproperty("ngIf", ctx_r1.isSponsored);
|
|
12272
12678
|
i0__namespace.ɵɵadvance(6);
|
|
12273
|
-
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(20, 12, ctx_r1.
|
|
12679
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(20, 12, ctx_r1.product.price.unit, ctx_r1.product.basketEntry.selectedItem.attributes.currency), " ");
|
|
12274
12680
|
i0__namespace.ɵɵadvance(3);
|
|
12275
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r1.basketEntry.status === "initial");
|
|
12681
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r1.product.basketEntry.status === "initial");
|
|
12276
12682
|
i0__namespace.ɵɵadvance(1);
|
|
12277
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r1.basketEntry.status === "active");
|
|
12683
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r1.product.basketEntry.status === "active");
|
|
12278
12684
|
}
|
|
12279
12685
|
}
|
|
12280
12686
|
function ProductCardComponent_div_0_ng_template_12_ng_container_0_Template(rf, ctx) {
|
|
@@ -12309,9 +12715,9 @@
|
|
|
12309
12715
|
}
|
|
12310
12716
|
if (rf & 2) {
|
|
12311
12717
|
var ctx_r3 = i0__namespace.ɵɵnextContext(2);
|
|
12312
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r3.basketEntry.status === "ignored" || ctx_r3.basketEntry.status === "deleted" || ctx_r3.basketEntry.status === "often_deleted");
|
|
12718
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r3.product.basketEntry.status === "ignored" || ctx_r3.product.basketEntry.status === "deleted" || ctx_r3.product.basketEntry.status === "often_deleted");
|
|
12313
12719
|
i0__namespace.ɵɵadvance(1);
|
|
12314
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r3.basketEntry.status === "unavailable");
|
|
12720
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r3.product.basketEntry.status === "unavailable");
|
|
12315
12721
|
}
|
|
12316
12722
|
}
|
|
12317
12723
|
function ProductCardComponent_div_0_div_14_Template(rf, ctx) {
|
|
@@ -12358,30 +12764,30 @@
|
|
|
12358
12764
|
if (rf & 2) {
|
|
12359
12765
|
var _r2 = i0__namespace.ɵɵreference(13);
|
|
12360
12766
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
12361
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(13, _c0$9, ctx_r0.basketEntry.status === "active", ctx_r0.basketEntry.status === "ignored" || ctx_r0.basketEntry.status === "deleted" || ctx_r0.basketEntry.status === "often_deleted" || ctx_r0.basketEntry.status === "unavailable"));
|
|
12767
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(13, _c0$9, ctx_r0.product.basketEntry.status === "active", ctx_r0.product.basketEntry.status === "ignored" || ctx_r0.product.basketEntry.status === "deleted" || ctx_r0.product.basketEntry.status === "often_deleted" || ctx_r0.product.basketEntry.status === "unavailable"));
|
|
12362
12768
|
i0__namespace.ɵɵadvance(1);
|
|
12363
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(16, _c0$9, ctx_r0.basketEntry.status === "active", ctx_r0.basketEntry.status === "ignored" || ctx_r0.basketEntry.status === "deleted" || ctx_r0.basketEntry.status === "often_deleted" || ctx_r0.basketEntry.status === "unavailable"));
|
|
12769
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(16, _c0$9, ctx_r0.product.basketEntry.status === "active", ctx_r0.product.basketEntry.status === "ignored" || ctx_r0.product.basketEntry.status === "deleted" || ctx_r0.product.basketEntry.status === "often_deleted" || ctx_r0.product.basketEntry.status === "unavailable"));
|
|
12364
12770
|
i0__namespace.ɵɵadvance(1);
|
|
12365
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(19, _c1$5, ctx_r0.basketEntry.status === "ignored" || ctx_r0.basketEntry.status === "deleted" || ctx_r0.basketEntry.status === "often_deleted" || ctx_r0.basketEntry.status === "unavailable"));
|
|
12771
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(19, _c1$5, ctx_r0.product.basketEntry.status === "ignored" || ctx_r0.product.basketEntry.status === "deleted" || ctx_r0.product.basketEntry.status === "often_deleted" || ctx_r0.product.basketEntry.status === "unavailable"));
|
|
12366
12772
|
i0__namespace.ɵɵadvance(1);
|
|
12367
|
-
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(4, 11, ctx_r0.basketEntry.name), " ");
|
|
12773
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(4, 11, ctx_r0.product.basketEntry.name), " ");
|
|
12368
12774
|
i0__namespace.ɵɵadvance(2);
|
|
12369
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(21, _c1$5, ctx_r0.basketEntry.status === "ignored" || ctx_r0.basketEntry.status === "deleted" || ctx_r0.basketEntry.status === "often_deleted" || ctx_r0.basketEntry.status === "unavailable"));
|
|
12775
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(21, _c1$5, ctx_r0.product.basketEntry.status === "ignored" || ctx_r0.product.basketEntry.status === "deleted" || ctx_r0.product.basketEntry.status === "often_deleted" || ctx_r0.product.basketEntry.status === "unavailable"));
|
|
12370
12776
|
i0__namespace.ɵɵadvance(2);
|
|
12371
12777
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r0.modifiedIngQty, " ");
|
|
12372
12778
|
i0__namespace.ɵɵadvance(2);
|
|
12373
|
-
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r0.ingredient.attributes.unit, " ");
|
|
12779
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r0.product.ingredient.attributes.unit, " ");
|
|
12374
12780
|
i0__namespace.ɵɵadvance(1);
|
|
12375
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(23, _c2$3, !(ctx_r0.basketEntry.status === "initial" || ctx_r0.basketEntry.status === "active")));
|
|
12781
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(23, _c2$3, !(ctx_r0.product.basketEntry.status === "initial" || ctx_r0.product.basketEntry.status === "active")));
|
|
12376
12782
|
i0__namespace.ɵɵadvance(1);
|
|
12377
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r0.basketEntry.status === "initial" || ctx_r0.basketEntry.status === "active")("ngIfElse", _r2);
|
|
12783
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.product.basketEntry.status === "initial" || ctx_r0.product.basketEntry.status === "active")("ngIfElse", _r2);
|
|
12378
12784
|
i0__namespace.ɵɵadvance(3);
|
|
12379
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r0.recipesIncludingIngredient > 1 && ctx_r0.basketEntry.status === "active");
|
|
12785
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.recipesIncludingIngredient > 1 && ctx_r0.product.basketEntry.status === "active");
|
|
12380
12786
|
}
|
|
12381
12787
|
}
|
|
12382
12788
|
var ProductCardComponent = /** @class */ (function (_super) {
|
|
12383
12789
|
__extends(ProductCardComponent, _super);
|
|
12384
|
-
function ProductCardComponent(cdr, basketsService, recipeDetailsService, recipesService, analyticsService, itemsService, ignoredBasketsService, elementRef) {
|
|
12790
|
+
function ProductCardComponent(cdr, basketsService, recipeDetailsService, recipesService, analyticsService, itemsService, ignoredBasketsService, basketActionsService, elementRef) {
|
|
12385
12791
|
var _this = _super.call(this, analyticsService) || this;
|
|
12386
12792
|
_this.cdr = cdr;
|
|
12387
12793
|
_this.basketsService = basketsService;
|
|
@@ -12390,6 +12796,7 @@
|
|
|
12390
12796
|
_this.analyticsService = analyticsService;
|
|
12391
12797
|
_this.itemsService = itemsService;
|
|
12392
12798
|
_this.ignoredBasketsService = ignoredBasketsService;
|
|
12799
|
+
_this.basketActionsService = basketActionsService;
|
|
12393
12800
|
_this.elementRef = elementRef;
|
|
12394
12801
|
_this.subscriptions = [];
|
|
12395
12802
|
_this.recipesIncludingIngredient = 0;
|
|
@@ -12397,21 +12804,20 @@
|
|
|
12397
12804
|
_this.loadingAddToBasket = false;
|
|
12398
12805
|
_this.counterMinusLoading = false;
|
|
12399
12806
|
_this.disabled = false;
|
|
12400
|
-
_this.updatedPrice = '';
|
|
12401
12807
|
_this.isSponsored = false;
|
|
12808
|
+
// Both below are used only for stored actions
|
|
12809
|
+
_this.searchString = '';
|
|
12402
12810
|
return _this;
|
|
12403
12811
|
}
|
|
12404
12812
|
ProductCardComponent.prototype.ngOnInit = function () {
|
|
12405
12813
|
var _this = this;
|
|
12406
|
-
this.subscriptions.push(this.recipeDetailsService.productsByCategory$.subscribe(function () { return _this.isProductSponsored(); }), this.loadOnRecipesActions(), this.loadOnIngredientsRemoval(), this.updateIngredientQuantityOnRecipeChange());
|
|
12814
|
+
this.subscriptions.push(this.recipeDetailsService.productsByCategory$.subscribe(function () { return _this.isProductSponsored(); }), this.executeActionFromStorage(), this.loadOnRecipesActions(), this.loadOnIngredientsRemoval(), this.updateIngredientQuantityOnRecipeChange());
|
|
12407
12815
|
};
|
|
12408
12816
|
ProductCardComponent.prototype.ngOnChanges = function (changes) {
|
|
12409
|
-
this.updatePriceForItem();
|
|
12410
|
-
this.getProductCardState();
|
|
12411
12817
|
this.recipesIncludingIngredient = this.isInXRecipes();
|
|
12412
12818
|
this.loadingAddToBasket = false;
|
|
12413
12819
|
if (changes.ingredient) {
|
|
12414
|
-
this.modifiedIngQty = +this.ingredient.quantity;
|
|
12820
|
+
this.modifiedIngQty = +this.product.ingredient.quantity;
|
|
12415
12821
|
}
|
|
12416
12822
|
this.cdr.detectChanges();
|
|
12417
12823
|
};
|
|
@@ -12419,71 +12825,72 @@
|
|
|
12419
12825
|
var _a;
|
|
12420
12826
|
(_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.forEach(function (sub) { return sub.unsubscribe(); });
|
|
12421
12827
|
};
|
|
12422
|
-
ProductCardComponent.prototype.
|
|
12828
|
+
ProductCardComponent.prototype.executeActionFromStorage = function () {
|
|
12423
12829
|
var _this = this;
|
|
12424
|
-
return this.
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
_this.modifiedIngQty = +((_b = recipe.modifiedIngredients.find(function (i) { return i.name === _this.ingredient.attributes.name; })) === null || _b === void 0 ? void 0 : _b.qty.toFixed(2));
|
|
12830
|
+
return this.recipeDetailsService.productsByCategory$.pipe(operators.skipWhile(function (products) { return products.toPickProducts.length === 0; }), operators.take(1), operators.switchMap(function () { return _this.basketActionsService.shouldExecuteBasketAction.pipe(operators.skipWhile(function (method) { return !method; })); })).subscribe(function (parsedMethod) {
|
|
12831
|
+
if (parsedMethod.method === 'addIngredientToBasket' &&
|
|
12832
|
+
parsedMethod.arguments.ingredientId === _this.product.ingredient.id &&
|
|
12833
|
+
_this.product.basketEntry.status === 'initial') {
|
|
12834
|
+
_this.replaceItemForStoredAction(parsedMethod);
|
|
12835
|
+
_this.addToBasket();
|
|
12431
12836
|
}
|
|
12432
|
-
_this.cdr.detectChanges();
|
|
12433
12837
|
});
|
|
12434
12838
|
};
|
|
12435
|
-
ProductCardComponent.prototype.
|
|
12839
|
+
ProductCardComponent.prototype.updateIngredientQuantityOnRecipeChange = function () {
|
|
12436
12840
|
var _this = this;
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
if (!['often_deleted', 'deleted', 'ignored'].includes(this.basketEntry.status)) {
|
|
12445
|
-
var _c = this.basketEntry, id = _c.id, selectedItem = _c.selectedItem, recipesIds = _c.recipesIds;
|
|
12446
|
-
if (id === '-1') {
|
|
12447
|
-
this.basketEntry.status = selectedItem ? 'initial' : 'unavailable';
|
|
12448
|
-
}
|
|
12449
|
-
else {
|
|
12450
|
-
var isRecipeActive = recipesIds.includes(+this.recipeDetailsService.recipe.id);
|
|
12451
|
-
this.basketEntry.status = isRecipeActive ? 'active' : 'initial';
|
|
12841
|
+
return this.recipesService.displayedRecipeChanged$.subscribe(function () {
|
|
12842
|
+
var _a, _b;
|
|
12843
|
+
var recipe = (_a = _this.recipesService.displayedRecipe$.value) === null || _a === void 0 ? void 0 : _a.recipe;
|
|
12844
|
+
_this.isProductSponsored();
|
|
12845
|
+
// If the recipe-details is displayed solo, recipesService.displayedRecipe$ has no value, so modifiedIngQty will be NaN
|
|
12846
|
+
if (recipe) {
|
|
12847
|
+
_this.modifiedIngQty = +((_b = recipe.modifiedIngredients.find(function (i) { return i.name === _this.product.ingredient.attributes.name; })) === null || _b === void 0 ? void 0 : _b.qty.toFixed(2));
|
|
12452
12848
|
}
|
|
12453
|
-
|
|
12849
|
+
_this.cdr.detectChanges();
|
|
12850
|
+
});
|
|
12454
12851
|
};
|
|
12455
12852
|
ProductCardComponent.prototype.counterChanged = function (newCount) {
|
|
12456
12853
|
if (newCount === 0) {
|
|
12457
|
-
this.recipeDetailsService.ingredientRemoved(this.ingredient, this.eventTrace());
|
|
12854
|
+
this.recipeDetailsService.ingredientRemoved(this.product.ingredient, this.eventTrace());
|
|
12458
12855
|
this.cdr.detectChanges();
|
|
12459
12856
|
}
|
|
12460
12857
|
else {
|
|
12461
|
-
this.recipeDetailsService.updateProductQuantity(this.basketEntry, newCount, this.eventTrace());
|
|
12858
|
+
this.recipeDetailsService.updateProductQuantity(this.product.basketEntry, newCount, this.eventTrace());
|
|
12462
12859
|
}
|
|
12860
|
+
this.recipeDetailsService.updateIngredientFromBasketLoading = true;
|
|
12463
12861
|
};
|
|
12464
12862
|
ProductCardComponent.prototype.addToBasket = function () {
|
|
12465
12863
|
var _this = this;
|
|
12466
|
-
this.loadingAddToBasket = true;
|
|
12467
12864
|
var recipe = this.recipeDetailsService.recipe;
|
|
12468
|
-
this.subscriptions.push(this.recipeDetailsService.canAddProductToBasket(
|
|
12469
|
-
|
|
12865
|
+
this.subscriptions.push(this.recipeDetailsService.canAddProductToBasket({
|
|
12866
|
+
method: 'addIngredientToBasket',
|
|
12867
|
+
arguments: {
|
|
12868
|
+
recipeId: recipe.id, ingredientId: this.product.ingredient.id, entry: this.product.basketEntry, eventTrace: this.eventTrace()
|
|
12869
|
+
}
|
|
12870
|
+
}, this.eventTrace()).subscribe(function (res) {
|
|
12871
|
+
if (res) {
|
|
12872
|
+
_this.loadingAddToBasket = true;
|
|
12873
|
+
_this.recipeDetailsService.ingredientToBasketLoading = true;
|
|
12874
|
+
_this.basketsService.addIngredientsToBasket(recipe.id, [{ ingredientId: _this.product.ingredient.id, entry: _this.product.basketEntry }], _this.eventTrace(), _this.previousItem, _this.searchString);
|
|
12875
|
+
}
|
|
12470
12876
|
}));
|
|
12471
12877
|
};
|
|
12472
12878
|
ProductCardComponent.prototype.ignoreProduct = function () {
|
|
12473
|
-
this.basketEntry.status = 'ignored';
|
|
12474
|
-
this.ignoredBasketsService.addIgnoredIngredients(this.ingredient.id);
|
|
12879
|
+
this.product.basketEntry.status = 'ignored';
|
|
12880
|
+
this.ignoredBasketsService.addIgnoredIngredients(this.product.ingredient.id);
|
|
12881
|
+
this.recipeDetailsService.updateRecipePrice(this.product, true);
|
|
12475
12882
|
this.recipeDetailsService.updateFooterDisplay$.next();
|
|
12476
12883
|
this.cdr.detectChanges();
|
|
12477
12884
|
};
|
|
12478
12885
|
ProductCardComponent.prototype.replaceProduct = function (ignoreSelected) {
|
|
12479
12886
|
this.recipeDetailsService.scrollBackToElementId = this.elementRef.nativeElement.id;
|
|
12480
|
-
this.recipeDetailsService.replaceBasketEntry(this.basketEntry, ignoreSelected);
|
|
12887
|
+
this.recipeDetailsService.replaceBasketEntry(this.product.basketEntry, ignoreSelected);
|
|
12481
12888
|
};
|
|
12482
12889
|
ProductCardComponent.prototype.isInXRecipes = function () {
|
|
12483
|
-
if (this.basketEntry.status !== 'active') {
|
|
12890
|
+
if (this.product.basketEntry.status !== 'active') {
|
|
12484
12891
|
return 1;
|
|
12485
12892
|
}
|
|
12486
|
-
return this.basketEntry.recipesIds.length;
|
|
12893
|
+
return this.product.basketEntry.recipesIds.length;
|
|
12487
12894
|
};
|
|
12488
12895
|
ProductCardComponent.prototype.currentPath = function () {
|
|
12489
12896
|
return '';
|
|
@@ -12502,25 +12909,38 @@
|
|
|
12502
12909
|
};
|
|
12503
12910
|
ProductCardComponent.prototype.loadOnIngredientsRemoval = function () {
|
|
12504
12911
|
var _this = this;
|
|
12505
|
-
return this.basketsService.ingredientWillBeRemoved(this.ingredient.id).subscribe(function (isLoading) {
|
|
12912
|
+
return this.basketsService.ingredientWillBeRemoved(this.product.ingredient.id).subscribe(function (isLoading) {
|
|
12506
12913
|
_this.counterMinusLoading = isLoading;
|
|
12507
12914
|
_this.cdr.detectChanges();
|
|
12508
12915
|
});
|
|
12509
12916
|
};
|
|
12510
12917
|
ProductCardComponent.prototype.isProductSponsored = function () {
|
|
12511
12918
|
var _a;
|
|
12512
|
-
this.isSponsored = this.recipeDetailsService.isSponsored && ((_a = this.ingredient.forcedEans) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
12919
|
+
this.isSponsored = this.recipeDetailsService.isSponsored && ((_a = this.product.ingredient.forcedEans) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
12513
12920
|
this.cdr.detectChanges();
|
|
12514
12921
|
};
|
|
12922
|
+
ProductCardComponent.prototype.replaceItemForStoredAction = function (parsedMethod) {
|
|
12923
|
+
if (parsedMethod.arguments.entry.relationships['selected-item'].data.id !== this.product.basketEntry.selectedItem.id) {
|
|
12924
|
+
if (this.product.basketEntry.status === 'ignored') {
|
|
12925
|
+
this.ignoredBasketsService.removeIngredientFromIgnored(this.product.ingredient.id);
|
|
12926
|
+
}
|
|
12927
|
+
this.previousItem = this.product.basketEntry.selectedItem;
|
|
12928
|
+
if (this.product.basketEntry.selectedItem) {
|
|
12929
|
+
this.product.basketEntry.removeRelationship('selected-item', this.product.basketEntry.selectedItem.id);
|
|
12930
|
+
}
|
|
12931
|
+
this.searchString = parsedMethod.arguments.searchString || '';
|
|
12932
|
+
this.product.basketEntry.addRelationship(parsedMethod.arguments.entry.relationships['selected-item'].data, 'selected-item');
|
|
12933
|
+
}
|
|
12934
|
+
};
|
|
12515
12935
|
return ProductCardComponent;
|
|
12516
12936
|
}(EventTracerComponent));
|
|
12517
|
-
ProductCardComponent.ɵfac = function ProductCardComponent_Factory(t) { return new (t || ProductCardComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(ItemsService), i0__namespace.ɵɵdirectiveInject(IgnoredIngredientsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef)); };
|
|
12518
|
-
ProductCardComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ProductCardComponent, selectors: [["ng-miam-product-card"]], inputs: {
|
|
12937
|
+
ProductCardComponent.ɵfac = function ProductCardComponent_Factory(t) { return new (t || ProductCardComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(ItemsService), i0__namespace.ɵɵdirectiveInject(IgnoredIngredientsService), i0__namespace.ɵɵdirectiveInject(BasketActionsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef)); };
|
|
12938
|
+
ProductCardComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ProductCardComponent, selectors: [["ng-miam-product-card"]], inputs: { product: "product" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "miam-product-card__container", 3, "ngClass", 4, "ngIf"], [1, "miam-product-card__container", 3, "ngClass"], [1, "miam-product-card__header", 3, "ngClass"], [1, "miam-product-card__header-name", "miam-ds-text", "size-l", "weight-xxl", 3, "ngClass"], [1, "miam-product-card__header-quantity", "miam-ds-text", "size-s", "weight-l", 3, "ngClass"], [1, "miam-product-card__content", 3, "ngClass"], [4, "ngIf", "ngIfElse"], ["disabledProduct", ""], ["class", "miam-product-card__footer", 4, "ngIf"], [1, "miam-product-card__selected-product"], [1, "miam-product-card__picture-column"], ["alt", "product picture", 1, "miam-product-card__picture", 3, "src"], [1, "miam-product-card__info-column"], [1, "miam-ds-text", "size-xs", "weight-xl", "miam-product-card__details", "product-brand"], [1, "miam-ds-text", "size-xs", "miam-product-card__details", "product-fullname"], [1, "miam-product-card__badges"], [1, "miam-ds-badge"], ["class", "miam-ds-badge outline", 4, "ngIf"], [1, "miam-ds-button", "ghost", 3, "click"], [1, "miam-product-card__lower-action"], [1, "miam-product-card__price", "miam-ds-text", "size-l", "weight-xxl"], [1, "miam-product-card__cta"], [4, "ngIf"], [1, "miam-ds-badge", "outline"], [1, "miam-ds-button", "miam-product-card__ignore-product", "ghost", "small", 3, "click"], [1, "miam-product-card__disabled-text"], ["class", "miam-ds-button miam-product-card__add-product square primary", 3, "disabled", "click", 4, "ngIf"], ["class", "miam-ds-button miam-product-card__loading-button square primary", 4, "ngIf"], [1, "miam-ds-button", "miam-product-card__add-product", "square", "primary", 3, "disabled", "click"], ["alt", "basket icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Basket.svg"], [1, "miam-ds-button", "miam-product-card__loading-button", "square", "primary"], [1, "miam-ds-loader"], ["minRange", "0", 3, "value", "minusLoading", "valueChange"], [1, "miam-ds-text", "miam-product-card__disabled-text"], [1, "miam-product-card__footer"], [1, "miam-ds-text", "size-xs", "weight-xl", "light-text"]], template: function ProductCardComponent_Template(rf, ctx) {
|
|
12519
12939
|
if (rf & 1) {
|
|
12520
12940
|
i0__namespace.ɵɵtemplate(0, ProductCardComponent_div_0_Template, 15, 25, "div", 0);
|
|
12521
12941
|
}
|
|
12522
12942
|
if (rf & 2) {
|
|
12523
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.basketEntry);
|
|
12943
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.product.basketEntry);
|
|
12524
12944
|
}
|
|
12525
12945
|
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgClass, CounterInputComponent], pipes: [CapitalizeFirstLetterPipe, i2__namespace$1.DecimalPipe, i2__namespace$1.CurrencyPipe, i2__namespace$1.AsyncPipe], styles: [".miam-product-card__container{display:flex;flex-direction:column;box-sizing:border-box;height:100%;border-radius:8px;overflow:hidden;border:1px solid var(--miam-ds-color-primary-100,#e4eaec);background:var(--miam-ds-color-primary-text,#fff);transition:all .3s}.miam-product-card__container.added{border:1px solid var(--miam-ds-color-primary,#24748f);background:var(--miam-ds-color-primary-text,#fff)}.miam-product-card__container .miam-product-card__header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;padding:8px;color:var(--miam-ds-color-neutral-black,#1f3543);background:var(--miam-ds-color-primary-100,#e4eaec);transition:all .3s}.miam-product-card__container .miam-product-card__header.added{background:var(--miam-ds-color-primary,#24748f);color:var(--core-background-background-primary,#fff)}.miam-product-card__container .miam-product-card__header.disabled{background:var(--miam-ds-color-neutral-200,#d9dde1)}.miam-product-card__container .miam-product-card__header .miam-product-card__header-quantity{text-align:right}.miam-product-card__container .miam-product-card__content{padding:8px 12px;height:100%;display:flex;flex-direction:column;gap:12px;background-color:var(--miam-ds-color-neutral-white,#fff);transition:background-color .3s}.miam-product-card__container .miam-product-card__content.disabled{justify-content:center;align-items:center;gap:12px;padding:12px;text-align:center;background-color:var(--miam-ds-color-neutral-200,#d9dde1)}@media (max-width:1023px){.miam-product-card__container .miam-product-card__content{padding:12px}}@media (min-width:1023px) and (max-height:800px){.miam-product-card__container .miam-product-card__content{padding:12px}}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product{display:flex;align-items:center;justify-content:center;flex-direction:column;height:100%}@media (max-width:1023px){.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product{flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:16px}}@media (min-width:1023px) and (max-height:800px){.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product{flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:16px}}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__picture{height:72px;width:72px}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column{display:flex;flex-direction:column;align-items:center;justify-content:center}@media (max-width:1023px){.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column{align-items:flex-start}}@media (min-width:1023px) and (max-height:800px){.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column{align-items:flex-start}}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__details{font-size:12px!important;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--miam-ds-color-neutral-black,#1f3543)}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__details.product-brand{text-transform:uppercase}@media screen{.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__details.product-fullname{height:36px}}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__link{font-size:14px}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__badges{display:flex;gap:8px;margin:8px 0}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__badges .miam-product-card__badge-text{color:var(--miam-ds-color-neutral-black,#1f3543);font-size:12px}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action{display:flex;align-items:center;justify-content:space-between;gap:8px}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta{display:flex;align-items:center;gap:12px}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-ds-button.square{padding:8px}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__loading-button{padding:14px}@media (max-width:1024px){.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-ds-button.primary:hover{background-color:var(--miam-ds-color-primary)}}@media (min-width:1023px) and (max-height:800px){.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-ds-button.primary:hover{background-color:var(--miam-ds-color-primary)}}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__price{color:var(--miam-ds-color-primary,#24748f)}.miam-product-card__container .miam-product-card__disabled-text{color:var(--miam-ds-color-neutral-black,#1f3543);opacity:.65}.miam-product-card__container .miam-product-card__footer{display:flex;flex-direction:column;align-items:center;background:var(--miam-ds-color-primary-50,#f0f3f4);padding:8px}.miam-product-card__container .miam-product-card__footer .light-text{color:var(--miam-ds-color-neutral-black,#1f3543);opacity:.5}"], encapsulation: 2, changeDetection: 0 });
|
|
12526
12946
|
(function () {
|
|
@@ -12533,9 +12953,7 @@
|
|
|
12533
12953
|
encapsulation: i0.ViewEncapsulation.None,
|
|
12534
12954
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
12535
12955
|
}]
|
|
12536
|
-
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: BasketsService }, { type: RecipeDetailsService }, { type: RecipesService }, { type: AnalyticsService }, { type: ItemsService }, { type: IgnoredIngredientsService }, { type: i0__namespace.ElementRef }]; }, {
|
|
12537
|
-
type: i0.Input
|
|
12538
|
-
}], ingredient: [{
|
|
12956
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: BasketsService }, { type: RecipeDetailsService }, { type: RecipesService }, { type: AnalyticsService }, { type: ItemsService }, { type: IgnoredIngredientsService }, { type: BasketActionsService }, { type: i0__namespace.ElementRef }]; }, { product: [{
|
|
12539
12957
|
type: i0.Input
|
|
12540
12958
|
}] });
|
|
12541
12959
|
})();
|
|
@@ -12635,22 +13053,22 @@
|
|
|
12635
13053
|
|
|
12636
13054
|
function ProductsPickerComponent_div_5_Template(rf, ctx) {
|
|
12637
13055
|
if (rf & 1) {
|
|
12638
|
-
i0__namespace.ɵɵelement(0, "div",
|
|
13056
|
+
i0__namespace.ɵɵelement(0, "div", 11);
|
|
12639
13057
|
}
|
|
12640
13058
|
}
|
|
12641
13059
|
function ProductsPickerComponent_div_7_ng_miam_product_card_1_Template(rf, ctx) {
|
|
12642
13060
|
if (rf & 1) {
|
|
12643
|
-
i0__namespace.ɵɵelement(0, "ng-miam-product-card",
|
|
13061
|
+
i0__namespace.ɵɵelement(0, "ng-miam-product-card", 14);
|
|
12644
13062
|
}
|
|
12645
13063
|
if (rf & 2) {
|
|
12646
13064
|
var product_r8 = ctx.$implicit;
|
|
12647
|
-
i0__namespace.ɵɵproperty("id", "miam_" + product_r8.basketEntry.nameId + "_product_card")("
|
|
13065
|
+
i0__namespace.ɵɵproperty("id", "miam_" + product_r8.basketEntry.nameId + "_product_card")("product", product_r8);
|
|
12648
13066
|
}
|
|
12649
13067
|
}
|
|
12650
13068
|
function ProductsPickerComponent_div_7_Template(rf, ctx) {
|
|
12651
13069
|
if (rf & 1) {
|
|
12652
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
12653
|
-
i0__namespace.ɵɵtemplate(1, ProductsPickerComponent_div_7_ng_miam_product_card_1_Template, 1,
|
|
13070
|
+
i0__namespace.ɵɵelementStart(0, "div", 12);
|
|
13071
|
+
i0__namespace.ɵɵtemplate(1, ProductsPickerComponent_div_7_ng_miam_product_card_1_Template, 1, 2, "ng-miam-product-card", 13);
|
|
12654
13072
|
i0__namespace.ɵɵelementEnd();
|
|
12655
13073
|
}
|
|
12656
13074
|
if (rf & 2) {
|
|
@@ -12659,33 +13077,33 @@
|
|
|
12659
13077
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r1.recipeDetailsService.productsByCategory.toPickProducts)("ngForTrackBy", ctx_r1.trackByFn);
|
|
12660
13078
|
}
|
|
12661
13079
|
}
|
|
12662
|
-
function
|
|
13080
|
+
function ProductsPickerComponent_ng_container_10_ng_miam_product_card_7_Template(rf, ctx) {
|
|
12663
13081
|
if (rf & 1) {
|
|
12664
|
-
i0__namespace.ɵɵelement(0, "ng-miam-product-card",
|
|
13082
|
+
i0__namespace.ɵɵelement(0, "ng-miam-product-card", 14);
|
|
12665
13083
|
}
|
|
12666
13084
|
if (rf & 2) {
|
|
12667
13085
|
var product_r10 = ctx.$implicit;
|
|
12668
|
-
i0__namespace.ɵɵproperty("id", "miam_" + product_r10.basketEntry.nameId + "_product_card")("
|
|
13086
|
+
i0__namespace.ɵɵproperty("id", "miam_" + product_r10.basketEntry.nameId + "_product_card")("product", product_r10);
|
|
12669
13087
|
}
|
|
12670
13088
|
}
|
|
12671
|
-
function
|
|
13089
|
+
function ProductsPickerComponent_ng_container_10_Template(rf, ctx) {
|
|
12672
13090
|
if (rf & 1) {
|
|
12673
13091
|
var _r12_1 = i0__namespace.ɵɵgetCurrentView();
|
|
12674
|
-
i0__namespace.ɵɵ
|
|
12675
|
-
i0__namespace.ɵɵelementStart(1, "ng-miam-accordion",
|
|
12676
|
-
i0__namespace.ɵɵlistener("isCollapsedChange", function
|
|
13092
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
13093
|
+
i0__namespace.ɵɵelementStart(1, "ng-miam-accordion", 15);
|
|
13094
|
+
i0__namespace.ɵɵlistener("isCollapsedChange", function ProductsPickerComponent_ng_container_10_Template_ng_miam_accordion_isCollapsedChange_1_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r11 = i0__namespace.ɵɵnextContext(); return ctx_r11.cdr.detectChanges(); });
|
|
12677
13095
|
i0__namespace.ɵɵelementStart(2, "ng-miam-accordion-title");
|
|
12678
13096
|
i0__namespace.ɵɵelementStart(3, "span", 2);
|
|
12679
13097
|
i0__namespace.ɵɵtext(4, " D\u00E9j\u00E0 dans le placard ");
|
|
12680
13098
|
i0__namespace.ɵɵelementEnd();
|
|
12681
13099
|
i0__namespace.ɵɵelementEnd();
|
|
12682
13100
|
i0__namespace.ɵɵelementStart(5, "ng-miam-accordion-content");
|
|
12683
|
-
i0__namespace.ɵɵelementStart(6, "div",
|
|
12684
|
-
i0__namespace.ɵɵtemplate(7,
|
|
12685
|
-
i0__namespace.ɵɵelementEnd();
|
|
13101
|
+
i0__namespace.ɵɵelementStart(6, "div", 12);
|
|
13102
|
+
i0__namespace.ɵɵtemplate(7, ProductsPickerComponent_ng_container_10_ng_miam_product_card_7_Template, 1, 2, "ng-miam-product-card", 13);
|
|
12686
13103
|
i0__namespace.ɵɵelementEnd();
|
|
12687
13104
|
i0__namespace.ɵɵelementEnd();
|
|
12688
13105
|
i0__namespace.ɵɵelementEnd();
|
|
13106
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
12689
13107
|
}
|
|
12690
13108
|
if (rf & 2) {
|
|
12691
13109
|
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
@@ -12695,31 +13113,31 @@
|
|
|
12695
13113
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r2.recipeDetailsService.productsByCategory.oftenIgnoredProducts)("ngForTrackBy", ctx_r2.trackByFn);
|
|
12696
13114
|
}
|
|
12697
13115
|
}
|
|
12698
|
-
function
|
|
13116
|
+
function ProductsPickerComponent_ng_container_11_ng_miam_product_card_6_Template(rf, ctx) {
|
|
12699
13117
|
if (rf & 1) {
|
|
12700
|
-
i0__namespace.ɵɵelement(0, "ng-miam-product-card",
|
|
13118
|
+
i0__namespace.ɵɵelement(0, "ng-miam-product-card", 14);
|
|
12701
13119
|
}
|
|
12702
13120
|
if (rf & 2) {
|
|
12703
13121
|
var product_r14 = ctx.$implicit;
|
|
12704
|
-
i0__namespace.ɵɵproperty("id", "miam_" + product_r14.basketEntry.nameId + "_product_card")("
|
|
13122
|
+
i0__namespace.ɵɵproperty("id", "miam_" + product_r14.basketEntry.nameId + "_product_card")("product", product_r14);
|
|
12705
13123
|
}
|
|
12706
13124
|
}
|
|
12707
|
-
function
|
|
13125
|
+
function ProductsPickerComponent_ng_container_11_Template(rf, ctx) {
|
|
12708
13126
|
if (rf & 1) {
|
|
12709
13127
|
var _r16_1 = i0__namespace.ɵɵgetCurrentView();
|
|
12710
|
-
i0__namespace.ɵɵ
|
|
12711
|
-
i0__namespace.ɵɵelementStart(1, "ng-miam-accordion",
|
|
12712
|
-
i0__namespace.ɵɵlistener("isCollapsedChange", function
|
|
13128
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
13129
|
+
i0__namespace.ɵɵelementStart(1, "ng-miam-accordion", 16);
|
|
13130
|
+
i0__namespace.ɵɵlistener("isCollapsedChange", function ProductsPickerComponent_ng_container_11_Template_ng_miam_accordion_isCollapsedChange_1_listener() { i0__namespace.ɵɵrestoreView(_r16_1); var ctx_r15 = i0__namespace.ɵɵnextContext(); return ctx_r15.cdr.detectChanges(); });
|
|
12713
13131
|
i0__namespace.ɵɵelementStart(2, "ng-miam-accordion-title");
|
|
12714
13132
|
i0__namespace.ɵɵtext(3, " Articles indisponibles ");
|
|
12715
13133
|
i0__namespace.ɵɵelementEnd();
|
|
12716
13134
|
i0__namespace.ɵɵelementStart(4, "ng-miam-accordion-content");
|
|
12717
|
-
i0__namespace.ɵɵelementStart(5, "div",
|
|
12718
|
-
i0__namespace.ɵɵtemplate(6,
|
|
12719
|
-
i0__namespace.ɵɵelementEnd();
|
|
13135
|
+
i0__namespace.ɵɵelementStart(5, "div", 12);
|
|
13136
|
+
i0__namespace.ɵɵtemplate(6, ProductsPickerComponent_ng_container_11_ng_miam_product_card_6_Template, 1, 2, "ng-miam-product-card", 13);
|
|
12720
13137
|
i0__namespace.ɵɵelementEnd();
|
|
12721
13138
|
i0__namespace.ɵɵelementEnd();
|
|
12722
13139
|
i0__namespace.ɵɵelementEnd();
|
|
13140
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
12723
13141
|
}
|
|
12724
13142
|
if (rf & 2) {
|
|
12725
13143
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
@@ -12729,12 +13147,12 @@
|
|
|
12729
13147
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r3.recipeDetailsService.productsByCategory.unavailableProducts)("ngForTrackBy", ctx_r3.trackByFn);
|
|
12730
13148
|
}
|
|
12731
13149
|
}
|
|
12732
|
-
function
|
|
13150
|
+
function ProductsPickerComponent_a_13_Template(rf, ctx) {
|
|
12733
13151
|
if (rf & 1) {
|
|
12734
|
-
i0__namespace.ɵɵelementStart(0, "a",
|
|
12735
|
-
i0__namespace.ɵɵelementStart(1, "button",
|
|
13152
|
+
i0__namespace.ɵɵelementStart(0, "a", 17);
|
|
13153
|
+
i0__namespace.ɵɵelementStart(1, "button", 18);
|
|
12736
13154
|
i0__namespace.ɵɵelementStart(2, "span");
|
|
12737
|
-
i0__namespace.ɵɵi18n(3,
|
|
13155
|
+
i0__namespace.ɵɵi18n(3, 19);
|
|
12738
13156
|
i0__namespace.ɵɵelementEnd();
|
|
12739
13157
|
i0__namespace.ɵɵelementEnd();
|
|
12740
13158
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -12744,13 +13162,13 @@
|
|
|
12744
13162
|
i0__namespace.ɵɵproperty("href", ctx_r4.contextService.catalogUrl, i0__namespace.ɵɵsanitizeUrl);
|
|
12745
13163
|
}
|
|
12746
13164
|
}
|
|
12747
|
-
function
|
|
13165
|
+
function ProductsPickerComponent_ng_template_14_Template(rf, ctx) {
|
|
12748
13166
|
if (rf & 1) {
|
|
12749
13167
|
var _r18_1 = i0__namespace.ɵɵgetCurrentView();
|
|
12750
|
-
i0__namespace.ɵɵelementStart(0, "button",
|
|
12751
|
-
i0__namespace.ɵɵlistener("click", function
|
|
13168
|
+
i0__namespace.ɵɵelementStart(0, "button", 20);
|
|
13169
|
+
i0__namespace.ɵɵlistener("click", function ProductsPickerComponent_ng_template_14_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r18_1); var ctx_r17 = i0__namespace.ɵɵnextContext(); return ctx_r17.closeRecipeModal(); });
|
|
12752
13170
|
i0__namespace.ɵɵelementStart(1, "span");
|
|
12753
|
-
i0__namespace.ɵɵi18n(2,
|
|
13171
|
+
i0__namespace.ɵɵi18n(2, 21);
|
|
12754
13172
|
i0__namespace.ɵɵelementEnd();
|
|
12755
13173
|
i0__namespace.ɵɵelementEnd();
|
|
12756
13174
|
}
|
|
@@ -12808,7 +13226,7 @@
|
|
|
12808
13226
|
return ProductsPickerComponent;
|
|
12809
13227
|
}());
|
|
12810
13228
|
ProductsPickerComponent.ɵfac = function ProductsPickerComponent_Factory(t) { return new (t || ProductsPickerComponent)(i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
12811
|
-
ProductsPickerComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ProductsPickerComponent, selectors: [["ng-miam-products-picker"]], outputs: { closeModal: "closeModal" }, decls:
|
|
13229
|
+
ProductsPickerComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ProductsPickerComponent, selectors: [["ng-miam-products-picker"]], outputs: { closeModal: "closeModal" }, decls: 16, vars: 11, consts: function () {
|
|
12812
13230
|
var i18n_0;
|
|
12813
13231
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
12814
13232
|
var MSG_EXTERNAL_7935172570546041466$$LIB__COMPONENTS_PRODUCTS_PICKER_PRODUCTS_PICKER_COMPONENT_TS__1 = goog.getMsg("Voir plus d'id\u00E9es repas");
|
|
@@ -12825,7 +13243,7 @@
|
|
|
12825
13243
|
else {
|
|
12826
13244
|
i18n_2 = $localize(templateObject_2$s || (templateObject_2$s = __makeTemplateObject([":\u241Fe98c28a19e26d5768391fd181582d011334dac18\u241F7935172570546041466:Voir plus d'id\u00E9es repas"], [":\u241Fe98c28a19e26d5768391fd181582d011334dac18\u241F7935172570546041466:Voir plus d'id\u00E9es repas"])));
|
|
12827
13245
|
}
|
|
12828
|
-
return [[1, "miam-products-picker__container"], [1, "miam-products-picker__header"], [1, "miam-ds-text", "weight-xxl"], [1, "miam-products-picker__header-text"], ["class", " miam-ds-loader miam-products-picker__loader", 4, "ngIf"], ["class", "miam-products-picker__list", 4, "ngIf"], [4, "ngIf"], [1, "miam-products-picker__more"], ["class", "miam-products-picker__more-anchor", 3, "href", 4, "ngIf", "ngIfElse"], ["noAnchor", ""], [1, "miam-ds-loader", "miam-products-picker__loader"], [1, "miam-products-picker__list"], ["class", "miam-products-picker__items", 3, "id", "
|
|
13246
|
+
return [[1, "miam-products-picker__container"], [1, "miam-products-picker__header"], [1, "miam-ds-text", "weight-xxl"], [1, "miam-products-picker__header-text"], ["class", " miam-ds-loader miam-products-picker__loader", 4, "ngIf"], ["class", "miam-products-picker__list", 4, "ngIf"], [1, "miam-products-picker__secondary-list"], [4, "ngIf"], [1, "miam-products-picker__more"], ["class", "miam-products-picker__more-anchor", 3, "href", 4, "ngIf", "ngIfElse"], ["noAnchor", ""], [1, "miam-ds-loader", "miam-products-picker__loader"], [1, "miam-products-picker__list"], ["class", "miam-products-picker__items", 3, "id", "product", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "miam-products-picker__items", 3, "id", "product"], [1, "miam-products-picker__often-ignored-list", 3, "isCollapsed", "isCollapsedChange"], [1, "miam-products-picker__unavailable-list", 3, "isCollapsed", "isCollapsedChange"], [1, "miam-products-picker__more-anchor", 3, "href"], [1, "miam-ds-button", "secondary"], i18n_0, [1, "miam-ds-button", "secondary", 3, "click"], i18n_2];
|
|
12829
13247
|
}, template: function ProductsPickerComponent_Template(rf, ctx) {
|
|
12830
13248
|
if (rf & 1) {
|
|
12831
13249
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
@@ -12840,30 +13258,32 @@
|
|
|
12840
13258
|
i0__namespace.ɵɵpipe(6, "async");
|
|
12841
13259
|
i0__namespace.ɵɵtemplate(7, ProductsPickerComponent_div_7_Template, 2, 2, "div", 5);
|
|
12842
13260
|
i0__namespace.ɵɵpipe(8, "async");
|
|
12843
|
-
i0__namespace.ɵɵ
|
|
12844
|
-
i0__namespace.ɵɵtemplate(10,
|
|
12845
|
-
i0__namespace.ɵɵ
|
|
12846
|
-
i0__namespace.ɵɵ
|
|
12847
|
-
i0__namespace.ɵɵ
|
|
13261
|
+
i0__namespace.ɵɵelementStart(9, "div", 6);
|
|
13262
|
+
i0__namespace.ɵɵtemplate(10, ProductsPickerComponent_ng_container_10_Template, 8, 3, "ng-container", 7);
|
|
13263
|
+
i0__namespace.ɵɵtemplate(11, ProductsPickerComponent_ng_container_11_Template, 7, 3, "ng-container", 7);
|
|
13264
|
+
i0__namespace.ɵɵelementEnd();
|
|
13265
|
+
i0__namespace.ɵɵelementStart(12, "div", 8);
|
|
13266
|
+
i0__namespace.ɵɵtemplate(13, ProductsPickerComponent_a_13_Template, 4, 1, "a", 9);
|
|
13267
|
+
i0__namespace.ɵɵtemplate(14, ProductsPickerComponent_ng_template_14_Template, 3, 0, "ng-template", null, 10, i0__namespace.ɵɵtemplateRefExtractor);
|
|
12848
13268
|
i0__namespace.ɵɵelementEnd();
|
|
12849
13269
|
i0__namespace.ɵɵelementEnd();
|
|
12850
13270
|
}
|
|
12851
13271
|
if (rf & 2) {
|
|
12852
|
-
var _r5 = i0__namespace.ɵɵreference(
|
|
13272
|
+
var _r5 = i0__namespace.ɵɵreference(15);
|
|
12853
13273
|
i0__namespace.ɵɵadvance(4);
|
|
12854
13274
|
i0__namespace.ɵɵtextInterpolate1("", ctx.recipeDetailsService.totalProducts, " ingr\u00E9dients");
|
|
12855
13275
|
i0__namespace.ɵɵadvance(1);
|
|
12856
13276
|
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(6, 7, ctx.recipeDetailsService.productsLoading$));
|
|
12857
13277
|
i0__namespace.ɵɵadvance(2);
|
|
12858
13278
|
i0__namespace.ɵɵproperty("ngIf", !i0__namespace.ɵɵpipeBind1(8, 9, ctx.recipeDetailsService.productsLoading$));
|
|
12859
|
-
i0__namespace.ɵɵadvance(
|
|
13279
|
+
i0__namespace.ɵɵadvance(3);
|
|
12860
13280
|
i0__namespace.ɵɵproperty("ngIf", ctx.recipeDetailsService.productsByCategory.oftenIgnoredProducts.length > 0);
|
|
12861
13281
|
i0__namespace.ɵɵadvance(1);
|
|
12862
13282
|
i0__namespace.ɵɵproperty("ngIf", ctx.recipeDetailsService.productsByCategory.unavailableProducts.length > 0);
|
|
12863
13283
|
i0__namespace.ɵɵadvance(2);
|
|
12864
13284
|
i0__namespace.ɵɵproperty("ngIf", !ctx.isAlreadyOnCatalogPage())("ngIfElse", _r5);
|
|
12865
13285
|
}
|
|
12866
|
-
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgForOf, ProductCardComponent, AccordionComponent, AccordionTitleDirective, AccordionContentDirective], pipes: [i2__namespace$1.AsyncPipe], styles: [".miam-products-picker__container{display:flex;flex-direction:column;gap:16px;padding:16px}.miam-products-picker__container .miam-products-picker__loader{margin:0 auto;width:40px;height:40px;background-position-x:20px;background-size:20px 20px}.miam-products-picker__container .miam-products-picker__header{display:flex;justify-content:space-between;align-items:center}.miam-products-picker__container .miam-products-picker__header .miam-products-picker__header-text{font-size:16px;line-height:150%;color:var(--miam-ds-color-neutral-black,#1f3543)}@media (min-width:1024px){.miam-products-picker__container .miam-products-picker__header .miam-products-picker__header-text{font-size:20px;line-height:120%}}.miam-products-picker__container .miam-products-picker__list{display:grid;grid-template-columns:repeat(auto-fill,minmax(
|
|
13286
|
+
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgForOf, ProductCardComponent, AccordionComponent, AccordionTitleDirective, AccordionContentDirective], pipes: [i2__namespace$1.AsyncPipe], styles: [".miam-products-picker__container{display:flex;flex-direction:column;gap:16px;padding:16px}.miam-products-picker__container .miam-products-picker__loader{margin:0 auto;width:40px;height:40px;background-position-x:20px;background-size:20px 20px}.miam-products-picker__container .miam-products-picker__header{display:flex;justify-content:space-between;align-items:center}.miam-products-picker__container .miam-products-picker__header .miam-products-picker__header-text{font-size:16px;line-height:150%;color:var(--miam-ds-color-neutral-black,#1f3543)}@media (min-width:1024px){.miam-products-picker__container .miam-products-picker__header .miam-products-picker__header-text{font-size:20px;line-height:120%}}.miam-products-picker__container .miam-products-picker__list{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));grid-gap:16px}@media (max-width:640px){.miam-products-picker__container .miam-products-picker__list{grid-gap:8px}}.miam-products-picker__container .miam-products-picker__secondary-list{display:flex;flex-direction:column}.miam-products-picker__container .miam-products-picker__more{display:flex;justify-content:center}.miam-products-picker__container .miam-products-picker__more .miam-products-picker__more-anchor{text-decoration:inherit}"], encapsulation: 2, changeDetection: 0 });
|
|
12867
13287
|
(function () {
|
|
12868
13288
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ProductsPickerComponent, [{
|
|
12869
13289
|
type: i0.Component,
|
|
@@ -12896,14 +13316,16 @@
|
|
|
12896
13316
|
AutowidthInputDirective,
|
|
12897
13317
|
ExtendedDatePipe,
|
|
12898
13318
|
ReachTopDirective,
|
|
12899
|
-
InViewportDirective
|
|
13319
|
+
InViewportDirective,
|
|
13320
|
+
LoadOnScrollDirective], exports: [ReadableFloatNumberPipe,
|
|
12900
13321
|
EllipsisPipe,
|
|
12901
13322
|
SafePipe,
|
|
12902
13323
|
CapitalizeFirstLetterPipe,
|
|
12903
13324
|
AutowidthInputDirective,
|
|
12904
13325
|
ExtendedDatePipe,
|
|
12905
13326
|
ReachTopDirective,
|
|
12906
|
-
InViewportDirective
|
|
13327
|
+
InViewportDirective,
|
|
13328
|
+
LoadOnScrollDirective] });
|
|
12907
13329
|
})();
|
|
12908
13330
|
(function () {
|
|
12909
13331
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(UtilsModule, [{
|
|
@@ -12918,7 +13340,8 @@
|
|
|
12918
13340
|
AutowidthInputDirective,
|
|
12919
13341
|
ExtendedDatePipe,
|
|
12920
13342
|
ReachTopDirective,
|
|
12921
|
-
InViewportDirective
|
|
13343
|
+
InViewportDirective,
|
|
13344
|
+
LoadOnScrollDirective
|
|
12922
13345
|
],
|
|
12923
13346
|
exports: [
|
|
12924
13347
|
ReadableFloatNumberPipe,
|
|
@@ -12928,7 +13351,8 @@
|
|
|
12928
13351
|
AutowidthInputDirective,
|
|
12929
13352
|
ExtendedDatePipe,
|
|
12930
13353
|
ReachTopDirective,
|
|
12931
|
-
InViewportDirective
|
|
13354
|
+
InViewportDirective,
|
|
13355
|
+
LoadOnScrollDirective
|
|
12932
13356
|
]
|
|
12933
13357
|
}]
|
|
12934
13358
|
}], null, null);
|
|
@@ -13141,7 +13565,7 @@
|
|
|
13141
13565
|
i0__namespace.ɵɵelement(0, "ng-miam-loader");
|
|
13142
13566
|
}
|
|
13143
13567
|
}
|
|
13144
|
-
var _c10 = function (a0) { return { loading: a0 }; };
|
|
13568
|
+
var _c10$2 = function (a0) { return { loading: a0 }; };
|
|
13145
13569
|
function BasketPreviewDisabledComponent_div_10_div_1_button_4_Template(rf, ctx) {
|
|
13146
13570
|
if (rf & 1) {
|
|
13147
13571
|
var _r12_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -13156,7 +13580,7 @@
|
|
|
13156
13580
|
if (rf & 2) {
|
|
13157
13581
|
var entry_r5 = i0__namespace.ɵɵnextContext().$implicit;
|
|
13158
13582
|
var ctx_r6 = i0__namespace.ɵɵnextContext(2);
|
|
13159
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c10, ctx_r6.loading[entry_r5.id]));
|
|
13583
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c10$2, ctx_r6.loading[entry_r5.id]));
|
|
13160
13584
|
i0__namespace.ɵɵadvance(1);
|
|
13161
13585
|
i0__namespace.ɵɵproperty("ngIf", !ctx_r6.loading[entry_r5.id]);
|
|
13162
13586
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -13197,7 +13621,7 @@
|
|
|
13197
13621
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r3.entries);
|
|
13198
13622
|
}
|
|
13199
13623
|
}
|
|
13200
|
-
var _c11
|
|
13624
|
+
var _c11 = function (a0) { return { "miam-basket-preview-disabled__chevron__down": a0 }; };
|
|
13201
13625
|
var MODES_CONFIG = {
|
|
13202
13626
|
unavailable: { cssClass: 'unavailable' },
|
|
13203
13627
|
removed: { cssClass: 'removed' },
|
|
@@ -13293,7 +13717,7 @@
|
|
|
13293
13717
|
i18n_8 = MSG_EXTERNAL_7632520172633395699$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_DISABLED_BASKET_PREVIEW_DISABLED_COMPONENT_TS_____9;
|
|
13294
13718
|
}
|
|
13295
13719
|
else {
|
|
13296
|
-
i18n_8 = $localize(templateObject_5$
|
|
13720
|
+
i18n_8 = $localize(templateObject_5$d || (templateObject_5$d = __makeTemplateObject([":\u241Fe31c09107c2be79ac21e40a68b0f4ab125f4ab8b\u241F7632520172633395699: au panier"], [":\u241Fe31c09107c2be79ac21e40a68b0f4ab125f4ab8b\u241F7632520172633395699: au panier"])));
|
|
13297
13721
|
}
|
|
13298
13722
|
return [[1, "miam-basket-preview-disabled"], [1, "miam-basket-preview-disabled__header", 3, "ngClass", "click"], [1, "miam-basket-preview-disabled__header__caption"], ["class", "miam-basket-preview-disabled__header__caption__text", 4, "ngIf"], [1, "miam-basket-preview-disabled__header__caption__number"], [1, "miam-basket-preview-disabled__header__chevron", 3, "ngClass"], ["height", "32", "width", "32", "primaryColor", "#fff", 3, "iconName"], [4, "ngIf"], [1, "miam-basket-preview-disabled__header__caption__text"], i18n_0, i18n_2, i18n_4, ["class", "miam-basket-preview-disabled__entry", 4, "ngFor", "ngForOf"], [1, "miam-basket-preview-disabled__entry"], [1, "text-muted"], ["class", "m-button-grey", 3, "ngClass", "click", 4, "ngIf"], [1, "m-button-grey", 3, "ngClass", "click"], i18n_6, i18n_8];
|
|
13299
13723
|
}, template: function BasketPreviewDisabledComponent_Template(rf, ctx) {
|
|
@@ -13328,7 +13752,7 @@
|
|
|
13328
13752
|
i0__namespace.ɵɵadvance(2);
|
|
13329
13753
|
i0__namespace.ɵɵtextInterpolate1(" (", ctx.entries.length, ") ");
|
|
13330
13754
|
i0__namespace.ɵɵadvance(1);
|
|
13331
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c11
|
|
13755
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c11, !ctx.reduced));
|
|
13332
13756
|
i0__namespace.ɵɵadvance(1);
|
|
13333
13757
|
i0__namespace.ɵɵproperty("iconName", ctx.icon.ChevronDown);
|
|
13334
13758
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -13359,19 +13783,19 @@
|
|
|
13359
13783
|
args: ['window:resize', ['$event']]
|
|
13360
13784
|
}] });
|
|
13361
13785
|
})();
|
|
13362
|
-
var templateObject_1$x, templateObject_2$r, templateObject_3$k, templateObject_4$h, templateObject_5$
|
|
13786
|
+
var templateObject_1$x, templateObject_2$r, templateObject_3$k, templateObject_4$h, templateObject_5$d;
|
|
13363
13787
|
|
|
13364
|
-
function
|
|
13788
|
+
function BasketPreviewLineComponent_ng_container_0_img_32_Template(rf, ctx) {
|
|
13365
13789
|
if (rf & 1) {
|
|
13366
|
-
i0__namespace.ɵɵelement(0, "img",
|
|
13790
|
+
i0__namespace.ɵɵelement(0, "img", 25);
|
|
13367
13791
|
}
|
|
13368
13792
|
}
|
|
13369
|
-
function
|
|
13793
|
+
function BasketPreviewLineComponent_ng_container_0_ng_template_33_Template(rf, ctx) {
|
|
13370
13794
|
if (rf & 1) {
|
|
13371
|
-
i0__namespace.ɵɵelement(0, "div",
|
|
13795
|
+
i0__namespace.ɵɵelement(0, "div", 26);
|
|
13372
13796
|
}
|
|
13373
13797
|
}
|
|
13374
|
-
var
|
|
13798
|
+
var _c8$2 = function (a0) { return { "disabled": a0 }; };
|
|
13375
13799
|
function BasketPreviewLineComponent_ng_container_0_Template(rf, ctx) {
|
|
13376
13800
|
if (rf & 1) {
|
|
13377
13801
|
var _r7_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -13408,27 +13832,40 @@
|
|
|
13408
13832
|
i0__namespace.ɵɵi18n(20, 14);
|
|
13409
13833
|
i0__namespace.ɵɵelementEnd();
|
|
13410
13834
|
i0__namespace.ɵɵelementEnd();
|
|
13411
|
-
i0__namespace.ɵɵ
|
|
13835
|
+
i0__namespace.ɵɵelementStart(21, "span", 15);
|
|
13836
|
+
i0__namespace.ɵɵtext(22);
|
|
13837
|
+
i0__namespace.ɵɵpipe(23, "currency");
|
|
13838
|
+
i0__namespace.ɵɵelementEnd();
|
|
13839
|
+
i0__namespace.ɵɵelementStart(24, "div", 16);
|
|
13840
|
+
i0__namespace.ɵɵelementStart(25, "span");
|
|
13841
|
+
i0__namespace.ɵɵi18n(26, 17);
|
|
13842
|
+
i0__namespace.ɵɵelementEnd();
|
|
13843
|
+
i0__namespace.ɵɵtext(27);
|
|
13844
|
+
i0__namespace.ɵɵpipe(28, "currency");
|
|
13845
|
+
i0__namespace.ɵɵelementStart(29, "span");
|
|
13846
|
+
i0__namespace.ɵɵi18n(30, 18);
|
|
13847
|
+
i0__namespace.ɵɵelementEnd();
|
|
13848
|
+
i0__namespace.ɵɵelementEnd();
|
|
13412
13849
|
i0__namespace.ɵɵelementEnd();
|
|
13413
|
-
i0__namespace.ɵɵelementStart(
|
|
13414
|
-
i0__namespace.ɵɵlistener("click", function
|
|
13415
|
-
i0__namespace.ɵɵtemplate(
|
|
13416
|
-
i0__namespace.ɵɵtemplate(
|
|
13850
|
+
i0__namespace.ɵɵelementStart(31, "button", 19);
|
|
13851
|
+
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_container_0_Template_button_click_31_listener($event) { i0__namespace.ɵɵrestoreView(_r7_1); var ctx_r9 = i0__namespace.ɵɵnextContext(); return ctx_r9.removeLine($event); });
|
|
13852
|
+
i0__namespace.ɵɵtemplate(32, BasketPreviewLineComponent_ng_container_0_img_32_Template, 1, 0, "img", 20);
|
|
13853
|
+
i0__namespace.ɵɵtemplate(33, BasketPreviewLineComponent_ng_container_0_ng_template_33_Template, 1, 0, "ng-template", null, 21, i0__namespace.ɵɵtemplateRefExtractor);
|
|
13417
13854
|
i0__namespace.ɵɵelementEnd();
|
|
13418
13855
|
i0__namespace.ɵɵelementEnd();
|
|
13419
|
-
i0__namespace.ɵɵelementStart(
|
|
13420
|
-
i0__namespace.ɵɵlistener("click", function
|
|
13421
|
-
i0__namespace.ɵɵelementStart(
|
|
13422
|
-
i0__namespace.ɵɵi18n(
|
|
13856
|
+
i0__namespace.ɵɵelementStart(35, "button", 22);
|
|
13857
|
+
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_container_0_Template_button_click_35_listener($event) { i0__namespace.ɵɵrestoreView(_r7_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.toggleRecipeDisplay($event); });
|
|
13858
|
+
i0__namespace.ɵɵelementStart(36, "span");
|
|
13859
|
+
i0__namespace.ɵɵi18n(37, 23);
|
|
13423
13860
|
i0__namespace.ɵɵelementEnd();
|
|
13424
|
-
i0__namespace.ɵɵelement(
|
|
13861
|
+
i0__namespace.ɵɵelement(38, "img", 24);
|
|
13425
13862
|
i0__namespace.ɵɵelementEnd();
|
|
13426
13863
|
i0__namespace.ɵɵelementEnd();
|
|
13427
13864
|
i0__namespace.ɵɵelementEnd();
|
|
13428
13865
|
i0__namespace.ɵɵelementContainerEnd();
|
|
13429
13866
|
}
|
|
13430
13867
|
if (rf & 2) {
|
|
13431
|
-
var _r4 = i0__namespace.ɵɵreference(
|
|
13868
|
+
var _r4 = i0__namespace.ɵɵreference(34);
|
|
13432
13869
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
13433
13870
|
i0__namespace.ɵɵadvance(1);
|
|
13434
13871
|
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r0.line.id);
|
|
@@ -13440,17 +13877,19 @@
|
|
|
13440
13877
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(15, 10, ctx_r0.line.title));
|
|
13441
13878
|
i0__namespace.ɵɵadvance(4);
|
|
13442
13879
|
i0__namespace.ɵɵtextInterpolate(ctx_r0.countProducts);
|
|
13443
|
-
i0__namespace.ɵɵadvance(
|
|
13444
|
-
i0__namespace.ɵɵ
|
|
13445
|
-
i0__namespace.ɵɵadvance(
|
|
13446
|
-
i0__namespace.ɵɵ
|
|
13880
|
+
i0__namespace.ɵɵadvance(4);
|
|
13881
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(23, 12, ctx_r0.line.price, ctx_r0.suppliersService.supplier$.value.currency));
|
|
13882
|
+
i0__namespace.ɵɵadvance(5);
|
|
13883
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(28, 15, +ctx_r0.line.price / +ctx_r0.line.count, ctx_r0.suppliersService.supplier$.value.currency));
|
|
13884
|
+
i0__namespace.ɵɵadvance(4);
|
|
13885
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(18, _c8$2, ctx_r0.disableRemove));
|
|
13447
13886
|
i0__namespace.ɵɵadvance(1);
|
|
13448
13887
|
i0__namespace.ɵɵproperty("ngIf", !ctx_r0.removing)("ngIfElse", _r4);
|
|
13449
13888
|
}
|
|
13450
13889
|
}
|
|
13451
13890
|
function BasketPreviewLineComponent_ng_template_1_button_3_ng_miam_icon_1_Template(rf, ctx) {
|
|
13452
13891
|
if (rf & 1) {
|
|
13453
|
-
i0__namespace.ɵɵelement(0, "ng-miam-icon",
|
|
13892
|
+
i0__namespace.ɵɵelement(0, "ng-miam-icon", 53);
|
|
13454
13893
|
}
|
|
13455
13894
|
if (rf & 2) {
|
|
13456
13895
|
var ctx_r26 = i0__namespace.ɵɵnextContext(3);
|
|
@@ -13459,32 +13898,32 @@
|
|
|
13459
13898
|
}
|
|
13460
13899
|
function BasketPreviewLineComponent_ng_template_1_button_3_ng_template_2_Template(rf, ctx) {
|
|
13461
13900
|
if (rf & 1) {
|
|
13462
|
-
i0__namespace.ɵɵelement(0, "div",
|
|
13901
|
+
i0__namespace.ɵɵelement(0, "div", 26);
|
|
13463
13902
|
}
|
|
13464
13903
|
}
|
|
13465
|
-
var
|
|
13904
|
+
var _c9$1 = function (a0, a1) { return { "disabled": a0, "loading": a1 }; };
|
|
13466
13905
|
function BasketPreviewLineComponent_ng_template_1_button_3_Template(rf, ctx) {
|
|
13467
13906
|
if (rf & 1) {
|
|
13468
13907
|
var _r30_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13469
|
-
i0__namespace.ɵɵelementStart(0, "button",
|
|
13908
|
+
i0__namespace.ɵɵelementStart(0, "button", 51);
|
|
13470
13909
|
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_template_1_button_3_Template_button_click_0_listener($event) { i0__namespace.ɵɵrestoreView(_r30_1); var ctx_r29 = i0__namespace.ɵɵnextContext(2); return ctx_r29.removeLine($event); });
|
|
13471
|
-
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_button_3_ng_miam_icon_1_Template, 1, 3, "ng-miam-icon",
|
|
13472
|
-
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_button_3_ng_template_2_Template, 1, 0, "ng-template", null,
|
|
13910
|
+
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_button_3_ng_miam_icon_1_Template, 1, 3, "ng-miam-icon", 52);
|
|
13911
|
+
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_button_3_ng_template_2_Template, 1, 0, "ng-template", null, 21, i0__namespace.ɵɵtemplateRefExtractor);
|
|
13473
13912
|
i0__namespace.ɵɵelementEnd();
|
|
13474
13913
|
}
|
|
13475
13914
|
if (rf & 2) {
|
|
13476
13915
|
var _r27 = i0__namespace.ɵɵreference(3);
|
|
13477
13916
|
var ctx_r11 = i0__namespace.ɵɵnextContext(2);
|
|
13478
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(3,
|
|
13917
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(3, _c9$1, ctx_r11.disableRemove, ctx_r11.removing));
|
|
13479
13918
|
i0__namespace.ɵɵadvance(1);
|
|
13480
13919
|
i0__namespace.ɵɵproperty("ngIf", !ctx_r11.removing)("ngIfElse", _r27);
|
|
13481
13920
|
}
|
|
13482
13921
|
}
|
|
13483
13922
|
function BasketPreviewLineComponent_ng_template_1_div_7_Template(rf, ctx) {
|
|
13484
13923
|
if (rf & 1) {
|
|
13485
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
13924
|
+
i0__namespace.ɵɵelementStart(0, "div", 54);
|
|
13486
13925
|
i0__namespace.ɵɵelementStart(1, "span");
|
|
13487
|
-
i0__namespace.ɵɵi18n(2,
|
|
13926
|
+
i0__namespace.ɵɵi18n(2, 55);
|
|
13488
13927
|
i0__namespace.ɵɵelementEnd();
|
|
13489
13928
|
i0__namespace.ɵɵelementEnd();
|
|
13490
13929
|
}
|
|
@@ -13503,7 +13942,7 @@
|
|
|
13503
13942
|
}
|
|
13504
13943
|
function BasketPreviewLineComponent_ng_template_1_div_14_span_1_Template(rf, ctx) {
|
|
13505
13944
|
if (rf & 1) {
|
|
13506
|
-
i0__namespace.ɵɵelementStart(0, "span",
|
|
13945
|
+
i0__namespace.ɵɵelementStart(0, "span", 58);
|
|
13507
13946
|
i0__namespace.ɵɵtext(1);
|
|
13508
13947
|
i0__namespace.ɵɵelementEnd();
|
|
13509
13948
|
}
|
|
@@ -13516,7 +13955,7 @@
|
|
|
13516
13955
|
function BasketPreviewLineComponent_ng_template_1_div_14_Template(rf, ctx) {
|
|
13517
13956
|
if (rf & 1) {
|
|
13518
13957
|
i0__namespace.ɵɵelementStart(0, "div");
|
|
13519
|
-
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_14_span_1_Template, 2, 1, "span",
|
|
13958
|
+
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_14_span_1_Template, 2, 1, "span", 56);
|
|
13520
13959
|
i0__namespace.ɵɵelementStart(2, "span");
|
|
13521
13960
|
i0__namespace.ɵɵtext(3);
|
|
13522
13961
|
i0__namespace.ɵɵpipe(4, "async");
|
|
@@ -13525,7 +13964,7 @@
|
|
|
13525
13964
|
i0__namespace.ɵɵtext(6, " /");
|
|
13526
13965
|
i0__namespace.ɵɵelementEnd();
|
|
13527
13966
|
i0__namespace.ɵɵelementStart(7, "span");
|
|
13528
|
-
i0__namespace.ɵɵi18n(8,
|
|
13967
|
+
i0__namespace.ɵɵi18n(8, 57);
|
|
13529
13968
|
i0__namespace.ɵɵelementEnd();
|
|
13530
13969
|
i0__namespace.ɵɵelementEnd();
|
|
13531
13970
|
}
|
|
@@ -13540,28 +13979,28 @@
|
|
|
13540
13979
|
function BasketPreviewLineComponent_ng_template_1_div_16_span_1_Template(rf, ctx) {
|
|
13541
13980
|
if (rf & 1) {
|
|
13542
13981
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
13543
|
-
i0__namespace.ɵɵi18n(1,
|
|
13982
|
+
i0__namespace.ɵɵi18n(1, 60);
|
|
13544
13983
|
i0__namespace.ɵɵelementEnd();
|
|
13545
13984
|
}
|
|
13546
13985
|
}
|
|
13547
13986
|
function BasketPreviewLineComponent_ng_template_1_div_16_span_2_Template(rf, ctx) {
|
|
13548
13987
|
if (rf & 1) {
|
|
13549
13988
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
13550
|
-
i0__namespace.ɵɵi18n(1,
|
|
13989
|
+
i0__namespace.ɵɵi18n(1, 61);
|
|
13551
13990
|
i0__namespace.ɵɵelementEnd();
|
|
13552
13991
|
}
|
|
13553
13992
|
}
|
|
13554
|
-
var
|
|
13993
|
+
var _c18$1 = function (a0) { return { "expanded": a0 }; };
|
|
13555
13994
|
function BasketPreviewLineComponent_ng_template_1_div_16_Template(rf, ctx) {
|
|
13556
13995
|
if (rf & 1) {
|
|
13557
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
13558
|
-
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_16_span_1_Template, 2, 0, "span",
|
|
13559
|
-
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_16_span_2_Template, 2, 0, "span",
|
|
13996
|
+
i0__namespace.ɵɵelementStart(0, "div", 59);
|
|
13997
|
+
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_16_span_1_Template, 2, 0, "span", 36);
|
|
13998
|
+
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_16_span_2_Template, 2, 0, "span", 36);
|
|
13560
13999
|
i0__namespace.ɵɵelementEnd();
|
|
13561
14000
|
}
|
|
13562
14001
|
if (rf & 2) {
|
|
13563
14002
|
var ctx_r15 = i0__namespace.ɵɵnextContext(2);
|
|
13564
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(3,
|
|
14003
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(3, _c18$1, ctx_r15.expanded));
|
|
13565
14004
|
i0__namespace.ɵɵadvance(1);
|
|
13566
14005
|
i0__namespace.ɵɵproperty("ngIf", ctx_r15.expanded);
|
|
13567
14006
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -13570,26 +14009,26 @@
|
|
|
13570
14009
|
}
|
|
13571
14010
|
function BasketPreviewLineComponent_ng_template_1_div_17_Template(rf, ctx) {
|
|
13572
14011
|
if (rf & 1) {
|
|
13573
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
13574
|
-
i0__namespace.ɵɵi18n(1,
|
|
14012
|
+
i0__namespace.ɵɵelementStart(0, "div", 62);
|
|
14013
|
+
i0__namespace.ɵɵi18n(1, 63);
|
|
13575
14014
|
i0__namespace.ɵɵelementEnd();
|
|
13576
14015
|
}
|
|
13577
14016
|
}
|
|
13578
|
-
var
|
|
14017
|
+
var _c23$1 = function (a0) { return { "disable": a0 }; };
|
|
13579
14018
|
function BasketPreviewLineComponent_ng_template_1_div_18_Template(rf, ctx) {
|
|
13580
14019
|
if (rf & 1) {
|
|
13581
14020
|
var _r36_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13582
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
14021
|
+
i0__namespace.ɵɵelementStart(0, "div", 64);
|
|
13583
14022
|
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_template_1_div_18_Template_div_click_0_listener() { i0__namespace.ɵɵrestoreView(_r36_1); var ctx_r35 = i0__namespace.ɵɵnextContext(2); return ctx_r35.changeProduct(ctx_r35.line); });
|
|
13584
|
-
i0__namespace.ɵɵelementStart(1, "a",
|
|
13585
|
-
i0__namespace.ɵɵi18n(2,
|
|
14023
|
+
i0__namespace.ɵɵelementStart(1, "a", 65);
|
|
14024
|
+
i0__namespace.ɵɵi18n(2, 66);
|
|
13586
14025
|
i0__namespace.ɵɵelementEnd();
|
|
13587
14026
|
i0__namespace.ɵɵelementEnd();
|
|
13588
14027
|
}
|
|
13589
14028
|
if (rf & 2) {
|
|
13590
14029
|
var ctx_r17 = i0__namespace.ɵɵnextContext(2);
|
|
13591
14030
|
i0__namespace.ɵɵadvance(1);
|
|
13592
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(1,
|
|
14031
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(1, _c23$1, ctx_r17.disableItemSelector));
|
|
13593
14032
|
}
|
|
13594
14033
|
}
|
|
13595
14034
|
function BasketPreviewLineComponent_ng_template_1_div_19_span_2_Template(rf, ctx) {
|
|
@@ -13606,9 +14045,9 @@
|
|
|
13606
14045
|
}
|
|
13607
14046
|
function BasketPreviewLineComponent_ng_template_1_div_19_Template(rf, ctx) {
|
|
13608
14047
|
if (rf & 1) {
|
|
13609
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
13610
|
-
i0__namespace.ɵɵelementStart(1, "div",
|
|
13611
|
-
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_19_span_2_Template, 2, 1, "span",
|
|
14048
|
+
i0__namespace.ɵɵelementStart(0, "div", 67);
|
|
14049
|
+
i0__namespace.ɵɵelementStart(1, "div", 68);
|
|
14050
|
+
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_19_span_2_Template, 2, 1, "span", 69);
|
|
13612
14051
|
i0__namespace.ɵɵelementEnd();
|
|
13613
14052
|
i0__namespace.ɵɵelementEnd();
|
|
13614
14053
|
}
|
|
@@ -13620,7 +14059,7 @@
|
|
|
13620
14059
|
}
|
|
13621
14060
|
function BasketPreviewLineComponent_ng_template_1_div_21_Template(rf, ctx) {
|
|
13622
14061
|
if (rf & 1) {
|
|
13623
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
14062
|
+
i0__namespace.ɵɵelementStart(0, "div", 70);
|
|
13624
14063
|
i0__namespace.ɵɵelementStart(1, "span");
|
|
13625
14064
|
i0__namespace.ɵɵtext(2);
|
|
13626
14065
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -13645,7 +14084,7 @@
|
|
|
13645
14084
|
}
|
|
13646
14085
|
function BasketPreviewLineComponent_ng_template_1_ng_template_22_Template(rf, ctx) {
|
|
13647
14086
|
if (rf & 1) {
|
|
13648
|
-
i0__namespace.ɵɵelement(0, "ng-miam-recipe-pricing",
|
|
14087
|
+
i0__namespace.ɵɵelement(0, "ng-miam-recipe-pricing", 71);
|
|
13649
14088
|
}
|
|
13650
14089
|
if (rf & 2) {
|
|
13651
14090
|
var ctx_r21 = i0__namespace.ɵɵnextContext(2);
|
|
@@ -13654,30 +14093,30 @@
|
|
|
13654
14093
|
}
|
|
13655
14094
|
function BasketPreviewLineComponent_ng_template_1_div_25_Template(rf, ctx) {
|
|
13656
14095
|
if (rf & 1) {
|
|
13657
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
13658
|
-
i0__namespace.ɵɵi18n(1,
|
|
14096
|
+
i0__namespace.ɵɵelementStart(0, "div", 72);
|
|
14097
|
+
i0__namespace.ɵɵi18n(1, 73);
|
|
13659
14098
|
i0__namespace.ɵɵelementEnd();
|
|
13660
14099
|
}
|
|
13661
14100
|
}
|
|
13662
14101
|
function BasketPreviewLineComponent_ng_template_1_div_27_span_1_Template(rf, ctx) {
|
|
13663
14102
|
if (rf & 1) {
|
|
13664
14103
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
13665
|
-
i0__namespace.ɵɵi18n(1,
|
|
14104
|
+
i0__namespace.ɵɵi18n(1, 75);
|
|
13666
14105
|
i0__namespace.ɵɵelementEnd();
|
|
13667
14106
|
}
|
|
13668
14107
|
}
|
|
13669
14108
|
function BasketPreviewLineComponent_ng_template_1_div_27_span_2_Template(rf, ctx) {
|
|
13670
14109
|
if (rf & 1) {
|
|
13671
14110
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
13672
|
-
i0__namespace.ɵɵi18n(1,
|
|
14111
|
+
i0__namespace.ɵɵi18n(1, 76);
|
|
13673
14112
|
i0__namespace.ɵɵelementEnd();
|
|
13674
14113
|
}
|
|
13675
14114
|
}
|
|
13676
14115
|
function BasketPreviewLineComponent_ng_template_1_div_27_Template(rf, ctx) {
|
|
13677
14116
|
if (rf & 1) {
|
|
13678
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
13679
|
-
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_27_span_1_Template, 2, 0, "span",
|
|
13680
|
-
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_27_span_2_Template, 2, 0, "span",
|
|
14117
|
+
i0__namespace.ɵɵelementStart(0, "div", 74);
|
|
14118
|
+
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_27_span_1_Template, 2, 0, "span", 36);
|
|
14119
|
+
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_27_span_2_Template, 2, 0, "span", 36);
|
|
13681
14120
|
i0__namespace.ɵɵelementEnd();
|
|
13682
14121
|
}
|
|
13683
14122
|
if (rf & 2) {
|
|
@@ -13691,10 +14130,10 @@
|
|
|
13691
14130
|
function BasketPreviewLineComponent_ng_template_1_div_28_Template(rf, ctx) {
|
|
13692
14131
|
if (rf & 1) {
|
|
13693
14132
|
var _r42_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13694
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
13695
|
-
i0__namespace.ɵɵelementStart(1, "button",
|
|
14133
|
+
i0__namespace.ɵɵelementStart(0, "div", 77);
|
|
14134
|
+
i0__namespace.ɵɵelementStart(1, "button", 78);
|
|
13696
14135
|
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_template_1_div_28_Template_button_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r42_1); var ctx_r41 = i0__namespace.ɵɵnextContext(2); return ctx_r41.toggleRecipeDisplay($event, true); });
|
|
13697
|
-
i0__namespace.ɵɵelement(2, "ng-miam-icon",
|
|
14136
|
+
i0__namespace.ɵɵelement(2, "ng-miam-icon", 79);
|
|
13698
14137
|
i0__namespace.ɵɵelementEnd();
|
|
13699
14138
|
i0__namespace.ɵɵelementEnd();
|
|
13700
14139
|
}
|
|
@@ -13707,7 +14146,7 @@
|
|
|
13707
14146
|
function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_line_1_Template(rf, ctx) {
|
|
13708
14147
|
if (rf & 1) {
|
|
13709
14148
|
var _r52_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13710
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-basket-preview-line",
|
|
14149
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-basket-preview-line", 86);
|
|
13711
14150
|
i0__namespace.ɵɵlistener("removed", function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_line_1_Template_ng_miam_basket_preview_line_removed_0_listener($event) { i0__namespace.ɵɵrestoreView(_r52_1); var ctx_r51 = i0__namespace.ɵɵnextContext(4); return ctx_r51.deleteEntry($event.record); })("replaceItem", function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_line_1_Template_ng_miam_basket_preview_line_replaceItem_0_listener() { i0__namespace.ɵɵrestoreView(_r52_1); var ctx_r53 = i0__namespace.ɵɵnextContext(4); return ctx_r53.replaceItem.emit(ctx_r53.line); });
|
|
13712
14151
|
i0__namespace.ɵɵelementEnd();
|
|
13713
14152
|
}
|
|
@@ -13719,7 +14158,7 @@
|
|
|
13719
14158
|
}
|
|
13720
14159
|
function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_3_Template(rf, ctx) {
|
|
13721
14160
|
if (rf & 1) {
|
|
13722
|
-
i0__namespace.ɵɵelement(0, "ng-miam-basket-preview-disabled",
|
|
14161
|
+
i0__namespace.ɵɵelement(0, "ng-miam-basket-preview-disabled", 87);
|
|
13723
14162
|
}
|
|
13724
14163
|
if (rf & 2) {
|
|
13725
14164
|
var ctx_r47 = i0__namespace.ɵɵnextContext(4);
|
|
@@ -13729,7 +14168,7 @@
|
|
|
13729
14168
|
function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_4_Template(rf, ctx) {
|
|
13730
14169
|
if (rf & 1) {
|
|
13731
14170
|
var _r55_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13732
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-basket-preview-disabled",
|
|
14171
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-basket-preview-disabled", 88);
|
|
13733
14172
|
i0__namespace.ɵɵlistener("entryAdded", function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_4_Template_ng_miam_basket_preview_disabled_entryAdded_0_listener($event) { i0__namespace.ɵɵrestoreView(_r55_1); var ctx_r54 = i0__namespace.ɵɵnextContext(4); return ctx_r54.addEntry($event); });
|
|
13734
14173
|
i0__namespace.ɵɵelementEnd();
|
|
13735
14174
|
}
|
|
@@ -13741,7 +14180,7 @@
|
|
|
13741
14180
|
function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_5_Template(rf, ctx) {
|
|
13742
14181
|
if (rf & 1) {
|
|
13743
14182
|
var _r57_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13744
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-basket-preview-disabled",
|
|
14183
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-basket-preview-disabled", 89);
|
|
13745
14184
|
i0__namespace.ɵɵlistener("entryAdded", function BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_5_Template_ng_miam_basket_preview_disabled_entryAdded_0_listener($event) { i0__namespace.ɵɵrestoreView(_r57_1); var ctx_r56 = i0__namespace.ɵɵnextContext(4); return ctx_r56.addEntry($event); });
|
|
13746
14185
|
i0__namespace.ɵɵelementEnd();
|
|
13747
14186
|
}
|
|
@@ -13753,11 +14192,11 @@
|
|
|
13753
14192
|
function BasketPreviewLineComponent_ng_template_1_div_29_div_1_Template(rf, ctx) {
|
|
13754
14193
|
if (rf & 1) {
|
|
13755
14194
|
i0__namespace.ɵɵelementStart(0, "div");
|
|
13756
|
-
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_line_1_Template, 1, 6, "ng-miam-basket-preview-line",
|
|
14195
|
+
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_line_1_Template, 1, 6, "ng-miam-basket-preview-line", 82);
|
|
13757
14196
|
i0__namespace.ɵɵpipe(2, "async");
|
|
13758
|
-
i0__namespace.ɵɵtemplate(3, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_3_Template, 1, 2, "ng-miam-basket-preview-disabled",
|
|
13759
|
-
i0__namespace.ɵɵtemplate(4, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_4_Template, 1, 2, "ng-miam-basket-preview-disabled",
|
|
13760
|
-
i0__namespace.ɵɵtemplate(5, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_5_Template, 1, 3, "ng-miam-basket-preview-disabled",
|
|
14197
|
+
i0__namespace.ɵɵtemplate(3, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_3_Template, 1, 2, "ng-miam-basket-preview-disabled", 83);
|
|
14198
|
+
i0__namespace.ɵɵtemplate(4, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_4_Template, 1, 2, "ng-miam-basket-preview-disabled", 84);
|
|
14199
|
+
i0__namespace.ɵɵtemplate(5, BasketPreviewLineComponent_ng_template_1_div_29_div_1_ng_miam_basket_preview_disabled_5_Template, 1, 3, "ng-miam-basket-preview-disabled", 85);
|
|
13761
14200
|
i0__namespace.ɵɵelementEnd();
|
|
13762
14201
|
}
|
|
13763
14202
|
if (rf & 2) {
|
|
@@ -13774,19 +14213,19 @@
|
|
|
13774
14213
|
}
|
|
13775
14214
|
function BasketPreviewLineComponent_ng_template_1_div_29_ng_template_2_Template(rf, ctx) {
|
|
13776
14215
|
if (rf & 1) {
|
|
13777
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
14216
|
+
i0__namespace.ɵɵelementStart(0, "div", 90);
|
|
13778
14217
|
i0__namespace.ɵɵelement(1, "ng-miam-loader");
|
|
13779
14218
|
i0__namespace.ɵɵelementStart(2, "div");
|
|
13780
|
-
i0__namespace.ɵɵi18n(3,
|
|
14219
|
+
i0__namespace.ɵɵi18n(3, 91);
|
|
13781
14220
|
i0__namespace.ɵɵelementEnd();
|
|
13782
14221
|
i0__namespace.ɵɵelementEnd();
|
|
13783
14222
|
}
|
|
13784
14223
|
}
|
|
13785
14224
|
function BasketPreviewLineComponent_ng_template_1_div_29_Template(rf, ctx) {
|
|
13786
14225
|
if (rf & 1) {
|
|
13787
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
14226
|
+
i0__namespace.ɵɵelementStart(0, "div", 80);
|
|
13788
14227
|
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_div_29_div_1_Template, 6, 6, "div", 0);
|
|
13789
|
-
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_29_ng_template_2_Template, 4, 0, "ng-template", null,
|
|
14228
|
+
i0__namespace.ɵɵtemplate(2, BasketPreviewLineComponent_ng_template_1_div_29_ng_template_2_Template, 4, 0, "ng-template", null, 81, i0__namespace.ɵɵtemplateRefExtractor);
|
|
13790
14229
|
i0__namespace.ɵɵelementEnd();
|
|
13791
14230
|
}
|
|
13792
14231
|
if (rf & 2) {
|
|
@@ -13796,69 +14235,69 @@
|
|
|
13796
14235
|
i0__namespace.ɵɵproperty("ngIf", !ctx_r25.loading)("ngIfElse", _r44);
|
|
13797
14236
|
}
|
|
13798
14237
|
}
|
|
13799
|
-
var
|
|
13800
|
-
var
|
|
14238
|
+
var _c32 = function (a0, a1, a2) { return { clickable: a0, expanded: a1, elevate: a2 }; };
|
|
14239
|
+
var _c33 = function (a0) { return { "with-inline-tag": a0 }; };
|
|
13801
14240
|
function BasketPreviewLineComponent_ng_template_1_Template(rf, ctx) {
|
|
13802
14241
|
if (rf & 1) {
|
|
13803
14242
|
var _r59_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13804
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
14243
|
+
i0__namespace.ɵɵelementStart(0, "div", 27);
|
|
13805
14244
|
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_template_1_Template_div_click_0_listener($event) { i0__namespace.ɵɵrestoreView(_r59_1); var ctx_r58 = i0__namespace.ɵɵnextContext(); return ctx_r58.line.displayMode ? ctx_r58.toggleRecipeDisplay($event) : ctx_r58.toggleExpanded($event); });
|
|
13806
|
-
i0__namespace.ɵɵelementStart(1, "div",
|
|
13807
|
-
i0__namespace.ɵɵelementStart(2, "div",
|
|
13808
|
-
i0__namespace.ɵɵtemplate(3, BasketPreviewLineComponent_ng_template_1_button_3_Template, 4, 6, "button",
|
|
13809
|
-
i0__namespace.ɵɵelementStart(4, "div",
|
|
14245
|
+
i0__namespace.ɵɵelementStart(1, "div", 28);
|
|
14246
|
+
i0__namespace.ɵɵelementStart(2, "div", 29);
|
|
14247
|
+
i0__namespace.ɵɵtemplate(3, BasketPreviewLineComponent_ng_template_1_button_3_Template, 4, 6, "button", 30);
|
|
14248
|
+
i0__namespace.ɵɵelementStart(4, "div", 31);
|
|
13810
14249
|
i0__namespace.ɵɵelementStart(5, "img", 5);
|
|
13811
14250
|
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_template_1_Template_img_click_5_listener($event) { i0__namespace.ɵɵrestoreView(_r59_1); var ctx_r60 = i0__namespace.ɵɵnextContext(); return ctx_r60.toggleRecipeDisplay($event); });
|
|
13812
14251
|
i0__namespace.ɵɵelementEnd();
|
|
13813
14252
|
i0__namespace.ɵɵelementEnd();
|
|
13814
|
-
i0__namespace.ɵɵelementStart(6, "div",
|
|
13815
|
-
i0__namespace.ɵɵtemplate(7, BasketPreviewLineComponent_ng_template_1_div_7_Template, 3, 0, "div",
|
|
13816
|
-
i0__namespace.ɵɵelementStart(8, "div",
|
|
14253
|
+
i0__namespace.ɵɵelementStart(6, "div", 32);
|
|
14254
|
+
i0__namespace.ɵɵtemplate(7, BasketPreviewLineComponent_ng_template_1_div_7_Template, 3, 0, "div", 33);
|
|
14255
|
+
i0__namespace.ɵɵelementStart(8, "div", 34);
|
|
13817
14256
|
i0__namespace.ɵɵlistener("click", function BasketPreviewLineComponent_ng_template_1_Template_div_click_8_listener($event) { i0__namespace.ɵɵrestoreView(_r59_1); var ctx_r61 = i0__namespace.ɵɵnextContext(); return ctx_r61.toggleRecipeDisplay($event); });
|
|
13818
14257
|
i0__namespace.ɵɵelementStart(9, "strong");
|
|
13819
14258
|
i0__namespace.ɵɵtext(10);
|
|
13820
14259
|
i0__namespace.ɵɵpipe(11, "capitalizeFirstLetter");
|
|
13821
14260
|
i0__namespace.ɵɵelementEnd();
|
|
13822
14261
|
i0__namespace.ɵɵelementEnd();
|
|
13823
|
-
i0__namespace.ɵɵelementStart(12, "div",
|
|
13824
|
-
i0__namespace.ɵɵtemplate(13, BasketPreviewLineComponent_ng_template_1_div_13_Template, 2, 1, "div",
|
|
13825
|
-
i0__namespace.ɵɵtemplate(14, BasketPreviewLineComponent_ng_template_1_div_14_Template, 9, 4, "div",
|
|
14262
|
+
i0__namespace.ɵɵelementStart(12, "div", 35);
|
|
14263
|
+
i0__namespace.ɵɵtemplate(13, BasketPreviewLineComponent_ng_template_1_div_13_Template, 2, 1, "div", 36);
|
|
14264
|
+
i0__namespace.ɵɵtemplate(14, BasketPreviewLineComponent_ng_template_1_div_14_Template, 9, 4, "div", 36);
|
|
13826
14265
|
i0__namespace.ɵɵelementEnd();
|
|
13827
|
-
i0__namespace.ɵɵelementStart(15, "div",
|
|
13828
|
-
i0__namespace.ɵɵtemplate(16, BasketPreviewLineComponent_ng_template_1_div_16_Template, 3, 5, "div",
|
|
13829
|
-
i0__namespace.ɵɵtemplate(17, BasketPreviewLineComponent_ng_template_1_div_17_Template, 2, 0, "div",
|
|
13830
|
-
i0__namespace.ɵɵtemplate(18, BasketPreviewLineComponent_ng_template_1_div_18_Template, 3, 3, "div",
|
|
13831
|
-
i0__namespace.ɵɵtemplate(19, BasketPreviewLineComponent_ng_template_1_div_19_Template, 3, 1, "div",
|
|
14266
|
+
i0__namespace.ɵɵelementStart(15, "div", 37);
|
|
14267
|
+
i0__namespace.ɵɵtemplate(16, BasketPreviewLineComponent_ng_template_1_div_16_Template, 3, 5, "div", 38);
|
|
14268
|
+
i0__namespace.ɵɵtemplate(17, BasketPreviewLineComponent_ng_template_1_div_17_Template, 2, 0, "div", 39);
|
|
14269
|
+
i0__namespace.ɵɵtemplate(18, BasketPreviewLineComponent_ng_template_1_div_18_Template, 3, 3, "div", 40);
|
|
14270
|
+
i0__namespace.ɵɵtemplate(19, BasketPreviewLineComponent_ng_template_1_div_19_Template, 3, 1, "div", 41);
|
|
13832
14271
|
i0__namespace.ɵɵelementEnd();
|
|
13833
14272
|
i0__namespace.ɵɵelementEnd();
|
|
13834
14273
|
i0__namespace.ɵɵelementEnd();
|
|
13835
|
-
i0__namespace.ɵɵelementStart(20, "div",
|
|
13836
|
-
i0__namespace.ɵɵtemplate(21, BasketPreviewLineComponent_ng_template_1_div_21_Template, 8, 5, "div",
|
|
13837
|
-
i0__namespace.ɵɵtemplate(22, BasketPreviewLineComponent_ng_template_1_ng_template_22_Template, 1, 2, "ng-template", null,
|
|
13838
|
-
i0__namespace.ɵɵelementStart(24, "div",
|
|
13839
|
-
i0__namespace.ɵɵtemplate(25, BasketPreviewLineComponent_ng_template_1_div_25_Template, 2, 0, "div",
|
|
13840
|
-
i0__namespace.ɵɵelementStart(26, "ng-miam-counter-input",
|
|
14274
|
+
i0__namespace.ɵɵelementStart(20, "div", 42);
|
|
14275
|
+
i0__namespace.ɵɵtemplate(21, BasketPreviewLineComponent_ng_template_1_div_21_Template, 8, 5, "div", 43);
|
|
14276
|
+
i0__namespace.ɵɵtemplate(22, BasketPreviewLineComponent_ng_template_1_ng_template_22_Template, 1, 2, "ng-template", null, 44, i0__namespace.ɵɵtemplateRefExtractor);
|
|
14277
|
+
i0__namespace.ɵɵelementStart(24, "div", 45);
|
|
14278
|
+
i0__namespace.ɵɵtemplate(25, BasketPreviewLineComponent_ng_template_1_div_25_Template, 2, 0, "div", 46);
|
|
14279
|
+
i0__namespace.ɵɵelementStart(26, "ng-miam-counter-input", 47);
|
|
13841
14280
|
i0__namespace.ɵɵlistener("valueChange", function BasketPreviewLineComponent_ng_template_1_Template_ng_miam_counter_input_valueChange_26_listener($event) { i0__namespace.ɵɵrestoreView(_r59_1); var ctx_r62 = i0__namespace.ɵɵnextContext(); return ctx_r62.changeCount($event); });
|
|
13842
14281
|
i0__namespace.ɵɵelementEnd();
|
|
13843
|
-
i0__namespace.ɵɵtemplate(27, BasketPreviewLineComponent_ng_template_1_div_27_Template, 3, 2, "div",
|
|
14282
|
+
i0__namespace.ɵɵtemplate(27, BasketPreviewLineComponent_ng_template_1_div_27_Template, 3, 2, "div", 48);
|
|
13844
14283
|
i0__namespace.ɵɵelementEnd();
|
|
13845
|
-
i0__namespace.ɵɵtemplate(28, BasketPreviewLineComponent_ng_template_1_div_28_Template, 3, 3, "div",
|
|
14284
|
+
i0__namespace.ɵɵtemplate(28, BasketPreviewLineComponent_ng_template_1_div_28_Template, 3, 3, "div", 49);
|
|
13846
14285
|
i0__namespace.ɵɵelementEnd();
|
|
13847
14286
|
i0__namespace.ɵɵelementEnd();
|
|
13848
14287
|
i0__namespace.ɵɵelementEnd();
|
|
13849
|
-
i0__namespace.ɵɵtemplate(29, BasketPreviewLineComponent_ng_template_1_div_29_Template, 4, 2, "div",
|
|
14288
|
+
i0__namespace.ɵɵtemplate(29, BasketPreviewLineComponent_ng_template_1_div_29_Template, 4, 2, "div", 50);
|
|
13850
14289
|
}
|
|
13851
14290
|
if (rf & 2) {
|
|
13852
14291
|
var _r20 = i0__namespace.ɵɵreference(23);
|
|
13853
14292
|
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
13854
14293
|
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r2.line.id);
|
|
13855
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction3(24,
|
|
14294
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction3(24, _c32, ctx_r2.line.hasEntries() || ctx_r2.line.displayMode, ctx_r2.expanded, ctx_r2.selectItem));
|
|
13856
14295
|
i0__namespace.ɵɵadvance(3);
|
|
13857
14296
|
i0__namespace.ɵɵproperty("ngIf", !ctx_r2.uniqueLine && !ctx_r2.line.displayMode);
|
|
13858
14297
|
i0__namespace.ɵɵadvance(2);
|
|
13859
14298
|
i0__namespace.ɵɵproperty("src", ctx_r2.line.picture, i0__namespace.ɵɵsanitizeUrl);
|
|
13860
14299
|
i0__namespace.ɵɵadvance(1);
|
|
13861
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(28,
|
|
14300
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(28, _c33, ctx_r2.line.inlineTag));
|
|
13862
14301
|
i0__namespace.ɵɵadvance(1);
|
|
13863
14302
|
i0__namespace.ɵɵproperty("ngIf", ctx_r2.sponsorised);
|
|
13864
14303
|
i0__namespace.ɵɵadvance(3);
|
|
@@ -13891,7 +14330,7 @@
|
|
|
13891
14330
|
}
|
|
13892
14331
|
var BasketPreviewLineComponent = /** @class */ (function (_super) {
|
|
13893
14332
|
__extends(BasketPreviewLineComponent, _super);
|
|
13894
|
-
function BasketPreviewLineComponent(cdr, recipesService, basketsService, analyticsService, posService, userService, contextService, elementRef, supplierService) {
|
|
14333
|
+
function BasketPreviewLineComponent(cdr, recipesService, basketsService, analyticsService, posService, userService, contextService, suppliersService, elementRef, supplierService) {
|
|
13895
14334
|
var _this = _super.call(this, analyticsService) || this;
|
|
13896
14335
|
_this.cdr = cdr;
|
|
13897
14336
|
_this.recipesService = recipesService;
|
|
@@ -13900,6 +14339,7 @@
|
|
|
13900
14339
|
_this.posService = posService;
|
|
13901
14340
|
_this.userService = userService;
|
|
13902
14341
|
_this.contextService = contextService;
|
|
14342
|
+
_this.suppliersService = suppliersService;
|
|
13903
14343
|
_this.elementRef = elementRef;
|
|
13904
14344
|
_this.supplierService = supplierService;
|
|
13905
14345
|
_this.displayTotalPricing = true;
|
|
@@ -13956,7 +14396,7 @@
|
|
|
13956
14396
|
fields: { recipe: ['number-of-guests'], ingredients: ['name', 'quantity', 'unit'] }
|
|
13957
14397
|
}).pipe(operators.switchMap(function (recipe) {
|
|
13958
14398
|
_this.legacyRecipe = recipe;
|
|
13959
|
-
var requests = recipe.relationships.ingredients.data.map(function (ing) { return _this.basketsService.basketEntryFromIngredient(ing.id).pipe(operators.tap(function (entry) {
|
|
14399
|
+
var requests = recipe.relationships.ingredients.data.map(function (ing) { return _this.basketsService.basketEntryFromIngredient(ing.id, _this.line.count).pipe(operators.tap(function (entry) {
|
|
13960
14400
|
if (_this.legacyIngredientsEntries === undefined) {
|
|
13961
14401
|
_this.legacyIngredientsEntries = [];
|
|
13962
14402
|
}
|
|
@@ -14167,7 +14607,7 @@
|
|
|
14167
14607
|
};
|
|
14168
14608
|
return BasketPreviewLineComponent;
|
|
14169
14609
|
}(EventTracerComponent));
|
|
14170
|
-
BasketPreviewLineComponent.ɵfac = function BasketPreviewLineComponent_Factory(t) { return new (t || BasketPreviewLineComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(PointOfSalesService), i0__namespace.ɵɵdirectiveInject(UserService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(SuppliersService)); };
|
|
14610
|
+
BasketPreviewLineComponent.ɵfac = function BasketPreviewLineComponent_Factory(t) { return new (t || BasketPreviewLineComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(PointOfSalesService), i0__namespace.ɵɵdirectiveInject(UserService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(SuppliersService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(SuppliersService)); };
|
|
14171
14611
|
BasketPreviewLineComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BasketPreviewLineComponent, selectors: [["ng-miam-basket-preview-line"]], inputs: { line: "line", uniqueLine: "uniqueLine", blockStates: "blockStates", displayTotalPricing: "displayTotalPricing", recipesAlwaysExpanded: "recipesAlwaysExpanded", itemsAlwaysExpanded: "itemsAlwaysExpanded", displayItemsUnitaryPrice: "displayItemsUnitaryPrice", sponsorised: "sponsorised", legacyMode: "legacyMode" }, outputs: { removed: "removed", countChanged: "countChanged", replaceItem: "replaceItem", showRecipe: "showRecipe" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: function () {
|
|
14172
14612
|
var i18n_0;
|
|
14173
14613
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -14179,103 +14619,119 @@
|
|
|
14179
14619
|
}
|
|
14180
14620
|
var i18n_2;
|
|
14181
14621
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14182
|
-
var
|
|
14183
|
-
i18n_2 =
|
|
14622
|
+
var MSG_EXTERNAL_2861269811387022272$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS__3 = goog.getMsg("soit ");
|
|
14623
|
+
i18n_2 = MSG_EXTERNAL_2861269811387022272$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS__3;
|
|
14184
14624
|
}
|
|
14185
14625
|
else {
|
|
14186
|
-
i18n_2 = $localize(templateObject_2$q || (templateObject_2$q = __makeTemplateObject([":\
|
|
14626
|
+
i18n_2 = $localize(templateObject_2$q || (templateObject_2$q = __makeTemplateObject([":\u241F2706048545fce399fb75b672add0eb745e09ada5\u241F2861269811387022272:soit "], [":\u241F2706048545fce399fb75b672add0eb745e09ada5\u241F2861269811387022272:soit "])));
|
|
14187
14627
|
}
|
|
14188
|
-
var
|
|
14628
|
+
var i18n_4;
|
|
14189
14629
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14190
|
-
var
|
|
14191
|
-
|
|
14630
|
+
var MSG_EXTERNAL_795612159703082771$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS__5 = goog.getMsg("/pers");
|
|
14631
|
+
i18n_4 = MSG_EXTERNAL_795612159703082771$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS__5;
|
|
14192
14632
|
}
|
|
14193
14633
|
else {
|
|
14194
|
-
|
|
14634
|
+
i18n_4 = $localize(templateObject_3$j || (templateObject_3$j = __makeTemplateObject([":\u241F1c70617413b748533642488f2e142c2f06296f8f\u241F795612159703082771:/pers"], [":\u241F1c70617413b748533642488f2e142c2f06296f8f\u241F795612159703082771:/pers"])));
|
|
14195
14635
|
}
|
|
14196
|
-
var
|
|
14636
|
+
var i18n_6;
|
|
14197
14637
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14198
|
-
var
|
|
14199
|
-
|
|
14638
|
+
var MSG_EXTERNAL_6749102764655247912$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS__7 = goog.getMsg("Voir les produits");
|
|
14639
|
+
i18n_6 = MSG_EXTERNAL_6749102764655247912$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS__7;
|
|
14200
14640
|
}
|
|
14201
14641
|
else {
|
|
14202
|
-
|
|
14642
|
+
i18n_6 = $localize(templateObject_4$g || (templateObject_4$g = __makeTemplateObject([":\u241Fd68184b8cb73679ad3ecea9935d57f739bea4871\u241F6749102764655247912:Voir les produits"], [":\u241Fd68184b8cb73679ad3ecea9935d57f739bea4871\u241F6749102764655247912:Voir les produits"])));
|
|
14203
14643
|
}
|
|
14204
14644
|
var i18n_10;
|
|
14205
14645
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14206
|
-
var
|
|
14207
|
-
i18n_10 =
|
|
14646
|
+
var MSG_EXTERNAL_8545968125113919212$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___11 = goog.getMsg("Sponsoris\u00E9");
|
|
14647
|
+
i18n_10 = MSG_EXTERNAL_8545968125113919212$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___11;
|
|
14208
14648
|
}
|
|
14209
14649
|
else {
|
|
14210
|
-
i18n_10 = $localize(templateObject_5$
|
|
14650
|
+
i18n_10 = $localize(templateObject_5$c || (templateObject_5$c = __makeTemplateObject([":\u241F5eb3efea30c37fe427894692cd5e01d298767657\u241F8545968125113919212:Sponsoris\u00E9"], [":\u241F5eb3efea30c37fe427894692cd5e01d298767657\u241F8545968125113919212:Sponsoris\u00E9"])));
|
|
14211
14651
|
}
|
|
14212
14652
|
var i18n_12;
|
|
14213
14653
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14214
|
-
var
|
|
14215
|
-
i18n_12 =
|
|
14654
|
+
var MSG_EXTERNAL_943969525955903510$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___13 = goog.getMsg(" personne ");
|
|
14655
|
+
i18n_12 = MSG_EXTERNAL_943969525955903510$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___13;
|
|
14216
14656
|
}
|
|
14217
14657
|
else {
|
|
14218
|
-
i18n_12 = $localize(templateObject_6$a || (templateObject_6$a = __makeTemplateObject([":\
|
|
14658
|
+
i18n_12 = $localize(templateObject_6$a || (templateObject_6$a = __makeTemplateObject([":\u241F464df96417b29e18e7c92bd6bbe85ec8ae81101a\u241F943969525955903510: personne "], [":\u241F464df96417b29e18e7c92bd6bbe85ec8ae81101a\u241F943969525955903510: personne "])));
|
|
14219
14659
|
}
|
|
14220
|
-
var
|
|
14660
|
+
var i18n_14;
|
|
14221
14661
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14222
|
-
var
|
|
14223
|
-
|
|
14662
|
+
var MSG_EXTERNAL_7216398619205393425$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____15 = goog.getMsg("Masquer le d\u00E9tail");
|
|
14663
|
+
i18n_14 = MSG_EXTERNAL_7216398619205393425$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____15;
|
|
14224
14664
|
}
|
|
14225
14665
|
else {
|
|
14226
|
-
|
|
14666
|
+
i18n_14 = $localize(templateObject_7$7 || (templateObject_7$7 = __makeTemplateObject([":\u241F4785d2ed6aa646690f46eb4fe02a1916a39cdbb8\u241F7216398619205393425:Masquer le d\u00E9tail"], [":\u241F4785d2ed6aa646690f46eb4fe02a1916a39cdbb8\u241F7216398619205393425:Masquer le d\u00E9tail"])));
|
|
14227
14667
|
}
|
|
14228
|
-
var
|
|
14668
|
+
var i18n_16;
|
|
14229
14669
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14230
|
-
var
|
|
14231
|
-
|
|
14670
|
+
var MSG_EXTERNAL_1356308905753232069$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____17 = goog.getMsg("Voir le d\u00E9tail");
|
|
14671
|
+
i18n_16 = MSG_EXTERNAL_1356308905753232069$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____17;
|
|
14232
14672
|
}
|
|
14233
14673
|
else {
|
|
14234
|
-
|
|
14674
|
+
i18n_16 = $localize(templateObject_8$5 || (templateObject_8$5 = __makeTemplateObject([":\u241F1afb0c360aa8eb58699c70b4f81b79db9b304633\u241F1356308905753232069:Voir le d\u00E9tail"], [":\u241F1afb0c360aa8eb58699c70b4f81b79db9b304633\u241F1356308905753232069:Voir le d\u00E9tail"])));
|
|
14235
14675
|
}
|
|
14236
|
-
var
|
|
14676
|
+
var i18n_19;
|
|
14237
14677
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14238
|
-
var
|
|
14239
|
-
|
|
14678
|
+
var MSG_EXTERNAL_5882806197320246536$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___20 = goog.getMsg(" Voir la recette ");
|
|
14679
|
+
i18n_19 = MSG_EXTERNAL_5882806197320246536$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___20;
|
|
14240
14680
|
}
|
|
14241
14681
|
else {
|
|
14242
|
-
|
|
14682
|
+
i18n_19 = $localize(templateObject_9$4 || (templateObject_9$4 = __makeTemplateObject([":\u241Fb13efa64234089d6652cd83ff1b3dc829f22a13e\u241F5882806197320246536: Voir la recette "], [":\u241Fb13efa64234089d6652cd83ff1b3dc829f22a13e\u241F5882806197320246536: Voir la recette "])));
|
|
14243
14683
|
}
|
|
14244
|
-
var
|
|
14684
|
+
var i18n_21;
|
|
14245
14685
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14246
|
-
var
|
|
14247
|
-
|
|
14686
|
+
var MSG_EXTERNAL_2014297263214357463$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___22 = goog.getMsg("Changer d'article");
|
|
14687
|
+
i18n_21 = MSG_EXTERNAL_2014297263214357463$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___22;
|
|
14248
14688
|
}
|
|
14249
14689
|
else {
|
|
14250
|
-
|
|
14690
|
+
i18n_21 = $localize(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject([":\u241Fc0482d798065c40279036142ef812ebf3942d280\u241F2014297263214357463:Changer d'article"], [":\u241Fc0482d798065c40279036142ef812ebf3942d280\u241F2014297263214357463:Changer d'article"])));
|
|
14251
14691
|
}
|
|
14252
14692
|
var i18n_24;
|
|
14253
14693
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14254
|
-
var
|
|
14255
|
-
i18n_24 =
|
|
14694
|
+
var MSG_EXTERNAL_6410345110451741598$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___25 = goog.getMsg("pour");
|
|
14695
|
+
i18n_24 = MSG_EXTERNAL_6410345110451741598$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___25;
|
|
14256
14696
|
}
|
|
14257
14697
|
else {
|
|
14258
|
-
i18n_24 = $localize(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject([":\
|
|
14698
|
+
i18n_24 = $localize(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject([":\u241F1987d6d2d7b60e267f6d65eb3c4cdb5c975d5f54\u241F6410345110451741598:pour"], [":\u241F1987d6d2d7b60e267f6d65eb3c4cdb5c975d5f54\u241F6410345110451741598:pour"])));
|
|
14259
14699
|
}
|
|
14260
14700
|
var i18n_26;
|
|
14261
14701
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14262
|
-
var
|
|
14263
|
-
i18n_26 =
|
|
14702
|
+
var MSG_EXTERNAL_3397501349112812891$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____27 = goog.getMsg("personnes");
|
|
14703
|
+
i18n_26 = MSG_EXTERNAL_3397501349112812891$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____27;
|
|
14704
|
+
}
|
|
14705
|
+
else {
|
|
14706
|
+
i18n_26 = $localize(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject([":\u241F63e53fe349a9d568182157b18cf3140aca246d62\u241F3397501349112812891:personnes"], [":\u241F63e53fe349a9d568182157b18cf3140aca246d62\u241F3397501349112812891:personnes"])));
|
|
14707
|
+
}
|
|
14708
|
+
var i18n_28;
|
|
14709
|
+
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14710
|
+
var MSG_EXTERNAL_2884439310873584392$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____29 = goog.getMsg("personne");
|
|
14711
|
+
i18n_28 = MSG_EXTERNAL_2884439310873584392$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____29;
|
|
14712
|
+
}
|
|
14713
|
+
else {
|
|
14714
|
+
i18n_28 = $localize(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject([":\u241F1d52fd9a90536a68517dea0fee46df2e64971d3f\u241F2884439310873584392:personne"], [":\u241F1d52fd9a90536a68517dea0fee46df2e64971d3f\u241F2884439310873584392:personne"])));
|
|
14715
|
+
}
|
|
14716
|
+
var i18n_30;
|
|
14717
|
+
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
14718
|
+
var MSG_EXTERNAL_8327069019640670106$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____31 = goog.getMsg("Calcul des ingr\u00E9dients...");
|
|
14719
|
+
i18n_30 = MSG_EXTERNAL_8327069019640670106$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS____31;
|
|
14264
14720
|
}
|
|
14265
14721
|
else {
|
|
14266
|
-
|
|
14722
|
+
i18n_30 = $localize(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject([":\u241F1eacd4f46056d28691469ea02279e20c0642e699\u241F8327069019640670106:Calcul des ingr\u00E9dients..."], [":\u241F1eacd4f46056d28691469ea02279e20c0642e699\u241F8327069019640670106:Calcul des ingr\u00E9dients..."])));
|
|
14267
14723
|
}
|
|
14268
|
-
return [[4, "ngIf", "ngIfElse"], ["legacyView", ""], [1, "miam-basket-preview-line", 3, "id"], [1, "miam-basket-preview-line__left"], [1, "miam-basket-preview-line__picture"], ["alt", "recipe picture", 3, "src", "click"], [1, "miam-basket-preview-line__counter"], [1, "miam-ds-text", "weight-xxl", "size-m"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter.svg", "alt", "people"], [1, "miam-basket-preview-line__right"], [1, "miam-basket-preview-line__top"], [1, "miam-basket-preview-line__infos"], [1, "miam-basket-preview-line__title", "miam-ds-text", "weight-xxl", "size-m", 3, "click"], [1, "miam-basket-preview-line__product-count", "miam-ds-text", "weight-l", "size-s"], i18n_0, [
|
|
14724
|
+
return [[4, "ngIf", "ngIfElse"], ["legacyView", ""], [1, "miam-basket-preview-line", 3, "id"], [1, "miam-basket-preview-line__left"], [1, "miam-basket-preview-line__picture"], ["alt", "recipe picture", 3, "src", "click"], [1, "miam-basket-preview-line__counter"], [1, "miam-ds-text", "weight-xxl", "size-m"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter.svg", "alt", "people"], [1, "miam-basket-preview-line__right"], [1, "miam-basket-preview-line__top"], [1, "miam-basket-preview-line__infos"], [1, "miam-basket-preview-line__title", "miam-ds-text", "weight-xxl", "size-m", 3, "click"], [1, "miam-basket-preview-line__product-count", "miam-ds-text", "weight-l", "size-s"], i18n_0, [1, "miam-basket-preview-line__price-label", "miam-ds-text", "weight-xxl"], [1, "miam-basket-preview-line__price-per-person-label", "miam-ds-text", "weight-l", "size-xs"], i18n_2, i18n_4, [1, "miam-basket-preview-line__remove", "miam-ds-button", "ghost", 3, "ngClass", "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/trash.svg", "alt", "remove recipe", 4, "ngIf", "ngIfElse"], ["removeLoader", ""], [1, "miam-basket-preview-line__link", "miam-ds-button", "ghost", 3, "click"], i18n_6, ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/arrow-right.svg", "alt", "arrow right"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/trash.svg", "alt", "remove recipe"], [1, "miam-ds-loader"], [1, "miam-basket-preview-line", "legacy", 3, "id", "ngClass", "click"], [1, "miam-basket-preview-line__item"], [1, "miam-basket-preview-line__item__left"], ["class", "miam-ds-button ghost square miam-basket-preview-line__item__remove", 3, "ngClass", "click", 4, "ngIf"], [1, "miam-basket-preview-line__item__picture"], [1, "miam-basket-preview-line__item__details", 3, "ngClass"], ["class", "miam-basket-preview-line__item__sponsorised", 4, "ngIf"], [1, "miam-basket-preview-line__item__title", 3, "click"], [1, "miam-basket-preview-line__item__description"], [4, "ngIf"], [1, "miam-basket-preview-line__item__actions"], ["class", "miam-basket-preview-line__item__showDetails", 3, "ngClass", 4, "ngIf"], ["class", "miam-basket-preview-line__item__showDetails", 4, "ngIf"], ["class", "miam-basket-preview-line__item__change", 3, "click", 4, "ngIf"], ["class", "miam-basket-preview-line__item__inlineTag__container", 4, "ngIf"], [1, "miam-basket-preview-line__item__right"], ["class", "miam-basket-preview-line__item__price", 4, "ngIf", "ngIfElse"], ["pricePerguest", ""], [1, "miam-basket-preview-line__item__count"], ["class", "miam-basket-preview-line__item__count__for", 4, "ngIf"], [3, "value", "minRange", "disable", "valueChange"], ["class", "miam-basket-preview-line__item__count__people", 4, "ngIf"], ["class", "miam-basket-preview-line__add__button", 4, "ngIf"], ["class", "miam-basket-preview-lines", 4, "ngIf"], [1, "miam-ds-button", "ghost", "square", "miam-basket-preview-line__item__remove", 3, "ngClass", "click"], [3, "iconName", "height", "width", 4, "ngIf", "ngIfElse"], [3, "iconName", "height", "width"], [1, "miam-basket-preview-line__item__sponsorised"], i18n_10, ["class", "miam-basket-preview-line__item__description__part", 4, "ngFor", "ngForOf"], i18n_12, [1, "miam-basket-preview-line__item__description__part"], [1, "miam-basket-preview-line__item__showDetails", 3, "ngClass"], i18n_14, i18n_16, [1, "miam-basket-preview-line__item__showDetails"], i18n_19, [1, "miam-basket-preview-line__item__change", 3, "click"], [1, "miam-basket-preview-line__item__change__link", 3, "ngClass"], i18n_21, [1, "miam-basket-preview-line__item__inlineTag__container"], [1, "miam-basket-preview-line__item__inlineTag"], [4, "ngFor", "ngForOf"], [1, "miam-basket-preview-line__item__price"], [3, "recipeId", "serves"], [1, "miam-basket-preview-line__item__count__for"], i18n_24, [1, "miam-basket-preview-line__item__count__people"], i18n_26, i18n_28, [1, "miam-basket-preview-line__add__button"], [1, "m-button-primary", 3, "click"], ["primaryColor", "#fff", 3, "width", "height", "iconName"], [1, "miam-basket-preview-lines"], ["loader", ""], [3, "line", "sponsorised", "displayItemsUnitaryPrice", "originTrace", "blockStates", "legacyMode", "removed", "replaceItem", 4, "ngFor", "ngForOf"], ["mode", "unavailable", 3, "entries", "alwaysExpanded", 4, "ngIf"], ["mode", "oftenDeleted", 3, "entries", "alwaysExpanded", "entryAdded", 4, "ngIf"], ["mode", "removed", 3, "entries", "alwaysExpanded", "reduced", "entryAdded", 4, "ngIf"], [3, "line", "sponsorised", "displayItemsUnitaryPrice", "originTrace", "blockStates", "legacyMode", "removed", "replaceItem"], ["mode", "unavailable", 3, "entries", "alwaysExpanded"], ["mode", "oftenDeleted", 3, "entries", "alwaysExpanded", "entryAdded"], ["mode", "removed", 3, "entries", "alwaysExpanded", "reduced", "entryAdded"], [1, "miam-basket-preview-line__loader-container"], i18n_30];
|
|
14269
14725
|
}, template: function BasketPreviewLineComponent_Template(rf, ctx) {
|
|
14270
14726
|
if (rf & 1) {
|
|
14271
|
-
i0__namespace.ɵɵtemplate(0, BasketPreviewLineComponent_ng_container_0_Template,
|
|
14727
|
+
i0__namespace.ɵɵtemplate(0, BasketPreviewLineComponent_ng_container_0_Template, 39, 20, "ng-container", 0);
|
|
14272
14728
|
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_Template, 30, 30, "ng-template", null, 1, i0__namespace.ɵɵtemplateRefExtractor);
|
|
14273
14729
|
}
|
|
14274
14730
|
if (rf & 2) {
|
|
14275
14731
|
var _r1 = i0__namespace.ɵɵreference(2);
|
|
14276
14732
|
i0__namespace.ɵɵproperty("ngIf", !ctx.legacyMode)("ngIfElse", _r1);
|
|
14277
14733
|
}
|
|
14278
|
-
}, directives: [i2__namespace$1.NgIf, RecipePricingComponent, i2__namespace$1.NgClass, CounterInputComponent, IconComponent, i2__namespace$1.NgForOf, BasketPreviewLineComponent, BasketPreviewDisabledComponent, LoaderComponent], pipes: [CapitalizeFirstLetterPipe, i2__namespace$1.AsyncPipe], styles: [".miam-basket-preview-line:not(.legacy){display:flex;padding:12px;align-items:flex-start;gap:16px;align-self:stretch;border-radius:12px;border:1px solid var(--border-primary,#d6e1ec);background:var(--surface-primary,#fff)}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left{position:relative;width:144px;height:144px}@media (max-width:360px){.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left{width:112px;height:112px}}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__picture{height:100%;width:100%;border-radius:12px;cursor:pointer}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__picture img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;border-radius:12px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__counter{position:absolute;right:8px;bottom:8px;display:flex;padding:4px 8px;align-items:center;gap:4px;border-radius:100px;background:var(--miam-ds-color-neutral-white,#fff);color:var(--miam-color-neutral-black);height:-moz-fit-content;height:fit-content}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__counter span{line-height:100%}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__counter img{width:16px;height:16px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:1 0 0;align-self:stretch}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top{display:flex;align-items:flex-start;gap:8px;flex:1 0 0;align-self:stretch}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;gap:4px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;color:var(--miam-ds-color-neutral-black,#02182b);text-overflow:ellipsis;cursor:pointer}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__product-count{display:flex;color:var(--text-subtle,rgba(31,53,67,.5));gap:4px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-recipe-pricing .miam-recipe-pricing__wrapper{gap:4px;align-items:flex-end;flex-wrap:nowrap}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-recipe-pricing .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__subline{font-size:12px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__remove{flex-shrink:0}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__remove .miam-loader,.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__remove img{height:24px;width:24px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__link{padding:4px 16px;gap:8px}@media (max-width:375px){.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__link img{display:none}}:root{--price-color:var(--miam-price-color,green) ;--tag-color:var(--miam-tag-color,#fcecce)}.miam-basket-preview-line.legacy{overflow:hidden;padding-left:10px;-webkit-tap-highlight-color:transparent}.miam-basket-preview-line.legacy.clickable{cursor:pointer;border-radius:4px;margin-bottom:6px;border:1px solid var(--m-color-grey);box-shadow:none;transition:var(--m-default-transition)}.miam-basket-preview-line.legacy.elevate{position:relative;z-index:var(--m-z-index-modal)}.miam-basket-preview-line.legacy.expanded{position:relative;background:#fff;box-shadow:var(--m-shadow-small);border-color:var(--m-color-grey);margin-top:10px;margin-bottom:15px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item{display:flex;justify-content:space-between;padding:16px 0}.miam-basket-preview-line.legacy .miam-basket-preview-line__item.clickable{cursor:pointer}.miam-basket-preview-line.legacy .miam-basket-preview-line__item.clickable.expanded{padding-bottom:0}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left{gap:16px;display:flex;align-items:center;width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{align-self:center}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove.disabled{filter:opacity(.3)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove .miam-ds-loader{width:16px;height:16px;background-position-x:8px;background-size:8px 8px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{width:130px;height:100px;-o-object-fit:cover;object-fit:cover;border-radius:var(--m-border-radius)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details{width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__sponsorised{display:flex;justify-content:center;align-items:center;padding:4px 12px;border-radius:100px;background-color:var(--m-color-grey);font-size:14px;font-weight:500;line-height:150%;width:-moz-fit-content;width:fit-content;margin-bottom:8px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--m-font-size-medium)}@media (min-width:1022px){.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__title:hover{color:var(--m-color-primary);text-decoration:underline}}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__title:first-letter{text-transform:capitalize}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__description{font-size:var(--m-font-size-small);font-weight:400}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__description .miam-basket-preview-line__item__description__part{margin-right:4px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions{display:flex;flex-direction:row}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__showDetails{margin:2px 30px 0 0;color:var(--m-color-grey-text);text-decoration:underline;cursor:pointer;width:-moz-max-content;width:max-content;transition:var(--m-default-transition)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__change .miam-basket-preview-line__item__change__link{margin:2px 30px 0 0;color:var(--m-color-grey-text);text-decoration:underline;cursor:pointer;transition:var(--m-default-transition)}@media (min-width:1022px){.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__change .miam-basket-preview-line__item__change__link:hover{color:var(--m-color-primary)}}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__change .miam-basket-preview-line__item__change__link.disable{pointer-events:none;color:var(--m-color-grey-text)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag{display:flex;align-items:center;height:22px;padding:1px 16px;font-size:var(--m-font-size-small);border-radius:100px;background-color:var(--tag-color)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag span:not(:last-child){margin-right:4px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right{max-width:330px;position:relative;display:flex;align-items:center;justify-content:flex-end;width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{margin:0 20px;font-size:var(--m-font-size-large);font-weight:700;white-space:nowrap;color:var(--price-color)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right ng-miam-recipe-pricing{width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count{text-align:center;font-size:var(--m-font-size-small)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__for,.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__people{margin-bottom:2px;padding-left:20px;font-weight:700;color:var(--m-color-slate)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__add__button{margin:0 20px}@media (min-width:1022px){.miam-basket-preview-line.legacy .miam-basket-preview-line__item:hover .miam-basket-preview-line__item__left .miam-basket-preview-line__item__showDetails{color:var(--m-color-primary)}}.miam-basket-preview-lines{margin-bottom:20px;border-left:1px solid var(--m-color-grey);overflow:hidden;margin-left:20px}.miam-basket-preview-lines .miam-basket-preview-line{border-top:1px solid var(--m-color-grey)}.miam-basket-preview-lines .miam-basket-preview-line.expanded{border-top:1px solid var(--m-color-primary)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item{border-top:none;padding:12px 0 15px}@media (min-width:1022px){.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__title:hover{color:var(--m-color-black);text-decoration:none}}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture,.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{margin-right:15px}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{width:50px;height:50px;-o-object-fit:cover;object-fit:cover;border-radius:var(--m-border-radius)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right{margin-top:-16px}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{font-size:16px;color:var(--m-color-grey-text)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count ng-miam-counter-input .miam-counter-input__icon{display:none}.miam-basket-preview-lines .miam-basket-preview-line__loader-container{padding:10px;display:flex;flex-direction:column;justify-content:center;align-items:center}@media (max-width:1022px){.miam-basket-preview-line .miam-basket-preview-line__item{flex-direction:column;height:204px;position:relative;padding:0 0 52px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left{height:92px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{position:absolute;right:18px;margin:0;bottom:58px;z-index:1}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture{height:152px;width:33%;position:absolute;top:16px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{height:100%;width:100%}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details{padding:8px 0 0 40%}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions{position:absolute;bottom:8px;left:0}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag{height:auto;text-align:center;padding:1px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right{justify-content:flex-start;padding-left:38%;flex-direction:column-reverse;align-items:flex-start}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{margin:0}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count{margin:16px 0}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__for,.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__people{display:none}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item{flex-direction:column;height:auto;position:relative;padding:0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left{height:auto}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{position:relative;right:unset;margin-right:15px;bottom:unset}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture{height:72px;width:72px;position:relative;top:unset}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{width:72px;height:72px;-o-object-fit:cover;object-fit:cover;border-radius:var(--m-border-radius)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details{padding:0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__actions{position:relative;bottom:unset;flex-direction:column;gap:8px}}@media (max-width:1022px) and (min-width:1023px){.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag__container{width:100%}}@media (max-width:1022px){.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag__container .miam-basket-preview-line__item__inlineTag{padding:4px 16px}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right{flex-direction:row;margin:16px 0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{margin:0 16px 0 0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count{margin:0}}"], encapsulation: 2, changeDetection: 0 });
|
|
14734
|
+
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgClass, CounterInputComponent, IconComponent, i2__namespace$1.NgForOf, RecipePricingComponent, BasketPreviewLineComponent, BasketPreviewDisabledComponent, LoaderComponent], pipes: [CapitalizeFirstLetterPipe, i2__namespace$1.CurrencyPipe, i2__namespace$1.AsyncPipe], styles: [".miam-basket-preview-line:not(.legacy){display:flex;padding:12px;align-items:flex-start;gap:16px;align-self:stretch;border-radius:12px;border:1px solid var(--border-primary,#d6e1ec);background:var(--surface-primary,#fff)}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left{position:relative;width:144px;height:144px}@media (max-width:360px){.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left{width:112px;height:112px}}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__picture{height:100%;width:100%;border-radius:12px;cursor:pointer}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__picture img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;border-radius:12px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__counter{position:absolute;right:8px;bottom:8px;display:flex;padding:4px 8px;align-items:center;gap:4px;border-radius:100px;background:var(--miam-ds-color-neutral-white,#fff);color:var(--miam-color-neutral-black);height:-moz-fit-content;height:fit-content}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__counter span{line-height:100%}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__left .miam-basket-preview-line__counter img{width:16px;height:16px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:1 0 0;align-self:stretch}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top{display:flex;align-items:flex-start;gap:8px;flex:1 0 0;align-self:stretch}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;gap:4px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:stretch;overflow:hidden;color:var(--miam-ds-color-neutral-black,#02182b);text-overflow:ellipsis;cursor:pointer}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__product-count{display:flex;color:var(--text-subtle,rgba(31,53,67,.5));gap:4px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__price-label{color:var(--miam-ds-color-primary,#24748f)}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__infos .miam-basket-preview-line__price-per-person-label{color:var(--text-subtle,rgba(31,53,67,.5))}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__remove{flex-shrink:0}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__remove .miam-loader,.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__top .miam-basket-preview-line__remove img{height:24px;width:24px}.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__link{padding:4px 16px;gap:8px}@media (max-width:375px){.miam-basket-preview-line:not(.legacy) .miam-basket-preview-line__right .miam-basket-preview-line__link img{display:none}}:root{--price-color:var(--miam-price-color,green) ;--tag-color:var(--miam-tag-color,#fcecce)}.miam-basket-preview-line.legacy{overflow:hidden;padding-left:10px;-webkit-tap-highlight-color:transparent}.miam-basket-preview-line.legacy.clickable{cursor:pointer;border-radius:4px;margin-bottom:6px;border:1px solid var(--m-color-grey);box-shadow:none;transition:var(--m-default-transition)}.miam-basket-preview-line.legacy.elevate{position:relative;z-index:var(--m-z-index-modal)}.miam-basket-preview-line.legacy.expanded{position:relative;background:#fff;box-shadow:var(--m-shadow-small);border-color:var(--m-color-grey);margin-top:10px;margin-bottom:15px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item{display:flex;justify-content:space-between;padding:16px 0}.miam-basket-preview-line.legacy .miam-basket-preview-line__item.clickable{cursor:pointer}.miam-basket-preview-line.legacy .miam-basket-preview-line__item.clickable.expanded{padding-bottom:0}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left{gap:16px;display:flex;align-items:center;width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{align-self:center}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove.disabled{filter:opacity(.3)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove .miam-ds-loader{width:16px;height:16px;background-position-x:8px;background-size:8px 8px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{width:130px;height:100px;-o-object-fit:cover;object-fit:cover;border-radius:var(--m-border-radius)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details{width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__sponsorised{display:flex;justify-content:center;align-items:center;padding:4px 12px;border-radius:100px;background-color:var(--m-color-grey);font-size:14px;font-weight:500;line-height:150%;width:-moz-fit-content;width:fit-content;margin-bottom:8px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--m-font-size-medium)}@media (min-width:1022px){.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__title:hover{color:var(--m-color-primary);text-decoration:underline}}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__title:first-letter{text-transform:capitalize}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__description{font-size:var(--m-font-size-small);font-weight:400}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__description .miam-basket-preview-line__item__description__part{margin-right:4px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions{display:flex;flex-direction:row}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__showDetails{margin:2px 30px 0 0;color:var(--m-color-grey-text);text-decoration:underline;cursor:pointer;width:-moz-max-content;width:max-content;transition:var(--m-default-transition)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__change .miam-basket-preview-line__item__change__link{margin:2px 30px 0 0;color:var(--m-color-grey-text);text-decoration:underline;cursor:pointer;transition:var(--m-default-transition)}@media (min-width:1022px){.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__change .miam-basket-preview-line__item__change__link:hover{color:var(--m-color-primary)}}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__change .miam-basket-preview-line__item__change__link.disable{pointer-events:none;color:var(--m-color-grey-text)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag{display:flex;align-items:center;height:22px;padding:1px 16px;font-size:var(--m-font-size-small);border-radius:100px;background-color:var(--tag-color)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag span:not(:last-child){margin-right:4px}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right{max-width:330px;position:relative;display:flex;align-items:center;justify-content:flex-end;width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{margin:0 20px;font-size:var(--m-font-size-large);font-weight:700;white-space:nowrap;color:var(--price-color)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right ng-miam-recipe-pricing{width:100%}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count{text-align:center;font-size:var(--m-font-size-small)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__for,.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__people{margin-bottom:2px;padding-left:20px;font-weight:700;color:var(--m-color-slate)}.miam-basket-preview-line.legacy .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__add__button{margin:0 20px}@media (min-width:1022px){.miam-basket-preview-line.legacy .miam-basket-preview-line__item:hover .miam-basket-preview-line__item__left,.miam-basket-preview-line.legacy .miam-basket-preview-line__item:hover .miam-basket-preview-line__item__showDetails{color:var(--m-color-primary)}}.miam-basket-preview-lines{margin-bottom:20px;border-left:1px solid var(--m-color-grey);overflow:hidden;margin-left:20px}.miam-basket-preview-lines .miam-basket-preview-line{border-top:1px solid var(--m-color-grey)}.miam-basket-preview-lines .miam-basket-preview-line.expanded{border-top:1px solid var(--m-color-primary)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item{border-top:none;padding:12px 0 15px}@media (min-width:1022px){.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details:hover,.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__title:hover{color:var(--m-color-black);text-decoration:none}}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture,.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{margin-right:15px}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{width:50px;height:50px;-o-object-fit:cover;object-fit:cover;border-radius:var(--m-border-radius)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right{margin-top:-16px}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{font-size:16px;color:var(--m-color-grey-text)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count ng-miam-counter-input .miam-counter-input__icon{display:none}.miam-basket-preview-lines .miam-basket-preview-line__loader-container{padding:10px;display:flex;flex-direction:column;justify-content:center;align-items:center}@media (max-width:1022px){.miam-basket-preview-line .miam-basket-preview-line__item{flex-direction:column;height:204px;position:relative;padding:0 0 52px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left{height:92px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{position:absolute;right:18px;margin:0;bottom:58px;z-index:1}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture{height:152px;width:33%;position:absolute;top:16px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{height:100%;width:100%}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details{padding:8px 0 0 40%}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions{position:absolute;bottom:8px;left:0}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag{height:auto;text-align:center;padding:1px}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right{justify-content:flex-start;padding-left:38%;flex-direction:column-reverse;align-items:flex-start}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{margin:0}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count{margin:16px 0}.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__for,.miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count .miam-basket-preview-line__item__count__people{display:none}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item{flex-direction:column;height:auto;position:relative;padding:0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left{height:auto}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__remove{position:relative;right:unset;margin-right:15px;bottom:unset}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture{height:72px;width:72px;position:relative;top:unset}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__picture img{width:72px;height:72px;-o-object-fit:cover;object-fit:cover;border-radius:var(--m-border-radius)}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__details{padding:0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__actions{position:relative;bottom:unset;flex-direction:column;gap:8px}}@media (max-width:1022px) and (min-width:1023px){.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag__container{width:100%}}@media (max-width:1022px){.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__left .miam-basket-preview-line__item__actions .miam-basket-preview-line__item__inlineTag__container .miam-basket-preview-line__item__inlineTag{padding:4px 16px}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right{flex-direction:row;margin:16px 0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__price{margin:0 16px 0 0}.miam-basket-preview-lines .miam-basket-preview-line .miam-basket-preview-line__item .miam-basket-preview-line__item__right .miam-basket-preview-line__item__count{margin:0}}"], encapsulation: 2, changeDetection: 0 });
|
|
14279
14735
|
(function () {
|
|
14280
14736
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasketPreviewLineComponent, [{
|
|
14281
14737
|
type: i0.Component,
|
|
@@ -14286,7 +14742,7 @@
|
|
|
14286
14742
|
encapsulation: i0.ViewEncapsulation.None,
|
|
14287
14743
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
14288
14744
|
}]
|
|
14289
|
-
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: RecipesService }, { type: BasketsService }, { type: AnalyticsService }, { type: PointOfSalesService }, { type: UserService }, { type: ContextService }, { type: i0__namespace.ElementRef }, { type: SuppliersService }]; }, { line: [{
|
|
14745
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: RecipesService }, { type: BasketsService }, { type: AnalyticsService }, { type: PointOfSalesService }, { type: UserService }, { type: ContextService }, { type: SuppliersService }, { type: i0__namespace.ElementRef }, { type: SuppliersService }]; }, { line: [{
|
|
14290
14746
|
type: i0.Input
|
|
14291
14747
|
}], uniqueLine: [{
|
|
14292
14748
|
type: i0.Input
|
|
@@ -14314,7 +14770,7 @@
|
|
|
14314
14770
|
type: i0.Output
|
|
14315
14771
|
}] });
|
|
14316
14772
|
})();
|
|
14317
|
-
var templateObject_1$w, templateObject_2$q, templateObject_3$j, templateObject_4$g, templateObject_5$
|
|
14773
|
+
var templateObject_1$w, templateObject_2$q, templateObject_3$j, templateObject_4$g, templateObject_5$c, templateObject_6$a, templateObject_7$7, templateObject_8$5, templateObject_9$4, templateObject_10$2, templateObject_11$2, templateObject_12$1, templateObject_13$1, templateObject_14$1;
|
|
14318
14774
|
|
|
14319
14775
|
function ReplaceItemComponent_span_3_Template(rf, ctx) {
|
|
14320
14776
|
if (rf & 1) {
|
|
@@ -14512,13 +14968,6 @@
|
|
|
14512
14968
|
ReplaceItemComponent.prototype.currentProps = function () {
|
|
14513
14969
|
return { entry_name: this.basketEntry.name };
|
|
14514
14970
|
};
|
|
14515
|
-
ReplaceItemComponent.prototype.onSearchKeydown = function (event) {
|
|
14516
|
-
if (event.key === ' ') {
|
|
14517
|
-
event.preventDefault();
|
|
14518
|
-
this.searchString += ' ';
|
|
14519
|
-
}
|
|
14520
|
-
this.onSearchInputChange();
|
|
14521
|
-
};
|
|
14522
14971
|
ReplaceItemComponent.prototype.setupSearchObservable = function () {
|
|
14523
14972
|
var _this = this;
|
|
14524
14973
|
this.subscriptions.push(this.searchSubject.pipe(operators.debounceTime(200), operators.filter(function (search) { return search.length >= 3; }), operators.distinctUntilChanged(), operators.tap(function () {
|
|
@@ -14554,8 +15003,21 @@
|
|
|
14554
15003
|
};
|
|
14555
15004
|
ReplaceItemComponent.prototype.addToBasket = function () {
|
|
14556
15005
|
var _this = this;
|
|
14557
|
-
this.subscriptions.push(this.recipeDetailsService.canAddProductToBasket(
|
|
14558
|
-
|
|
15006
|
+
this.subscriptions.push(this.recipeDetailsService.canAddProductToBasket({
|
|
15007
|
+
method: 'addIngredientToBasket',
|
|
15008
|
+
arguments: {
|
|
15009
|
+
recipeId: this.recipe.id,
|
|
15010
|
+
ingredientId: this.ingredient.id,
|
|
15011
|
+
entry: this.basketEntry,
|
|
15012
|
+
eventTrace: this.eventTrace(),
|
|
15013
|
+
searchString: this.searchString
|
|
15014
|
+
}
|
|
15015
|
+
}, this.eventTrace()).subscribe(function (passed) {
|
|
15016
|
+
if (passed) {
|
|
15017
|
+
_this.recipeDetailsService.ingredientToBasketLoading = _this.basketEntry.status === 'initial';
|
|
15018
|
+
_this.recipeDetailsService.updateIngredientFromBasketLoading = _this.basketEntry.status !== 'initial';
|
|
15019
|
+
_this.basketsService.addIngredientsToBasket(_this.recipe.id, [{ ingredientId: _this.ingredient.id, entry: _this.basketEntry }], _this.eventTrace(), _this.previousItem, _this.searchString);
|
|
15020
|
+
}
|
|
14559
15021
|
}));
|
|
14560
15022
|
this.cdr.detectChanges();
|
|
14561
15023
|
};
|
|
@@ -14646,9 +15108,9 @@
|
|
|
14646
15108
|
i18n_9 = MSG_EXTERNAL_5308134879633194724$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_REPLACE_ITEM_REPLACE_ITEM_COMPONENT_TS__10;
|
|
14647
15109
|
}
|
|
14648
15110
|
else {
|
|
14649
|
-
i18n_9 = $localize(templateObject_5$
|
|
15111
|
+
i18n_9 = $localize(templateObject_5$b || (templateObject_5$b = __makeTemplateObject([":\u241F0b93781999a48f1d48c2780cb91b6f63b2583b51\u241F5308134879633194724:Essayez avec un autre mot-cl\u00E9s"], [":\u241F0b93781999a48f1d48c2780cb91b6f63b2583b51\u241F5308134879633194724:Essayez avec un autre mot-cl\u00E9s"])));
|
|
14650
15112
|
}
|
|
14651
|
-
return [[1, "miam-replace-item__header", "miam-ds-text", "weight-xxl"], [1, "miam-ds-button", "ghost", "square", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--miam-ds-color-primary-500)", 3, "iconName"], [4, "ngIf", "ngIfElse"], ["addProduct", ""], [1, "miam-replace-item__top-container"], [1, "miam-replace-item__searchbar"], ["width", "20", "height", "20", 3, "iconName"], ["type", "text", "placeholder", "Rechercher un produit de substitution", 1, "miam-replace-item__searchbar__input", "miam-ds-text", "size-m", "weight-l", 3, "ngModel", "ngModelChange"
|
|
15113
|
+
return [[1, "miam-replace-item__header", "miam-ds-text", "weight-xxl"], [1, "miam-ds-button", "ghost", "square", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--miam-ds-color-primary-500)", 3, "iconName"], [4, "ngIf", "ngIfElse"], ["addProduct", ""], [1, "miam-replace-item__top-container"], [1, "miam-replace-item__searchbar"], ["width", "20", "height", "20", 3, "iconName"], ["type", "text", "placeholder", "Rechercher un produit de substitution", 1, "miam-replace-item__searchbar__input", "miam-ds-text", "size-m", "weight-l", 3, "ngModel", "ngModelChange"], [1, "miam-ds-loader"], [1, "miam-replace-item__product-banner"], [1, "miam-replace-item__banner-product-name", "miam-ds-text", "size-s"], [1, "miam-replace-item__banner-quantity", "miam-ds-text", "weight-xxl"], [1, "miam-replace-item__product-list"], ["class", "miam-replace-item__product-item", 3, "ngClass", 4, "ngFor", "ngForOf"], [4, "ngIf"], i18n_0, i18n_2, [1, "miam-replace-item__product-item", 3, "ngClass"], [1, "miam-replace-item__card-upper-section"], [1, "miam-replace-item__product-image-container"], ["alt", "product to replace", 1, "miam-replace-item__product-image", 3, "src"], [1, "miam-replace-item__product-info"], [1, "miam-replace-item__product-brand", "miam-ds-text", "size-xs", "weight-xl"], [1, "miam-replace-item__product-brand-text"], [1, "miam-replace-item__product-name", "miam-ds-text", "size-xs"], [1, "miam-replace-item__product-name-text"], [1, "miam-ds-badge"], [1, "miam-replace-item__product-quantity", "miam-ds-text", "size-xs"], [1, "miam-replace-item__card-lower-section"], [1, "miam-replace-item__product-price", "miam-ds-text", "size-l", "weight-xxl"], [1, "miam-replace-item__cta", "miam-ds-button", "small", "primary", 3, "disabled", "click"], ["class", "miam-ds-loader", 4, "ngIf", "ngIfElse"], ["defaultSelectButton", ""], [1, "miam-replace-item__error"], [1, "miam-replace-item__error-image-container", "small-img"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/images/product-issue.png", "alt", "issue with product", 1, "miam-replace-item__error-image"], [1, "miam-replace-item__issue-title"], i18n_5, [1, "miam-replace-item__error-image-container"], i18n_7, [1, "miam-replace-item__issue-description", "miam-ds-text", "weight-xxl"], i18n_9];
|
|
14652
15114
|
}, template: function ReplaceItemComponent_Template(rf, ctx) {
|
|
14653
15115
|
if (rf & 1) {
|
|
14654
15116
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
@@ -14663,7 +15125,7 @@
|
|
|
14663
15125
|
i0__namespace.ɵɵelementStart(7, "div", 6);
|
|
14664
15126
|
i0__namespace.ɵɵelement(8, "ng-miam-icon", 7);
|
|
14665
15127
|
i0__namespace.ɵɵelementStart(9, "input", 8);
|
|
14666
|
-
i0__namespace.ɵɵlistener("ngModelChange", function ReplaceItemComponent_Template_input_ngModelChange_9_listener($event) { return ctx.searchString = $event; })("
|
|
15128
|
+
i0__namespace.ɵɵlistener("ngModelChange", function ReplaceItemComponent_Template_input_ngModelChange_9_listener($event) { return ctx.searchString = $event; })("ngModelChange", function ReplaceItemComponent_Template_input_ngModelChange_9_listener() { return ctx.onSearchInputChange(); });
|
|
14667
15129
|
i0__namespace.ɵɵelementEnd();
|
|
14668
15130
|
i0__namespace.ɵɵelement(10, "div", 9);
|
|
14669
15131
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -14765,7 +15227,7 @@
|
|
|
14765
15227
|
args: ['@slide']
|
|
14766
15228
|
}] });
|
|
14767
15229
|
})();
|
|
14768
|
-
var templateObject_1$v, templateObject_2$p, templateObject_3$i, templateObject_4$f, templateObject_5$
|
|
15230
|
+
var templateObject_1$v, templateObject_2$p, templateObject_3$i, templateObject_4$f, templateObject_5$b;
|
|
14769
15231
|
|
|
14770
15232
|
function BasketPreviewBlockComponent_div_2_ng_container_1_div_1_Template(rf, ctx) {
|
|
14771
15233
|
if (rf & 1) {
|
|
@@ -15151,7 +15613,7 @@
|
|
|
15151
15613
|
i18n_9 = MSG_EXTERNAL_5143648071312042408$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_BLOCK_BASKET_PREVIEW_BLOCK_COMPONENT_TS_____10;
|
|
15152
15614
|
}
|
|
15153
15615
|
else {
|
|
15154
|
-
i18n_9 = $localize(templateObject_5$
|
|
15616
|
+
i18n_9 = $localize(templateObject_5$a || (templateObject_5$a = __makeTemplateObject([":\u241F523c6748d32ce2079498ff4de01387f2d6515c44\u241F5143648071312042408:Chargement du repas..."], [":\u241F523c6748d32ce2079498ff4de01387f2d6515c44\u241F5143648071312042408:Chargement du repas..."])));
|
|
15155
15617
|
}
|
|
15156
15618
|
var i18n_11;
|
|
15157
15619
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -15229,7 +15691,7 @@
|
|
|
15229
15691
|
args: [BasketPreviewLineComponent]
|
|
15230
15692
|
}] });
|
|
15231
15693
|
})();
|
|
15232
|
-
var templateObject_1$u, templateObject_2$o, templateObject_3$h, templateObject_4$e, templateObject_5$
|
|
15694
|
+
var templateObject_1$u, templateObject_2$o, templateObject_3$h, templateObject_4$e, templateObject_5$a, templateObject_6$9, templateObject_7$6, templateObject_8$4;
|
|
15233
15695
|
|
|
15234
15696
|
var BasketPreviewModule = /** @class */ (function () {
|
|
15235
15697
|
// Create custom elements so the WebComponents can be interpreted by the browser regardless of the js framework used
|
|
@@ -15819,7 +16281,7 @@
|
|
|
15819
16281
|
i18n_8 = MSG_EXTERNAL_7013342739706915791$$LIB__WEB_COMPONENTS_LIST_SCAN_INGREDIENTS_LIST_INGREDIENTS_LIST_COMPONENT_TS__9;
|
|
15820
16282
|
}
|
|
15821
16283
|
else {
|
|
15822
|
-
i18n_8 = $localize(templateObject_5$
|
|
16284
|
+
i18n_8 = $localize(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject([":\u241Fac0d6812963be073dd69ed4976e8f61da7354f14\u241F7013342739706915791:Quantit\u00E9"], [":\u241Fac0d6812963be073dd69ed4976e8f61da7354f14\u241F7013342739706915791:Quantit\u00E9"])));
|
|
15823
16285
|
}
|
|
15824
16286
|
var i18n_10;
|
|
15825
16287
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -15895,7 +16357,7 @@
|
|
|
15895
16357
|
type: i0.Output
|
|
15896
16358
|
}] });
|
|
15897
16359
|
})();
|
|
15898
|
-
var templateObject_1$r, templateObject_2$m, templateObject_3$g, templateObject_4$d, templateObject_5$
|
|
16360
|
+
var templateObject_1$r, templateObject_2$m, templateObject_3$g, templateObject_4$d, templateObject_5$9, templateObject_6$8;
|
|
15899
16361
|
|
|
15900
16362
|
function ListScanBasketPreviewComponent_span_4_Template(rf, ctx) {
|
|
15901
16363
|
if (rf & 1) {
|
|
@@ -16483,7 +16945,7 @@
|
|
|
16483
16945
|
i0__namespace.ɵɵtextInterpolate(number_r14);
|
|
16484
16946
|
}
|
|
16485
16947
|
}
|
|
16486
|
-
var _c12
|
|
16948
|
+
var _c12 = function () { return [1, 2, 3, 4, 5, 6, 7, 8, 9]; };
|
|
16487
16949
|
function MealsPlannerFormComponent_ng_template_29_Template(rf, ctx) {
|
|
16488
16950
|
if (rf & 1) {
|
|
16489
16951
|
var _r16_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -16502,7 +16964,7 @@
|
|
|
16502
16964
|
i0__namespace.ɵɵadvance(1);
|
|
16503
16965
|
i0__namespace.ɵɵtextInterpolate(ctx_r2.form.value.guestsCount);
|
|
16504
16966
|
i0__namespace.ɵɵadvance(1);
|
|
16505
|
-
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpureFunction0(3, _c12
|
|
16967
|
+
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpureFunction0(3, _c12));
|
|
16506
16968
|
}
|
|
16507
16969
|
}
|
|
16508
16970
|
function MealsPlannerFormComponent_ng_miam_counter_input_39_Template(rf, ctx) {
|
|
@@ -16651,14 +17113,20 @@
|
|
|
16651
17113
|
MealsPlannerFormComponent.prototype.ngOnDestroy = function () {
|
|
16652
17114
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
16653
17115
|
};
|
|
16654
|
-
MealsPlannerFormComponent.prototype.currentPath = function () {
|
|
17116
|
+
MealsPlannerFormComponent.prototype.currentPath = function () {
|
|
17117
|
+
return '';
|
|
17118
|
+
};
|
|
17119
|
+
MealsPlannerFormComponent.prototype.hasPos = function () {
|
|
17120
|
+
var _this = this;
|
|
17121
|
+
return this.posService.posWasInitialized().pipe(operators.take(1), operators.tap(function (posWasInitialized) { return _this.context.hookCallback(true, posWasInitialized); }));
|
|
17122
|
+
};
|
|
16655
17123
|
MealsPlannerFormComponent.prototype.fetchRecipesNumbers = function () {
|
|
16656
17124
|
var _this = this;
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
return _this.recipesService.maxPlannableRecipes(_this.form.value.budget, _this.form.value.guestsCount, logged ? false : undefined).pipe(operators.tap(function (maxRecipes) {
|
|
17125
|
+
return this.hasPos().pipe(operators.switchMap(function (hasPos) {
|
|
17126
|
+
if (!hasPos || !_this.form.value.guestsCount || !_this.form.value.budget) {
|
|
17127
|
+
return rxjs.of(null);
|
|
17128
|
+
}
|
|
17129
|
+
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) {
|
|
16662
17130
|
var numbers = [];
|
|
16663
17131
|
for (var i = 1; i <= maxRecipes; i++) {
|
|
16664
17132
|
numbers.push(i);
|
|
@@ -16668,7 +17136,7 @@
|
|
|
16668
17136
|
_this.updateRecipesCount(maxRecipes);
|
|
16669
17137
|
}
|
|
16670
17138
|
_this.noRecipesAvailable = maxRecipes < 1;
|
|
16671
|
-
}));
|
|
17139
|
+
})); }));
|
|
16672
17140
|
}));
|
|
16673
17141
|
};
|
|
16674
17142
|
MealsPlannerFormComponent.prototype.submit = function () {
|
|
@@ -16679,9 +17147,9 @@
|
|
|
16679
17147
|
]).subscribe(function (res) {
|
|
16680
17148
|
var isHookOk = _this.context.hookCallback(res[0], res[1]);
|
|
16681
17149
|
sessionStorage.setItem('miam-meals-planner-form', JSON.stringify({
|
|
16682
|
-
budget:
|
|
16683
|
-
guestsCount:
|
|
16684
|
-
recipesCount:
|
|
17150
|
+
budget: +_this.form.get('budget').value,
|
|
17151
|
+
guestsCount: +_this.form.get('guestsCount').value,
|
|
17152
|
+
recipesCount: +_this.form.get('recipesCount').value,
|
|
16685
17153
|
}));
|
|
16686
17154
|
if (isHookOk) {
|
|
16687
17155
|
sessionStorage.removeItem('miam-meals-planner-form');
|
|
@@ -16694,7 +17162,7 @@
|
|
|
16694
17162
|
}));
|
|
16695
17163
|
};
|
|
16696
17164
|
MealsPlannerFormComponent.prototype.updateView = function () {
|
|
16697
|
-
if (
|
|
17165
|
+
if (+this.form.get('budget').value > 999) {
|
|
16698
17166
|
this.form.get('budget').patchValue(999);
|
|
16699
17167
|
}
|
|
16700
17168
|
this.cdr.detectChanges();
|
|
@@ -16752,7 +17220,7 @@
|
|
|
16752
17220
|
i18n_8 = MSG_EXTERNAL_6105149763216124630$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_FORM_MEALS_PLANNER_FORM_COMPONENT_TS_9;
|
|
16753
17221
|
}
|
|
16754
17222
|
else {
|
|
16755
|
-
i18n_8 = $localize(templateObject_5$
|
|
17223
|
+
i18n_8 = $localize(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject([":\u241F54db9980698d46d77cbe00eb3a20ac4d5407c95d\u241F6105149763216124630:Planifier"], [":\u241F54db9980698d46d77cbe00eb3a20ac4d5407c95d\u241F6105149763216124630:Planifier"])));
|
|
16756
17224
|
}
|
|
16757
17225
|
var i18n_10;
|
|
16758
17226
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -16952,7 +17420,7 @@
|
|
|
16952
17420
|
type: i0.Output
|
|
16953
17421
|
}] });
|
|
16954
17422
|
})();
|
|
16955
|
-
var templateObject_1$o, templateObject_2$j, templateObject_3$d, templateObject_4$b, templateObject_5$
|
|
17423
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$d, templateObject_4$b, templateObject_5$8, templateObject_6$7, templateObject_7$5, templateObject_8$3, templateObject_9$3, templateObject_10$1, templateObject_11$1;
|
|
16956
17424
|
|
|
16957
17425
|
function RecipeCardCtaComponent_div_0_span_2_Template(rf, ctx) {
|
|
16958
17426
|
if (rf & 1) {
|
|
@@ -18115,7 +18583,7 @@
|
|
|
18115
18583
|
i18n_8 = MSG_EXTERNAL_3503734824800029552$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_BASKET_PREVIEW_MEALS_PLANNER_BASKET_PREVIEW_COMPONENT_TS___9;
|
|
18116
18584
|
}
|
|
18117
18585
|
else {
|
|
18118
|
-
i18n_8 = $localize(templateObject_5$
|
|
18586
|
+
i18n_8 = $localize(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject([":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"], [":\u241F4f168d78d73759138d43c58ec329dc9a1cfcd316\u241F3503734824800029552:Finaliser"])));
|
|
18119
18587
|
}
|
|
18120
18588
|
return [["class", "miam-meals-planner-basket-preview", 4, "ngIf"], [1, "miam-meals-planner-basket-preview"], [1, "miam-meals-planner-basket-preview__content"], [1, "miam-meals-planner-basket-preview__title"], i18n_0, ["class", "miam-meals-planner-basket-preview__ingredients-regrouped", 4, "ngIf"], [3, "originTrace", "recipesIds", "displayItemsUnitaryPrice", "legacyMode", "loading"], [1, "miam-meals-planner-basket-preview__actions"], ["class", "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max", 4, "ngIf"], ["class", "m-button-primary reverse", 3, "disabled", 4, "ngIf"], [1, "m-button-primary", 3, "disabled"], ["href", "/", 4, "ngIf", "ngIfElse"], ["antiInflation", ""], [1, "miam-meals-planner-basket-preview__ingredients-regrouped"], [1, "miam-meals-planner-basket-preview__ingredients-regrouped__title"], i18n_2, [1, "miam-meals-planner-basket-preview__progress-bar", 3, "unit", "value", "max"], [1, "m-button-primary", "reverse", 3, "disabled"], [3, "href"], [1, "miam-meals-planner-basket-preview__button-text"], i18n_4, ["href", "/"], i18n_6, [3, "click"], i18n_8];
|
|
18121
18589
|
}, template: function MealsPlannerBasketPreviewComponent_Template(rf, ctx) {
|
|
@@ -18148,7 +18616,7 @@
|
|
|
18148
18616
|
type: i0.Output
|
|
18149
18617
|
}] });
|
|
18150
18618
|
})();
|
|
18151
|
-
var templateObject_1$k, templateObject_2$g, templateObject_3$c, templateObject_4$a, templateObject_5$
|
|
18619
|
+
var templateObject_1$k, templateObject_2$g, templateObject_3$c, templateObject_4$a, templateObject_5$7;
|
|
18152
18620
|
|
|
18153
18621
|
var RecipeFilters = /** @class */ (function () {
|
|
18154
18622
|
function RecipeFilters(filters) {
|
|
@@ -18377,9 +18845,9 @@
|
|
|
18377
18845
|
i0__namespace.ɵɵelementEnd();
|
|
18378
18846
|
}
|
|
18379
18847
|
if (rf & 2) {
|
|
18380
|
-
var
|
|
18848
|
+
var ctx_r12 = i0__namespace.ɵɵnextContext(3);
|
|
18381
18849
|
i0__namespace.ɵɵadvance(4);
|
|
18382
|
-
i0__namespace.ɵɵtextInterpolate1("\"",
|
|
18850
|
+
i0__namespace.ɵɵtextInterpolate1("\"", ctx_r12.filters.search, "\"");
|
|
18383
18851
|
}
|
|
18384
18852
|
}
|
|
18385
18853
|
function CatalogListComponent_div_1_div_2_Template(rf, ctx) {
|
|
@@ -18399,9 +18867,9 @@
|
|
|
18399
18867
|
i0__namespace.ɵɵelementEnd();
|
|
18400
18868
|
}
|
|
18401
18869
|
if (rf & 2) {
|
|
18402
|
-
var
|
|
18870
|
+
var ctx_r7 = i0__namespace.ɵɵnextContext(2);
|
|
18403
18871
|
i0__namespace.ɵɵadvance(4);
|
|
18404
|
-
i0__namespace.ɵɵproperty("ngIf",
|
|
18872
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r7.isSearching());
|
|
18405
18873
|
}
|
|
18406
18874
|
}
|
|
18407
18875
|
function CatalogListComponent_div_1_ng_template_3_div_0_Template(rf, ctx) {
|
|
@@ -18422,9 +18890,9 @@
|
|
|
18422
18890
|
}
|
|
18423
18891
|
if (rf & 2) {
|
|
18424
18892
|
i0__namespace.ɵɵnextContext();
|
|
18425
|
-
var
|
|
18426
|
-
var
|
|
18427
|
-
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(1, 2,
|
|
18893
|
+
var _r10 = i0__namespace.ɵɵreference(6);
|
|
18894
|
+
var ctx_r9 = i0__namespace.ɵɵnextContext();
|
|
18895
|
+
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(1, 2, ctx_r9.userService.isLogged$))("ngIfElse", _r10);
|
|
18428
18896
|
}
|
|
18429
18897
|
}
|
|
18430
18898
|
function CatalogListComponent_div_1_ng_template_5_Template(rf, ctx) {
|
|
@@ -18446,50 +18914,98 @@
|
|
|
18446
18914
|
i0__namespace.ɵɵelementEnd();
|
|
18447
18915
|
}
|
|
18448
18916
|
if (rf & 2) {
|
|
18449
|
-
var
|
|
18917
|
+
var _r8 = i0__namespace.ɵɵreference(4);
|
|
18450
18918
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
18451
18919
|
i0__namespace.ɵɵadvance(1);
|
|
18452
18920
|
i0__namespace.ɵɵproperty("width", 279)("height", 243)("iconName", ctx_r0.icon.NoRecipeFound);
|
|
18453
18921
|
i0__namespace.ɵɵadvance(1);
|
|
18454
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r0.isFiltering())("ngIfElse",
|
|
18922
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.isFiltering())("ngIfElse", _r8);
|
|
18455
18923
|
}
|
|
18456
18924
|
}
|
|
18457
18925
|
function CatalogListComponent_ng_miam_card_create_recipe_3_Template(rf, ctx) {
|
|
18458
18926
|
if (rf & 1) {
|
|
18459
|
-
var
|
|
18927
|
+
var _r15_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18460
18928
|
i0__namespace.ɵɵelementStart(0, "ng-miam-card-create-recipe", 23);
|
|
18461
|
-
i0__namespace.ɵɵlistener("clicked", function CatalogListComponent_ng_miam_card_create_recipe_3_Template_ng_miam_card_create_recipe_clicked_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
18929
|
+
i0__namespace.ɵɵlistener("clicked", function CatalogListComponent_ng_miam_card_create_recipe_3_Template_ng_miam_card_create_recipe_clicked_0_listener() { i0__namespace.ɵɵrestoreView(_r15_1); var ctx_r14 = i0__namespace.ɵɵnextContext(); return ctx_r14.recipeActionTriggered.emit({ action: "CREATE", recipe: null }); });
|
|
18462
18930
|
i0__namespace.ɵɵelementEnd();
|
|
18463
18931
|
}
|
|
18464
18932
|
}
|
|
18465
|
-
function
|
|
18933
|
+
function CatalogListComponent_ng_template_4_Template(rf, ctx) {
|
|
18466
18934
|
if (rf & 1) {
|
|
18467
|
-
var
|
|
18935
|
+
var _r18_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18468
18936
|
i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-card", 24);
|
|
18469
|
-
i0__namespace.ɵɵlistener("addToMealsPlanner", function
|
|
18937
|
+
i0__namespace.ɵɵlistener("addToMealsPlanner", function CatalogListComponent_ng_template_4_Template_ng_miam_recipe_card_addToMealsPlanner_0_listener($event) { i0__namespace.ɵɵrestoreView(_r18_1); var ctx_r17 = i0__namespace.ɵɵnextContext(); return ctx_r17.addToMealsPlanner.emit($event); })("actionTriggered", function CatalogListComponent_ng_template_4_Template_ng_miam_recipe_card_actionTriggered_0_listener($event) { i0__namespace.ɵɵrestoreView(_r18_1); var recipe_r16 = ctx.recipe; var ctx_r19 = i0__namespace.ɵɵnextContext(); return ctx_r19.recipeActionTriggered.emit({ action: $event, recipe: recipe_r16 }); });
|
|
18470
18938
|
i0__namespace.ɵɵelementEnd();
|
|
18471
18939
|
}
|
|
18472
18940
|
if (rf & 2) {
|
|
18473
|
-
var
|
|
18474
|
-
var
|
|
18475
|
-
i0__namespace.ɵɵproperty("recipe",
|
|
18941
|
+
var recipe_r16 = ctx.recipe;
|
|
18942
|
+
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
18943
|
+
i0__namespace.ɵɵproperty("recipe", recipe_r16)("originTrace", ctx_r3.eventTrace())("displayPricing", ctx_r3.displayPricing)("previewAllowed", !ctx_r3.addRecipeMode)("addRecipeMode", ctx_r3.addRecipeMode)("displayGuests", ctx_r3.displayGuests)("helpButtonAllowed", ctx_r3.helpButtonAllowed);
|
|
18476
18944
|
}
|
|
18477
18945
|
}
|
|
18478
|
-
function
|
|
18946
|
+
var _c10$1 = function (a0) { return { recipe: a0 }; };
|
|
18947
|
+
function CatalogListComponent_ng_container_6_ng_container_1_Template(rf, ctx) {
|
|
18479
18948
|
if (rf & 1) {
|
|
18480
|
-
i0__namespace.ɵɵ
|
|
18949
|
+
var _r25_1 = i0__namespace.ɵɵgetCurrentView();
|
|
18950
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
18951
|
+
i0__namespace.ɵɵelementStart(1, "div", 27);
|
|
18952
|
+
i0__namespace.ɵɵlistener("loadMore", function CatalogListComponent_ng_container_6_ng_container_1_Template_div_loadMore_1_listener() { i0__namespace.ɵɵrestoreView(_r25_1); var ctx_r24 = i0__namespace.ɵɵnextContext(2); return ctx_r24.autoloadContentIfNecessary(); });
|
|
18953
|
+
i0__namespace.ɵɵpipe(2, "async");
|
|
18954
|
+
i0__namespace.ɵɵelementContainer(3, 28);
|
|
18955
|
+
i0__namespace.ɵɵelementEnd();
|
|
18956
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
18957
|
+
}
|
|
18958
|
+
if (rf & 2) {
|
|
18959
|
+
var recipe_r20 = i0__namespace.ɵɵnextContext().$implicit;
|
|
18960
|
+
var ctx_r22 = i0__namespace.ɵɵnextContext();
|
|
18961
|
+
var _r2 = i0__namespace.ɵɵreference(5);
|
|
18962
|
+
i0__namespace.ɵɵadvance(1);
|
|
18963
|
+
i0__namespace.ɵɵproperty("isLoading", i0__namespace.ɵɵpipeBind1(2, 3, ctx_r22.loading));
|
|
18964
|
+
i0__namespace.ɵɵadvance(2);
|
|
18965
|
+
i0__namespace.ɵɵproperty("ngTemplateOutlet", _r2)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(5, _c10$1, recipe_r20));
|
|
18966
|
+
}
|
|
18967
|
+
}
|
|
18968
|
+
function CatalogListComponent_ng_container_6_ng_container_2_Template(rf, ctx) {
|
|
18969
|
+
if (rf & 1) {
|
|
18970
|
+
i0__namespace.ɵɵelementContainer(0, 28);
|
|
18481
18971
|
}
|
|
18482
18972
|
if (rf & 2) {
|
|
18483
|
-
var
|
|
18484
|
-
i0__namespace.ɵɵ
|
|
18973
|
+
var recipe_r20 = i0__namespace.ɵɵnextContext().$implicit;
|
|
18974
|
+
i0__namespace.ɵɵnextContext();
|
|
18975
|
+
var _r2 = i0__namespace.ɵɵreference(5);
|
|
18976
|
+
i0__namespace.ɵɵproperty("ngTemplateOutlet", _r2)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c10$1, recipe_r20));
|
|
18485
18977
|
}
|
|
18486
18978
|
}
|
|
18487
|
-
function
|
|
18979
|
+
function CatalogListComponent_ng_container_6_Template(rf, ctx) {
|
|
18488
18980
|
if (rf & 1) {
|
|
18489
|
-
i0__namespace.ɵɵ
|
|
18981
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
18982
|
+
i0__namespace.ɵɵtemplate(1, CatalogListComponent_ng_container_6_ng_container_1_Template, 4, 7, "ng-container", 25);
|
|
18983
|
+
i0__namespace.ɵɵtemplate(2, CatalogListComponent_ng_container_6_ng_container_2_Template, 1, 4, "ng-container", 26);
|
|
18984
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
18985
|
+
}
|
|
18986
|
+
if (rf & 2) {
|
|
18987
|
+
var isLast_r21 = ctx.last;
|
|
18988
|
+
i0__namespace.ɵɵadvance(1);
|
|
18989
|
+
i0__namespace.ɵɵproperty("ngIf", isLast_r21);
|
|
18990
|
+
i0__namespace.ɵɵadvance(1);
|
|
18991
|
+
i0__namespace.ɵɵproperty("ngIf", !isLast_r21);
|
|
18992
|
+
}
|
|
18993
|
+
}
|
|
18994
|
+
function CatalogListComponent_ng_miam_catalog_article_card_7_Template(rf, ctx) {
|
|
18995
|
+
if (rf & 1) {
|
|
18996
|
+
i0__namespace.ɵɵelement(0, "ng-miam-catalog-article-card", 29);
|
|
18997
|
+
}
|
|
18998
|
+
if (rf & 2) {
|
|
18999
|
+
var article_r28 = ctx.$implicit;
|
|
19000
|
+
i0__namespace.ɵɵproperty("article", article_r28);
|
|
19001
|
+
}
|
|
19002
|
+
}
|
|
19003
|
+
function CatalogListComponent_div_8_Template(rf, ctx) {
|
|
19004
|
+
if (rf & 1) {
|
|
19005
|
+
i0__namespace.ɵɵelementStart(0, "div", 30);
|
|
18490
19006
|
i0__namespace.ɵɵelement(1, "ng-miam-loader");
|
|
18491
19007
|
i0__namespace.ɵɵelementStart(2, "div");
|
|
18492
|
-
i0__namespace.ɵɵi18n(3,
|
|
19008
|
+
i0__namespace.ɵɵi18n(3, 31);
|
|
18493
19009
|
i0__namespace.ɵɵelementEnd();
|
|
18494
19010
|
i0__namespace.ɵɵelementEnd();
|
|
18495
19011
|
}
|
|
@@ -18504,10 +19020,9 @@
|
|
|
18504
19020
|
_c$1);
|
|
18505
19021
|
var CatalogListComponent = /** @class */ (function (_super) {
|
|
18506
19022
|
__extends(CatalogListComponent, _super);
|
|
18507
|
-
function CatalogListComponent(recipesService,
|
|
19023
|
+
function CatalogListComponent(recipesService, articlesService, userService, context, cdr, analyticsService) {
|
|
18508
19024
|
var _this = _super.call(this, analyticsService) || this;
|
|
18509
19025
|
_this.recipesService = recipesService;
|
|
18510
|
-
_this.recipeLikesService = recipeLikesService;
|
|
18511
19026
|
_this.articlesService = articlesService;
|
|
18512
19027
|
_this.userService = userService;
|
|
18513
19028
|
_this.context = context;
|
|
@@ -18552,10 +19067,6 @@
|
|
|
18552
19067
|
enumerable: false,
|
|
18553
19068
|
configurable: true
|
|
18554
19069
|
});
|
|
18555
|
-
CatalogListComponent.prototype.ngOnInit = function () {
|
|
18556
|
-
this.bottomAnchor = document.getElementById('miam-catalog-list__anchor');
|
|
18557
|
-
this.initLoadOnScroll();
|
|
18558
|
-
};
|
|
18559
19070
|
CatalogListComponent.prototype.ngOnChanges = function (changes) {
|
|
18560
19071
|
var changesKeys = Object.keys(changes);
|
|
18561
19072
|
// Prevents reload loop in angular, because originTrace and excludedRecipesIds are passed as methods so they keep refreshing the DOM
|
|
@@ -18572,27 +19083,11 @@
|
|
|
18572
19083
|
CatalogListComponent.prototype.currentPath = function () {
|
|
18573
19084
|
return this.filters.eventPath();
|
|
18574
19085
|
};
|
|
18575
|
-
CatalogListComponent.prototype.initLoadOnScroll = function () {
|
|
18576
|
-
var _this = this;
|
|
18577
|
-
// Receive an event each time the anchor enters/leaves the viewport
|
|
18578
|
-
this.intersectionObserver = new IntersectionObserver(function () { _this.autoloadContentIfNecessary(); }, {});
|
|
18579
|
-
// Receive an event each time an attribute/child is added/deleted/updated in the parent div of the recipes
|
|
18580
|
-
// i.e. will be triggered each time new recipes are displayed
|
|
18581
|
-
this.mutationObserver = new MutationObserver(function () { _this.autoloadContentIfNecessary(); });
|
|
18582
|
-
this.intersectionObserver.observe(this.bottomAnchor);
|
|
18583
|
-
this.mutationObserver.observe(document.getElementsByClassName('miam-catalog-list__cards')[0], { attributes: true, childList: true, subtree: false } // subtree false => changes on children won't trigger the callback
|
|
18584
|
-
);
|
|
18585
|
-
};
|
|
18586
|
-
CatalogListComponent.prototype.anchorIsOnScreen = function () {
|
|
18587
|
-
var viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
18588
|
-
var rect = this.bottomAnchor.getBoundingClientRect();
|
|
18589
|
-
return (rect.top <= viewportHeight && rect.bottom >= 0);
|
|
18590
|
-
};
|
|
18591
19086
|
CatalogListComponent.prototype.autoloadContentIfNecessary = function () {
|
|
18592
19087
|
var _this = this;
|
|
18593
19088
|
this.subscriptions.push(this.loading.pipe(operators.take(1), operators.filter(function (loading) { return !loading; })).subscribe(function () {
|
|
18594
|
-
if (
|
|
18595
|
-
(_this.articles.length > 0 && !_this.noMoreArticles))
|
|
19089
|
+
if ((_this.currentRecipes.length > 0 && !_this.noMoreRecipes) ||
|
|
19090
|
+
(_this.articles.length > 0 && !_this.noMoreArticles)) {
|
|
18596
19091
|
// At component initial load, 2 calls will be made for the first two recipes page
|
|
18597
19092
|
// This is to avoid making the loader spin twice
|
|
18598
19093
|
_this.loadMore(_this.lastPage > 2);
|
|
@@ -18603,6 +19098,7 @@
|
|
|
18603
19098
|
if (loader === void 0) { loader = true; }
|
|
18604
19099
|
if (loader) {
|
|
18605
19100
|
this.loading.next(true);
|
|
19101
|
+
this.cdr.detectChanges();
|
|
18606
19102
|
}
|
|
18607
19103
|
this.lastPage++;
|
|
18608
19104
|
this.loadContent();
|
|
@@ -18679,33 +19175,16 @@
|
|
|
18679
19175
|
};
|
|
18680
19176
|
CatalogListComponent.prototype.ngOnDestroy = function () {
|
|
18681
19177
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
18682
|
-
this.intersectionObserver.disconnect();
|
|
18683
|
-
this.mutationObserver.disconnect();
|
|
18684
19178
|
};
|
|
18685
19179
|
CatalogListComponent.prototype.isSearching = function () {
|
|
18686
19180
|
return this.filters.search && this.filters.search !== '';
|
|
18687
19181
|
};
|
|
18688
19182
|
CatalogListComponent.prototype.isFieldEmpty = function (recipeFilter) {
|
|
18689
|
-
var e_1, _c;
|
|
18690
19183
|
if (!recipeFilter) {
|
|
18691
19184
|
return true;
|
|
18692
19185
|
}
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
var f = recipeFilter_1_1.value;
|
|
18696
|
-
if (f.value) {
|
|
18697
|
-
return false;
|
|
18698
|
-
}
|
|
18699
|
-
}
|
|
18700
|
-
}
|
|
18701
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
18702
|
-
finally {
|
|
18703
|
-
try {
|
|
18704
|
-
if (recipeFilter_1_1 && !recipeFilter_1_1.done && (_c = recipeFilter_1.return)) _c.call(recipeFilter_1);
|
|
18705
|
-
}
|
|
18706
|
-
finally { if (e_1) throw e_1.error; }
|
|
18707
|
-
}
|
|
18708
|
-
return true;
|
|
19186
|
+
// if recipeFilter has at least one filter with value, return false
|
|
19187
|
+
return !recipeFilter.some(function (f) { return f.value; });
|
|
18709
19188
|
};
|
|
18710
19189
|
CatalogListComponent.prototype.isFiltering = function () {
|
|
18711
19190
|
return this.isSearching() ||
|
|
@@ -18713,6 +19192,9 @@
|
|
|
18713
19192
|
!this.isFieldEmpty(this.filters.cost) ||
|
|
18714
19193
|
!this.isFieldEmpty(this.filters.time);
|
|
18715
19194
|
};
|
|
19195
|
+
CatalogListComponent.prototype.trackByFn = function (index, recipe) {
|
|
19196
|
+
return recipe.id;
|
|
19197
|
+
};
|
|
18716
19198
|
CatalogListComponent.prototype.props = function () {
|
|
18717
19199
|
var _a, _b;
|
|
18718
19200
|
if (!((_a = this.filters) === null || _a === void 0 ? void 0 : _a.search)) {
|
|
@@ -18748,7 +19230,7 @@
|
|
|
18748
19230
|
};
|
|
18749
19231
|
return CatalogListComponent;
|
|
18750
19232
|
}(EventTracerComponent));
|
|
18751
|
-
CatalogListComponent.ɵfac = function CatalogListComponent_Factory(t) { return new (t || CatalogListComponent)(i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(
|
|
19233
|
+
CatalogListComponent.ɵfac = function CatalogListComponent_Factory(t) { return new (t || CatalogListComponent)(i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ArticlesService), i0__namespace.ɵɵdirectiveInject(UserService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(AnalyticsService)); };
|
|
18752
19234
|
CatalogListComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CatalogListComponent, selectors: [["ng-miam-catalog-list"]], viewQuery: function CatalogListComponent_Query(rf, ctx) {
|
|
18753
19235
|
if (rf & 1) {
|
|
18754
19236
|
i0__namespace.ɵɵviewQuery(RecipeCardComponent, 1);
|
|
@@ -18757,7 +19239,7 @@
|
|
|
18757
19239
|
var _t = void 0;
|
|
18758
19240
|
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.recipeCards = _t);
|
|
18759
19241
|
}
|
|
18760
|
-
}, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing", displayGuests: "displayGuests", helpButtonAllowed: "helpButtonAllowed", addRecipeMode: "addRecipeMode", excludedRecipesIds: "excludedRecipesIds" }, outputs: { addToMealsPlanner: "addToMealsPlanner", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], decls:
|
|
19242
|
+
}, inputs: { filters: "filters", insertCreateCard: "insertCreateCard", randomMode: "randomMode", modifiedGuests: "modifiedGuests", displayPricing: "displayPricing", displayGuests: "displayGuests", helpButtonAllowed: "helpButtonAllowed", addRecipeMode: "addRecipeMode", excludedRecipesIds: "excludedRecipesIds" }, outputs: { addToMealsPlanner: "addToMealsPlanner", filterRemoved: "filterRemoved", recipeActionTriggered: "recipeActionTriggered", loading: "loading" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], decls: 10, vars: 10, consts: function () {
|
|
18761
19243
|
var i18n_0;
|
|
18762
19244
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
18763
19245
|
var MSG_EXTERNAL_2565683500171826824$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_LIST_CATALOG_LIST_COMPONENT_TS___1 = goog.getMsg("D\u00E9sol\u00E9, aucune proposition trouv\u00E9e");
|
|
@@ -18796,43 +19278,43 @@
|
|
|
18796
19278
|
i18n_8 = MSG_EXTERNAL_4851375363781203983$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_LIST_CATALOG_LIST_COMPONENT_TS___9;
|
|
18797
19279
|
}
|
|
18798
19280
|
else {
|
|
18799
|
-
i18n_8 = $localize(templateObject_5$
|
|
19281
|
+
i18n_8 = $localize(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject([":\u241Fcdf437ced0967505680ee7fbb9fe6583203edb25\u241F4851375363781203983:D\u00E9sol\u00E9, vous devez \u00EAtre connect\u00E9 pour acc\u00E9der au contenu de cette page."], [":\u241Fcdf437ced0967505680ee7fbb9fe6583203edb25\u241F4851375363781203983:D\u00E9sol\u00E9, vous devez \u00EAtre connect\u00E9 pour acc\u00E9der au contenu de cette page."])));
|
|
18800
19282
|
}
|
|
18801
|
-
var
|
|
19283
|
+
var i18n_11;
|
|
18802
19284
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
18803
|
-
var MSG_EXTERNAL_1875448131572248295$$
|
|
18804
|
-
|
|
19285
|
+
var MSG_EXTERNAL_1875448131572248295$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_LIST_CATALOG_LIST_COMPONENT_TS__12 = goog.getMsg(" Chargement des r\u00E9sultats... ");
|
|
19286
|
+
i18n_11 = MSG_EXTERNAL_1875448131572248295$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_LIST_CATALOG_LIST_COMPONENT_TS__12;
|
|
18805
19287
|
}
|
|
18806
19288
|
else {
|
|
18807
|
-
|
|
19289
|
+
i18n_11 = $localize(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject([":\u241F834498e5698b366d53cba7a7f98b06a12967862c\u241F1875448131572248295: Chargement des r\u00E9sultats... "], [":\u241F834498e5698b366d53cba7a7f98b06a12967862c\u241F1875448131572248295: Chargement des r\u00E9sultats... "])));
|
|
18808
19290
|
}
|
|
18809
|
-
return [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], [
|
|
19291
|
+
return [[1, "miam-catalog-list__cards"], ["class", "miam-catalog-list__notFound", 4, "ngIf"], ["class", "miam-catalog-list__card", 3, "clicked", 4, "ngIf"], ["recipeCard", ""], [4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "article", 4, "ngFor", "ngForOf"], ["class", "miam-catalog-list__loader", 4, "ngIf"], [1, "miam-catalog-list__notFound"], [1, "miam-catalog-list__notFound__icon", 3, "width", "height", "iconName"], [4, "ngIf", "ngIfElse"], ["notFiltering", ""], ["notLogged", ""], [1, "miam-catalog-list__notFound__title1", "filtering"], i18n_0, ["class", "miam-catalog-list__notFound__searching", 4, "ngIf"], [1, "miam-catalog-list__notFound__title2"], i18n_2, [1, "miam-catalog-list__notFound__searching"], i18n_4, [1, "miam-catalog-list__notFound__title1", "not-filtering"], i18n_6, [1, "miam-catalog-list__notFound__title1", "not-logged"], i18n_8, [1, "miam-catalog-list__card", 3, "clicked"], [3, "recipe", "originTrace", "displayPricing", "previewAllowed", "addRecipeMode", "displayGuests", "helpButtonAllowed", "addToMealsPlanner", "actionTriggered"], [4, "ngIf"], [3, "ngTemplateOutlet", "ngTemplateOutletContext", 4, "ngIf"], ["ngMiamLoadOnScroll", "", "marginRoot", "600px", 3, "isLoading", "loadMore"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "article"], [1, "miam-catalog-list__loader"], i18n_11];
|
|
18810
19292
|
}, template: function CatalogListComponent_Template(rf, ctx) {
|
|
18811
19293
|
if (rf & 1) {
|
|
18812
19294
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
18813
19295
|
i0__namespace.ɵɵtemplate(1, CatalogListComponent_div_1_Template, 7, 5, "div", 1);
|
|
18814
19296
|
i0__namespace.ɵɵpipe(2, "async");
|
|
18815
19297
|
i0__namespace.ɵɵtemplate(3, CatalogListComponent_ng_miam_card_create_recipe_3_Template, 1, 0, "ng-miam-card-create-recipe", 2);
|
|
18816
|
-
i0__namespace.ɵɵtemplate(4,
|
|
18817
|
-
i0__namespace.ɵɵtemplate(
|
|
18818
|
-
i0__namespace.ɵɵtemplate(
|
|
18819
|
-
i0__namespace.ɵɵ
|
|
18820
|
-
i0__namespace.ɵɵ
|
|
19298
|
+
i0__namespace.ɵɵtemplate(4, CatalogListComponent_ng_template_4_Template, 1, 7, "ng-template", null, 3, i0__namespace.ɵɵtemplateRefExtractor);
|
|
19299
|
+
i0__namespace.ɵɵtemplate(6, CatalogListComponent_ng_container_6_Template, 3, 2, "ng-container", 4);
|
|
19300
|
+
i0__namespace.ɵɵtemplate(7, CatalogListComponent_ng_miam_catalog_article_card_7_Template, 1, 1, "ng-miam-catalog-article-card", 5);
|
|
19301
|
+
i0__namespace.ɵɵtemplate(8, CatalogListComponent_div_8_Template, 4, 0, "div", 6);
|
|
19302
|
+
i0__namespace.ɵɵpipe(9, "async");
|
|
18821
19303
|
i0__namespace.ɵɵelementEnd();
|
|
18822
19304
|
}
|
|
18823
19305
|
if (rf & 2) {
|
|
18824
19306
|
i0__namespace.ɵɵadvance(1);
|
|
18825
|
-
i0__namespace.ɵɵproperty("ngIf", !i0__namespace.ɵɵpipeBind1(2,
|
|
19307
|
+
i0__namespace.ɵɵproperty("ngIf", !i0__namespace.ɵɵpipeBind1(2, 6, ctx.loading) && ctx.currentRecipes.length === 0 && ctx.articles.length === 0);
|
|
18826
19308
|
i0__namespace.ɵɵadvance(2);
|
|
18827
19309
|
i0__namespace.ɵɵproperty("ngIf", ctx.insertCreateCard && ctx.currentRecipes.length !== 0);
|
|
18828
|
-
i0__namespace.ɵɵadvance(
|
|
18829
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx.currentRecipes);
|
|
19310
|
+
i0__namespace.ɵɵadvance(3);
|
|
19311
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.currentRecipes)("ngForTrackBy", ctx.trackByFn);
|
|
18830
19312
|
i0__namespace.ɵɵadvance(1);
|
|
18831
19313
|
i0__namespace.ɵɵproperty("ngForOf", ctx.articles);
|
|
18832
19314
|
i0__namespace.ɵɵadvance(1);
|
|
18833
|
-
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(
|
|
19315
|
+
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(9, 8, ctx.loading));
|
|
18834
19316
|
}
|
|
18835
|
-
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgForOf, IconComponent, CardCreateRecipeComponent, RecipeCardComponent, CatalogArticleCardComponent, LoaderComponent], pipes: [i2__namespace$1.AsyncPipe], styles: [".miam-catalog-list__cards{display:grid;grid-template-columns:repeat(auto-fill,var(--m-catalog-card-width));justify-content:center;gap:16px;position:relative;width:100%;box-sizing:border-box}.miam-catalog-list__cards .miam-catalog-list__notFound{display:flex;flex-direction:column;width:100%;justify-content:center;text-align:center;padding:36px 0 0}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1{margin-top:36px;font-size:24px;font-weight:700;color:var(--m-color-primary)}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering{display:flex;justify-content:center}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering .miam-catalog-list__notFound__searching span{margin-left:5px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title2{font-size:22px;color:var(--m-color-grey-text)}.miam-catalog-list__cards .miam-catalog-list__loader{width:100%;font-size:20px;font-weight:700;color:var(--m-color-grey-text);text-align:center}.miam-catalog-list__cards .miam-catalog-list__loader .miam-loader{margin-top:80px;margin-bottom:16px;margin-left:calc(50% - 40px);height:80px;width:80px}.miam-catalog-list__cards #miam-catalog-list__anchor{position:relative;bottom:0;height:600px;margin-top:-600px}"], encapsulation: 2, changeDetection: 0 });
|
|
19317
|
+
}, directives: [i2__namespace$1.NgIf, i2__namespace$1.NgForOf, IconComponent, CardCreateRecipeComponent, RecipeCardComponent, LoadOnScrollDirective, i2__namespace$1.NgTemplateOutlet, CatalogArticleCardComponent, LoaderComponent], pipes: [i2__namespace$1.AsyncPipe], styles: [".miam-catalog-list__cards{display:grid;grid-template-columns:repeat(auto-fill,var(--m-catalog-card-width));justify-content:center;gap:16px;position:relative;width:100%;box-sizing:border-box}.miam-catalog-list__cards .miam-catalog-list__notFound{display:flex;flex-direction:column;width:100%;justify-content:center;text-align:center;padding:36px 0 0}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1{margin-top:36px;font-size:24px;font-weight:700;color:var(--m-color-primary)}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering{display:flex;justify-content:center}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title1.filtering .miam-catalog-list__notFound__searching span{margin-left:5px}.miam-catalog-list__cards .miam-catalog-list__notFound .miam-catalog-list__notFound__title2{font-size:22px;color:var(--m-color-grey-text)}.miam-catalog-list__cards .miam-catalog-list__loader{width:100%;font-size:20px;font-weight:700;color:var(--m-color-grey-text);text-align:center}.miam-catalog-list__cards .miam-catalog-list__loader .miam-loader{margin-top:80px;margin-bottom:16px;margin-left:calc(50% - 40px);height:80px;width:80px}.miam-catalog-list__cards #miam-catalog-list__anchor{position:relative;bottom:0;height:600px;margin-top:-600px}"], encapsulation: 2, changeDetection: 0 });
|
|
18836
19318
|
(function () {
|
|
18837
19319
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CatalogListComponent, [{
|
|
18838
19320
|
type: i0.Component,
|
|
@@ -18843,7 +19325,7 @@
|
|
|
18843
19325
|
encapsulation: i0.ViewEncapsulation.None,
|
|
18844
19326
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
18845
19327
|
}]
|
|
18846
|
-
}], function () { return [{ type: RecipesService }, { type:
|
|
19328
|
+
}], function () { return [{ type: RecipesService }, { type: ArticlesService }, { type: UserService }, { type: ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }]; }, { filters: [{
|
|
18847
19329
|
type: i0.Input
|
|
18848
19330
|
}], insertCreateCard: [{
|
|
18849
19331
|
type: i0.Input
|
|
@@ -18874,7 +19356,7 @@
|
|
|
18874
19356
|
args: [RecipeCardComponent]
|
|
18875
19357
|
}] });
|
|
18876
19358
|
})();
|
|
18877
|
-
var templateObject_1$i, templateObject_2$f, templateObject_3$b, templateObject_4$9, templateObject_5$
|
|
19359
|
+
var templateObject_1$i, templateObject_2$f, templateObject_3$b, templateObject_4$9, templateObject_5$6, templateObject_6$6;
|
|
18878
19360
|
|
|
18879
19361
|
function MealsPlannerCatalogComponent_div_14_Template(rf, ctx) {
|
|
18880
19362
|
if (rf & 1) {
|
|
@@ -19419,7 +19901,9 @@
|
|
|
19419
19901
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
19420
19902
|
this.recipeDetailsService.onlyShowPreparation = false;
|
|
19421
19903
|
};
|
|
19422
|
-
MealsPlannerComponent.prototype.currentPath = function () {
|
|
19904
|
+
MealsPlannerComponent.prototype.currentPath = function () {
|
|
19905
|
+
return 'miam/recipes/meals-planner';
|
|
19906
|
+
};
|
|
19423
19907
|
// TODO: cut into more methods
|
|
19424
19908
|
MealsPlannerComponent.prototype.addRecipes = function () {
|
|
19425
19909
|
var _this = this;
|
|
@@ -19743,13 +20227,14 @@
|
|
|
19743
20227
|
_c);
|
|
19744
20228
|
var CatalogCategoryComponent = /** @class */ (function (_super) {
|
|
19745
20229
|
__extends(CatalogCategoryComponent, _super);
|
|
19746
|
-
function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService) {
|
|
20230
|
+
function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService, basketTransfer) {
|
|
19747
20231
|
var _this = _super.call(this, analyticsService) || this;
|
|
19748
20232
|
_this.recipesService = recipesService;
|
|
19749
20233
|
_this.articlesService = articlesService;
|
|
19750
20234
|
_this.context = context;
|
|
19751
20235
|
_this.cdr = cdr;
|
|
19752
20236
|
_this.analyticsService = analyticsService;
|
|
20237
|
+
_this.basketTransfer = basketTransfer;
|
|
19753
20238
|
_this.title = '';
|
|
19754
20239
|
_this.maxRecipeNumber = 20;
|
|
19755
20240
|
_this.displayPricing = true;
|
|
@@ -19821,7 +20306,7 @@
|
|
|
19821
20306
|
};
|
|
19822
20307
|
return CatalogCategoryComponent;
|
|
19823
20308
|
}(EventTracerComponent));
|
|
19824
|
-
CatalogCategoryComponent.ɵfac = function CatalogCategoryComponent_Factory(t) { return new (t || CatalogCategoryComponent)(i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ArticlesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(AnalyticsService)); };
|
|
20309
|
+
CatalogCategoryComponent.ɵfac = function CatalogCategoryComponent_Factory(t) { return new (t || CatalogCategoryComponent)(i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ArticlesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(BasketTransferService)); };
|
|
19825
20310
|
CatalogCategoryComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CatalogCategoryComponent, selectors: [["ng-miam-catalog-category"]], viewQuery: function CatalogCategoryComponent_Query(rf, ctx) {
|
|
19826
20311
|
if (rf & 1) {
|
|
19827
20312
|
i0__namespace.ɵɵviewQuery(_c0$5, 1);
|
|
@@ -19870,7 +20355,7 @@
|
|
|
19870
20355
|
encapsulation: i0.ViewEncapsulation.None,
|
|
19871
20356
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
19872
20357
|
}]
|
|
19873
|
-
}], function () { return [{ type: RecipesService }, { type: ArticlesService }, { type: ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }]; }, { filters: [{
|
|
20358
|
+
}], function () { return [{ type: RecipesService }, { type: ArticlesService }, { type: ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }, { type: BasketTransferService }]; }, { filters: [{
|
|
19874
20359
|
type: i0.Input
|
|
19875
20360
|
}], title: [{
|
|
19876
20361
|
type: i0.Input
|
|
@@ -20247,7 +20732,7 @@
|
|
|
20247
20732
|
i18n_8 = MSG_EXTERNAL_7387753154079259338$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_CATALOG_HEADER_CATALOG_HEADER_COMPONENT_TS___9;
|
|
20248
20733
|
}
|
|
20249
20734
|
else {
|
|
20250
|
-
i18n_8 = $localize(templateObject_5$
|
|
20735
|
+
i18n_8 = $localize(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject([":\u241F1e0415ec0e248029811bbeb6a2892c6bf701f9be\u241F7387753154079259338:Votre s\u00E9lection"], [":\u241F1e0415ec0e248029811bbeb6a2892c6bf701f9be\u241F7387753154079259338:Votre s\u00E9lection"])));
|
|
20251
20736
|
}
|
|
20252
20737
|
var i18n_10;
|
|
20253
20738
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -20382,7 +20867,7 @@
|
|
|
20382
20867
|
type: i0.Output
|
|
20383
20868
|
}] });
|
|
20384
20869
|
})();
|
|
20385
|
-
var templateObject_1$d, templateObject_2$a, templateObject_3$8, templateObject_4$7, templateObject_5$
|
|
20870
|
+
var templateObject_1$d, templateObject_2$a, templateObject_3$8, templateObject_4$7, templateObject_5$5, templateObject_6$5, templateObject_7$4, templateObject_8$2, templateObject_9$2;
|
|
20386
20871
|
|
|
20387
20872
|
function RecipeFormComponent_form_0_ng_template_3_Template(rf, ctx) {
|
|
20388
20873
|
if (rf & 1) {
|
|
@@ -20903,7 +21388,7 @@
|
|
|
20903
21388
|
i18n_8 = MSG_EXTERNAL_4142863621251590306$$LIB__WEB_COMPONENTS_RECIPE_CREATION_RECIPE_FORM_RECIPE_FORM_COMPONENT_TS___9;
|
|
20904
21389
|
}
|
|
20905
21390
|
else {
|
|
20906
|
-
i18n_8 = $localize(templateObject_5$
|
|
21391
|
+
i18n_8 = $localize(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject([":\u241Ffb8b4b6668befda8fc42e047c9b246d4777a881b\u241F4142863621251590306:Ajouter une photo"], [":\u241Ffb8b4b6668befda8fc42e047c9b246d4777a881b\u241F4142863621251590306:Ajouter une photo"])));
|
|
20907
21392
|
}
|
|
20908
21393
|
var i18n_10;
|
|
20909
21394
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -20984,7 +21469,7 @@
|
|
|
20984
21469
|
type: i0.Output
|
|
20985
21470
|
}] });
|
|
20986
21471
|
})();
|
|
20987
|
-
var templateObject_1$c, templateObject_2$9, templateObject_3$7, templateObject_4$6, templateObject_5$
|
|
21472
|
+
var templateObject_1$c, templateObject_2$9, templateObject_3$7, templateObject_4$6, templateObject_5$4, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9$1;
|
|
20988
21473
|
|
|
20989
21474
|
function TagsCreatorComponent_ng_miam_modal_0_Template(rf, ctx) {
|
|
20990
21475
|
if (rf & 1) {
|
|
@@ -21348,7 +21833,7 @@
|
|
|
21348
21833
|
i18n_8 = MSG_EXTERNAL_2575761888491507638$$LIB__WEB_COMPONENTS_RECIPE_CREATION_TAGS_SELECTOR_TAGS_SELECTOR_COMPONENT_TS__9;
|
|
21349
21834
|
}
|
|
21350
21835
|
else {
|
|
21351
|
-
i18n_8 = $localize(templateObject_5$
|
|
21836
|
+
i18n_8 = $localize(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject([":\u241F13a158067c29e5c5211ea07d687c286c5ba99516\u241F2575761888491507638: Famille d'ingr\u00E9dients "], [":\u241F13a158067c29e5c5211ea07d687c286c5ba99516\u241F2575761888491507638: Famille d'ingr\u00E9dients "])));
|
|
21352
21837
|
}
|
|
21353
21838
|
var i18n_10;
|
|
21354
21839
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -21399,7 +21884,7 @@
|
|
|
21399
21884
|
type: i0.Output
|
|
21400
21885
|
}] });
|
|
21401
21886
|
})();
|
|
21402
|
-
var templateObject_1$a, templateObject_2$7, templateObject_3$5, templateObject_4$4, templateObject_5$
|
|
21887
|
+
var templateObject_1$a, templateObject_2$7, templateObject_3$5, templateObject_4$4, templateObject_5$3, templateObject_6$3, templateObject_7$2;
|
|
21403
21888
|
|
|
21404
21889
|
var _c0$4 = ["topAnchor"];
|
|
21405
21890
|
var _c1$2 = ["stepperLinks"];
|
|
@@ -21916,7 +22401,7 @@
|
|
|
21916
22401
|
i18n_11 = MSG_EXTERNAL_4078662097036588656$$LIB__WEB_COMPONENTS_RECIPE_CREATION_RECIPE_STEPPER_RECIPE_STEPPER_COMPONENT_TS_12;
|
|
21917
22402
|
}
|
|
21918
22403
|
else {
|
|
21919
|
-
i18n_11 = $localize(templateObject_5$
|
|
22404
|
+
i18n_11 = $localize(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject([":\u241F49375178588cf9deb7d988b78a2c8f00026e7285\u241F4078662097036588656:Image trop volumineuse"], [":\u241F49375178588cf9deb7d988b78a2c8f00026e7285\u241F4078662097036588656:Image trop volumineuse"])));
|
|
21920
22405
|
}
|
|
21921
22406
|
var i18n_13;
|
|
21922
22407
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -22176,7 +22661,7 @@
|
|
|
22176
22661
|
args: ['step']
|
|
22177
22662
|
}] });
|
|
22178
22663
|
})();
|
|
22179
|
-
var templateObject_1$9, templateObject_2$6, templateObject_3$4, templateObject_4$3, templateObject_5$
|
|
22664
|
+
var templateObject_1$9, templateObject_2$6, templateObject_3$4, templateObject_4$3, templateObject_5$2, templateObject_6$2, templateObject_7$1, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23;
|
|
22180
22665
|
|
|
22181
22666
|
var _c0$3 = ["miamCatalogTopAnchor"];
|
|
22182
22667
|
function RecipeCatalogComponent_div_2_div_4_Template(rf, ctx) {
|
|
@@ -22800,7 +23285,7 @@
|
|
|
22800
23285
|
i18n_9 = MSG_EXTERNAL_7387753154079259338$$LIB__WEB_COMPONENTS_RECIPE_CATALOG_RECIPE_CATALOG_COMPONENT_TS____10;
|
|
22801
23286
|
}
|
|
22802
23287
|
else {
|
|
22803
|
-
i18n_9 = $localize(templateObject_5$
|
|
23288
|
+
i18n_9 = $localize(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject([":\u241F1e0415ec0e248029811bbeb6a2892c6bf701f9be\u241F7387753154079259338:Votre s\u00E9lection"], [":\u241F1e0415ec0e248029811bbeb6a2892c6bf701f9be\u241F7387753154079259338:Votre s\u00E9lection"])));
|
|
22804
23289
|
}
|
|
22805
23290
|
var i18n_11;
|
|
22806
23291
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -22856,7 +23341,7 @@
|
|
|
22856
23341
|
type: i0.Input
|
|
22857
23342
|
}] });
|
|
22858
23343
|
})();
|
|
22859
|
-
var templateObject_1$8, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$
|
|
23344
|
+
var templateObject_1$8, templateObject_2$5, templateObject_3$3, templateObject_4$2, templateObject_5$1, templateObject_6$1;
|
|
22860
23345
|
|
|
22861
23346
|
var RecipeCreationModule = /** @class */ (function () {
|
|
22862
23347
|
// Create custom elements so the WebComponents can be interpreted by the browser regardless of the js framework used
|
|
@@ -23239,7 +23724,7 @@
|
|
|
23239
23724
|
var _r1 = i0__namespace.ɵɵreference(2);
|
|
23240
23725
|
i0__namespace.ɵɵproperty("ngIf", !ctx.loading)("ngIfElse", _r1);
|
|
23241
23726
|
}
|
|
23242
|
-
}, 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:
|
|
23727
|
+
}, 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 });
|
|
23243
23728
|
(function () {
|
|
23244
23729
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeAddonComponent, [{
|
|
23245
23730
|
type: i0.Component,
|
|
@@ -23644,7 +24129,7 @@
|
|
|
23644
24129
|
}
|
|
23645
24130
|
function RecipeDetailsComponent_div_0_div_3_ng_miam_like_button_10_Template(rf, ctx) {
|
|
23646
24131
|
if (rf & 1) {
|
|
23647
|
-
i0__namespace.ɵɵelement(0, "ng-miam-like-button",
|
|
24132
|
+
i0__namespace.ɵɵelement(0, "ng-miam-like-button", 45);
|
|
23648
24133
|
}
|
|
23649
24134
|
if (rf & 2) {
|
|
23650
24135
|
var ctx_r6 = i0__namespace.ɵɵnextContext(3);
|
|
@@ -23653,7 +24138,7 @@
|
|
|
23653
24138
|
}
|
|
23654
24139
|
function RecipeDetailsComponent_div_0_div_3_img_14_Template(rf, ctx) {
|
|
23655
24140
|
if (rf & 1) {
|
|
23656
|
-
i0__namespace.ɵɵelement(0, "img",
|
|
24141
|
+
i0__namespace.ɵɵelement(0, "img", 46);
|
|
23657
24142
|
}
|
|
23658
24143
|
if (rf & 2) {
|
|
23659
24144
|
var ctx_r7 = i0__namespace.ɵɵnextContext(3);
|
|
@@ -23662,7 +24147,7 @@
|
|
|
23662
24147
|
}
|
|
23663
24148
|
function RecipeDetailsComponent_div_0_div_3_youtube_player_15_Template(rf, ctx) {
|
|
23664
24149
|
if (rf & 1) {
|
|
23665
|
-
i0__namespace.ɵɵelement(0, "youtube-player",
|
|
24150
|
+
i0__namespace.ɵɵelement(0, "youtube-player", 47);
|
|
23666
24151
|
}
|
|
23667
24152
|
if (rf & 2) {
|
|
23668
24153
|
var ctx_r8 = i0__namespace.ɵɵnextContext(3);
|
|
@@ -23671,8 +24156,8 @@
|
|
|
23671
24156
|
}
|
|
23672
24157
|
function RecipeDetailsComponent_div_0_div_3_div_16_Template(rf, ctx) {
|
|
23673
24158
|
if (rf & 1) {
|
|
23674
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
23675
|
-
i0__namespace.ɵɵelement(1, "img",
|
|
24159
|
+
i0__namespace.ɵɵelementStart(0, "div", 48);
|
|
24160
|
+
i0__namespace.ɵɵelement(1, "img", 49);
|
|
23676
24161
|
i0__namespace.ɵɵelementEnd();
|
|
23677
24162
|
}
|
|
23678
24163
|
if (rf & 2) {
|
|
@@ -23683,9 +24168,9 @@
|
|
|
23683
24168
|
}
|
|
23684
24169
|
function RecipeDetailsComponent_div_0_div_3_ng_miam_addon_link_18_Template(rf, ctx) {
|
|
23685
24170
|
if (rf & 1) {
|
|
23686
|
-
var
|
|
23687
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-addon-link",
|
|
23688
|
-
i0__namespace.ɵɵlistener("showAddon", function RecipeDetailsComponent_div_0_div_3_ng_miam_addon_link_18_Template_ng_miam_addon_link_showAddon_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
24171
|
+
var _r19_1 = i0__namespace.ɵɵgetCurrentView();
|
|
24172
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-addon-link", 50);
|
|
24173
|
+
i0__namespace.ɵɵlistener("showAddon", function RecipeDetailsComponent_div_0_div_3_ng_miam_addon_link_18_Template_ng_miam_addon_link_showAddon_0_listener() { i0__namespace.ɵɵrestoreView(_r19_1); var ctx_r18 = i0__namespace.ɵɵnextContext(3); return ctx_r18.toggleAddon(); });
|
|
23689
24174
|
i0__namespace.ɵɵelementEnd();
|
|
23690
24175
|
}
|
|
23691
24176
|
if (rf & 2) {
|
|
@@ -23695,7 +24180,7 @@
|
|
|
23695
24180
|
}
|
|
23696
24181
|
function RecipeDetailsComponent_div_0_div_3_ng_miam_like_button_27_Template(rf, ctx) {
|
|
23697
24182
|
if (rf & 1) {
|
|
23698
|
-
i0__namespace.ɵɵelement(0, "ng-miam-like-button",
|
|
24183
|
+
i0__namespace.ɵɵelement(0, "ng-miam-like-button", 51);
|
|
23699
24184
|
}
|
|
23700
24185
|
if (rf & 2) {
|
|
23701
24186
|
var ctx_r11 = i0__namespace.ɵɵnextContext(3);
|
|
@@ -23704,17 +24189,17 @@
|
|
|
23704
24189
|
}
|
|
23705
24190
|
function RecipeDetailsComponent_div_0_div_3_ng_miam_products_picker_35_Template(rf, ctx) {
|
|
23706
24191
|
if (rf & 1) {
|
|
23707
|
-
var
|
|
23708
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-products-picker",
|
|
23709
|
-
i0__namespace.ɵɵlistener("closeModal", function RecipeDetailsComponent_div_0_div_3_ng_miam_products_picker_35_Template_ng_miam_products_picker_closeModal_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
24192
|
+
var _r21_1 = i0__namespace.ɵɵgetCurrentView();
|
|
24193
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-products-picker", 52);
|
|
24194
|
+
i0__namespace.ɵɵlistener("closeModal", function RecipeDetailsComponent_div_0_div_3_ng_miam_products_picker_35_Template_ng_miam_products_picker_closeModal_0_listener() { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r20 = i0__namespace.ɵɵnextContext(3); return ctx_r20.onClose(); });
|
|
23710
24195
|
i0__namespace.ɵɵelementEnd();
|
|
23711
24196
|
}
|
|
23712
24197
|
}
|
|
23713
24198
|
function RecipeDetailsComponent_div_0_div_3_div_36_Template(rf, ctx) {
|
|
23714
24199
|
if (rf & 1) {
|
|
23715
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
23716
|
-
i0__namespace.ɵɵelement(1, "ng-miam-recipe-details-ingredients",
|
|
23717
|
-
i0__namespace.ɵɵelement(2, "ng-miam-recipe-details-steps",
|
|
24200
|
+
i0__namespace.ɵɵelementStart(0, "div", 53);
|
|
24201
|
+
i0__namespace.ɵɵelement(1, "ng-miam-recipe-details-ingredients", 54);
|
|
24202
|
+
i0__namespace.ɵɵelement(2, "ng-miam-recipe-details-steps", 55);
|
|
23718
24203
|
i0__namespace.ɵɵelementEnd();
|
|
23719
24204
|
}
|
|
23720
24205
|
if (rf & 2) {
|
|
@@ -23725,135 +24210,130 @@
|
|
|
23725
24210
|
i0__namespace.ɵɵproperty("recipe", ctx_r13.recipeDetailsService.recipe);
|
|
23726
24211
|
}
|
|
23727
24212
|
}
|
|
23728
|
-
function
|
|
24213
|
+
function RecipeDetailsComponent_div_0_div_3_button_39_span_7_Template(rf, ctx) {
|
|
23729
24214
|
if (rf & 1) {
|
|
23730
|
-
i0__namespace.ɵɵelementStart(0, "
|
|
23731
|
-
i0__namespace.ɵɵ
|
|
23732
|
-
i0__namespace.ɵɵi18n(2, 62);
|
|
23733
|
-
i0__namespace.ɵɵelementEnd();
|
|
24215
|
+
i0__namespace.ɵɵelementStart(0, "span");
|
|
24216
|
+
i0__namespace.ɵɵi18n(1, 63);
|
|
23734
24217
|
i0__namespace.ɵɵelementEnd();
|
|
23735
24218
|
}
|
|
23736
24219
|
}
|
|
23737
|
-
function
|
|
24220
|
+
function RecipeDetailsComponent_div_0_div_3_button_39_span_8_Template(rf, ctx) {
|
|
23738
24221
|
if (rf & 1) {
|
|
23739
24222
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
23740
24223
|
i0__namespace.ɵɵi18n(1, 64);
|
|
23741
24224
|
i0__namespace.ɵɵelementEnd();
|
|
23742
24225
|
}
|
|
23743
24226
|
}
|
|
23744
|
-
function
|
|
24227
|
+
function RecipeDetailsComponent_div_0_div_3_button_39_Template(rf, ctx) {
|
|
23745
24228
|
if (rf & 1) {
|
|
23746
|
-
i0__namespace.ɵɵ
|
|
23747
|
-
i0__namespace.ɵɵ
|
|
24229
|
+
var _r25_1 = i0__namespace.ɵɵgetCurrentView();
|
|
24230
|
+
i0__namespace.ɵɵelementStart(0, "button", 56);
|
|
24231
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_button_39_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r25_1); var ctx_r24 = i0__namespace.ɵɵnextContext(3); return ctx_r24.recipeDetailsService.addAllIngredientsToBasket(ctx_r24.eventTrace()); });
|
|
24232
|
+
i0__namespace.ɵɵelement(1, "img", 57);
|
|
24233
|
+
i0__namespace.ɵɵelementStart(2, "div", 58);
|
|
24234
|
+
i0__namespace.ɵɵelementStart(3, "span");
|
|
24235
|
+
i0__namespace.ɵɵi18n(4, 59);
|
|
23748
24236
|
i0__namespace.ɵɵelementEnd();
|
|
23749
|
-
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23753
|
-
i0__namespace.ɵɵ
|
|
23754
|
-
i0__namespace.ɵɵelementStart(
|
|
23755
|
-
i0__namespace.ɵɵ
|
|
24237
|
+
i0__namespace.ɵɵelementStart(5, "span");
|
|
24238
|
+
i0__namespace.ɵɵtext(6);
|
|
24239
|
+
i0__namespace.ɵɵelementEnd();
|
|
24240
|
+
i0__namespace.ɵɵtemplate(7, RecipeDetailsComponent_div_0_div_3_button_39_span_7_Template, 2, 0, "span", 60);
|
|
24241
|
+
i0__namespace.ɵɵtemplate(8, RecipeDetailsComponent_div_0_div_3_button_39_span_8_Template, 2, 0, "span", 60);
|
|
24242
|
+
i0__namespace.ɵɵelementStart(9, "div", 61);
|
|
24243
|
+
i0__namespace.ɵɵtext(10, " ( ");
|
|
24244
|
+
i0__namespace.ɵɵelementStart(11, "span");
|
|
24245
|
+
i0__namespace.ɵɵpipe(12, "async");
|
|
24246
|
+
i0__namespace.ɵɵtext(13);
|
|
24247
|
+
i0__namespace.ɵɵpipe(14, "currency");
|
|
24248
|
+
i0__namespace.ɵɵelementEnd();
|
|
24249
|
+
i0__namespace.ɵɵelement(15, "div", 62);
|
|
24250
|
+
i0__namespace.ɵɵpipe(16, "async");
|
|
24251
|
+
i0__namespace.ɵɵtext(17, " ) ");
|
|
23756
24252
|
i0__namespace.ɵɵelementEnd();
|
|
23757
|
-
i0__namespace.ɵɵelementStart(3, "span");
|
|
23758
|
-
i0__namespace.ɵɵtext(4);
|
|
23759
24253
|
i0__namespace.ɵɵelementEnd();
|
|
23760
|
-
i0__namespace.ɵɵtemplate(5, RecipeDetailsComponent_div_0_div_3_ng_container_38_button_1_ng_template_3_span_5_Template, 2, 0, "span", 41);
|
|
23761
|
-
i0__namespace.ɵɵtemplate(6, RecipeDetailsComponent_div_0_div_3_ng_container_38_button_1_ng_template_3_span_6_Template, 2, 0, "span", 41);
|
|
23762
24254
|
i0__namespace.ɵɵelementEnd();
|
|
23763
24255
|
}
|
|
23764
24256
|
if (rf & 2) {
|
|
23765
|
-
var
|
|
23766
|
-
i0__namespace.ɵɵadvance(
|
|
23767
|
-
i0__namespace.ɵɵtextInterpolate(
|
|
24257
|
+
var ctx_r14 = i0__namespace.ɵɵnextContext(3);
|
|
24258
|
+
i0__namespace.ɵɵadvance(6);
|
|
24259
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r14.recipeDetailsService.remainingBasketEntries.length);
|
|
23768
24260
|
i0__namespace.ɵɵadvance(1);
|
|
23769
|
-
i0__namespace.ɵɵproperty("ngIf",
|
|
24261
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r14.recipeDetailsService.remainingBasketEntries.length <= 1);
|
|
23770
24262
|
i0__namespace.ɵɵadvance(1);
|
|
23771
|
-
i0__namespace.ɵɵproperty("ngIf",
|
|
23772
|
-
|
|
23773
|
-
|
|
23774
|
-
|
|
23775
|
-
|
|
23776
|
-
var _r29_1 = i0__namespace.ɵɵgetCurrentView();
|
|
23777
|
-
i0__namespace.ɵɵelementStart(0, "button", 57);
|
|
23778
|
-
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_ng_container_38_button_1_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r28 = i0__namespace.ɵɵnextContext(4); return ctx_r28.recipeDetailsService.addAllIngredientsToBasket(ctx_r28.eventTrace()); });
|
|
23779
|
-
i0__namespace.ɵɵelement(1, "img", 58);
|
|
23780
|
-
i0__namespace.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_3_ng_container_38_button_1_div_2_Template, 3, 0, "div", 59);
|
|
23781
|
-
i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_ng_container_38_button_1_ng_template_3_Template, 7, 3, "ng-template", null, 60, i0__namespace.ɵɵtemplateRefExtractor);
|
|
23782
|
-
i0__namespace.ɵɵelementEnd();
|
|
23783
|
-
}
|
|
23784
|
-
if (rf & 2) {
|
|
23785
|
-
var _r24 = i0__namespace.ɵɵreference(4);
|
|
23786
|
-
var ctx_r20 = i0__namespace.ɵɵnextContext(4);
|
|
24263
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r14.recipeDetailsService.remainingBasketEntries.length > 1);
|
|
24264
|
+
i0__namespace.ɵɵadvance(3);
|
|
24265
|
+
i0__namespace.ɵɵclassProp("hidden", i0__namespace.ɵɵpipeBind1(12, 8, ctx_r14.recipeDetailsService.ingredientToBasketLoading$));
|
|
24266
|
+
i0__namespace.ɵɵadvance(2);
|
|
24267
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(14, 10, ctx_r14.recipeDetailsService.recipePrice.remaining, ctx_r14.suppliersService.supplier$.value.currency), " ");
|
|
23787
24268
|
i0__namespace.ɵɵadvance(2);
|
|
23788
|
-
i0__namespace.ɵɵ
|
|
24269
|
+
i0__namespace.ɵɵclassProp("hidden", !i0__namespace.ɵɵpipeBind1(16, 13, ctx_r14.recipeDetailsService.ingredientToBasketLoading$));
|
|
23789
24270
|
}
|
|
23790
24271
|
}
|
|
23791
|
-
function
|
|
24272
|
+
function RecipeDetailsComponent_div_0_div_3_button_41_Template(rf, ctx) {
|
|
23792
24273
|
if (rf & 1) {
|
|
23793
|
-
i0__namespace.ɵɵelementStart(0, "button",
|
|
23794
|
-
i0__namespace.ɵɵelement(1, "div",
|
|
24274
|
+
i0__namespace.ɵɵelementStart(0, "button", 65);
|
|
24275
|
+
i0__namespace.ɵɵelement(1, "div", 62);
|
|
23795
24276
|
i0__namespace.ɵɵelementEnd();
|
|
23796
24277
|
}
|
|
23797
24278
|
}
|
|
23798
|
-
function
|
|
24279
|
+
function RecipeDetailsComponent_div_0_div_3_button_43_Template(rf, ctx) {
|
|
23799
24280
|
if (rf & 1) {
|
|
23800
|
-
var
|
|
23801
|
-
i0__namespace.ɵɵelementStart(0, "button",
|
|
23802
|
-
i0__namespace.ɵɵlistener("click", function
|
|
23803
|
-
i0__namespace.ɵɵelementStart(1, "div",
|
|
24281
|
+
var _r27_1 = i0__namespace.ɵɵgetCurrentView();
|
|
24282
|
+
i0__namespace.ɵɵelementStart(0, "button", 66);
|
|
24283
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_button_43_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r27_1); var ctx_r26 = i0__namespace.ɵɵnextContext(3); return ctx_r26.onClose(); });
|
|
24284
|
+
i0__namespace.ɵɵelementStart(1, "div", 58);
|
|
23804
24285
|
i0__namespace.ɵɵelementStart(2, "span");
|
|
23805
|
-
i0__namespace.ɵɵi18n(3,
|
|
24286
|
+
i0__namespace.ɵɵi18n(3, 67);
|
|
23806
24287
|
i0__namespace.ɵɵelementEnd();
|
|
23807
24288
|
i0__namespace.ɵɵelementEnd();
|
|
23808
24289
|
i0__namespace.ɵɵelementEnd();
|
|
23809
24290
|
}
|
|
23810
24291
|
}
|
|
23811
|
-
function
|
|
24292
|
+
function RecipeDetailsComponent_div_0_div_3_div_44_Template(rf, ctx) {
|
|
23812
24293
|
if (rf & 1) {
|
|
23813
|
-
i0__namespace.ɵɵ
|
|
23814
|
-
i0__namespace.ɵɵ
|
|
23815
|
-
i0__namespace.ɵɵ
|
|
23816
|
-
i0__namespace.ɵɵ
|
|
24294
|
+
i0__namespace.ɵɵelementStart(0, "div", 68);
|
|
24295
|
+
i0__namespace.ɵɵelementStart(1, "div", 69);
|
|
24296
|
+
i0__namespace.ɵɵelementStart(2, "span");
|
|
24297
|
+
i0__namespace.ɵɵpipe(3, "async");
|
|
23817
24298
|
i0__namespace.ɵɵpipe(4, "async");
|
|
23818
|
-
i0__namespace.ɵɵ
|
|
23819
|
-
i0__namespace.ɵɵ
|
|
24299
|
+
i0__namespace.ɵɵtext(5);
|
|
24300
|
+
i0__namespace.ɵɵpipe(6, "currency");
|
|
24301
|
+
i0__namespace.ɵɵelementEnd();
|
|
24302
|
+
i0__namespace.ɵɵelement(7, "div", 70);
|
|
24303
|
+
i0__namespace.ɵɵpipe(8, "async");
|
|
24304
|
+
i0__namespace.ɵɵpipe(9, "async");
|
|
24305
|
+
i0__namespace.ɵɵelementEnd();
|
|
24306
|
+
i0__namespace.ɵɵelementStart(10, "span", 71);
|
|
24307
|
+
i0__namespace.ɵɵtext(11, "dans mon panier");
|
|
24308
|
+
i0__namespace.ɵɵelementEnd();
|
|
24309
|
+
i0__namespace.ɵɵelementEnd();
|
|
23820
24310
|
}
|
|
23821
24311
|
if (rf & 2) {
|
|
23822
|
-
var
|
|
23823
|
-
i0__namespace.ɵɵadvance(1);
|
|
23824
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r14.recipeDetailsService.remainingBasketEntries.length > 0 && !i0__namespace.ɵɵpipeBind1(2, 3, ctx_r14.recipeDetailsService.allIngredientsToBasketLoading$));
|
|
24312
|
+
var ctx_r17 = i0__namespace.ɵɵnextContext(3);
|
|
23825
24313
|
i0__namespace.ɵɵadvance(2);
|
|
23826
|
-
i0__namespace.ɵɵ
|
|
24314
|
+
i0__namespace.ɵɵclassProp("hidden", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r17.recipeDetailsService.ingredientToBasketLoading$) || i0__namespace.ɵɵpipeBind1(4, 7, ctx_r17.recipeDetailsService.updateIngredientFromBasketLoading$));
|
|
24315
|
+
i0__namespace.ɵɵadvance(3);
|
|
24316
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(6, 9, ctx_r17.recipeDetailsService.recipePrice.inBasket, ctx_r17.suppliersService.supplier$.value.currency), " ");
|
|
23827
24317
|
i0__namespace.ɵɵadvance(2);
|
|
23828
|
-
i0__namespace.ɵɵ
|
|
23829
|
-
}
|
|
23830
|
-
}
|
|
23831
|
-
function RecipeDetailsComponent_div_0_div_3_ng_miam_recipe_pricing_39_Template(rf, ctx) {
|
|
23832
|
-
if (rf & 1) {
|
|
23833
|
-
i0__namespace.ɵɵelement(0, "ng-miam-recipe-pricing", 70);
|
|
23834
|
-
}
|
|
23835
|
-
if (rf & 2) {
|
|
23836
|
-
var ctx_r15 = i0__namespace.ɵɵnextContext(3);
|
|
23837
|
-
i0__namespace.ɵɵproperty("fetchPricingOnScroll", false)("recipeId", ctx_r15.recipeDetailsService.recipe == null ? null : ctx_r15.recipeDetailsService.recipe.id)("serves", ctx_r15.recipeDetailsService.recipe == null ? null : ctx_r15.recipeDetailsService.recipe.modifiedGuests)("guestsText", ctx_r15.pricingGuestsText);
|
|
24318
|
+
i0__namespace.ɵɵclassProp("hidden", !(i0__namespace.ɵɵpipeBind1(8, 12, ctx_r17.recipeDetailsService.ingredientToBasketLoading$) || i0__namespace.ɵɵpipeBind1(9, 14, ctx_r17.recipeDetailsService.updateIngredientFromBasketLoading$)));
|
|
23838
24319
|
}
|
|
23839
24320
|
}
|
|
23840
|
-
var
|
|
23841
|
-
var
|
|
23842
|
-
var _c13 = function (a0, a1) { return { "center": a0, "hidden": a1 }; };
|
|
24321
|
+
var _c9 = function (a0) { return { "hidden": a0 }; };
|
|
24322
|
+
var _c10 = function () { return ["Je fais mes courses", "Je cuisine"]; };
|
|
23843
24323
|
function RecipeDetailsComponent_div_0_div_3_Template(rf, ctx) {
|
|
23844
24324
|
if (rf & 1) {
|
|
23845
|
-
var
|
|
24325
|
+
var _r29_1 = i0__namespace.ɵɵgetCurrentView();
|
|
23846
24326
|
i0__namespace.ɵɵelementStart(0, "div", 7);
|
|
23847
24327
|
i0__namespace.ɵɵelementStart(1, "div", 8, 9);
|
|
23848
24328
|
i0__namespace.ɵɵelementStart(3, "div", 10);
|
|
23849
24329
|
i0__namespace.ɵɵelementStart(4, "div", 11);
|
|
23850
24330
|
i0__namespace.ɵɵelementStart(5, "button", 12);
|
|
23851
|
-
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_5_listener() { i0__namespace.ɵɵrestoreView(
|
|
24331
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_5_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r28 = i0__namespace.ɵɵnextContext(2); return ctx_r28.onClose(); });
|
|
23852
24332
|
i0__namespace.ɵɵelement(6, "img", 13);
|
|
23853
24333
|
i0__namespace.ɵɵelementEnd();
|
|
23854
24334
|
i0__namespace.ɵɵelementStart(7, "div", 14);
|
|
23855
24335
|
i0__namespace.ɵɵelementStart(8, "button", 15);
|
|
23856
|
-
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_8_listener() { i0__namespace.ɵɵrestoreView(
|
|
24336
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_8_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r30 = i0__namespace.ɵɵnextContext(2); return ctx_r30.onClose(); });
|
|
23857
24337
|
i0__namespace.ɵɵelement(9, "img", 16);
|
|
23858
24338
|
i0__namespace.ɵɵelementEnd();
|
|
23859
24339
|
i0__namespace.ɵɵtemplate(10, RecipeDetailsComponent_div_0_div_3_ng_miam_like_button_10_Template, 1, 3, "ng-miam-like-button", 17);
|
|
@@ -23861,7 +24341,7 @@
|
|
|
23861
24341
|
i0__namespace.ɵɵelementEnd();
|
|
23862
24342
|
i0__namespace.ɵɵelementEnd();
|
|
23863
24343
|
i0__namespace.ɵɵelementStart(12, "ng-miam-counter-input", 18);
|
|
23864
|
-
i0__namespace.ɵɵlistener("valueChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_counter_input_valueChange_12_listener($event) { i0__namespace.ɵɵrestoreView(
|
|
24344
|
+
i0__namespace.ɵɵlistener("valueChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_counter_input_valueChange_12_listener($event) { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r31 = i0__namespace.ɵɵnextContext(2); return ctx_r31.updateGuests($event); });
|
|
23865
24345
|
i0__namespace.ɵɵtext(13, " > ");
|
|
23866
24346
|
i0__namespace.ɵɵelementEnd();
|
|
23867
24347
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -23876,7 +24356,7 @@
|
|
|
23876
24356
|
i0__namespace.ɵɵelementStart(20, "div", 25);
|
|
23877
24357
|
i0__namespace.ɵɵelementStart(21, "div", 26);
|
|
23878
24358
|
i0__namespace.ɵɵelementStart(22, "button", 27);
|
|
23879
|
-
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_22_listener() { i0__namespace.ɵɵrestoreView(
|
|
24359
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_22_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r32 = i0__namespace.ɵɵnextContext(2); return ctx_r32.onClose(); });
|
|
23880
24360
|
i0__namespace.ɵɵelement(23, "img", 28);
|
|
23881
24361
|
i0__namespace.ɵɵelementEnd();
|
|
23882
24362
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -23888,7 +24368,7 @@
|
|
|
23888
24368
|
i0__namespace.ɵɵpipe(28, "async");
|
|
23889
24369
|
i0__namespace.ɵɵelementStart(29, "div", 32);
|
|
23890
24370
|
i0__namespace.ɵɵelementStart(30, "button", 33);
|
|
23891
|
-
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_30_listener() { i0__namespace.ɵɵrestoreView(
|
|
24371
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_30_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r33 = i0__namespace.ɵɵnextContext(2); return ctx_r33.onClose(); });
|
|
23892
24372
|
i0__namespace.ɵɵelement(31, "img", 34);
|
|
23893
24373
|
i0__namespace.ɵɵelementEnd();
|
|
23894
24374
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -23897,21 +24377,27 @@
|
|
|
23897
24377
|
i0__namespace.ɵɵelement(32, "ng-miam-recipe-details-infos", 35);
|
|
23898
24378
|
i0__namespace.ɵɵelementStart(33, "div", 36);
|
|
23899
24379
|
i0__namespace.ɵɵelementStart(34, "ng-miam-slider-tabs", 37);
|
|
23900
|
-
i0__namespace.ɵɵlistener("selectedTabIndexChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_slider_tabs_selectedTabIndexChange_34_listener($event) { i0__namespace.ɵɵrestoreView(
|
|
24380
|
+
i0__namespace.ɵɵlistener("selectedTabIndexChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_slider_tabs_selectedTabIndexChange_34_listener($event) { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r34 = i0__namespace.ɵɵnextContext(2); return ctx_r34.activeTabIndex = $event; })("selectedTabIndexChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_slider_tabs_selectedTabIndexChange_34_listener() { i0__namespace.ɵɵrestoreView(_r29_1); var ctx_r35 = i0__namespace.ɵɵnextContext(2); return ctx_r35.cdr.detectChanges(); });
|
|
23901
24381
|
i0__namespace.ɵɵelementEnd();
|
|
23902
24382
|
i0__namespace.ɵɵelementEnd();
|
|
23903
24383
|
i0__namespace.ɵɵtemplate(35, RecipeDetailsComponent_div_0_div_3_ng_miam_products_picker_35_Template, 1, 0, "ng-miam-products-picker", 38);
|
|
23904
24384
|
i0__namespace.ɵɵtemplate(36, RecipeDetailsComponent_div_0_div_3_div_36_Template, 3, 2, "div", 39);
|
|
23905
24385
|
i0__namespace.ɵɵelementStart(37, "div", 40);
|
|
23906
|
-
i0__namespace.ɵɵ
|
|
23907
|
-
i0__namespace.ɵɵtemplate(39,
|
|
24386
|
+
i0__namespace.ɵɵelementContainerStart(38);
|
|
24387
|
+
i0__namespace.ɵɵtemplate(39, RecipeDetailsComponent_div_0_div_3_button_39_Template, 18, 15, "button", 41);
|
|
24388
|
+
i0__namespace.ɵɵpipe(40, "async");
|
|
24389
|
+
i0__namespace.ɵɵtemplate(41, RecipeDetailsComponent_div_0_div_3_button_41_Template, 2, 0, "button", 42);
|
|
24390
|
+
i0__namespace.ɵɵpipe(42, "async");
|
|
24391
|
+
i0__namespace.ɵɵtemplate(43, RecipeDetailsComponent_div_0_div_3_button_43_Template, 4, 0, "button", 43);
|
|
24392
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
24393
|
+
i0__namespace.ɵɵtemplate(44, RecipeDetailsComponent_div_0_div_3_div_44_Template, 12, 16, "div", 44);
|
|
23908
24394
|
i0__namespace.ɵɵelementEnd();
|
|
23909
24395
|
i0__namespace.ɵɵelementEnd();
|
|
23910
24396
|
}
|
|
23911
24397
|
if (rf & 2) {
|
|
23912
24398
|
var ctx_r4 = i0__namespace.ɵɵnextContext(2);
|
|
23913
24399
|
i0__namespace.ɵɵadvance(10);
|
|
23914
|
-
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(11,
|
|
24400
|
+
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(11, 20, ctx_r4.userService.isLogged$));
|
|
23915
24401
|
i0__namespace.ɵɵadvance(2);
|
|
23916
24402
|
i0__namespace.ɵɵproperty("floating", true)("value", ctx_r4.recipeDetailsService.recipe.modifiedGuests)("minRange", 1);
|
|
23917
24403
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -23925,21 +24411,23 @@
|
|
|
23925
24411
|
i0__namespace.ɵɵadvance(7);
|
|
23926
24412
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r4.recipeDetailsService.recipe == null ? null : ctx_r4.recipeDetailsService.recipe.attributes["title"], " ");
|
|
23927
24413
|
i0__namespace.ɵɵadvance(2);
|
|
23928
|
-
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(28,
|
|
24414
|
+
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(28, 22, ctx_r4.userService.isLogged$));
|
|
23929
24415
|
i0__namespace.ɵɵadvance(5);
|
|
23930
24416
|
i0__namespace.ɵɵproperty("recipe", ctx_r4.recipeDetailsService.recipe);
|
|
23931
24417
|
i0__namespace.ɵɵadvance(1);
|
|
23932
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(
|
|
24418
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(28, _c9, ctx_r4.recipeDetailsService.onlyShowPreparation));
|
|
23933
24419
|
i0__namespace.ɵɵadvance(1);
|
|
23934
|
-
i0__namespace.ɵɵproperty("tabs", i0__namespace.ɵɵpureFunction0(
|
|
24420
|
+
i0__namespace.ɵɵproperty("tabs", i0__namespace.ɵɵpureFunction0(30, _c10))("selectedTabIndex", ctx_r4.activeTabIndex);
|
|
23935
24421
|
i0__namespace.ɵɵadvance(1);
|
|
23936
24422
|
i0__namespace.ɵɵproperty("ngIf", ctx_r4.activeTabIndex === 0);
|
|
23937
24423
|
i0__namespace.ɵɵadvance(1);
|
|
23938
24424
|
i0__namespace.ɵɵproperty("ngIf", ctx_r4.activeTabIndex === 1);
|
|
23939
|
-
i0__namespace.ɵɵadvance(
|
|
23940
|
-
i0__namespace.ɵɵproperty("
|
|
23941
|
-
i0__namespace.ɵɵadvance(
|
|
23942
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r4.
|
|
24425
|
+
i0__namespace.ɵɵadvance(3);
|
|
24426
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r4.recipeDetailsService.remainingBasketEntries.length > 0 && !i0__namespace.ɵɵpipeBind1(40, 24, ctx_r4.recipeDetailsService.allIngredientsToBasketLoading$));
|
|
24427
|
+
i0__namespace.ɵɵadvance(2);
|
|
24428
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r4.recipeDetailsService.remainingBasketEntries.length > 0 && i0__namespace.ɵɵpipeBind1(42, 26, ctx_r4.recipeDetailsService.allIngredientsToBasketLoading$));
|
|
24429
|
+
i0__namespace.ɵɵadvance(2);
|
|
24430
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r4.recipeDetailsService.remainingBasketEntries.length === 0);
|
|
23943
24431
|
i0__namespace.ɵɵadvance(1);
|
|
23944
24432
|
i0__namespace.ɵɵproperty("ngIf", ctx_r4.showPrice());
|
|
23945
24433
|
}
|
|
@@ -23949,7 +24437,7 @@
|
|
|
23949
24437
|
i0__namespace.ɵɵelementStart(0, "div", 3);
|
|
23950
24438
|
i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_1_Template, 1, 0, "div", 4);
|
|
23951
24439
|
i0__namespace.ɵɵpipe(2, "async");
|
|
23952
|
-
i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_Template,
|
|
24440
|
+
i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_Template, 45, 31, "div", 5);
|
|
23953
24441
|
i0__namespace.ɵɵpipe(4, "async");
|
|
23954
24442
|
i0__namespace.ɵɵelementEnd();
|
|
23955
24443
|
}
|
|
@@ -23963,9 +24451,9 @@
|
|
|
23963
24451
|
}
|
|
23964
24452
|
function RecipeDetailsComponent_ng_miam_recipe_addon_2_Template(rf, ctx) {
|
|
23965
24453
|
if (rf & 1) {
|
|
23966
|
-
var
|
|
23967
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-addon",
|
|
23968
|
-
i0__namespace.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_miam_recipe_addon_2_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
24454
|
+
var _r37_1 = i0__namespace.ɵɵgetCurrentView();
|
|
24455
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-addon", 72);
|
|
24456
|
+
i0__namespace.ɵɵlistener("hideAddon", function RecipeDetailsComponent_ng_miam_recipe_addon_2_Template_ng_miam_recipe_addon_hideAddon_0_listener() { i0__namespace.ɵɵrestoreView(_r37_1); var ctx_r36 = i0__namespace.ɵɵnextContext(); return ctx_r36.toggleAddon(); });
|
|
23969
24457
|
i0__namespace.ɵɵelementEnd();
|
|
23970
24458
|
}
|
|
23971
24459
|
if (rf & 2) {
|
|
@@ -23975,9 +24463,9 @@
|
|
|
23975
24463
|
}
|
|
23976
24464
|
function RecipeDetailsComponent_ng_miam_replace_item_3_Template(rf, ctx) {
|
|
23977
24465
|
if (rf & 1) {
|
|
23978
|
-
var
|
|
23979
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-replace-item",
|
|
23980
|
-
i0__namespace.ɵɵlistener("selected", function RecipeDetailsComponent_ng_miam_replace_item_3_Template_ng_miam_replace_item_selected_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
24466
|
+
var _r39_1 = i0__namespace.ɵɵgetCurrentView();
|
|
24467
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-replace-item", 73);
|
|
24468
|
+
i0__namespace.ɵɵlistener("selected", function RecipeDetailsComponent_ng_miam_replace_item_3_Template_ng_miam_replace_item_selected_0_listener() { i0__namespace.ɵɵrestoreView(_r39_1); var ctx_r38 = i0__namespace.ɵɵnextContext(); return ctx_r38.recipeDetailsService.basketEntryToReplace = null; });
|
|
23981
24469
|
i0__namespace.ɵɵelementEnd();
|
|
23982
24470
|
}
|
|
23983
24471
|
if (rf & 2) {
|
|
@@ -23996,13 +24484,14 @@
|
|
|
23996
24484
|
};
|
|
23997
24485
|
var RecipeDetailsComponent = /** @class */ (function (_super) {
|
|
23998
24486
|
__extends(RecipeDetailsComponent, _super);
|
|
23999
|
-
function RecipeDetailsComponent(cdr, recipesService, basketsService, userService, posService, contextService, recipeDetailsService, sponsorBlocksService, analyticsService) {
|
|
24487
|
+
function RecipeDetailsComponent(cdr, recipesService, basketsService, userService, posService, suppliersService, contextService, recipeDetailsService, sponsorBlocksService, analyticsService) {
|
|
24000
24488
|
var _this = _super.call(this, analyticsService) || this;
|
|
24001
24489
|
_this.cdr = cdr;
|
|
24002
24490
|
_this.recipesService = recipesService;
|
|
24003
24491
|
_this.basketsService = basketsService;
|
|
24004
24492
|
_this.userService = userService;
|
|
24005
24493
|
_this.posService = posService;
|
|
24494
|
+
_this.suppliersService = suppliersService;
|
|
24006
24495
|
_this.contextService = contextService;
|
|
24007
24496
|
_this.recipeDetailsService = recipeDetailsService;
|
|
24008
24497
|
_this.sponsorBlocksService = sponsorBlocksService;
|
|
@@ -24070,10 +24559,13 @@
|
|
|
24070
24559
|
this.recipeDetailsService.displayEventWasSent = false;
|
|
24071
24560
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
24072
24561
|
};
|
|
24073
|
-
RecipeDetailsComponent.prototype.getProducts = function () {
|
|
24562
|
+
RecipeDetailsComponent.prototype.getProducts = function (fromInit) {
|
|
24074
24563
|
var _this = this;
|
|
24075
|
-
|
|
24076
|
-
|
|
24564
|
+
if (fromInit === void 0) { fromInit = false; }
|
|
24565
|
+
if (fromInit) {
|
|
24566
|
+
this.recipeDetailsService.productsLoading = true;
|
|
24567
|
+
}
|
|
24568
|
+
this.subscriptions.push(this.recipeDetailsService.getIngredientsBasketEntries(fromInit).subscribe(function () {
|
|
24077
24569
|
_this.recipeDetailsService.productsLoading = false;
|
|
24078
24570
|
_this.cdr.detectChanges();
|
|
24079
24571
|
}));
|
|
@@ -24088,7 +24580,7 @@
|
|
|
24088
24580
|
_this.recipeDetailsService.recipe = result;
|
|
24089
24581
|
_this.recipeDetailsService.recipeLoading = false;
|
|
24090
24582
|
_this.recipeDetailsService.recipe.modifiedGuests = +_this.guestNumber || +result.guests;
|
|
24091
|
-
_this.getProducts();
|
|
24583
|
+
_this.getProducts(true);
|
|
24092
24584
|
_this.sendDisplayRecipeEvent();
|
|
24093
24585
|
_this.setupYoutubePlayer();
|
|
24094
24586
|
setTimeout(function () {
|
|
@@ -24152,6 +24644,7 @@
|
|
|
24152
24644
|
RecipeDetailsComponent.prototype.updateGuests = function (guests) {
|
|
24153
24645
|
this.recipeDetailsService.recipe.modifiedGuests = guests;
|
|
24154
24646
|
this.recipeDetailsService.updateGuests(this.eventTrace());
|
|
24647
|
+
this.getProducts(false);
|
|
24155
24648
|
this.cdr.detectChanges();
|
|
24156
24649
|
};
|
|
24157
24650
|
RecipeDetailsComponent.prototype.toggleAddon = function () {
|
|
@@ -24198,7 +24691,7 @@
|
|
|
24198
24691
|
};
|
|
24199
24692
|
return RecipeDetailsComponent;
|
|
24200
24693
|
}(EventTracerComponent));
|
|
24201
|
-
RecipeDetailsComponent.ɵfac = function RecipeDetailsComponent_Factory(t) { return new (t || RecipeDetailsComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(UserService), i0__namespace.ɵɵdirectiveInject(PointOfSalesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService), i0__namespace.ɵɵdirectiveInject(SponsorBlockService), i0__namespace.ɵɵdirectiveInject(AnalyticsService)); };
|
|
24694
|
+
RecipeDetailsComponent.ɵfac = function RecipeDetailsComponent_Factory(t) { return new (t || RecipeDetailsComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(UserService), i0__namespace.ɵɵdirectiveInject(PointOfSalesService), i0__namespace.ɵɵdirectiveInject(SuppliersService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService), i0__namespace.ɵɵdirectiveInject(SponsorBlockService), i0__namespace.ɵɵdirectiveInject(AnalyticsService)); };
|
|
24202
24695
|
RecipeDetailsComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: RecipeDetailsComponent, selectors: [["ng-miam-recipe-details"]], viewQuery: function RecipeDetailsComponent_Query(rf, ctx) {
|
|
24203
24696
|
if (rf & 1) {
|
|
24204
24697
|
i0__namespace.ɵɵviewQuery(_c0$1, 1);
|
|
@@ -24210,45 +24703,37 @@
|
|
|
24210
24703
|
}, inputs: { recipeId: "recipeId", guestNumber: "guestNumber", previewAllowed: "previewAllowed", ingredientsPictures: "ingredientsPictures", forceDisplayTags: "forceDisplayTags", displayTagsIcons: "displayTagsIcons", displayPricing: "displayPricing", displayGuests: "displayGuests", helpButtonAllowed: "helpButtonAllowed", stepsOnLeftSide: "stepsOnLeftSide", cookingTimeAsPrimaryInfo: "cookingTimeAsPrimaryInfo", moreRecipesImageURL: "moreRecipesImageURL", pricingGuestsText: "pricingGuestsText" }, outputs: { recipeAdded: "recipeAdded", recipeError: "recipeError" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], decls: 5, vars: 7, consts: function () {
|
|
24211
24704
|
var i18n_1;
|
|
24212
24705
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
24213
|
-
var
|
|
24214
|
-
i18n_1 =
|
|
24706
|
+
var MSG_EXTERNAL_70397346439942337$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS____2 = goog.getMsg("Ajouter");
|
|
24707
|
+
i18n_1 = MSG_EXTERNAL_70397346439942337$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS____2;
|
|
24215
24708
|
}
|
|
24216
24709
|
else {
|
|
24217
|
-
i18n_1 = $localize(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject([":\
|
|
24710
|
+
i18n_1 = $localize(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject([":\u241F8aa969e69241c7c5838b40348f913519d6349371\u241F70397346439942337:Ajouter"], [":\u241F8aa969e69241c7c5838b40348f913519d6349371\u241F70397346439942337:Ajouter"])));
|
|
24218
24711
|
}
|
|
24219
24712
|
var i18n_3;
|
|
24220
24713
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
24221
|
-
var
|
|
24222
|
-
i18n_3 =
|
|
24714
|
+
var MSG_EXTERNAL_5144484951400113194$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS_____4 = goog.getMsg("produit");
|
|
24715
|
+
i18n_3 = MSG_EXTERNAL_5144484951400113194$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS_____4;
|
|
24223
24716
|
}
|
|
24224
24717
|
else {
|
|
24225
|
-
i18n_3 = $localize(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject([":\
|
|
24718
|
+
i18n_3 = $localize(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject([":\u241F84c216d92afc9edd2b3bd2175d38197737ff86c5\u241F5144484951400113194:produit"], [":\u241F84c216d92afc9edd2b3bd2175d38197737ff86c5\u241F5144484951400113194:produit"])));
|
|
24226
24719
|
}
|
|
24227
24720
|
var i18n_5;
|
|
24228
24721
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
24229
|
-
var
|
|
24230
|
-
i18n_5 =
|
|
24722
|
+
var MSG_EXTERNAL_1112144680738962826$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS_____6 = goog.getMsg("produits");
|
|
24723
|
+
i18n_5 = MSG_EXTERNAL_1112144680738962826$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS_____6;
|
|
24231
24724
|
}
|
|
24232
24725
|
else {
|
|
24233
|
-
i18n_5 = $localize(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject([":\
|
|
24726
|
+
i18n_5 = $localize(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject([":\u241F2571d7fbaeed8646df6ee852fb5d94185b0efd88\u241F1112144680738962826:produits"], [":\u241F2571d7fbaeed8646df6ee852fb5d94185b0efd88\u241F1112144680738962826:produits"])));
|
|
24234
24727
|
}
|
|
24235
24728
|
var i18n_7;
|
|
24236
24729
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
24237
|
-
var
|
|
24238
|
-
i18n_7 =
|
|
24239
|
-
}
|
|
24240
|
-
else {
|
|
24241
|
-
i18n_7 = $localize(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject([":\u241F2571d7fbaeed8646df6ee852fb5d94185b0efd88\u241F1112144680738962826:produits"], [":\u241F2571d7fbaeed8646df6ee852fb5d94185b0efd88\u241F1112144680738962826:produits"])));
|
|
24242
|
-
}
|
|
24243
|
-
var i18n_9;
|
|
24244
|
-
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
24245
|
-
var MSG_EXTERNAL_2001694451572573558$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS_____10 = goog.getMsg("Continuer mes courses");
|
|
24246
|
-
i18n_9 = MSG_EXTERNAL_2001694451572573558$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS_____10;
|
|
24730
|
+
var MSG_EXTERNAL_2001694451572573558$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS____8 = goog.getMsg("Continuer mes courses");
|
|
24731
|
+
i18n_7 = MSG_EXTERNAL_2001694451572573558$$LIB__WEB_COMPONENTS_RECIPE_DETAILS_RECIPE_DETAILS_COMPONENT_TS____8;
|
|
24247
24732
|
}
|
|
24248
24733
|
else {
|
|
24249
|
-
|
|
24734
|
+
i18n_7 = $localize(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject([":\u241F0e81a4e1efd31ae65483ef21f4fa59c2dce0e6f1\u241F2001694451572573558:Continuer mes courses"], [":\u241F0e81a4e1efd31ae65483ef21f4fa59c2dce0e6f1\u241F2001694451572573558:Continuer mes courses"])));
|
|
24250
24735
|
}
|
|
24251
|
-
return [["class", "miam-recipe-details", 4, "ngIf"], [3, "recipe", "hideAddon", 4, "ngIf"], [3, "recipe", "basketEntry", "ingredient", "ignoreSelected", "loadOnSelect", "selected", 4, "ngIf"], [1, "miam-recipe-details"], ["class", "miam-ds-loader miam-recipe-details__loader", 4, "ngIf"], ["class", "miam-recipe-details__container", 4, "ngIf"], [1, "miam-ds-loader", "miam-recipe-details__loader"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [1, "miam-recipe-details__banner_buttons"], [1, "miam-recipe-details__top-button-wrapper"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", "alt", "modal close button", 1, "miam-recipe-details__close-icon"], [1, "miam-recipe-details__mobile-header-buttons"], [1, "miam-recipe-details__back-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal back button", 1, "miam-recipe-details__back-icon"], ["class", "miam-recipe-details__like-button", 3, "recipe", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__guest-counter", 3, "floating", "value", "minRange", "valueChange"], ["alt", "recipe picture", "class", "miam-recipe-details__picture-img", 3, "src", 4, "ngIf"], [3, "videoId", "width", "height", "playerVars", 4, "ngIf"], ["class", "miam-recipe-details__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-details__sponsor"], [3, "hasStorytelling", "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__sponsor-separator"], ["ngMiamReachTop", "", 1, "miam-recipe-details__title-container"], [1, "miam-recipe-details__back-button-mobile-container"], [1, "miam-recipe-details__back-button", "miam-ds-button", "small", "square", "ghost", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal close button", 1, "miam-recipe-details__back-icon"], [1, "miam-recipe-details__title", "miam-ds-text", "size-xl", "weight-xxl"], [1, "miam-recipe-details__actions__icon"], ["class", "miam-recipe-details__like-button", 3, "recipe", "originTrace", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__hideable-actions"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "ghost", 3, "click"], ["alt", "modal close button", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", 1, "miam-recipe-details__close-icon"], [1, "miam-recipe-details__infos", 3, "recipe"], [1, "miam-recipe-details__tabs", 3, "ngClass"], [3, "tabs", "selectedTabIndex", "selectedTabIndexChange"], [3, "closeModal", 4, "ngIf"], ["class", "miam-recipe-details__preparation-tab", 4, "ngIf"], [1, "miam-recipe-details__footer", 3, "
|
|
24736
|
+
return [["class", "miam-recipe-details", 4, "ngIf"], [3, "recipe", "hideAddon", 4, "ngIf"], [3, "recipe", "basketEntry", "ingredient", "ignoreSelected", "loadOnSelect", "selected", 4, "ngIf"], [1, "miam-recipe-details"], ["class", "miam-ds-loader miam-recipe-details__loader", 4, "ngIf"], ["class", "miam-recipe-details__container", 4, "ngIf"], [1, "miam-ds-loader", "miam-recipe-details__loader"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [1, "miam-recipe-details__banner_buttons"], [1, "miam-recipe-details__top-button-wrapper"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", "alt", "modal close button", 1, "miam-recipe-details__close-icon"], [1, "miam-recipe-details__mobile-header-buttons"], [1, "miam-recipe-details__back-button", "miam-ds-button", "square", "primary", "reverse", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal back button", 1, "miam-recipe-details__back-icon"], ["class", "miam-recipe-details__like-button", 3, "recipe", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__guest-counter", 3, "floating", "value", "minRange", "valueChange"], ["alt", "recipe picture", "class", "miam-recipe-details__picture-img", 3, "src", 4, "ngIf"], [3, "videoId", "width", "height", "playerVars", 4, "ngIf"], ["class", "miam-recipe-details__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-details__sponsor"], [3, "hasStorytelling", "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__sponsor-separator"], ["ngMiamReachTop", "", 1, "miam-recipe-details__title-container"], [1, "miam-recipe-details__back-button-mobile-container"], [1, "miam-recipe-details__back-button", "miam-ds-button", "small", "square", "ghost", 3, "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-primary.svg", "alt", "modal close button", 1, "miam-recipe-details__back-icon"], [1, "miam-recipe-details__title", "miam-ds-text", "size-xl", "weight-xxl"], [1, "miam-recipe-details__actions__icon"], ["class", "miam-recipe-details__like-button", 3, "recipe", "originTrace", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__hideable-actions"], [1, "miam-recipe-details__close-button", "miam-ds-button", "square", "ghost", 3, "click"], ["alt", "modal close button", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", 1, "miam-recipe-details__close-icon"], [1, "miam-recipe-details__infos", 3, "recipe"], [1, "miam-recipe-details__tabs", 3, "ngClass"], [3, "tabs", "selectedTabIndex", "selectedTabIndexChange"], [3, "closeModal", 4, "ngIf"], ["class", "miam-recipe-details__preparation-tab", 4, "ngIf"], [1, "miam-recipe-details__footer"], ["class", "miam-recipe-details__add-to-basket-cta miam-ds-button primary", 3, "click", 4, "ngIf"], ["class", "miam-recipe-details__add-to-basket-cta miam-ds-button primary", 4, "ngIf"], ["class", "miam-ds-button secondary", 3, "click", 4, "ngIf"], ["class", "miam-recipe-details__price", 4, "ngIf"], [1, "miam-recipe-details__like-button", 3, "recipe", "width", "height"], ["alt", "recipe picture", 1, "miam-recipe-details__picture-img", 3, "src"], [3, "videoId", "width", "height", "playerVars"], [1, "miam-recipe-details__picture__filigrane"], ["alt", "filigrane logo", 3, "src"], [3, "hasStorytelling", "recipe", "showAddon"], [1, "miam-recipe-details__like-button", 3, "recipe", "originTrace", "width", "height"], [3, "closeModal"], [1, "miam-recipe-details__preparation-tab"], [3, "ingredients"], [3, "recipe"], [1, "miam-recipe-details__add-to-basket-cta", "miam-ds-button", "primary", 3, "click"], ["alt", "basket icon", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Basket.svg"], [1, "miam-recipe-details__add-to-basket-cta__text"], i18n_1, [4, "ngIf"], [1, "miam-recipe-details__add-to-basket-remaining-price"], [1, "miam-ds-loader"], i18n_3, i18n_5, [1, "miam-recipe-details__add-to-basket-cta", "miam-ds-button", "primary"], [1, "miam-ds-button", "secondary", 3, "click"], i18n_7, [1, "miam-recipe-details__price"], [1, "miam-recipe-details__price-label", "miam-ds-text", "size-l", "weight-xxl"], [1, "miam-ds-loader", "primary"], [1, "miam-recipe-details__price-in-basket-label", "miam-ds-text", "size-xs"], [3, "recipe", "hideAddon"], [3, "recipe", "basketEntry", "ingredient", "ignoreSelected", "loadOnSelect", "selected"]];
|
|
24252
24737
|
}, template: function RecipeDetailsComponent_Template(rf, ctx) {
|
|
24253
24738
|
if (rf & 1) {
|
|
24254
24739
|
i0__namespace.ɵɵtemplate(0, RecipeDetailsComponent_div_0_Template, 5, 6, "div", 0);
|
|
@@ -24264,7 +24749,7 @@
|
|
|
24264
24749
|
i0__namespace.ɵɵadvance(1);
|
|
24265
24750
|
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(4, 5, ctx.recipeDetailsService.basketEntryToReplace$));
|
|
24266
24751
|
}
|
|
24267
|
-
}, directives: [i2__namespace$1.NgIf, CounterInputComponent, ReachTopDirective, RecipeDetailsInfosComponent, i2__namespace$1.NgClass, SliderTabsComponent, LikeButtonComponent, i8__namespace.YouTubePlayer, AddonLinkComponent, ProductsPickerComponent, RecipeDetailsIngredientsComponent, RecipeDetailsStepsComponent, RecipePricingComponent, RecipeAddonComponent, ReplaceItemComponent], pipes: [i2__namespace$1.AsyncPipe], styles: [".miam-recipe-details{min-height:100dvh}.miam-recipe-details .miam-recipe-details__loader{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;width:40px;height:40px;background-position-x:20px;background-size:20px 20px}.miam-recipe-details .miam-recipe-details__container{position:relative}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__sponsor-separator{border-top:1px solid var(--miam-ds-color-neutral-200,#d9dde1);margin:unset}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture{position:relative;max-height:600px;display:flex}@media (min-width:1023px) and (max-height:1000px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture{max-height:400px}}@media (min-width:1023px) and (max-height:800px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture{max-height:300px}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons{position:absolute;display:flex;flex-direction:row;justify-content:space-between;align-items:flex-end;gap:24px;top:16px;right:16px;left:16px;bottom:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper{flex:1;width:100%;height:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons{display:flex;justify-content:space-between;height:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button{transform:rotate(90deg);border-radius:100%;height:40px;width:40px;position:sticky;top:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button .miam-recipe-details__back-icon{display:block}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button:hover img.miam-recipe-details__back-icon{content:url(https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-white.svg)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__like-button{position:absolute;top:0;right:0}@media (min-width:1023px) and (max-height:800px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input{padding:2px}}@media (min-width:1023px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons{top:24px;right:24px;left:24px;bottom:24px;flex-direction:column}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper{width:inherit}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button{display:flex;position:sticky;top:24px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button:hover img.miam-recipe-details__close-icon{content:url(https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross.svg)}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__picture-img{width:100%;max-height:100%;-o-object-position:center;object-position:center;-o-object-fit:cover;object-fit:cover}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container{z-index:2;display:flex;justify-content:space-between;align-items:center;position:sticky;top:-1px;padding:16px;overflow:hidden;background:var(--miam-ds-color-neutral-white,#fff);transition:padding .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__back-button-mobile-container{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__title{width:100%;transition:font-size .3s;color:var(--miam-ds-color-neutral-black,#1f3543)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon{display:flex;position:absolute;right:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon .miam-recipe-details__hideable-actions{max-width:0;overflow:hidden;transition:max-width .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon .miam-recipe-details__close-button{margin-left:16px;padding:8px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned{padding:12px 16px;border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__title{font-size:20px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon{position:relative;top:unset;right:unset}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon .miam-recipe-details__like-button{margin-right:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon .miam-recipe-details__hideable-actions{max-width:64px}@media (max-width:1024px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container{justify-content:flex-start}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__back-button-mobile-container{display:flex;align-items:center;justify-content:center;max-width:0;overflow:hidden;transition:max-width .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__back-button-mobile-container .miam-recipe-details__back-icon{transform:rotate(90deg)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__title{font-size:20px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon{max-width:0;overflow:hidden;transition:max-width .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__hideable-actions{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned{padding:4px 16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__back-button-mobile-container{overflow:visible;max-width:48px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__back-button-mobile-container .miam-recipe-details__back-button{margin:8px 0;width:40px;height:40px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__title{font-size:14px;font-weight:500}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon{max-width:40px}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__infos{padding:8px 16px 16px;display:block}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs{padding:8px 16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs.hidden{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer{box-sizing:border-box;background:var(--miam-ds-color-neutral-white,#fff);border-top:1px solid var(--miam-ds-color-neutral-200,#d9dde1);padding:16px;position:sticky;bottom:0;display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center;z-index:2;height:80px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer.center{justify-content:center}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer.hidden{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta{display:flex;gap:8px}@media (max-width:1024px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta.miam-ds-button.primary:hover{background-color:var(--miam-ds-color-primary)}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta .miam-recipe-details__add-to-basket-cta__text{display:flex;gap:4px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer ng-miam-recipe-pricing .miam-recipe-pricing__wrapper{align-items:flex-end}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer ng-miam-recipe-pricing .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__price{color:var(--miam-ds-color-primary-700);margin-right:4px}@media (max-width:1024px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer ng-miam-recipe-pricing .miam-recipe-pricing__wrapper{flex-direction:column;align-items:flex-start}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__preparation-tab{padding:16px;display:flex;flex-direction:column;gap:24px}"], encapsulation: 2, changeDetection: 0 });
|
|
24752
|
+
}, directives: [i2__namespace$1.NgIf, CounterInputComponent, ReachTopDirective, RecipeDetailsInfosComponent, i2__namespace$1.NgClass, SliderTabsComponent, LikeButtonComponent, i8__namespace.YouTubePlayer, AddonLinkComponent, ProductsPickerComponent, RecipeDetailsIngredientsComponent, RecipeDetailsStepsComponent, RecipeAddonComponent, ReplaceItemComponent], pipes: [i2__namespace$1.AsyncPipe, i2__namespace$1.CurrencyPipe], styles: [".miam-recipe-details{min-height:100dvh}.miam-recipe-details .miam-recipe-details__loader{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;width:40px;height:40px;background-position-x:20px;background-size:20px 20px}.miam-recipe-details .miam-recipe-details__container{position:relative}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__sponsor-separator{border-top:1px solid var(--miam-ds-color-neutral-200,#d9dde1);margin:unset}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture{position:relative;max-height:600px;display:flex}@media (min-width:1023px) and (max-height:1000px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture{max-height:400px}}@media (min-width:1023px) and (max-height:800px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture{max-height:300px}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons{position:absolute;display:flex;flex-direction:row;justify-content:space-between;align-items:flex-end;gap:24px;top:16px;right:16px;left:16px;bottom:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper{flex:1;width:100%;height:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons{display:flex;justify-content:space-between;height:100%}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button{transform:rotate(90deg);border-radius:100%;height:40px;width:40px;position:sticky;top:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button .miam-recipe-details__back-icon{display:block}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__back-button:hover img.miam-recipe-details__back-icon{content:url(https://storage.googleapis.com/assets.miam.tech/generic/icons/chevron-down-white.svg)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons .miam-recipe-details__like-button{position:absolute;top:0;right:0}@media (min-width:1023px) and (max-height:800px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__guest-counter .miam-counter-input{padding:2px}}@media (min-width:1023px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons{top:24px;right:24px;left:24px;bottom:24px;flex-direction:column}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper{width:inherit}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__mobile-header-buttons{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button{display:flex;position:sticky;top:24px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__banner_buttons .miam-recipe-details__top-button-wrapper .miam-recipe-details__close-button:hover img.miam-recipe-details__close-icon{content:url(https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross.svg)}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__picture .miam-recipe-details__picture-img{width:100%;max-height:100%;-o-object-position:center;object-position:center;-o-object-fit:cover;object-fit:cover}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container{z-index:2;display:flex;justify-content:space-between;align-items:center;position:sticky;top:-1px;padding:16px;overflow:hidden;background:var(--miam-ds-color-neutral-white,#fff);transition:padding .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__back-button-mobile-container{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__title{width:100%;transition:font-size .3s;color:var(--miam-ds-color-neutral-black,#1f3543)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon{display:flex;position:absolute;right:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon .miam-recipe-details__hideable-actions{max-width:0;overflow:hidden;transition:max-width .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon .miam-recipe-details__close-button{margin-left:16px;padding:8px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned{padding:12px 16px;border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__title{font-size:20px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon{position:relative;top:unset;right:unset}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon .miam-recipe-details__like-button{margin-right:16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon .miam-recipe-details__hideable-actions{max-width:64px}@media (max-width:1024px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container{justify-content:flex-start}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__back-button-mobile-container{display:flex;align-items:center;justify-content:center;max-width:0;overflow:hidden;transition:max-width .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__back-button-mobile-container .miam-recipe-details__back-icon{transform:rotate(90deg)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__title{font-size:20px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__actions__icon{max-width:0;overflow:hidden;transition:max-width .3s}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container .miam-recipe-details__hideable-actions{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned{padding:4px 16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__back-button-mobile-container{overflow:visible;max-width:48px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__back-button-mobile-container .miam-recipe-details__back-button{margin:8px 0;width:40px;height:40px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__title{font-size:14px;font-weight:500}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__title-container.is-pinned .miam-recipe-details__actions__icon{max-width:40px}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__infos{padding:8px 16px 16px;display:block}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs{padding:8px 16px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__tabs.hidden{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer{box-sizing:border-box;background:var(--miam-ds-color-neutral-white,#fff);border-top:1px solid var(--miam-ds-color-neutral-200,#d9dde1);padding:16px 12px;position:sticky;bottom:0;display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center;z-index:2;height:80px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer.center{justify-content:center}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer.hidden{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta{display:flex;gap:8px}@media (max-width:1024px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta.miam-ds-button.primary:hover{background-color:var(--miam-ds-color-primary)}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta .miam-recipe-details__add-to-basket-cta__text{display:flex;gap:4px}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta .miam-recipe-details__add-to-basket-cta__text .miam-recipe-details__add-to-basket-remaining-price{display:flex}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__add-to-basket-cta .miam-recipe-details__add-to-basket-cta__text .miam-recipe-details__add-to-basket-remaining-price .hidden{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer ng-miam-recipe-pricing .miam-recipe-pricing__wrapper{align-items:flex-end}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer ng-miam-recipe-pricing .miam-recipe-pricing__wrapper .miam-recipe-pricing__wrapper__price{color:var(--miam-ds-color-primary-700);margin-right:4px}@media (max-width:1024px){.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer ng-miam-recipe-pricing .miam-recipe-pricing__wrapper{flex-direction:column;align-items:flex-start}}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__price{display:flex;flex-direction:column}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__price .miam-recipe-details__price-label{color:var(--miam-ds-color-primary,#24748f)}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__price .miam-recipe-details__price-label .hidden{display:none}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__footer .miam-recipe-details__price .miam-recipe-details__price-in-basket-label{color:var(--miam-ds-color-neutral-black,#1f3543);opacity:.65}.miam-recipe-details .miam-recipe-details__container .miam-recipe-details__preparation-tab{padding:16px;display:flex;flex-direction:column;gap:24px}"], encapsulation: 2, changeDetection: 0 });
|
|
24268
24753
|
(function () {
|
|
24269
24754
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeDetailsComponent, [{
|
|
24270
24755
|
type: i0.Component,
|
|
@@ -24275,7 +24760,7 @@
|
|
|
24275
24760
|
encapsulation: i0.ViewEncapsulation.None,
|
|
24276
24761
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
24277
24762
|
}]
|
|
24278
|
-
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: RecipesService }, { type: BasketsService }, { type: UserService }, { type: PointOfSalesService }, { type: ContextService }, { type: RecipeDetailsService }, { type: SponsorBlockService }, { type: AnalyticsService }]; }, { recipeId: [{
|
|
24763
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: RecipesService }, { type: BasketsService }, { type: UserService }, { type: PointOfSalesService }, { type: SuppliersService }, { type: ContextService }, { type: RecipeDetailsService }, { type: SponsorBlockService }, { type: AnalyticsService }]; }, { recipeId: [{
|
|
24279
24764
|
type: i0.Input
|
|
24280
24765
|
}], guestNumber: [{
|
|
24281
24766
|
type: i0.Input
|
|
@@ -24310,7 +24795,7 @@
|
|
|
24310
24795
|
args: ['topContainerImg']
|
|
24311
24796
|
}] });
|
|
24312
24797
|
})();
|
|
24313
|
-
var templateObject_1$4, templateObject_2$2, templateObject_3$2, templateObject_4$1
|
|
24798
|
+
var templateObject_1$4, templateObject_2$2, templateObject_3$2, templateObject_4$1;
|
|
24314
24799
|
|
|
24315
24800
|
var RecipeDetailsModule = /** @class */ (function () {
|
|
24316
24801
|
// Create custom elements so the WebComponents can be interpreted by the browser regardless of the js framework used
|
|
@@ -25313,6 +25798,7 @@
|
|
|
25313
25798
|
};
|
|
25314
25799
|
RecipeModalComponent.prototype.ngOnDestroy = function () {
|
|
25315
25800
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
25801
|
+
this.recipeDetailsService.unsubscribe();
|
|
25316
25802
|
};
|
|
25317
25803
|
RecipeModalComponent.prototype.listenToRecipeDisplayed = function () {
|
|
25318
25804
|
var _this = this;
|
|
@@ -25324,7 +25810,8 @@
|
|
|
25324
25810
|
_this.previewMode.next(result.previewMode);
|
|
25325
25811
|
_this.previewAllowed = result.previewAllowed;
|
|
25326
25812
|
_this.show = true;
|
|
25327
|
-
|
|
25813
|
+
// Put back if/when printing is reimplemented
|
|
25814
|
+
// this.printService.prepareForPrint(this.elRef);
|
|
25328
25815
|
}
|
|
25329
25816
|
else {
|
|
25330
25817
|
_this.show = false;
|
|
@@ -25339,7 +25826,8 @@
|
|
|
25339
25826
|
_this.displayGuestsInDetails = result.displayGuests;
|
|
25340
25827
|
_this.helpButtonAllowedInDetails = result.helpButtonAllowed;
|
|
25341
25828
|
_this.show = true;
|
|
25342
|
-
|
|
25829
|
+
// Put back if/when printing is reimplemented
|
|
25830
|
+
// this.printService.prepareForPrint(this.elRef);
|
|
25343
25831
|
(_a = _this.detailsComponent) === null || _a === void 0 ? void 0 : _a.cdr.markForCheck();
|
|
25344
25832
|
if (_this.detailsComponent) {
|
|
25345
25833
|
_this.detailsComponent.showDetail = true;
|
|
@@ -25363,7 +25851,8 @@
|
|
|
25363
25851
|
this.recipe = null; // trigger again a change on recipe if we re-open the view
|
|
25364
25852
|
this.previewMode.next(false);
|
|
25365
25853
|
this.recipesService.hide();
|
|
25366
|
-
|
|
25854
|
+
// Put back if/when printing is reimplemented
|
|
25855
|
+
// this.printService.dismissPrinting();
|
|
25367
25856
|
this.hasChangesOnClose.emit(this.basketChangedSinceOpened);
|
|
25368
25857
|
this.basketChangedSinceOpened = false;
|
|
25369
25858
|
this.cdr.detectChanges();
|
|
@@ -25650,6 +26139,7 @@
|
|
|
25650
26139
|
RecipesService,
|
|
25651
26140
|
RecipeLikesService,
|
|
25652
26141
|
RecipeDetailsService,
|
|
26142
|
+
BasketTransferService,
|
|
25653
26143
|
BasketsService,
|
|
25654
26144
|
BasketEntriesService,
|
|
25655
26145
|
ItemsService,
|
|
@@ -25685,6 +26175,7 @@
|
|
|
25685
26175
|
RecipesService,
|
|
25686
26176
|
RecipeLikesService,
|
|
25687
26177
|
RecipeDetailsService,
|
|
26178
|
+
BasketTransferService,
|
|
25688
26179
|
BasketsService,
|
|
25689
26180
|
BasketEntriesService,
|
|
25690
26181
|
ItemsService,
|
|
@@ -25729,6 +26220,7 @@
|
|
|
25729
26220
|
exports.BasketPreviewLine = BasketPreviewLine;
|
|
25730
26221
|
exports.BasketPreviewLineComponent = BasketPreviewLineComponent;
|
|
25731
26222
|
exports.BasketPreviewModule = BasketPreviewModule;
|
|
26223
|
+
exports.BasketTransferService = BasketTransferService;
|
|
25732
26224
|
exports.BasketsComparatorService = BasketsComparatorService;
|
|
25733
26225
|
exports.BasketsService = BasketsService;
|
|
25734
26226
|
exports.BasketsSynchronizerService = BasketsSynchronizerService;
|