ng-miam 8.2.4 → 8.2.6
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 +245 -212
- 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/abstracts/event-tracer.component.js +6 -1
- package/esm2015/lib/_components/product-card/product-card.component.js +7 -10
- package/esm2015/lib/_services/analytics.service.js +5 -1
- package/esm2015/lib/_services/basket-actions.service.js +3 -2
- package/esm2015/lib/_services/basket-transfer.service.js +40 -33
- package/esm2015/lib/_services/baskets.service.js +3 -1
- package/esm2015/lib/_services/interceptor.service.js +2 -2
- package/esm2015/lib/_services/package.service.js +3 -2
- package/esm2015/lib/_services/point-of-sales.service.js +16 -5
- package/esm2015/lib/_services/preferences.service.js +11 -3
- package/esm2015/lib/_types/event-trace.js +1 -1
- package/esm2015/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.js +2 -1
- package/esm2015/lib/_web-components/preferences/preferences.component.js +45 -86
- package/esm2015/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.js +5 -6
- package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +47 -13
- package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +6 -3
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +49 -55
- package/fesm2015/ng-miam.js +223 -196
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_components/abstracts/event-tracer.component.d.ts +1 -0
- package/lib/_components/abstracts/event-tracer.component.d.ts.map +1 -1
- package/lib/_components/product-card/product-card.component.d.ts +2 -4
- package/lib/_components/product-card/product-card.component.d.ts.map +1 -1
- package/lib/_services/analytics.service.d.ts.map +1 -1
- package/lib/_services/basket-actions.service.d.ts.map +1 -1
- package/lib/_services/basket-transfer.service.d.ts +5 -3
- package/lib/_services/basket-transfer.service.d.ts.map +1 -1
- package/lib/_services/baskets.service.d.ts.map +1 -1
- package/lib/_services/package.service.d.ts +1 -1
- package/lib/_services/package.service.d.ts.map +1 -1
- package/lib/_services/point-of-sales.service.d.ts +2 -1
- package/lib/_services/point-of-sales.service.d.ts.map +1 -1
- package/lib/_services/preferences.service.d.ts +2 -0
- package/lib/_services/preferences.service.d.ts.map +1 -1
- package/lib/_types/event-trace.d.ts +1 -0
- package/lib/_types/event-trace.d.ts.map +1 -1
- package/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.d.ts.map +1 -1
- package/lib/_web-components/preferences/preferences.component.d.ts +2 -5
- package/lib/_web-components/preferences/preferences.component.d.ts.map +1 -1
- package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts +2 -3
- package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts.map +1 -1
- package/lib/_web-components/recipe-catalog/recipe-catalog.component.d.ts +11 -5
- package/lib/_web-components/recipe-catalog/recipe-catalog.component.d.ts.map +1 -1
- 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 +4 -3
- package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts.map +1 -1
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -2023,13 +2023,18 @@
|
|
|
2023
2023
|
_this.type = 'point-of-sales';
|
|
2024
2024
|
_this.pos$ = new rxjs.BehaviorSubject(undefined);
|
|
2025
2025
|
_this.openStoreLocators$ = new rxjs.Subject();
|
|
2026
|
+
_this.posIsLoading$ = new rxjs.BehaviorSubject(false);
|
|
2026
2027
|
_this.register();
|
|
2027
2028
|
return _this;
|
|
2028
2029
|
}
|
|
2029
2030
|
PointOfSalesService.prototype.loadPos = function (posId) {
|
|
2030
2031
|
var _this = this;
|
|
2032
|
+
this.posIsLoading$.next(true);
|
|
2031
2033
|
if (!this.pos$.value || this.pos$.value.id !== posId) {
|
|
2032
|
-
this.get(posId, { include: ['supplier'] }).pipe(operators.skipWhile(function (pos) { return pos.is_loading; }), operators.tap(function (pos) {
|
|
2034
|
+
this.get(posId, { include: ['supplier'] }).pipe(operators.skipWhile(function (pos) { return pos.is_loading; }), operators.tap(function (pos) {
|
|
2035
|
+
_this.pos$.next(pos);
|
|
2036
|
+
_this.posIsLoading$.next(false);
|
|
2037
|
+
})).subscribe();
|
|
2033
2038
|
}
|
|
2034
2039
|
return this.pos$;
|
|
2035
2040
|
};
|
|
@@ -2037,10 +2042,20 @@
|
|
|
2037
2042
|
return this.pos$.pipe(operators.map(function (pos) { var _a, _b, _c; return !!((_c = (_b = (_a = pos === null || pos === void 0 ? void 0 : pos.relationships) === null || _a === void 0 ? void 0 : _a.supplier) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.id); }));
|
|
2038
2043
|
};
|
|
2039
2044
|
PointOfSalesService.prototype.posWasInitialized = function () {
|
|
2040
|
-
return
|
|
2045
|
+
return rxjs.combineLatest([
|
|
2046
|
+
this.pos$,
|
|
2047
|
+
this.posIsLoading$
|
|
2048
|
+
]).pipe(operators.skipWhile(function (_d) {
|
|
2049
|
+
var _e = __read(_d, 2), _pos = _e[0], loading = _e[1];
|
|
2050
|
+
return loading;
|
|
2051
|
+
}), operators.map(function (_d) {
|
|
2052
|
+
var _e = __read(_d, 2), pos = _e[0], _isLoading = _e[1];
|
|
2053
|
+
return pos !== undefined;
|
|
2054
|
+
}));
|
|
2041
2055
|
};
|
|
2042
2056
|
PointOfSalesService.prototype.loadPosWithExtId = function (extId) {
|
|
2043
2057
|
var _this = this;
|
|
2058
|
+
this.posIsLoading$.next(true);
|
|
2044
2059
|
this.suppliersService.supplier$.pipe(operators.skipWhile(function (supplier) { return !(supplier === null || supplier === void 0 ? void 0 : supplier.id); }), operators.take(1), operators.switchMap(function (supplier) { return _this.all({
|
|
2045
2060
|
remotefilter: {
|
|
2046
2061
|
'ext-id': extId,
|
|
@@ -2050,9 +2065,11 @@
|
|
|
2050
2065
|
}).pipe(operators.skipWhile(function (pos) { return pos.is_loading; }), operators.tap(function (pos) {
|
|
2051
2066
|
if (pos.data.length > 0) {
|
|
2052
2067
|
_this.pos$.next(pos.data[0]);
|
|
2068
|
+
_this.posIsLoading$.next(false);
|
|
2053
2069
|
}
|
|
2054
2070
|
else {
|
|
2055
2071
|
_this.pos$.next(null);
|
|
2072
|
+
_this.posIsLoading$.next(false);
|
|
2056
2073
|
}
|
|
2057
2074
|
})); })).subscribe();
|
|
2058
2075
|
return this.pos$;
|
|
@@ -2767,8 +2784,11 @@
|
|
|
2767
2784
|
_this.register();
|
|
2768
2785
|
return _this;
|
|
2769
2786
|
}
|
|
2770
|
-
PackageService.prototype.categories_for = function (suppliersIds) {
|
|
2787
|
+
PackageService.prototype.categories_for = function (suppliersIds, pageSize, pageNumber) {
|
|
2788
|
+
if (pageSize === void 0) { pageSize = 30; }
|
|
2789
|
+
if (pageNumber === void 0) { pageNumber = 1; }
|
|
2771
2790
|
return this.all({
|
|
2791
|
+
page: { size: pageSize, number: pageNumber },
|
|
2772
2792
|
remotefilter: {
|
|
2773
2793
|
category_for: suppliersIds.join(','),
|
|
2774
2794
|
status: 'validated',
|
|
@@ -2915,9 +2935,13 @@
|
|
|
2915
2935
|
this.abTestkey = key;
|
|
2916
2936
|
};
|
|
2917
2937
|
AnalyticsService.prototype.event = function (name, path, props) {
|
|
2938
|
+
var _a;
|
|
2918
2939
|
if (this.abTestkey) {
|
|
2919
2940
|
props.abTestKey = this.abTestkey;
|
|
2920
2941
|
}
|
|
2942
|
+
if (((_a = localStorage.getItem('_miam/affiliate')) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
2943
|
+
props.affiliate = localStorage.getItem('_miam/affiliate');
|
|
2944
|
+
}
|
|
2921
2945
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
2922
2946
|
plausible(name, { u: this.url(path), props: props });
|
|
2923
2947
|
this.eventEmitter.emit(JSON.stringify({
|
|
@@ -3200,14 +3224,16 @@
|
|
|
3200
3224
|
this.tagsToAdd = [];
|
|
3201
3225
|
this.tagsToRemove = [];
|
|
3202
3226
|
this.currentPreferencesNumber = new rxjs.BehaviorSubject(0);
|
|
3227
|
+
this.guests$ = new rxjs.BehaviorSubject(0);
|
|
3228
|
+
this.initGuests();
|
|
3203
3229
|
this.updatePreferencesCount();
|
|
3204
3230
|
}
|
|
3205
3231
|
Object.defineProperty(PreferencesService.prototype, "guests", {
|
|
3206
3232
|
get: function () {
|
|
3207
|
-
return
|
|
3233
|
+
return this.guests$.value;
|
|
3208
3234
|
},
|
|
3209
3235
|
set: function (newNumber) {
|
|
3210
|
-
|
|
3236
|
+
this.guests$.next(newNumber);
|
|
3211
3237
|
},
|
|
3212
3238
|
enumerable: false,
|
|
3213
3239
|
configurable: true
|
|
@@ -3222,6 +3248,9 @@
|
|
|
3222
3248
|
enumerable: false,
|
|
3223
3249
|
configurable: true
|
|
3224
3250
|
});
|
|
3251
|
+
PreferencesService.prototype.initGuests = function () {
|
|
3252
|
+
this.guests$.next(+localStorage.getItem('_miam/preferences/guests') || 4);
|
|
3253
|
+
};
|
|
3225
3254
|
PreferencesService.prototype.tagIsInStorage = function (tag, without) {
|
|
3226
3255
|
var preferences = this.preferencesInStorage;
|
|
3227
3256
|
if (!preferences || !preferences.with || !preferences.without) {
|
|
@@ -3241,7 +3270,9 @@
|
|
|
3241
3270
|
return (this.tagIsInStorage(tag, without) && !this.tagWasAlreadyRemoved(tag)) || this.tagWasAlreadyAdded(tag);
|
|
3242
3271
|
};
|
|
3243
3272
|
PreferencesService.prototype.resetPreferences = function () {
|
|
3273
|
+
localStorage.setItem('_miam/preferences/guests', '4');
|
|
3244
3274
|
localStorage.setItem('_miam/preferences', JSON.stringify({ with: [], without: [] }));
|
|
3275
|
+
this.guests$.next(+localStorage.getItem('_miam/preferences/guests') || 4);
|
|
3245
3276
|
this.resetTagsActions();
|
|
3246
3277
|
};
|
|
3247
3278
|
PreferencesService.prototype.resetTagsActions = function () {
|
|
@@ -3317,6 +3348,7 @@
|
|
|
3317
3348
|
this.tagsToRemove.forEach(function (tag) {
|
|
3318
3349
|
_this.removeTagFromPreferences(tag);
|
|
3319
3350
|
});
|
|
3351
|
+
localStorage.setItem('_miam/preferences/guests', this.guests.toString());
|
|
3320
3352
|
this.updatePreferencesCount();
|
|
3321
3353
|
this.resetTagsActions();
|
|
3322
3354
|
};
|
|
@@ -3944,6 +3976,7 @@
|
|
|
3944
3976
|
if (eventTrace === void 0) { eventTrace = { originPath: '', props: {} }; }
|
|
3945
3977
|
console.log('[Miam] resetting basket');
|
|
3946
3978
|
this.analyticsService.sendEventWhenReady(this.analyticsService.EVENT_RECIPE_RESET, eventTrace.originPath, eventTrace.props);
|
|
3979
|
+
localStorage.removeItem('_miam/affiliate');
|
|
3947
3980
|
this.ignoredBasketsService.resetIgnoredIngredients();
|
|
3948
3981
|
return this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) { return _this.waitForBasket.pipe(operators.tap(function (basket) { return _this.analyticsService.sendEventsOfResetBasket(basket, eventTrace); }), operators.switchMap(function () { return _this.get("reset?point_of_sale_id=" + pos.id + "&fields[baskets]=" + BASKET_SPARSE_FIELDS.baskets.join(',')).pipe(operators.skipWhile(function (basket) { return basket.is_loading; }), operators.switchMap(function (basket) { return _this.updateLocalBasket(basket); })); })); }));
|
|
3949
3982
|
};
|
|
@@ -3967,6 +4000,7 @@
|
|
|
3967
4000
|
console.log("[Miam] send push analytics event if > 0: " + JSON.stringify(confirmedBasket.totalPrice) + " " + JSON.stringify(confirmedBasket));
|
|
3968
4001
|
if (confirmedBasket.totalPrice > 0 && confirmedBasket.token) {
|
|
3969
4002
|
_this.analyticsService.sendEventWhenReady(_this.analyticsService.EVENT_BASKET_CONFIRMED, null, _this.eventProps(confirmedBasket, totalPrice));
|
|
4003
|
+
localStorage.removeItem('_miam/affiliate');
|
|
3970
4004
|
}
|
|
3971
4005
|
_this._basket$.next(undefined);
|
|
3972
4006
|
return _this.resetBasket();
|
|
@@ -7739,6 +7773,11 @@
|
|
|
7739
7773
|
}
|
|
7740
7774
|
return this.originTrace.originPath;
|
|
7741
7775
|
};
|
|
7776
|
+
EventTracerComponent.prototype.removeFromOriginPath = function (partToReplace) {
|
|
7777
|
+
if (this.originTrace.originPath.includes(partToReplace)) {
|
|
7778
|
+
this.originTrace.originPath = this.originTrace.originPath.replace(partToReplace, '');
|
|
7779
|
+
}
|
|
7780
|
+
};
|
|
7742
7781
|
EventTracerComponent.prototype.sendEvent = function (eventType) {
|
|
7743
7782
|
this.analyticsService.sendEventWhenReady(eventType, this.path(), this.props());
|
|
7744
7783
|
};
|
|
@@ -7992,7 +8031,8 @@
|
|
|
7992
8031
|
* either adds recipes to the basket or ingredients to the basket.
|
|
7993
8032
|
*/
|
|
7994
8033
|
BasketActionsService.prototype.getStoredMethod = function () {
|
|
7995
|
-
|
|
8034
|
+
var storedMethod = localStorage.getItem('_miam/storeCallbackMethod');
|
|
8035
|
+
if (storedMethod && storedMethod !== 'setFavoritesFilter') {
|
|
7996
8036
|
var parsedStoredData = JSON.parse(localStorage.getItem('_miam/storeCallbackMethod'));
|
|
7997
8037
|
this.shouldExecuteBasketAction.next(parsedStoredData);
|
|
7998
8038
|
this.recipesService.display(parsedStoredData.arguments.recipeId, { previewAllowed: true, previewMode: false }, { originPath: '', props: {} });
|
|
@@ -8499,35 +8539,33 @@
|
|
|
8499
8539
|
var _this = this;
|
|
8500
8540
|
var transferData = this.getTransferData();
|
|
8501
8541
|
if (transferData) {
|
|
8502
|
-
this.
|
|
8542
|
+
this.setSessionData(transferData);
|
|
8543
|
+
this.applyBasketTransfer(transferData).pipe(operators.switchMap(function () { return _this.basketsService.reloadBasket(); })).subscribe();
|
|
8503
8544
|
}
|
|
8504
8545
|
};
|
|
8505
8546
|
BasketTransferService.prototype.applyBasketTransfer = function (params) {
|
|
8506
8547
|
var _this = this;
|
|
8507
|
-
this.
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
return rxjs.of(true);
|
|
8519
|
-
}));
|
|
8548
|
+
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 () { return _this.posService.pos$.pipe(operators.skipWhile(function (pos) { return !pos; }), operators.take(1), operators.switchMap(function (pos) { return _this.basketsService.waitForBasket
|
|
8549
|
+
.pipe(operators.map(function () { return pos; })); }), operators.switchMap(function (pos) {
|
|
8550
|
+
var posId = pos.id;
|
|
8551
|
+
var transferBasketUrl = environment$1.miamAPI + "/api/v1/baskets/transfer?point_of_sale_id=" + posId + "&transferred_basket_token=" + params.basketToken;
|
|
8552
|
+
_this.clearTransferSessionData();
|
|
8553
|
+
sessionStorage.setItem('_miam/basketActionInterrupted', 'true');
|
|
8554
|
+
return _this.http.patch(transferBasketUrl, {}).pipe(operators.switchMap(function () {
|
|
8555
|
+
var getCurrentBasketUrl = environment$1.miamAPI + "/api/v1/baskets/current?point_of_sale_id=" + posId;
|
|
8556
|
+
return _this.http.get(getCurrentBasketUrl, {}).pipe(operators.switchMap(function () {
|
|
8557
|
+
sessionStorage.removeItem('_miam/basketActionInterrupted');
|
|
8558
|
+
return rxjs.of(true);
|
|
8520
8559
|
}));
|
|
8521
8560
|
}));
|
|
8522
|
-
}));
|
|
8561
|
+
})); }));
|
|
8523
8562
|
};
|
|
8524
8563
|
BasketTransferService.prototype.setSessionData = function (params) {
|
|
8525
|
-
var
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
if (
|
|
8529
|
-
|
|
8530
|
-
sessionStorage.setItem('_miam/posOfSaleExtId', params.posExtId);
|
|
8564
|
+
var _a;
|
|
8565
|
+
sessionStorage.setItem('_miam/transferredBasketToken', params.basketToken);
|
|
8566
|
+
sessionStorage.setItem('_miam/posOfSaleExtId', params.posExtId);
|
|
8567
|
+
if (((_a = params.affiliate) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
8568
|
+
localStorage.setItem('_miam/affiliate', params.affiliate);
|
|
8531
8569
|
}
|
|
8532
8570
|
};
|
|
8533
8571
|
BasketTransferService.prototype.clearTransferSessionData = function () {
|
|
@@ -8543,7 +8581,6 @@
|
|
|
8543
8581
|
_this.http.get(getCurrentBasketUrl, {}).subscribe(function () {
|
|
8544
8582
|
var startTransferUrl = environment$1.miamAPI + "/api/v1/baskets/start_transfer?point_of_sale_id=" + posId;
|
|
8545
8583
|
_this.http.patch(startTransferUrl, {}).subscribe(function (transferResponse) {
|
|
8546
|
-
console.log('PATCH transfer:', transferResponse);
|
|
8547
8584
|
_this.http.get(getCurrentBasketUrl, {}).subscribe(function () {
|
|
8548
8585
|
var transferUrl = transferResponse['transfer_url'];
|
|
8549
8586
|
window.open(transferUrl, '_blank');
|
|
@@ -8557,8 +8594,8 @@
|
|
|
8557
8594
|
return rxjs.combineLatest([
|
|
8558
8595
|
this.userService.isLogged$,
|
|
8559
8596
|
this.posService.posWasInitialized()
|
|
8560
|
-
]).pipe(operators.take(1), operators.map(function (
|
|
8561
|
-
var
|
|
8597
|
+
]).pipe(operators.take(1), operators.map(function (_b) {
|
|
8598
|
+
var _c = __read(_b, 2), isLogged = _c[0], isPosValid = _c[1];
|
|
8562
8599
|
return _this.contextService.hookCallback(isLogged, isPosValid);
|
|
8563
8600
|
}));
|
|
8564
8601
|
};
|
|
@@ -8573,19 +8610,31 @@
|
|
|
8573
8610
|
}));
|
|
8574
8611
|
};
|
|
8575
8612
|
BasketTransferService.prototype.getTransferData = function () {
|
|
8613
|
+
var _a;
|
|
8576
8614
|
var currentUrl = window.location.href;
|
|
8577
8615
|
var urlParams = new URL(currentUrl).searchParams;
|
|
8578
8616
|
var basketToken = urlParams.get('transferred_basket_token') || sessionStorage.getItem('_miam/transferredBasketToken');
|
|
8579
8617
|
var posExtId = urlParams.get('point_of_sale_ext_id') || sessionStorage.getItem('_miam/posOfSaleExtId');
|
|
8580
|
-
var
|
|
8581
|
-
history.replaceState({}, document.title, urlWithoutParams);
|
|
8618
|
+
var affiliate = (_a = urlParams.get('utm_source')) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
8582
8619
|
if (basketToken && posExtId) {
|
|
8583
|
-
|
|
8620
|
+
this.removeTransferParamsFromUrl();
|
|
8621
|
+
return { basketToken: basketToken, posExtId: posExtId, affiliate: affiliate };
|
|
8584
8622
|
}
|
|
8585
8623
|
else {
|
|
8586
8624
|
return null;
|
|
8587
8625
|
}
|
|
8588
8626
|
};
|
|
8627
|
+
BasketTransferService.prototype.removeTransferParamsFromUrl = function () {
|
|
8628
|
+
var currentUrl = window.location.href;
|
|
8629
|
+
var urlQuery = currentUrl.split('?')[1];
|
|
8630
|
+
if (urlQuery) {
|
|
8631
|
+
var urlParams = new URLSearchParams(urlQuery);
|
|
8632
|
+
urlParams.delete('transferred_basket_token');
|
|
8633
|
+
urlParams.delete('point_of_sale_ext_id');
|
|
8634
|
+
var newUrl = currentUrl.split('?')[0] + (urlParams.toString().length > 0 ? '?' + urlParams.toString() : '');
|
|
8635
|
+
history.replaceState({}, document.title, newUrl);
|
|
8636
|
+
}
|
|
8637
|
+
};
|
|
8589
8638
|
return BasketTransferService;
|
|
8590
8639
|
}());
|
|
8591
8640
|
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)); };
|
|
@@ -8666,7 +8715,7 @@
|
|
|
8666
8715
|
request = request.clone({
|
|
8667
8716
|
setHeaders: {
|
|
8668
8717
|
'miam-origin': this.context.origin.value,
|
|
8669
|
-
'miam-front-version': '8.2.
|
|
8718
|
+
'miam-front-version': '8.2.6',
|
|
8670
8719
|
'miam-front-type': 'web',
|
|
8671
8720
|
'miam-api-version': '4.7.0',
|
|
8672
8721
|
'language-id': environment$1.lang
|
|
@@ -9219,7 +9268,7 @@
|
|
|
9219
9268
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r30.getImportances());
|
|
9220
9269
|
}
|
|
9221
9270
|
}
|
|
9222
|
-
var _c18$
|
|
9271
|
+
var _c18$3 = function (a0) { return { clickable: a0 }; };
|
|
9223
9272
|
function ListInputComponent_ul_4_ng_template_2_li_0_label_17_img_1_Template(rf, ctx) {
|
|
9224
9273
|
if (rf & 1) {
|
|
9225
9274
|
i0__namespace.ɵɵelement(0, "img", 57);
|
|
@@ -9227,7 +9276,7 @@
|
|
|
9227
9276
|
if (rf & 2) {
|
|
9228
9277
|
var row_r26 = i0__namespace.ɵɵnextContext(2).$implicit;
|
|
9229
9278
|
var ctx_r49 = i0__namespace.ɵɵnextContext(3);
|
|
9230
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c18$
|
|
9279
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c18$3, ctx_r49.ingredientsPictures.editable))("src", row_r26.controls.attributes.controls["picture-url"].value, i0__namespace.ɵɵsanitizeUrl);
|
|
9231
9280
|
}
|
|
9232
9281
|
}
|
|
9233
9282
|
function ListInputComponent_ul_4_ng_template_2_li_0_label_17_ng_miam_icon_2_Template(rf, ctx) {
|
|
@@ -9825,7 +9874,7 @@
|
|
|
9825
9874
|
i18n_19 = MSG_EXTERNAL_5063758185397051816$$LIB__COMPONENTS_LIST_INPUT_LIST_INPUT_COMPONENT_TS__20;
|
|
9826
9875
|
}
|
|
9827
9876
|
else {
|
|
9828
|
-
i18n_19 = $localize(templateObject_10$
|
|
9877
|
+
i18n_19 = $localize(templateObject_10$4 || (templateObject_10$4 = __makeTemplateObject([":\u241F8bf11ac957bb9c1d67052f048a5a711f3fb32bab\u241F5063758185397051816:Oups... c\u2019est vide, commencez \u00E0 ajouter des "], [":\u241F8bf11ac957bb9c1d67052f048a5a711f3fb32bab\u241F5063758185397051816:Oups... c\u2019est vide, commencez \u00E0 ajouter des "])));
|
|
9829
9878
|
}
|
|
9830
9879
|
var i18n_21;
|
|
9831
9880
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -9966,7 +10015,7 @@
|
|
|
9966
10015
|
type: i0.Output
|
|
9967
10016
|
}] });
|
|
9968
10017
|
})();
|
|
9969
|
-
var templateObject_1$K, templateObject_2$C, templateObject_3$u, templateObject_4$o, templateObject_5$j, templateObject_6$f, templateObject_7$b, templateObject_8$9, templateObject_9$7, templateObject_10$
|
|
10018
|
+
var templateObject_1$K, templateObject_2$C, templateObject_3$u, templateObject_4$o, templateObject_5$j, templateObject_6$f, templateObject_7$b, templateObject_8$9, templateObject_9$7, templateObject_10$4, templateObject_11$4, templateObject_12$4, templateObject_13$4, templateObject_14$3, templateObject_15$2, templateObject_16$2, templateObject_17$2;
|
|
9970
10019
|
|
|
9971
10020
|
var MealsPlannerLinkComponent = /** @class */ (function () {
|
|
9972
10021
|
function MealsPlannerLinkComponent(context) {
|
|
@@ -10870,7 +10919,7 @@
|
|
|
10870
10919
|
i18n_18 = MSG_EXTERNAL_2877853972557702593$$LIB__COMPONENTS_RECIPE_FILTERS_RECIPE_FILTERS_COMPONENT_TS__19;
|
|
10871
10920
|
}
|
|
10872
10921
|
else {
|
|
10873
|
-
i18n_18 = $localize(templateObject_10$
|
|
10922
|
+
i18n_18 = $localize(templateObject_10$3 || (templateObject_10$3 = __makeTemplateObject([":\u241Fdc6b8f21ea2f0969bbb711d6d261babaab678179\u241F2877853972557702593:Difficult\u00E9"], [":\u241Fdc6b8f21ea2f0969bbb711d6d261babaab678179\u241F2877853972557702593:Difficult\u00E9"])));
|
|
10874
10923
|
}
|
|
10875
10924
|
var i18n_20;
|
|
10876
10925
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -11025,7 +11074,7 @@
|
|
|
11025
11074
|
type: i0.Output
|
|
11026
11075
|
}] });
|
|
11027
11076
|
})();
|
|
11028
|
-
var templateObject_1$I, templateObject_2$A, templateObject_3$s, templateObject_4$n, templateObject_5$i, templateObject_6$e, templateObject_7$a, templateObject_8$8, templateObject_9$6, templateObject_10$
|
|
11077
|
+
var templateObject_1$I, templateObject_2$A, templateObject_3$s, templateObject_4$n, templateObject_5$i, templateObject_6$e, templateObject_7$a, templateObject_8$8, templateObject_9$6, templateObject_10$3, templateObject_11$3, templateObject_12$3, templateObject_13$3, templateObject_14$2, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1, templateObject_19$1;
|
|
11029
11078
|
|
|
11030
11079
|
var SelectPosButtonDirective = /** @class */ (function () {
|
|
11031
11080
|
function SelectPosButtonDirective(el, contextService, posService) {
|
|
@@ -12890,12 +12939,12 @@
|
|
|
12890
12939
|
if (rf & 2) {
|
|
12891
12940
|
var ctx_r4 = i0__namespace.ɵɵnextContext(2);
|
|
12892
12941
|
i0__namespace.ɵɵadvance(5);
|
|
12893
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r4.
|
|
12942
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r4.isInXRecipes());
|
|
12894
12943
|
}
|
|
12895
12944
|
}
|
|
12896
|
-
var _c16
|
|
12945
|
+
var _c16 = function (a0, a1) { return { "added": a0, "disabled": a1 }; };
|
|
12897
12946
|
var _c17 = function (a0) { return { "miam-product-card__disabled-text": a0 }; };
|
|
12898
|
-
var _c18$
|
|
12947
|
+
var _c18$2 = function (a0) { return { "disabled": a0 }; };
|
|
12899
12948
|
function ProductCardComponent_div_0_Template(rf, ctx) {
|
|
12900
12949
|
if (rf & 1) {
|
|
12901
12950
|
i0__namespace.ɵɵelementStart(0, "div", 1);
|
|
@@ -12923,9 +12972,9 @@
|
|
|
12923
12972
|
if (rf & 2) {
|
|
12924
12973
|
var _r2 = i0__namespace.ɵɵreference(13);
|
|
12925
12974
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
12926
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(13, _c16
|
|
12975
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(13, _c16, 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"));
|
|
12927
12976
|
i0__namespace.ɵɵadvance(1);
|
|
12928
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(16, _c16
|
|
12977
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(16, _c16, 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"));
|
|
12929
12978
|
i0__namespace.ɵɵadvance(1);
|
|
12930
12979
|
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(19, _c17, 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"));
|
|
12931
12980
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -12937,28 +12986,26 @@
|
|
|
12937
12986
|
i0__namespace.ɵɵadvance(2);
|
|
12938
12987
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r0.product.ingredient.attributes.unit, " ");
|
|
12939
12988
|
i0__namespace.ɵɵadvance(1);
|
|
12940
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(23, _c18$
|
|
12989
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(23, _c18$2, !(ctx_r0.product.basketEntry.status === "initial" || ctx_r0.product.basketEntry.status === "active")));
|
|
12941
12990
|
i0__namespace.ɵɵadvance(1);
|
|
12942
12991
|
i0__namespace.ɵɵproperty("ngIf", ctx_r0.product.basketEntry.status === "initial" || ctx_r0.product.basketEntry.status === "active")("ngIfElse", _r2);
|
|
12943
12992
|
i0__namespace.ɵɵadvance(3);
|
|
12944
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r0.
|
|
12993
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.isInXRecipes() > 1 && ctx_r0.product.basketEntry.status === "active");
|
|
12945
12994
|
}
|
|
12946
12995
|
}
|
|
12947
12996
|
var ProductCardComponent = /** @class */ (function (_super) {
|
|
12948
12997
|
__extends(ProductCardComponent, _super);
|
|
12949
|
-
function ProductCardComponent(cdr, basketsService, recipeDetailsService, recipesService, analyticsService,
|
|
12998
|
+
function ProductCardComponent(cdr, basketsService, recipeDetailsService, recipesService, analyticsService, ignoredBasketsService, basketActionsService, elementRef) {
|
|
12950
12999
|
var _this = _super.call(this, analyticsService) || this;
|
|
12951
13000
|
_this.cdr = cdr;
|
|
12952
13001
|
_this.basketsService = basketsService;
|
|
12953
13002
|
_this.recipeDetailsService = recipeDetailsService;
|
|
12954
13003
|
_this.recipesService = recipesService;
|
|
12955
13004
|
_this.analyticsService = analyticsService;
|
|
12956
|
-
_this.itemsService = itemsService;
|
|
12957
13005
|
_this.ignoredBasketsService = ignoredBasketsService;
|
|
12958
13006
|
_this.basketActionsService = basketActionsService;
|
|
12959
13007
|
_this.elementRef = elementRef;
|
|
12960
13008
|
_this.subscriptions = [];
|
|
12961
|
-
_this.recipesIncludingIngredient = 0;
|
|
12962
13009
|
_this.loading = false;
|
|
12963
13010
|
_this.loadingAddToBasket = false;
|
|
12964
13011
|
_this.counterMinusLoading = false;
|
|
@@ -12973,7 +13020,6 @@
|
|
|
12973
13020
|
this.subscriptions.push(this.recipeDetailsService.productsByCategory$.subscribe(function () { return _this.isProductSponsored(); }), this.executeActionFromStorage(), this.loadOnRecipesActions(), this.loadOnIngredientsRemoval(), this.updateIngredientQuantityOnRecipeChange());
|
|
12974
13021
|
};
|
|
12975
13022
|
ProductCardComponent.prototype.ngOnChanges = function (changes) {
|
|
12976
|
-
this.recipesIncludingIngredient = this.isInXRecipes();
|
|
12977
13023
|
this.loadingAddToBasket = false;
|
|
12978
13024
|
if (changes.ingredient) {
|
|
12979
13025
|
this.modifiedIngQty = +this.product.ingredient.quantity;
|
|
@@ -13093,7 +13139,7 @@
|
|
|
13093
13139
|
};
|
|
13094
13140
|
return ProductCardComponent;
|
|
13095
13141
|
}(EventTracerComponent));
|
|
13096
|
-
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(
|
|
13142
|
+
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(IgnoredIngredientsService), i0__namespace.ɵɵdirectiveInject(BasketActionsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef)); };
|
|
13097
13143
|
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: function () {
|
|
13098
13144
|
var i18n_0;
|
|
13099
13145
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -13178,7 +13224,7 @@
|
|
|
13178
13224
|
encapsulation: i0.ViewEncapsulation.None,
|
|
13179
13225
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
13180
13226
|
}]
|
|
13181
|
-
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: BasketsService }, { type: RecipeDetailsService }, { type: RecipesService }, { type: AnalyticsService }, { type:
|
|
13227
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: BasketsService }, { type: RecipeDetailsService }, { type: RecipesService }, { type: AnalyticsService }, { type: IgnoredIngredientsService }, { type: BasketActionsService }, { type: i0__namespace.ElementRef }]; }, { product: [{
|
|
13182
13228
|
type: i0.Input
|
|
13183
13229
|
}] });
|
|
13184
13230
|
})();
|
|
@@ -14879,7 +14925,7 @@
|
|
|
14879
14925
|
i18n_22 = MSG_EXTERNAL_2014297263214357463$$LIB__WEB_COMPONENTS_BASKET_PREVIEW_BASKET_PREVIEW_LINE_BASKET_PREVIEW_LINE_COMPONENT_TS___23;
|
|
14880
14926
|
}
|
|
14881
14927
|
else {
|
|
14882
|
-
i18n_22 = $localize(templateObject_10$
|
|
14928
|
+
i18n_22 = $localize(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject([":\u241Fc0482d798065c40279036142ef812ebf3942d280\u241F2014297263214357463:Changer d'article"], [":\u241Fc0482d798065c40279036142ef812ebf3942d280\u241F2014297263214357463:Changer d'article"])));
|
|
14883
14929
|
}
|
|
14884
14930
|
var i18n_25;
|
|
14885
14931
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -14962,7 +15008,7 @@
|
|
|
14962
15008
|
type: i0.Output
|
|
14963
15009
|
}] });
|
|
14964
15010
|
})();
|
|
14965
|
-
var templateObject_1$B, templateObject_2$t, templateObject_3$m, templateObject_4$i, templateObject_5$e, templateObject_6$c, templateObject_7$8, templateObject_8$6, templateObject_9$5, templateObject_10$
|
|
15011
|
+
var templateObject_1$B, templateObject_2$t, templateObject_3$m, templateObject_4$i, templateObject_5$e, templateObject_6$c, templateObject_7$8, templateObject_8$6, templateObject_9$5, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1;
|
|
14966
15012
|
|
|
14967
15013
|
function ReplaceItemComponent_span_3_Template(rf, ctx) {
|
|
14968
15014
|
if (rf & 1) {
|
|
@@ -15680,6 +15726,7 @@
|
|
|
15680
15726
|
this.loading.next(true);
|
|
15681
15727
|
}
|
|
15682
15728
|
this.pageview();
|
|
15729
|
+
this.removeFromOriginPath('/basket-preview/detail');
|
|
15683
15730
|
};
|
|
15684
15731
|
BasketPreviewBlockComponent.prototype.ngAfterViewInit = function () {
|
|
15685
15732
|
var _this = this;
|
|
@@ -17501,7 +17548,7 @@
|
|
|
17501
17548
|
i18n_19 = MSG_EXTERNAL_6893194938999563957$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_FORM_MEALS_PLANNER_FORM_COMPONENT_TS__20;
|
|
17502
17549
|
}
|
|
17503
17550
|
else {
|
|
17504
|
-
i18n_19 = $localize(templateObject_10$
|
|
17551
|
+
i18n_19 = $localize(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject([":\u241F50b3396becd6af8e717b75056a468fc7fe7efabc\u241F6893194938999563957:Nos id\u00E9es repas anti-inflation (prix par personne) "], [":\u241F50b3396becd6af8e717b75056a468fc7fe7efabc\u241F6893194938999563957:Nos id\u00E9es repas anti-inflation (prix par personne) "])));
|
|
17505
17552
|
}
|
|
17506
17553
|
var i18n_21;
|
|
17507
17554
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -17677,7 +17724,7 @@
|
|
|
17677
17724
|
type: i0.Output
|
|
17678
17725
|
}] });
|
|
17679
17726
|
})();
|
|
17680
|
-
var templateObject_1$t, templateObject_2$m, templateObject_3$g, templateObject_4$d, templateObject_5$a, templateObject_6$8, templateObject_7$5, templateObject_8$3, templateObject_9$3, templateObject_10$
|
|
17727
|
+
var templateObject_1$t, templateObject_2$m, templateObject_3$g, templateObject_4$d, templateObject_5$a, templateObject_6$8, templateObject_7$5, templateObject_8$3, templateObject_9$3, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1;
|
|
17681
17728
|
|
|
17682
17729
|
function RecipeCardCtaComponent_div_0_span_2_Template(rf, ctx) {
|
|
17683
17730
|
if (rf & 1) {
|
|
@@ -20575,14 +20622,13 @@
|
|
|
20575
20622
|
_c);
|
|
20576
20623
|
var CatalogCategoryComponent = /** @class */ (function (_super) {
|
|
20577
20624
|
__extends(CatalogCategoryComponent, _super);
|
|
20578
|
-
function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService
|
|
20625
|
+
function CatalogCategoryComponent(recipesService, articlesService, context, cdr, analyticsService) {
|
|
20579
20626
|
var _this = _super.call(this, analyticsService) || this;
|
|
20580
20627
|
_this.recipesService = recipesService;
|
|
20581
20628
|
_this.articlesService = articlesService;
|
|
20582
20629
|
_this.context = context;
|
|
20583
20630
|
_this.cdr = cdr;
|
|
20584
20631
|
_this.analyticsService = analyticsService;
|
|
20585
|
-
_this.basketTransfer = basketTransfer;
|
|
20586
20632
|
_this.title = '';
|
|
20587
20633
|
_this.maxRecipeNumber = 20;
|
|
20588
20634
|
_this.displayInfos = false;
|
|
@@ -20659,7 +20705,7 @@
|
|
|
20659
20705
|
};
|
|
20660
20706
|
return CatalogCategoryComponent;
|
|
20661
20707
|
}(EventTracerComponent));
|
|
20662
|
-
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)
|
|
20708
|
+
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)); };
|
|
20663
20709
|
CatalogCategoryComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CatalogCategoryComponent, selectors: [["ng-miam-catalog-category"]], viewQuery: function CatalogCategoryComponent_Query(rf, ctx) {
|
|
20664
20710
|
if (rf & 1) {
|
|
20665
20711
|
i0__namespace.ɵɵviewQuery(_c0$4, 1);
|
|
@@ -20708,7 +20754,7 @@
|
|
|
20708
20754
|
encapsulation: i0.ViewEncapsulation.None,
|
|
20709
20755
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
20710
20756
|
}]
|
|
20711
|
-
}], function () { return [{ type: RecipesService }, { type: ArticlesService }, { type: ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }
|
|
20757
|
+
}], function () { return [{ type: RecipesService }, { type: ArticlesService }, { type: ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: AnalyticsService }]; }, { filters: [{
|
|
20712
20758
|
type: i0.Input
|
|
20713
20759
|
}], title: [{
|
|
20714
20760
|
type: i0.Input
|
|
@@ -21511,9 +21557,9 @@
|
|
|
21511
21557
|
}
|
|
21512
21558
|
function PreferencesComponent_ng_container_5_div_11_Template(rf, ctx) {
|
|
21513
21559
|
if (rf & 1) {
|
|
21514
|
-
var
|
|
21560
|
+
var _r14_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21515
21561
|
i0__namespace.ɵɵelementStart(0, "div", 37);
|
|
21516
|
-
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_div_11_Template_div_click_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
21562
|
+
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_div_11_Template_div_click_0_listener() { i0__namespace.ɵɵrestoreView(_r14_1); var diet_r12 = ctx.$implicit; var ctx_r13 = i0__namespace.ɵɵnextContext(2); return ctx_r13.toggleTag(diet_r12); });
|
|
21517
21563
|
i0__namespace.ɵɵelementStart(1, "div", 38);
|
|
21518
21564
|
i0__namespace.ɵɵtext(2);
|
|
21519
21565
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -21521,11 +21567,11 @@
|
|
|
21521
21567
|
i0__namespace.ɵɵelementEnd();
|
|
21522
21568
|
}
|
|
21523
21569
|
if (rf & 2) {
|
|
21524
|
-
var
|
|
21570
|
+
var diet_r12 = ctx.$implicit;
|
|
21525
21571
|
i0__namespace.ɵɵadvance(2);
|
|
21526
|
-
i0__namespace.ɵɵtextInterpolate1(" ",
|
|
21572
|
+
i0__namespace.ɵɵtextInterpolate1(" ", diet_r12.tag.name, " ");
|
|
21527
21573
|
i0__namespace.ɵɵadvance(1);
|
|
21528
|
-
i0__namespace.ɵɵproperty("checked",
|
|
21574
|
+
i0__namespace.ɵɵproperty("checked", diet_r12.checked);
|
|
21529
21575
|
}
|
|
21530
21576
|
}
|
|
21531
21577
|
function PreferencesComponent_ng_container_5_button_17_img_5_Template(rf, ctx) {
|
|
@@ -21533,16 +21579,16 @@
|
|
|
21533
21579
|
i0__namespace.ɵɵelement(0, "img", 42);
|
|
21534
21580
|
}
|
|
21535
21581
|
if (rf & 2) {
|
|
21536
|
-
var
|
|
21537
|
-
i0__namespace.ɵɵproperty("alt", "remove " +
|
|
21582
|
+
var ingredient_r15 = i0__namespace.ɵɵnextContext().$implicit;
|
|
21583
|
+
i0__namespace.ɵɵproperty("alt", "remove " + ingredient_r15.tag.attributes.name);
|
|
21538
21584
|
}
|
|
21539
21585
|
}
|
|
21540
|
-
var
|
|
21586
|
+
var _c18$1 = function (a0) { return { "checked": a0 }; };
|
|
21541
21587
|
function PreferencesComponent_ng_container_5_button_17_Template(rf, ctx) {
|
|
21542
21588
|
if (rf & 1) {
|
|
21543
|
-
var
|
|
21589
|
+
var _r19_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21544
21590
|
i0__namespace.ɵɵelementStart(0, "button", 40);
|
|
21545
|
-
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_button_17_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
21591
|
+
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_button_17_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r19_1); var ingredient_r15 = ctx.$implicit; var ctx_r18 = i0__namespace.ɵɵnextContext(2); return ctx_r18.toggleTag(ingredient_r15); });
|
|
21546
21592
|
i0__namespace.ɵɵelementStart(1, "div", 27);
|
|
21547
21593
|
i0__namespace.ɵɵelementStart(2, "span");
|
|
21548
21594
|
i0__namespace.ɵɵtext(3);
|
|
@@ -21553,20 +21599,20 @@
|
|
|
21553
21599
|
i0__namespace.ɵɵelementEnd();
|
|
21554
21600
|
}
|
|
21555
21601
|
if (rf & 2) {
|
|
21556
|
-
var
|
|
21602
|
+
var ingredient_r15 = ctx.$implicit;
|
|
21557
21603
|
var ctx_r10 = i0__namespace.ɵɵnextContext(2);
|
|
21558
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5,
|
|
21604
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c18$1, ingredient_r15.checked));
|
|
21559
21605
|
i0__namespace.ɵɵadvance(3);
|
|
21560
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(4, 3,
|
|
21606
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(4, 3, ingredient_r15.tag.attributes.name));
|
|
21561
21607
|
i0__namespace.ɵɵadvance(2);
|
|
21562
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r10.isAdditionalIngredient(
|
|
21608
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r10.isAdditionalIngredient(ingredient_r15));
|
|
21563
21609
|
}
|
|
21564
21610
|
}
|
|
21565
21611
|
function PreferencesComponent_ng_container_5_div_30_Template(rf, ctx) {
|
|
21566
21612
|
if (rf & 1) {
|
|
21567
|
-
var
|
|
21613
|
+
var _r22_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21568
21614
|
i0__namespace.ɵɵelementStart(0, "div", 37);
|
|
21569
|
-
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_div_30_Template_div_click_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
21615
|
+
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_div_30_Template_div_click_0_listener() { i0__namespace.ɵɵrestoreView(_r22_1); var equipment_r20 = ctx.$implicit; var ctx_r21 = i0__namespace.ɵɵnextContext(2); return ctx_r21.toggleTag(equipment_r20); });
|
|
21570
21616
|
i0__namespace.ɵɵelementStart(1, "div", 43);
|
|
21571
21617
|
i0__namespace.ɵɵtext(2);
|
|
21572
21618
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -21574,41 +21620,27 @@
|
|
|
21574
21620
|
i0__namespace.ɵɵelementEnd();
|
|
21575
21621
|
}
|
|
21576
21622
|
if (rf & 2) {
|
|
21577
|
-
var
|
|
21623
|
+
var equipment_r20 = ctx.$implicit;
|
|
21578
21624
|
i0__namespace.ɵɵadvance(2);
|
|
21579
|
-
i0__namespace.ɵɵtextInterpolate1(" ",
|
|
21625
|
+
i0__namespace.ɵɵtextInterpolate1(" ", equipment_r20.tag.name, " ");
|
|
21580
21626
|
i0__namespace.ɵɵadvance(1);
|
|
21581
|
-
i0__namespace.ɵɵproperty("checked",
|
|
21582
|
-
}
|
|
21583
|
-
}
|
|
21584
|
-
function PreferencesComponent_ng_container_5_span_38_Template(rf, ctx) {
|
|
21585
|
-
if (rf & 1) {
|
|
21586
|
-
i0__namespace.ɵɵelementStart(0, "span");
|
|
21587
|
-
i0__namespace.ɵɵi18n(1, 44);
|
|
21588
|
-
i0__namespace.ɵɵelementEnd();
|
|
21589
|
-
}
|
|
21590
|
-
}
|
|
21591
|
-
function PreferencesComponent_ng_container_5_span_39_Template(rf, ctx) {
|
|
21592
|
-
if (rf & 1) {
|
|
21593
|
-
i0__namespace.ɵɵelementStart(0, "span");
|
|
21594
|
-
i0__namespace.ɵɵi18n(1, 45);
|
|
21595
|
-
i0__namespace.ɵɵelementEnd();
|
|
21627
|
+
i0__namespace.ɵɵproperty("checked", equipment_r20.checked);
|
|
21596
21628
|
}
|
|
21597
21629
|
}
|
|
21598
21630
|
function PreferencesComponent_ng_container_5_Template(rf, ctx) {
|
|
21599
21631
|
if (rf & 1) {
|
|
21600
|
-
var
|
|
21632
|
+
var _r24_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21601
21633
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
21602
21634
|
i0__namespace.ɵɵelementStart(1, "div", 14);
|
|
21603
21635
|
i0__namespace.ɵɵelementStart(2, "span", 15);
|
|
21604
21636
|
i0__namespace.ɵɵi18n(3, 16);
|
|
21605
21637
|
i0__namespace.ɵɵelementEnd();
|
|
21606
21638
|
i0__namespace.ɵɵelementStart(4, "ng-miam-counter-input", 17);
|
|
21607
|
-
i0__namespace.ɵɵlistener("valueChange", function PreferencesComponent_ng_container_5_Template_ng_miam_counter_input_valueChange_4_listener($event) { i0__namespace.ɵɵrestoreView(
|
|
21639
|
+
i0__namespace.ɵɵlistener("valueChange", function PreferencesComponent_ng_container_5_Template_ng_miam_counter_input_valueChange_4_listener($event) { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r23 = i0__namespace.ɵɵnextContext(); return ctx_r23.preferencesService.guests = $event; });
|
|
21608
21640
|
i0__namespace.ɵɵelementEnd();
|
|
21609
21641
|
i0__namespace.ɵɵelementEnd();
|
|
21610
21642
|
i0__namespace.ɵɵelementStart(5, "ng-miam-accordion", 18);
|
|
21611
|
-
i0__namespace.ɵɵlistener("isCollapsedChange", function PreferencesComponent_ng_container_5_Template_ng_miam_accordion_isCollapsedChange_5_listener() { i0__namespace.ɵɵrestoreView(
|
|
21643
|
+
i0__namespace.ɵɵlistener("isCollapsedChange", function PreferencesComponent_ng_container_5_Template_ng_miam_accordion_isCollapsedChange_5_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r25 = i0__namespace.ɵɵnextContext(); return ctx_r25.cdr.detectChanges(); });
|
|
21612
21644
|
i0__namespace.ɵɵelementStart(6, "ng-miam-accordion-title");
|
|
21613
21645
|
i0__namespace.ɵɵelementStart(7, "span", 19);
|
|
21614
21646
|
i0__namespace.ɵɵi18n(8, 20);
|
|
@@ -21621,7 +21653,7 @@
|
|
|
21621
21653
|
i0__namespace.ɵɵelementEnd();
|
|
21622
21654
|
i0__namespace.ɵɵelementEnd();
|
|
21623
21655
|
i0__namespace.ɵɵelementStart(12, "ng-miam-accordion", 23);
|
|
21624
|
-
i0__namespace.ɵɵlistener("isCollapsedChange", function PreferencesComponent_ng_container_5_Template_ng_miam_accordion_isCollapsedChange_12_listener() { i0__namespace.ɵɵrestoreView(
|
|
21656
|
+
i0__namespace.ɵɵlistener("isCollapsedChange", function PreferencesComponent_ng_container_5_Template_ng_miam_accordion_isCollapsedChange_12_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r26 = i0__namespace.ɵɵnextContext(); return ctx_r26.cdr.detectChanges(); });
|
|
21625
21657
|
i0__namespace.ɵɵelementStart(13, "ng-miam-accordion-title");
|
|
21626
21658
|
i0__namespace.ɵɵelementStart(14, "span", 19);
|
|
21627
21659
|
i0__namespace.ɵɵi18n(15, 24);
|
|
@@ -21630,7 +21662,7 @@
|
|
|
21630
21662
|
i0__namespace.ɵɵelementStart(16, "ng-miam-accordion-content");
|
|
21631
21663
|
i0__namespace.ɵɵtemplate(17, PreferencesComponent_ng_container_5_button_17_Template, 6, 7, "button", 25);
|
|
21632
21664
|
i0__namespace.ɵɵelementStart(18, "button", 26);
|
|
21633
|
-
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_Template_button_click_18_listener() { i0__namespace.ɵɵrestoreView(
|
|
21665
|
+
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_Template_button_click_18_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r27 = i0__namespace.ɵɵnextContext(); return ctx_r27.goToSearchView(); });
|
|
21634
21666
|
i0__namespace.ɵɵelementStart(19, "div", 27);
|
|
21635
21667
|
i0__namespace.ɵɵelementStart(20, "span");
|
|
21636
21668
|
i0__namespace.ɵɵi18n(21, 28);
|
|
@@ -21641,7 +21673,7 @@
|
|
|
21641
21673
|
i0__namespace.ɵɵelementEnd();
|
|
21642
21674
|
i0__namespace.ɵɵelementEnd();
|
|
21643
21675
|
i0__namespace.ɵɵelementStart(23, "ng-miam-accordion", 30);
|
|
21644
|
-
i0__namespace.ɵɵlistener("isCollapsedChange", function PreferencesComponent_ng_container_5_Template_ng_miam_accordion_isCollapsedChange_23_listener() { i0__namespace.ɵɵrestoreView(
|
|
21676
|
+
i0__namespace.ɵɵlistener("isCollapsedChange", function PreferencesComponent_ng_container_5_Template_ng_miam_accordion_isCollapsedChange_23_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r28 = i0__namespace.ɵɵnextContext(); return ctx_r28.cdr.detectChanges(); });
|
|
21645
21677
|
i0__namespace.ɵɵelementStart(24, "ng-miam-accordion-title");
|
|
21646
21678
|
i0__namespace.ɵɵelementStart(25, "span", 19);
|
|
21647
21679
|
i0__namespace.ɵɵi18n(26, 31);
|
|
@@ -21657,18 +21689,16 @@
|
|
|
21657
21689
|
i0__namespace.ɵɵelementEnd();
|
|
21658
21690
|
i0__namespace.ɵɵelementStart(31, "div", 32);
|
|
21659
21691
|
i0__namespace.ɵɵelementStart(32, "button", 33);
|
|
21660
|
-
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_Template_button_click_32_listener() { i0__namespace.ɵɵrestoreView(
|
|
21692
|
+
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_Template_button_click_32_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r29 = i0__namespace.ɵɵnextContext(); return ctx_r29.reset(); });
|
|
21661
21693
|
i0__namespace.ɵɵelementStart(33, "span");
|
|
21662
21694
|
i0__namespace.ɵɵi18n(34, 34);
|
|
21663
21695
|
i0__namespace.ɵɵelementEnd();
|
|
21664
21696
|
i0__namespace.ɵɵelementEnd();
|
|
21665
21697
|
i0__namespace.ɵɵelementStart(35, "button", 35);
|
|
21666
|
-
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_Template_button_click_35_listener() { i0__namespace.ɵɵrestoreView(
|
|
21667
|
-
i0__namespace.ɵɵelementStart(36, "span"
|
|
21668
|
-
i0__namespace.ɵɵ
|
|
21698
|
+
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_Template_button_click_35_listener() { i0__namespace.ɵɵrestoreView(_r24_1); var ctx_r30 = i0__namespace.ɵɵnextContext(); return ctx_r30.updateAndBack(); });
|
|
21699
|
+
i0__namespace.ɵɵelementStart(36, "span");
|
|
21700
|
+
i0__namespace.ɵɵi18n(37, 36);
|
|
21669
21701
|
i0__namespace.ɵɵelementEnd();
|
|
21670
|
-
i0__namespace.ɵɵtemplate(38, PreferencesComponent_ng_container_5_span_38_Template, 2, 0, "span", 3);
|
|
21671
|
-
i0__namespace.ɵɵtemplate(39, PreferencesComponent_ng_container_5_span_39_Template, 2, 0, "span", 3);
|
|
21672
21702
|
i0__namespace.ɵɵelementEnd();
|
|
21673
21703
|
i0__namespace.ɵɵelementEnd();
|
|
21674
21704
|
i0__namespace.ɵɵelementContainerEnd();
|
|
@@ -21689,20 +21719,14 @@
|
|
|
21689
21719
|
i0__namespace.ɵɵproperty("isCollapsed", false);
|
|
21690
21720
|
i0__namespace.ɵɵadvance(7);
|
|
21691
21721
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r2.equipments);
|
|
21692
|
-
i0__namespace.ɵɵadvance(7);
|
|
21693
|
-
i0__namespace.ɵɵtextInterpolate(ctx_r2.recipesFound);
|
|
21694
|
-
i0__namespace.ɵɵadvance(1);
|
|
21695
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r2.recipesFound > 1);
|
|
21696
|
-
i0__namespace.ɵɵadvance(1);
|
|
21697
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r2.recipesFound <= 1);
|
|
21698
21722
|
}
|
|
21699
21723
|
}
|
|
21700
21724
|
function PreferencesComponent_ng_container_6_Template(rf, ctx) {
|
|
21701
21725
|
if (rf & 1) {
|
|
21702
|
-
var
|
|
21726
|
+
var _r32_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21703
21727
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
21704
|
-
i0__namespace.ɵɵelementStart(1, "ng-miam-preferences-search",
|
|
21705
|
-
i0__namespace.ɵɵlistener("backAndReload", function PreferencesComponent_ng_container_6_Template_ng_miam_preferences_search_backAndReload_1_listener() { i0__namespace.ɵɵrestoreView(
|
|
21728
|
+
i0__namespace.ɵɵelementStart(1, "ng-miam-preferences-search", 44);
|
|
21729
|
+
i0__namespace.ɵɵlistener("backAndReload", function PreferencesComponent_ng_container_6_Template_ng_miam_preferences_search_backAndReload_1_listener() { i0__namespace.ɵɵrestoreView(_r32_1); var ctx_r31 = i0__namespace.ɵɵnextContext(); ctx_r31.fetchTags(); return ctx_r31.goToDefaultView(); });
|
|
21706
21730
|
i0__namespace.ɵɵelementEnd();
|
|
21707
21731
|
i0__namespace.ɵɵelementContainerEnd();
|
|
21708
21732
|
}
|
|
@@ -21713,18 +21737,16 @@
|
|
|
21713
21737
|
PreferenceView[PreferenceView["SEARCH"] = 1] = "SEARCH";
|
|
21714
21738
|
})(PreferenceView || (PreferenceView = {}));
|
|
21715
21739
|
var PreferencesComponent = /** @class */ (function () {
|
|
21716
|
-
function PreferencesComponent(tagsService, cdr, preferencesService
|
|
21740
|
+
function PreferencesComponent(tagsService, cdr, preferencesService) {
|
|
21717
21741
|
this.tagsService = tagsService;
|
|
21718
21742
|
this.cdr = cdr;
|
|
21719
21743
|
this.preferencesService = preferencesService;
|
|
21720
|
-
this.recipesService = recipesService;
|
|
21721
21744
|
this.isOpenChange = new i0.EventEmitter();
|
|
21722
21745
|
this.preferencesChanged = new i0.EventEmitter();
|
|
21723
21746
|
this._isOpen = false;
|
|
21724
21747
|
this.diets = [];
|
|
21725
21748
|
this.ingredients = [];
|
|
21726
21749
|
this.equipments = [];
|
|
21727
|
-
this.recipesFound = 0;
|
|
21728
21750
|
this.displayType = PreferenceView.DEFAULT;
|
|
21729
21751
|
this.preferenceViewEnum = PreferenceView;
|
|
21730
21752
|
this.subscriptions = [];
|
|
@@ -21759,6 +21781,8 @@
|
|
|
21759
21781
|
configurable: true
|
|
21760
21782
|
});
|
|
21761
21783
|
PreferencesComponent.prototype.ngOnInit = function () {
|
|
21784
|
+
var _this = this;
|
|
21785
|
+
this.subscriptions.push(this.preferencesService.guests$.subscribe(function () { return _this.cdr.detectChanges(); }));
|
|
21762
21786
|
this.fetchTags();
|
|
21763
21787
|
};
|
|
21764
21788
|
PreferencesComponent.prototype.ngAfterViewInit = function () {
|
|
@@ -21776,9 +21800,6 @@
|
|
|
21776
21800
|
without: false
|
|
21777
21801
|
}); });
|
|
21778
21802
|
_this.cdr.detectChanges();
|
|
21779
|
-
// this.route.fragment.subscribe(fragment => {
|
|
21780
|
-
// setTimeout(() => document.getElementById(fragment)?.scrollIntoView());
|
|
21781
|
-
// });
|
|
21782
21803
|
}), this.tagsService.all({ remotefilter: { tag_type: 'equipment' } }).pipe(operators.skipWhile(function (res) { return res.is_loading; })).subscribe(function (res) {
|
|
21783
21804
|
_this.equipments = _this.whitelistedTags(res.data).map(function (e) { return ({
|
|
21784
21805
|
tag: e,
|
|
@@ -21788,7 +21809,6 @@
|
|
|
21788
21809
|
_this.cdr.detectChanges();
|
|
21789
21810
|
}));
|
|
21790
21811
|
this.initIngredientTags();
|
|
21791
|
-
this.updateRecipesCount();
|
|
21792
21812
|
};
|
|
21793
21813
|
PreferencesComponent.prototype.reset = function () {
|
|
21794
21814
|
this.preferencesService.resetPreferences();
|
|
@@ -21851,19 +21871,7 @@
|
|
|
21851
21871
|
this.ingredients.splice(this.ingredients.findIndex(function (i) { return i.tag.id === tag.tag.id; }), 1);
|
|
21852
21872
|
}
|
|
21853
21873
|
}
|
|
21854
|
-
this.
|
|
21855
|
-
};
|
|
21856
|
-
PreferencesComponent.prototype.updateRecipesCount = function () {
|
|
21857
|
-
var _this = this;
|
|
21858
|
-
this.subscriptions.push(this.recipesService.all({
|
|
21859
|
-
remotefilter: this.preferencesService.addPreferencesToRemoteFilters({}, true), page: { number: 1, size: 1 }
|
|
21860
|
-
}).pipe(operators.skipWhile(function (result) { return result.is_loading; }))
|
|
21861
|
-
.subscribe(function (result) {
|
|
21862
|
-
var _a;
|
|
21863
|
-
// Apparently total_resource = 1 even if no result was found so we have to check
|
|
21864
|
-
_this.recipesFound = result.data.length ? (_a = result === null || result === void 0 ? void 0 : result.page) === null || _a === void 0 ? void 0 : _a.total_resources : 0;
|
|
21865
|
-
_this.cdr.detectChanges();
|
|
21866
|
-
}));
|
|
21874
|
+
this.cdr.detectChanges();
|
|
21867
21875
|
};
|
|
21868
21876
|
PreferencesComponent.prototype.updateAndBack = function () {
|
|
21869
21877
|
this.preferencesService.updatePreferences();
|
|
@@ -21887,7 +21895,7 @@
|
|
|
21887
21895
|
};
|
|
21888
21896
|
return PreferencesComponent;
|
|
21889
21897
|
}());
|
|
21890
|
-
PreferencesComponent.ɵfac = function PreferencesComponent_Factory(t) { return new (t || PreferencesComponent)(i0__namespace.ɵɵdirectiveInject(TagsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PreferencesService)
|
|
21898
|
+
PreferencesComponent.ɵfac = function PreferencesComponent_Factory(t) { return new (t || PreferencesComponent)(i0__namespace.ɵɵdirectiveInject(TagsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PreferencesService)); };
|
|
21891
21899
|
PreferencesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: PreferencesComponent, selectors: [["ng-miam-preferences"]], inputs: { isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange", preferencesChanged: "preferencesChanged" }, decls: 7, vars: 6, consts: function () {
|
|
21892
21900
|
var i18n_0;
|
|
21893
21901
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -21953,23 +21961,15 @@
|
|
|
21953
21961
|
else {
|
|
21954
21962
|
i18n_14 = $localize(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject([":\u241F515812e22dc3f7668cb6ad93e54740e5c1a140b0\u241F4359053901144852078:R\u00E9initialiser"], [":\u241F515812e22dc3f7668cb6ad93e54740e5c1a140b0\u241F4359053901144852078:R\u00E9initialiser"])));
|
|
21955
21963
|
}
|
|
21956
|
-
var
|
|
21957
|
-
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
21958
|
-
var MSG_EXTERNAL_3809820644785537818$$LIB__WEB_COMPONENTS_PREFERENCES_PREFERENCES_COMPONENT_TS___18 = goog.getMsg("recettes");
|
|
21959
|
-
i18n_17 = MSG_EXTERNAL_3809820644785537818$$LIB__WEB_COMPONENTS_PREFERENCES_PREFERENCES_COMPONENT_TS___18;
|
|
21960
|
-
}
|
|
21961
|
-
else {
|
|
21962
|
-
i18n_17 = $localize(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject([":\u241F2b5c164efaa4ab2f43d98ed7cb742d3424135de9\u241F3809820644785537818:recettes"], [":\u241F2b5c164efaa4ab2f43d98ed7cb742d3424135de9\u241F3809820644785537818:recettes"])));
|
|
21963
|
-
}
|
|
21964
|
-
var i18n_19;
|
|
21964
|
+
var i18n_16;
|
|
21965
21965
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
21966
|
-
var
|
|
21967
|
-
|
|
21966
|
+
var MSG_EXTERNAL_4160637687093543290$$LIB__WEB_COMPONENTS_PREFERENCES_PREFERENCES_COMPONENT_TS__17 = goog.getMsg("Appliquer");
|
|
21967
|
+
i18n_16 = MSG_EXTERNAL_4160637687093543290$$LIB__WEB_COMPONENTS_PREFERENCES_PREFERENCES_COMPONENT_TS__17;
|
|
21968
21968
|
}
|
|
21969
21969
|
else {
|
|
21970
|
-
|
|
21970
|
+
i18n_16 = $localize(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject([":\u241Fd52eb7599c75829bf96401d33dfdad4f9857822b\u241F4160637687093543290:Appliquer"], [":\u241Fd52eb7599c75829bf96401d33dfdad4f9857822b\u241F4160637687093543290:Appliquer"])));
|
|
21971
21971
|
}
|
|
21972
|
-
return [["modalStyle", "right", 3, "noHeaderMode", "display", "close"], [1, "miam-preferences"], [1, "miam-preferences__header"], [4, "ngIf"], ["class", "miam-preferences_nav-and-title", 4, "ngIf"], [1, "miam-ds-button", "ghost", "square", "miam-preferences__back-button", 3, "click"], ["alt", "go back", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/arrow-right.svg", 1, "miam-preferences__back-image"], [1, "miam-ds-text", "size-l", "weight-xxl", "miam-preferences__title"], i18n_0, [1, "miam-ds-button", "ghost", "square", "miam-preferences__close-button", 3, "click"], ["alt", "close modal", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", 1, "miam-preferences__close-image"], [1, "miam-preferences_nav-and-title"], [1, "miam-ds-button", "ghost", "square", "miam-preferences__search-back-button", 3, "click"], i18n_2, [1, "miam-preferences__guests"], [1, "miam-ds-text", "miam-preferences_guest-label"], i18n_4, [1, "miam-preferences_guest-counter", 3, "value", "valueChange"], [1, "miam-preferences__diet-section", 3, "isCollapsed", "isCollapsedChange"], [1, "miam-ds-text", "weight-xl"], i18n_6, [1, "miam-preferences__list"], ["class", "miam-preferences__list__item", 3, "click", 4, "ngFor", "ngForOf"], [1, "miam-preferences__dislikes-section", 3, "isCollapsed", "isCollapsedChange"], i18n_8, ["class", "miam-ds-badge miam-preferences__badge", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "miam-ds-badge", "miam-preferences__badge", 3, "click"], [1, "miam-preferences__badge_label"], i18n_10, ["alt", "add dislikes", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/plus-neutral-black.svg"], [1, "miam-preferences__equipments-section", 3, "isCollapsed", "isCollapsedChange"], i18n_12, [1, "miam-preferences__footer"], [1, "miam-ds-button", "secondary", "miam-preferences__footer__reset", 3, "click"], i18n_14, [1, "miam-ds-button", "primary", "miam-preferences__footer__recipes", 3, "click"],
|
|
21972
|
+
return [["modalStyle", "right", 3, "noHeaderMode", "display", "close"], [1, "miam-preferences"], [1, "miam-preferences__header"], [4, "ngIf"], ["class", "miam-preferences_nav-and-title", 4, "ngIf"], [1, "miam-ds-button", "ghost", "square", "miam-preferences__back-button", 3, "click"], ["alt", "go back", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/arrow-right.svg", 1, "miam-preferences__back-image"], [1, "miam-ds-text", "size-l", "weight-xxl", "miam-preferences__title"], i18n_0, [1, "miam-ds-button", "ghost", "square", "miam-preferences__close-button", 3, "click"], ["alt", "close modal", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross_primary.svg", 1, "miam-preferences__close-image"], [1, "miam-preferences_nav-and-title"], [1, "miam-ds-button", "ghost", "square", "miam-preferences__search-back-button", 3, "click"], i18n_2, [1, "miam-preferences__guests"], [1, "miam-ds-text", "miam-preferences_guest-label"], i18n_4, [1, "miam-preferences_guest-counter", 3, "value", "valueChange"], [1, "miam-preferences__diet-section", 3, "isCollapsed", "isCollapsedChange"], [1, "miam-ds-text", "weight-xl"], i18n_6, [1, "miam-preferences__list"], ["class", "miam-preferences__list__item", 3, "click", 4, "ngFor", "ngForOf"], [1, "miam-preferences__dislikes-section", 3, "isCollapsed", "isCollapsedChange"], i18n_8, ["class", "miam-ds-badge miam-preferences__badge", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "miam-ds-badge", "miam-preferences__badge", 3, "click"], [1, "miam-preferences__badge_label"], i18n_10, ["alt", "add dislikes", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/plus-neutral-black.svg"], [1, "miam-preferences__equipments-section", 3, "isCollapsed", "isCollapsedChange"], i18n_12, [1, "miam-preferences__footer"], [1, "miam-ds-button", "secondary", "miam-preferences__footer__reset", 3, "click"], i18n_14, [1, "miam-ds-button", "primary", "miam-preferences__footer__recipes", 3, "click"], i18n_16, [1, "miam-preferences__list__item", 3, "click"], [1, "miam-ds-text", "miam-preferences__list__item__name"], ["type", "checkbox", 3, "checked"], [1, "miam-ds-badge", "miam-preferences__badge", 3, "ngClass", "click"], ["class", "miam-preferences__remove-tag", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross.svg", 3, "alt", 4, "ngIf"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Cross.svg", 1, "miam-preferences__remove-tag", 3, "alt"], [1, "miam-preferences__list__item__name"], [3, "backAndReload"]];
|
|
21973
21973
|
}, template: function PreferencesComponent_Template(rf, ctx) {
|
|
21974
21974
|
if (rf & 1) {
|
|
21975
21975
|
i0__namespace.ɵɵelementStart(0, "ng-miam-modal", 0);
|
|
@@ -21979,7 +21979,7 @@
|
|
|
21979
21979
|
i0__namespace.ɵɵtemplate(3, PreferencesComponent_ng_container_3_Template, 8, 0, "ng-container", 3);
|
|
21980
21980
|
i0__namespace.ɵɵtemplate(4, PreferencesComponent_div_4_Template, 6, 0, "div", 4);
|
|
21981
21981
|
i0__namespace.ɵɵelementEnd();
|
|
21982
|
-
i0__namespace.ɵɵtemplate(5, PreferencesComponent_ng_container_5_Template,
|
|
21982
|
+
i0__namespace.ɵɵtemplate(5, PreferencesComponent_ng_container_5_Template, 38, 7, "ng-container", 3);
|
|
21983
21983
|
i0__namespace.ɵɵtemplate(6, PreferencesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
|
|
21984
21984
|
i0__namespace.ɵɵelementEnd();
|
|
21985
21985
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -22006,7 +22006,7 @@
|
|
|
22006
22006
|
encapsulation: i0.ViewEncapsulation.None,
|
|
22007
22007
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
22008
22008
|
}]
|
|
22009
|
-
}], function () { return [{ type: TagsService }, { type: i0__namespace.ChangeDetectorRef }, { type: PreferencesService }
|
|
22009
|
+
}], function () { return [{ type: TagsService }, { type: i0__namespace.ChangeDetectorRef }, { type: PreferencesService }]; }, { isOpenChange: [{
|
|
22010
22010
|
type: i0.Output
|
|
22011
22011
|
}], preferencesChanged: [{
|
|
22012
22012
|
type: i0.Output
|
|
@@ -22014,7 +22014,7 @@
|
|
|
22014
22014
|
type: i0.Input
|
|
22015
22015
|
}] });
|
|
22016
22016
|
})();
|
|
22017
|
-
var templateObject_1$f, templateObject_2$a, templateObject_3$8, templateObject_4$7, templateObject_5$6, templateObject_6$5, templateObject_7$4, templateObject_8$2, templateObject_9$2
|
|
22017
|
+
var templateObject_1$f, templateObject_2$a, templateObject_3$8, templateObject_4$7, templateObject_5$6, templateObject_6$5, templateObject_7$4, templateObject_8$2, templateObject_9$2;
|
|
22018
22018
|
|
|
22019
22019
|
function RecipeFormComponent_form_0_ng_template_3_Template(rf, ctx) {
|
|
22020
22020
|
if (rf & 1) {
|
|
@@ -23822,7 +23822,7 @@
|
|
|
23822
23822
|
var _r12_1 = i0__namespace.ɵɵgetCurrentView();
|
|
23823
23823
|
i0__namespace.ɵɵelementStart(0, "div", 15, 16);
|
|
23824
23824
|
i0__namespace.ɵɵelementStart(2, "ng-miam-catalog-toolbar", 17);
|
|
23825
|
-
i0__namespace.ɵɵlistener("filterButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_filterButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r11 = i0__namespace.ɵɵnextContext(2); return ctx_r11.onFilterCollapsed(); })("preferencesButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_preferencesButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r13 = i0__namespace.ɵɵnextContext(2); return ctx_r13.isPreferenceModalOpen = !ctx_r13.isPreferenceModalOpen; })("searchStringChanged", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_searchStringChanged_2_listener($event) { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r14 = i0__namespace.ɵɵnextContext(2); return ctx_r14.updateSearch($event); })("personalButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_personalButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r15 = i0__namespace.ɵɵnextContext(2); return ctx_r15.setPersonalFilter(); })("favoritesButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_favoritesButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r16 = i0__namespace.ɵɵnextContext(2); return ctx_r16.
|
|
23825
|
+
i0__namespace.ɵɵlistener("filterButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_filterButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r11 = i0__namespace.ɵɵnextContext(2); return ctx_r11.onFilterCollapsed(); })("preferencesButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_preferencesButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r13 = i0__namespace.ɵɵnextContext(2); return ctx_r13.isPreferenceModalOpen = !ctx_r13.isPreferenceModalOpen; })("searchStringChanged", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_searchStringChanged_2_listener($event) { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r14 = i0__namespace.ɵɵnextContext(2); return ctx_r14.updateSearch($event); })("personalButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_personalButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r15 = i0__namespace.ɵɵnextContext(2); return ctx_r15.setPersonalFilter(); })("favoritesButtonPressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_favoritesButtonPressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r16 = i0__namespace.ɵɵnextContext(2); return ctx_r16.checkAndSetFavoritesFilter(); })("returnHomePressed", function RecipeCatalogComponent_div_2_div_4_Template_ng_miam_catalog_toolbar_returnHomePressed_2_listener() { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r17 = i0__namespace.ɵɵnextContext(2); return ctx_r17.returnToHomePage(); });
|
|
23826
23826
|
i0__namespace.ɵɵpipe(3, "async");
|
|
23827
23827
|
i0__namespace.ɵɵelementEnd();
|
|
23828
23828
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -23959,7 +23959,7 @@
|
|
|
23959
23959
|
i0__namespace.ɵɵelement(9, "div", 14);
|
|
23960
23960
|
i0__namespace.ɵɵelementStart(10, "div", 15, 30);
|
|
23961
23961
|
i0__namespace.ɵɵelementStart(12, "ng-miam-catalog-toolbar", 17);
|
|
23962
|
-
i0__namespace.ɵɵlistener("filterButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_filterButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r32 = i0__namespace.ɵɵnextContext(2); return ctx_r32.onFilterCollapsed(); })("preferencesButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_preferencesButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r33 = i0__namespace.ɵɵnextContext(2); return ctx_r33.isPreferenceModalOpen = !ctx_r33.isPreferenceModalOpen; })("searchStringChanged", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_searchStringChanged_12_listener($event) { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r34 = i0__namespace.ɵɵnextContext(2); return ctx_r34.updateSearch($event); })("personalButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_personalButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r35 = i0__namespace.ɵɵnextContext(2); return ctx_r35.setPersonalFilter(); })("favoritesButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_favoritesButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r36 = i0__namespace.ɵɵnextContext(2); return ctx_r36.
|
|
23962
|
+
i0__namespace.ɵɵlistener("filterButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_filterButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r32 = i0__namespace.ɵɵnextContext(2); return ctx_r32.onFilterCollapsed(); })("preferencesButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_preferencesButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r33 = i0__namespace.ɵɵnextContext(2); return ctx_r33.isPreferenceModalOpen = !ctx_r33.isPreferenceModalOpen; })("searchStringChanged", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_searchStringChanged_12_listener($event) { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r34 = i0__namespace.ɵɵnextContext(2); return ctx_r34.updateSearch($event); })("personalButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_personalButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r35 = i0__namespace.ɵɵnextContext(2); return ctx_r35.setPersonalFilter(); })("favoritesButtonPressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_favoritesButtonPressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r36 = i0__namespace.ɵɵnextContext(2); return ctx_r36.checkAndSetFavoritesFilter(); })("returnHomePressed", function RecipeCatalogComponent_div_2_div_6_Template_ng_miam_catalog_toolbar_returnHomePressed_12_listener() { i0__namespace.ɵɵrestoreView(_r31_1); var ctx_r37 = i0__namespace.ɵɵnextContext(2); return ctx_r37.returnToHomePage(); });
|
|
23963
23963
|
i0__namespace.ɵɵpipe(13, "async");
|
|
23964
23964
|
i0__namespace.ɵɵelementEnd();
|
|
23965
23965
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -24165,6 +24165,7 @@
|
|
|
24165
24165
|
_this.headerHeightSubscription = new rxjs.Subscription();
|
|
24166
24166
|
_this.isMobile = mediaMatcher.matchMedia('(max-width: 1022px)').matches;
|
|
24167
24167
|
return _this;
|
|
24168
|
+
// this.subscriptions.push();
|
|
24168
24169
|
}
|
|
24169
24170
|
Object.defineProperty(RecipeCatalogComponent.prototype, "isPreferenceModalOpen", {
|
|
24170
24171
|
get: function () {
|
|
@@ -24189,7 +24190,7 @@
|
|
|
24189
24190
|
_this.recipeCount = bs.recipesCount;
|
|
24190
24191
|
_this.totalPrice = bs.totalPrice;
|
|
24191
24192
|
_this.cdr.detectChanges();
|
|
24192
|
-
}), this.assessShowUserFeedback());
|
|
24193
|
+
}), this.assessShowUserFeedback(), this.executeStoredMethodIfLoggedIn().subscribe());
|
|
24193
24194
|
this.setDirectAccess();
|
|
24194
24195
|
};
|
|
24195
24196
|
RecipeCatalogComponent.prototype.ngAfterViewInit = function () {
|
|
@@ -24237,8 +24238,12 @@
|
|
|
24237
24238
|
})).subscribe());
|
|
24238
24239
|
}
|
|
24239
24240
|
};
|
|
24241
|
+
RecipeCatalogComponent.prototype.deepCloneAndResetValues = function (filters) {
|
|
24242
|
+
return filters.map(function (filter) { return (Object.assign(Object.assign({}, filter), { value: false })); });
|
|
24243
|
+
};
|
|
24240
24244
|
// Used on load to build the filters attribute, and on click on the link to reset the filters
|
|
24241
24245
|
RecipeCatalogComponent.prototype.initFilters = function () {
|
|
24246
|
+
var _this = this;
|
|
24242
24247
|
this.filters = new RecipeFilters({
|
|
24243
24248
|
difficulty: this.recipesService.difficultyLevels.map(function (f) { return ({ name: f.value.toString(), text: f.label, value: false }); }),
|
|
24244
24249
|
cost: [
|
|
@@ -24255,7 +24260,9 @@
|
|
|
24255
24260
|
]
|
|
24256
24261
|
});
|
|
24257
24262
|
if (this.customFilters) {
|
|
24258
|
-
Object.
|
|
24263
|
+
Object.keys(this.customFilters).forEach(function (key) {
|
|
24264
|
+
_this.filters[key] = _this.deepCloneAndResetValues(_this.customFilters[key]);
|
|
24265
|
+
});
|
|
24259
24266
|
}
|
|
24260
24267
|
if (this.catalogToolbar) {
|
|
24261
24268
|
this.catalogToolbar.resetSearchString();
|
|
@@ -24282,6 +24289,13 @@
|
|
|
24282
24289
|
});
|
|
24283
24290
|
this.updateFilters(filters);
|
|
24284
24291
|
};
|
|
24292
|
+
RecipeCatalogComponent.prototype.checkAndSetFavoritesFilter = function () {
|
|
24293
|
+
var _this = this;
|
|
24294
|
+
this.storeMethodIfCallbackNeeded('setFavoritesFilter').pipe(operators.switchMap(function () {
|
|
24295
|
+
_this.setFavoritesFilter();
|
|
24296
|
+
return rxjs.of(null);
|
|
24297
|
+
})).subscribe();
|
|
24298
|
+
};
|
|
24285
24299
|
RecipeCatalogComponent.prototype.setFavoritesFilter = function () {
|
|
24286
24300
|
var filters = Object.assign(this.filters, {
|
|
24287
24301
|
additionalFilters: {
|
|
@@ -24291,6 +24305,29 @@
|
|
|
24291
24305
|
});
|
|
24292
24306
|
this.updateFilters(filters);
|
|
24293
24307
|
};
|
|
24308
|
+
RecipeCatalogComponent.prototype.storeMethodIfCallbackNeeded = function (method) {
|
|
24309
|
+
var _this = this;
|
|
24310
|
+
return this.isUserLoggedIn().pipe(operators.take(1), operators.map(function (isLoggedIn) {
|
|
24311
|
+
if (!isLoggedIn) {
|
|
24312
|
+
localStorage.setItem('_miam/storeCallbackMethod', method);
|
|
24313
|
+
}
|
|
24314
|
+
return _this.contextService.hookCallback(isLoggedIn, true);
|
|
24315
|
+
}));
|
|
24316
|
+
};
|
|
24317
|
+
RecipeCatalogComponent.prototype.isUserLoggedIn = function () {
|
|
24318
|
+
return this.usersService.isLogged$;
|
|
24319
|
+
};
|
|
24320
|
+
RecipeCatalogComponent.prototype.executeStoredMethodIfLoggedIn = function () {
|
|
24321
|
+
var _this = this;
|
|
24322
|
+
return this.isUserLoggedIn().pipe(operators.skipWhile(function (isLoggedIn) { return !isLoggedIn; }), operators.take(1), operators.map(function () { return _this.getStoredMethod(); }));
|
|
24323
|
+
};
|
|
24324
|
+
RecipeCatalogComponent.prototype.getStoredMethod = function () {
|
|
24325
|
+
var method = localStorage.getItem('_miam/storeCallbackMethod');
|
|
24326
|
+
if (method === 'setFavoritesFilter') {
|
|
24327
|
+
this.setFavoritesFilter();
|
|
24328
|
+
localStorage.removeItem('_miam/storeCallbackMethod');
|
|
24329
|
+
}
|
|
24330
|
+
};
|
|
24294
24331
|
RecipeCatalogComponent.prototype.setPersonalFilter = function () {
|
|
24295
24332
|
var filters = Object.assign(this.filters, {
|
|
24296
24333
|
additionalFilters: {
|
|
@@ -24370,6 +24407,7 @@
|
|
|
24370
24407
|
}
|
|
24371
24408
|
};
|
|
24372
24409
|
RecipeCatalogComponent.prototype.reloadPackages = function () {
|
|
24410
|
+
this.guests = +localStorage.getItem('_miam/preferences/guests');
|
|
24373
24411
|
this.subscriptions.push(this.loadPackages().subscribe());
|
|
24374
24412
|
};
|
|
24375
24413
|
RecipeCatalogComponent.prototype.isSearchPage = function () {
|
|
@@ -24422,7 +24460,7 @@
|
|
|
24422
24460
|
RecipeCatalogComponent.prototype.selectCategoryFromUrl = function () {
|
|
24423
24461
|
var paramsArray = new URLSearchParams(window.location.search);
|
|
24424
24462
|
if (paramsArray.get('catalogCategory') === 'favorites') {
|
|
24425
|
-
return this.
|
|
24463
|
+
return this.checkAndSetFavoritesFilter();
|
|
24426
24464
|
}
|
|
24427
24465
|
var selectedCategory = this.categories.find(function (cat) { return cat.key === paramsArray.get('catalogCategory'); });
|
|
24428
24466
|
if (selectedCategory) {
|
|
@@ -24458,7 +24496,7 @@
|
|
|
24458
24496
|
this.setPersonalFilter();
|
|
24459
24497
|
break;
|
|
24460
24498
|
case 'recettes-favorites':
|
|
24461
|
-
this.
|
|
24499
|
+
this.checkAndSetFavoritesFilter();
|
|
24462
24500
|
break;
|
|
24463
24501
|
}
|
|
24464
24502
|
}
|
|
@@ -26108,14 +26146,17 @@
|
|
|
26108
26146
|
};
|
|
26109
26147
|
RecipeDetailsComponent.prototype.onClose = function () {
|
|
26110
26148
|
this.recipeDetailsService.displayEventWasSent = false;
|
|
26149
|
+
this.removeFromOriginPath('/detail/basket-preview');
|
|
26111
26150
|
var originPath = this.eventTrace().originPath;
|
|
26112
26151
|
this.closeDetails.emit();
|
|
26113
|
-
this.recipesService.hide();
|
|
26114
26152
|
this.cdr.detectChanges();
|
|
26115
26153
|
this.activeTabIndex = 0;
|
|
26116
|
-
if (originPath
|
|
26154
|
+
if (originPath.includes('/basket-preview/detail')) {
|
|
26117
26155
|
this.recipesService.openBasket(this.eventTrace());
|
|
26118
26156
|
}
|
|
26157
|
+
else if (originPath !== '/miam/recipes/basket-preview') {
|
|
26158
|
+
this.recipesService.hide();
|
|
26159
|
+
}
|
|
26119
26160
|
};
|
|
26120
26161
|
RecipeDetailsComponent.prototype.print = function () {
|
|
26121
26162
|
this.sendEvent(this.analyticsService.EVENT_RECIPE_PRINT);
|
|
@@ -27184,60 +27225,37 @@
|
|
|
27184
27225
|
}], function () { return []; }, null);
|
|
27185
27226
|
})();
|
|
27186
27227
|
|
|
27187
|
-
function
|
|
27228
|
+
function RecipeModalComponent_ng_miam_store_locator_link_3_Template(rf, ctx) {
|
|
27188
27229
|
if (rf & 1) {
|
|
27189
|
-
i0__namespace.ɵɵelement(0, "ng-miam-store-locator-link",
|
|
27230
|
+
i0__namespace.ɵɵelement(0, "ng-miam-store-locator-link", 4);
|
|
27190
27231
|
}
|
|
27191
27232
|
}
|
|
27192
|
-
function
|
|
27233
|
+
function RecipeModalComponent_div_4_Template(rf, ctx) {
|
|
27193
27234
|
if (rf & 1) {
|
|
27194
|
-
|
|
27195
|
-
i0__namespace.ɵɵ
|
|
27196
|
-
i0__namespace.ɵɵlistener("displayChange", function RecipeModalComponent_ng_miam_modal_0_Template_ng_miam_modal_displayChange_0_listener($event) { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.show = $event; })("close", function RecipeModalComponent_ng_miam_modal_0_Template_ng_miam_modal_close_0_listener() { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.hide(); })("cancel", function RecipeModalComponent_ng_miam_modal_0_Template_ng_miam_modal_cancel_0_listener() { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r6 = i0__namespace.ɵɵnextContext(); return ctx_r6.removeRecipe(); })("confirm", function RecipeModalComponent_ng_miam_modal_0_Template_ng_miam_modal_confirm_0_listener() { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.hide(); });
|
|
27197
|
-
i0__namespace.ɵɵtemplate(1, RecipeModalComponent_ng_miam_modal_0_ng_miam_store_locator_link_1_Template, 1, 0, "ng-miam-store-locator-link", 3);
|
|
27198
|
-
i0__namespace.ɵɵelementStart(2, "div", 4);
|
|
27199
|
-
i0__namespace.ɵɵelement(3, "ng-miam-basket-preview-block", 5);
|
|
27200
|
-
i0__namespace.ɵɵelementEnd();
|
|
27235
|
+
i0__namespace.ɵɵelementStart(0, "div", 5);
|
|
27236
|
+
i0__namespace.ɵɵelement(1, "ng-miam-basket-preview-block", 6);
|
|
27201
27237
|
i0__namespace.ɵɵelementEnd();
|
|
27202
27238
|
}
|
|
27203
27239
|
if (rf & 2) {
|
|
27204
|
-
var
|
|
27205
|
-
i0__namespace.ɵɵproperty("display", ctx_r0.show)("noHeaderMode", false)("confirmButtonDisabled", !ctx_r0.canCloseModal)("cancelButtonIsLoading", ctx_r0.removeIsLoading);
|
|
27240
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
27206
27241
|
i0__namespace.ɵɵadvance(1);
|
|
27207
|
-
i0__namespace.ɵɵproperty("
|
|
27208
|
-
i0__namespace.ɵɵadvance(2);
|
|
27209
|
-
i0__namespace.ɵɵproperty("recipeId", ctx_r0.recipe == null ? null : ctx_r0.recipe.id)("displayItemsUnitaryPrice", true)("originTrace", ctx_r0.eventTrace);
|
|
27210
|
-
}
|
|
27211
|
-
}
|
|
27212
|
-
function RecipeModalComponent_ng_miam_modal_2_ng_miam_recipe_details_1_Template(rf, ctx) {
|
|
27213
|
-
if (rf & 1) {
|
|
27214
|
-
var _r11_1 = i0__namespace.ɵɵgetCurrentView();
|
|
27215
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-details", 9, 10);
|
|
27216
|
-
i0__namespace.ɵɵlistener("recipeAdded", function RecipeModalComponent_ng_miam_modal_2_ng_miam_recipe_details_1_Template_ng_miam_recipe_details_recipeAdded_0_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(2); return ctx_r10.togglePreviewMode(); })("recipeError", function RecipeModalComponent_ng_miam_modal_2_ng_miam_recipe_details_1_Template_ng_miam_recipe_details_recipeError_0_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r12 = i0__namespace.ɵɵnextContext(2); return ctx_r12.hide(); })("closeDetails", function RecipeModalComponent_ng_miam_modal_2_ng_miam_recipe_details_1_Template_ng_miam_recipe_details_closeDetails_0_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r13 = i0__namespace.ɵɵnextContext(2); return ctx_r13.hide(); });
|
|
27217
|
-
i0__namespace.ɵɵelementEnd();
|
|
27218
|
-
}
|
|
27219
|
-
if (rf & 2) {
|
|
27220
|
-
var ctx_r8 = i0__namespace.ɵɵnextContext(2);
|
|
27221
|
-
i0__namespace.ɵɵproperty("recipeId", ctx_r8.recipe.id)("guestNumber", ctx_r8.recipe.modifiedGuests)("previewAllowed", ctx_r8.previewAllowed)("originTrace", ctx_r8.eventTrace)("stepsOnLeftSide", ctx_r8.detailsStepsOnLeftSide)("moreRecipesImageURL", ctx_r8.detailsMoreRecipesImageURL)("pricingGuestsText", ctx_r8.detailsPricingGuestsText)("displayGuests", ctx_r8.displayGuestsInDetails)("helpButtonAllowed", ctx_r8.helpButtonAllowedInDetails);
|
|
27242
|
+
i0__namespace.ɵɵproperty("recipeId", ctx_r1.recipe == null ? null : ctx_r1.recipe.id)("displayItemsUnitaryPrice", true)("originTrace", ctx_r1.eventTrace);
|
|
27222
27243
|
}
|
|
27223
27244
|
}
|
|
27224
|
-
function
|
|
27245
|
+
function RecipeModalComponent_ng_miam_recipe_details_6_Template(rf, ctx) {
|
|
27225
27246
|
if (rf & 1) {
|
|
27226
|
-
var
|
|
27227
|
-
i0__namespace.ɵɵelementStart(0, "ng-miam-
|
|
27228
|
-
i0__namespace.ɵɵlistener("
|
|
27229
|
-
i0__namespace.ɵɵtemplate(1, RecipeModalComponent_ng_miam_modal_2_ng_miam_recipe_details_1_Template, 2, 9, "ng-miam-recipe-details", 8);
|
|
27247
|
+
var _r5_1 = i0__namespace.ɵɵgetCurrentView();
|
|
27248
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-recipe-details", 7, 8);
|
|
27249
|
+
i0__namespace.ɵɵlistener("recipeAdded", function RecipeModalComponent_ng_miam_recipe_details_6_Template_ng_miam_recipe_details_recipeAdded_0_listener() { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r4 = i0__namespace.ɵɵnextContext(); return ctx_r4.togglePreviewMode(); })("recipeError", function RecipeModalComponent_ng_miam_recipe_details_6_Template_ng_miam_recipe_details_recipeError_0_listener() { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r6 = i0__namespace.ɵɵnextContext(); return ctx_r6.hide(true); })("closeDetails", function RecipeModalComponent_ng_miam_recipe_details_6_Template_ng_miam_recipe_details_closeDetails_0_listener() { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.hide(true); });
|
|
27230
27250
|
i0__namespace.ɵɵelementEnd();
|
|
27231
27251
|
}
|
|
27232
27252
|
if (rf & 2) {
|
|
27233
|
-
var
|
|
27234
|
-
i0__namespace.ɵɵproperty("
|
|
27235
|
-
i0__namespace.ɵɵadvance(1);
|
|
27236
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r1.recipe && true);
|
|
27253
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
27254
|
+
i0__namespace.ɵɵproperty("recipeId", ctx_r2.recipe.id)("guestNumber", ctx_r2.recipe.modifiedGuests)("previewAllowed", ctx_r2.previewAllowed)("originTrace", ctx_r2.eventTrace)("stepsOnLeftSide", ctx_r2.detailsStepsOnLeftSide)("moreRecipesImageURL", ctx_r2.detailsMoreRecipesImageURL)("pricingGuestsText", ctx_r2.detailsPricingGuestsText)("displayGuests", ctx_r2.displayGuestsInDetails)("helpButtonAllowed", ctx_r2.helpButtonAllowedInDetails);
|
|
27237
27255
|
}
|
|
27238
27256
|
}
|
|
27239
27257
|
var RecipeModalComponent = /** @class */ (function () {
|
|
27240
|
-
function RecipeModalComponent(cdr, recipesService, contextService, printService, elRef, basketsService, recipeDetailsService) {
|
|
27258
|
+
function RecipeModalComponent(cdr, recipesService, contextService, printService, elRef, basketsService, recipeDetailsService, basketTransfer) {
|
|
27241
27259
|
this.cdr = cdr;
|
|
27242
27260
|
this.recipesService = recipesService;
|
|
27243
27261
|
this.contextService = contextService;
|
|
@@ -27245,6 +27263,7 @@
|
|
|
27245
27263
|
this.elRef = elRef;
|
|
27246
27264
|
this.basketsService = basketsService;
|
|
27247
27265
|
this.recipeDetailsService = recipeDetailsService;
|
|
27266
|
+
this.basketTransfer = basketTransfer;
|
|
27248
27267
|
this.show = false;
|
|
27249
27268
|
this.previewMode = new rxjs.BehaviorSubject(false);
|
|
27250
27269
|
this.displayGuestsInDetails = true;
|
|
@@ -27279,7 +27298,7 @@
|
|
|
27279
27298
|
var _a;
|
|
27280
27299
|
_this.registerTrace(result === null || result === void 0 ? void 0 : result.eventTrace);
|
|
27281
27300
|
if (!(result === null || result === void 0 ? void 0 : result.recipe)) {
|
|
27282
|
-
if (result === null || result === void 0 ? void 0 : result.force) {
|
|
27301
|
+
if ((result === null || result === void 0 ? void 0 : result.force) && Object.keys(result === null || result === void 0 ? void 0 : result.eventTrace.props).length === 0) {
|
|
27283
27302
|
_this.previewMode.next(result.previewMode);
|
|
27284
27303
|
_this.previewAllowed = result.previewAllowed;
|
|
27285
27304
|
_this.show = true;
|
|
@@ -27317,13 +27336,16 @@
|
|
|
27317
27336
|
this.eventTrace = { originPath: '', props: {} };
|
|
27318
27337
|
}
|
|
27319
27338
|
};
|
|
27320
|
-
RecipeModalComponent.prototype.hide = function () {
|
|
27339
|
+
RecipeModalComponent.prototype.hide = function (isDetail) {
|
|
27340
|
+
if (isDetail === void 0) { isDetail = false; }
|
|
27321
27341
|
if (this.canCloseModal) {
|
|
27322
27342
|
this.recipeDetailsService.displayEventWasSent = false;
|
|
27323
|
-
this.show = false;
|
|
27324
27343
|
this.recipe = null; // trigger again a change on recipe if we re-open the view
|
|
27325
|
-
this.previewMode.next(
|
|
27326
|
-
|
|
27344
|
+
this.previewMode.next(isDetail);
|
|
27345
|
+
if (!isDetail) {
|
|
27346
|
+
this.show = false;
|
|
27347
|
+
this.recipesService.hide();
|
|
27348
|
+
}
|
|
27327
27349
|
// Put back if/when printing is reimplemented
|
|
27328
27350
|
// this.printService.dismissPrinting();
|
|
27329
27351
|
this.hasChangesOnClose.emit(this.basketChangedSinceOpened);
|
|
@@ -27369,8 +27391,8 @@
|
|
|
27369
27391
|
};
|
|
27370
27392
|
return RecipeModalComponent;
|
|
27371
27393
|
}());
|
|
27372
|
-
RecipeModalComponent.ɵfac = function RecipeModalComponent_Factory(t) { return new (t || RecipeModalComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(PrintService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService)); };
|
|
27373
|
-
RecipeModalComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], inputs: { detailsStepsOnLeftSide: "detailsStepsOnLeftSide", detailsMoreRecipesImageURL: "detailsMoreRecipesImageURL", detailsPricingGuestsText: "detailsPricingGuestsText" }, outputs: { hasChangesOnClose: "hasChangesOnClose" }, decls:
|
|
27394
|
+
RecipeModalComponent.ɵfac = function RecipeModalComponent_Factory(t) { return new (t || RecipeModalComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(PrintService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(BasketsService), i0__namespace.ɵɵdirectiveInject(RecipeDetailsService), i0__namespace.ɵɵdirectiveInject(BasketTransferService)); };
|
|
27395
|
+
RecipeModalComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], inputs: { detailsStepsOnLeftSide: "detailsStepsOnLeftSide", detailsMoreRecipesImageURL: "detailsMoreRecipesImageURL", detailsPricingGuestsText: "detailsPricingGuestsText" }, outputs: { hasChangesOnClose: "hasChangesOnClose" }, decls: 8, vars: 17, consts: function () {
|
|
27374
27396
|
var i18n_0;
|
|
27375
27397
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
27376
27398
|
var MSG_EXTERNAL_171150506213829263$$LIB__WEB_COMPONENTS_RECIPE_MODAL_RECIPE_MODAL_COMPONENT_TS_1 = goog.getMsg("Mes repas");
|
|
@@ -27379,20 +27401,31 @@
|
|
|
27379
27401
|
else {
|
|
27380
27402
|
i18n_0 = $localize(templateObject_1 || (templateObject_1 = __makeTemplateObject([":\u241Fd0309cdf7a6522949c4f145db5e71f70c9d9d66c\u241F171150506213829263:Mes repas"], [":\u241Fd0309cdf7a6522949c4f145db5e71f70c9d9d66c\u241F171150506213829263:Mes repas"])));
|
|
27381
27403
|
}
|
|
27382
|
-
return [["title", i18n_0, "modalStyle", "right",
|
|
27404
|
+
return [["title", i18n_0, "modalStyle", "right", 3, "display", "noHeaderMode", "confirmButtonDisabled", "cancelButtonIsLoading", "displayChange", "close", "cancel", "confirm"], ["header", "", 4, "ngIf"], ["class", "miam-wrapper-preview", 4, "ngIf"], [3, "recipeId", "guestNumber", "previewAllowed", "originTrace", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError", "closeDetails", 4, "ngIf"], ["header", ""], [1, "miam-wrapper-preview"], [3, "recipeId", "displayItemsUnitaryPrice", "originTrace"], [3, "recipeId", "guestNumber", "previewAllowed", "originTrace", "stepsOnLeftSide", "moreRecipesImageURL", "pricingGuestsText", "displayGuests", "helpButtonAllowed", "recipeAdded", "recipeError", "closeDetails"], ["details", ""]];
|
|
27383
27405
|
}, template: function RecipeModalComponent_Template(rf, ctx) {
|
|
27384
27406
|
if (rf & 1) {
|
|
27385
|
-
i0__namespace.ɵɵ
|
|
27407
|
+
i0__namespace.ɵɵelementStart(0, "ng-miam-modal", 0);
|
|
27408
|
+
i0__namespace.ɵɵlistener("displayChange", function RecipeModalComponent_Template_ng_miam_modal_displayChange_0_listener($event) { return ctx.show = $event; })("close", function RecipeModalComponent_Template_ng_miam_modal_close_0_listener() { return ctx.hide(); })("cancel", function RecipeModalComponent_Template_ng_miam_modal_cancel_0_listener() { return ctx.removeRecipe(); })("confirm", function RecipeModalComponent_Template_ng_miam_modal_confirm_0_listener() { return ctx.hide(); });
|
|
27386
27409
|
i0__namespace.ɵɵpipe(1, "async");
|
|
27387
|
-
i0__namespace.ɵɵ
|
|
27388
|
-
i0__namespace.ɵɵ
|
|
27410
|
+
i0__namespace.ɵɵpipe(2, "async");
|
|
27411
|
+
i0__namespace.ɵɵtemplate(3, RecipeModalComponent_ng_miam_store_locator_link_3_Template, 1, 0, "ng-miam-store-locator-link", 1);
|
|
27412
|
+
i0__namespace.ɵɵtemplate(4, RecipeModalComponent_div_4_Template, 2, 3, "div", 2);
|
|
27413
|
+
i0__namespace.ɵɵpipe(5, "async");
|
|
27414
|
+
i0__namespace.ɵɵtemplate(6, RecipeModalComponent_ng_miam_recipe_details_6_Template, 2, 9, "ng-miam-recipe-details", 3);
|
|
27415
|
+
i0__namespace.ɵɵpipe(7, "async");
|
|
27416
|
+
i0__namespace.ɵɵelementEnd();
|
|
27389
27417
|
}
|
|
27390
27418
|
if (rf & 2) {
|
|
27391
|
-
i0__namespace.ɵɵ
|
|
27419
|
+
i0__namespace.ɵɵclassProp("miam-recipe-modal__basket-preview-modal", i0__namespace.ɵɵpipeBind1(1, 9, ctx.previewMode));
|
|
27420
|
+
i0__namespace.ɵɵproperty("display", ctx.show)("noHeaderMode", !i0__namespace.ɵɵpipeBind1(2, 11, ctx.previewMode))("confirmButtonDisabled", !ctx.canCloseModal)("cancelButtonIsLoading", ctx.removeIsLoading);
|
|
27421
|
+
i0__namespace.ɵɵadvance(3);
|
|
27422
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.contextService.noSupplier);
|
|
27423
|
+
i0__namespace.ɵɵadvance(1);
|
|
27424
|
+
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(5, 13, ctx.previewMode));
|
|
27392
27425
|
i0__namespace.ɵɵadvance(2);
|
|
27393
|
-
i0__namespace.ɵɵproperty("ngIf", !i0__namespace.ɵɵpipeBind1(
|
|
27426
|
+
i0__namespace.ɵɵproperty("ngIf", !i0__namespace.ɵɵpipeBind1(7, 15, ctx.previewMode) && ctx.recipe);
|
|
27394
27427
|
}
|
|
27395
|
-
}, directives: [i2__namespace$1.NgIf,
|
|
27428
|
+
}, directives: [ModalComponent, i2__namespace$1.NgIf, StoreLocatorLinkComponent, BasketPreviewBlockComponent, RecipeDetailsComponent], pipes: [i2__namespace$1.AsyncPipe], styles: [".miam-modal.without-header .miam-modal__header .miam-modal__close-icon{display:none}.miam-recipe-modal__basket-preview-modal .miam-modal__container.right .miam-modal{width:480px}@media (max-width:600px){.miam-recipe-modal__basket-preview-modal .miam-modal__container.right .miam-modal{width:100%}}.miam-recipe-modal__basket-preview-modal .miam-modal__container.right .miam-modal .miam-modal__content-container .miam-modal__content{padding:16px}@media (min-width:1023px) and (max-height:1000px){ng-miam-recipe-modal .miam-modal__container.left .miam-modal,ng-miam-recipe-modal .miam-modal__container.right .miam-modal,webc-miam-recipe-modal .miam-modal__container.left .miam-modal,webc-miam-recipe-modal .miam-modal__container.right .miam-modal{width:650px}}@media (min-width:1023px) and (max-height:800px){ng-miam-recipe-modal .miam-modal__container.left .miam-modal,ng-miam-recipe-modal .miam-modal__container.right .miam-modal,webc-miam-recipe-modal .miam-modal__container.left .miam-modal,webc-miam-recipe-modal .miam-modal__container.right .miam-modal{width:450px}}"], encapsulation: 2, changeDetection: 0 });
|
|
27396
27429
|
(function () {
|
|
27397
27430
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RecipeModalComponent, [{
|
|
27398
27431
|
type: i0.Component,
|
|
@@ -27403,7 +27436,7 @@
|
|
|
27403
27436
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
27404
27437
|
encapsulation: i0.ViewEncapsulation.None
|
|
27405
27438
|
}]
|
|
27406
|
-
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: RecipesService }, { type: ContextService }, { type: PrintService }, { type: i0__namespace.ElementRef }, { type: BasketsService }, { type: RecipeDetailsService }]; }, { detailsStepsOnLeftSide: [{
|
|
27439
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: RecipesService }, { type: ContextService }, { type: PrintService }, { type: i0__namespace.ElementRef }, { type: BasketsService }, { type: RecipeDetailsService }, { type: BasketTransferService }]; }, { detailsStepsOnLeftSide: [{
|
|
27407
27440
|
type: i0.Input
|
|
27408
27441
|
}], detailsMoreRecipesImageURL: [{
|
|
27409
27442
|
type: i0.Input
|