ng-miam 9.3.11 → 9.3.12
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 +178 -95
- 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/product-card/product-card.component.js +61 -55
- package/esm2015/lib/_services/baskets.service.js +28 -9
- package/esm2015/lib/_services/context.service.js +3 -2
- package/esm2015/lib/_services/history.service.js +9 -28
- package/esm2015/lib/_services/index.js +2 -1
- package/esm2015/lib/_services/menus.service.js +34 -0
- package/esm2015/lib/_services/planner-ssr.service.js +42 -5
- package/esm2015/lib/_services/price.service.js +8 -3
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +7 -1
- package/esm2015/lib/environments/environment.js +2 -2
- package/esm2015/lib/environments/environment.prod.js +2 -2
- package/esm2015/lib/environments/version.js +2 -2
- package/fesm2015/ng-miam.js +185 -109
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/baskets.service.d.ts +4 -1
- package/lib/_services/baskets.service.d.ts.map +1 -1
- package/lib/_services/context.service.d.ts.map +1 -1
- package/lib/_services/history.service.d.ts +1 -1
- package/lib/_services/history.service.d.ts.map +1 -1
- package/lib/_services/index.d.ts +1 -0
- package/lib/_services/index.d.ts.map +1 -1
- package/lib/_services/menus.service.d.ts +18 -0
- package/lib/_services/menus.service.d.ts.map +1 -0
- package/lib/_services/planner-ssr.service.d.ts +17 -1
- package/lib/_services/planner-ssr.service.d.ts.map +1 -1
- package/lib/_services/price.service.d.ts +1 -0
- package/lib/_services/price.service.d.ts.map +1 -1
- package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts.map +1 -1
- package/lib/environments/version.d.ts +1 -1
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -1832,7 +1832,7 @@
|
|
|
1832
1832
|
env: 'prod',
|
|
1833
1833
|
miamAPI: 'https://api.miam.tech',
|
|
1834
1834
|
miamWeb: 'https://miam.tech',
|
|
1835
|
-
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.
|
|
1835
|
+
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.6/dist',
|
|
1836
1836
|
mealzSsrApi: 'https://ssr-api.mealz.ai',
|
|
1837
1837
|
mealzSdkV10: 'https://cdn.jsdelivr.net/npm/webc-miam@10.3',
|
|
1838
1838
|
lang: 'fr',
|
|
@@ -3652,7 +3652,7 @@
|
|
|
3652
3652
|
EventJourney["EMPTY"] = "";
|
|
3653
3653
|
})(EventJourney || (EventJourney = {}));
|
|
3654
3654
|
|
|
3655
|
-
var VERSION = "9.3.
|
|
3655
|
+
var VERSION = "9.3.12"; // TODO: replace by ##VERSION## and update it in the CI/CD
|
|
3656
3656
|
|
|
3657
3657
|
var ContextRegistryService = /** @class */ (function () {
|
|
3658
3658
|
function ContextRegistryService() {
|
|
@@ -5841,17 +5841,22 @@
|
|
|
5841
5841
|
};
|
|
5842
5842
|
};
|
|
5843
5843
|
PriceService.prototype.getCurrentPrice = function (price) {
|
|
5844
|
-
if (
|
|
5844
|
+
if (this.isDiscountSupported(price)) {
|
|
5845
5845
|
return price.discountedPrice;
|
|
5846
5846
|
}
|
|
5847
5847
|
return price.unit;
|
|
5848
5848
|
};
|
|
5849
5849
|
PriceService.prototype.getOldPrice = function (price) {
|
|
5850
|
-
if (
|
|
5850
|
+
if (!this.isDiscountSupported(price)) {
|
|
5851
5851
|
return undefined;
|
|
5852
5852
|
}
|
|
5853
5853
|
return price.unit;
|
|
5854
5854
|
};
|
|
5855
|
+
// Temporary method as not every promotion types are currently handled
|
|
5856
|
+
PriceService.prototype.isDiscountSupported = function (price) {
|
|
5857
|
+
return price.discountType === exports.DiscountType.StrikethroughPrice ||
|
|
5858
|
+
price.discountType === exports.DiscountType.StrikethroughPricePerc;
|
|
5859
|
+
};
|
|
5855
5860
|
return PriceService;
|
|
5856
5861
|
}());
|
|
5857
5862
|
PriceService.ɵfac = function PriceService_Factory(t) { return new (t || PriceService)(i0__namespace.ɵɵinject(CurrencyService)); };
|
|
@@ -5865,12 +5870,40 @@
|
|
|
5865
5870
|
}], function () { return [{ type: CurrencyService }]; }, null);
|
|
5866
5871
|
})();
|
|
5867
5872
|
|
|
5873
|
+
var MenusService = /** @class */ (function () {
|
|
5874
|
+
function MenusService(http, statesService) {
|
|
5875
|
+
this.http = http;
|
|
5876
|
+
this.statesService = statesService;
|
|
5877
|
+
}
|
|
5878
|
+
/**
|
|
5879
|
+
* Transfers the authless user's current menu to the authenticated user.
|
|
5880
|
+
* Replaces the user's menu with the authless one (no merge).
|
|
5881
|
+
* Call at end of authless journey when user logs in. Authless user must have a current menu.
|
|
5882
|
+
*/
|
|
5883
|
+
MenusService.prototype.transferAuthlessMenu = function (authlessId) {
|
|
5884
|
+
this.statesService.callAuthlessTransfer.next();
|
|
5885
|
+
var url = environment$1.miamAPI + "/api/v1/menus/transfer-authless?authless_user_id=" + authlessId;
|
|
5886
|
+
return this.http.patch(url, {}).pipe(operators.map(function () { return undefined; }), operators.catchError(function () { return rxjs.of(undefined); }));
|
|
5887
|
+
};
|
|
5888
|
+
return MenusService;
|
|
5889
|
+
}());
|
|
5890
|
+
MenusService.ɵfac = function MenusService_Factory(t) { return new (t || MenusService)(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(StatesService)); };
|
|
5891
|
+
MenusService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: MenusService, factory: MenusService.ɵfac, providedIn: 'root' });
|
|
5892
|
+
(function () {
|
|
5893
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MenusService, [{
|
|
5894
|
+
type: i0.Injectable,
|
|
5895
|
+
args: [{
|
|
5896
|
+
providedIn: 'root'
|
|
5897
|
+
}]
|
|
5898
|
+
}], function () { return [{ type: i1__namespace$1.HttpClient }, { type: StatesService }]; }, null);
|
|
5899
|
+
})();
|
|
5900
|
+
|
|
5868
5901
|
var BASKET_SPARSE_FIELDS = {
|
|
5869
5902
|
baskets: ['total-price', 'recipes-infos', 'completion', 'status']
|
|
5870
5903
|
};
|
|
5871
5904
|
var BasketsService = /** @class */ (function (_super) {
|
|
5872
5905
|
__extends(BasketsService, _super);
|
|
5873
|
-
function BasketsService(http, basketEntriesService, posService, recipesService, analyticsService, usersService, toasterService, ignoredBasketsService, statesService, priceService) {
|
|
5906
|
+
function BasketsService(http, basketEntriesService, posService, recipesService, analyticsService, usersService, toasterService, ignoredBasketsService, statesService, priceService, menusService) {
|
|
5874
5907
|
var _this = _super.call(this) || this;
|
|
5875
5908
|
_this.http = http;
|
|
5876
5909
|
_this.basketEntriesService = basketEntriesService;
|
|
@@ -5882,6 +5915,7 @@
|
|
|
5882
5915
|
_this.ignoredBasketsService = ignoredBasketsService;
|
|
5883
5916
|
_this.statesService = statesService;
|
|
5884
5917
|
_this.priceService = priceService;
|
|
5918
|
+
_this.menusService = menusService;
|
|
5885
5919
|
_this.resource = Basket;
|
|
5886
5920
|
_this.type = 'baskets';
|
|
5887
5921
|
_this._basket$ = new rxjs.BehaviorSubject(null);
|
|
@@ -5895,6 +5929,7 @@
|
|
|
5895
5929
|
_this.confirming = new rxjs.BehaviorSubject(false);
|
|
5896
5930
|
_this.currentlyAddingRecipes = [];
|
|
5897
5931
|
_this.basketActionsQueue = new rxjs.BehaviorSubject([]);
|
|
5932
|
+
_this.authlessTransferInProgress$ = new rxjs.BehaviorSubject(false);
|
|
5898
5933
|
_this._entries$ = new rxjs.BehaviorSubject([]);
|
|
5899
5934
|
_this.actionsBeingProcessed = new rxjs.BehaviorSubject([]);
|
|
5900
5935
|
_this.actionsBeingOverridden = [];
|
|
@@ -6112,12 +6147,27 @@
|
|
|
6112
6147
|
mealzDebug('[Mealz] refreshing basket');
|
|
6113
6148
|
var authlessId = localStorage.getItem('_miam/authlessId');
|
|
6114
6149
|
var userId = localStorage.getItem('_miam/userId');
|
|
6115
|
-
|
|
6150
|
+
var hasAuthlessAndUser = !!authlessId && !!userId;
|
|
6151
|
+
if (_this.authlessTransferInProgress$.value) {
|
|
6152
|
+
return _this._basket$;
|
|
6153
|
+
}
|
|
6154
|
+
// We can safely cancel any previous in-flight request as long as it's not an authless transfer.
|
|
6155
|
+
if (_this.currentSubscription && !_this.authlessTransferInProgress$.value) {
|
|
6116
6156
|
_this.currentSubscription.unsubscribe();
|
|
6117
6157
|
}
|
|
6118
|
-
var basketObservable
|
|
6119
|
-
|
|
6120
|
-
|
|
6158
|
+
var basketObservable;
|
|
6159
|
+
if (hasAuthlessAndUser) {
|
|
6160
|
+
_this.authlessTransferInProgress$.next(true);
|
|
6161
|
+
basketObservable = rxjs.forkJoin([
|
|
6162
|
+
_this.transferAuthlessBasket(pos.id, authlessId),
|
|
6163
|
+
_this.menusService.transferAuthlessMenu(authlessId)
|
|
6164
|
+
]).pipe(operators.map(function () { return undefined; }), operators.finalize(function () {
|
|
6165
|
+
_this.authlessTransferInProgress$.next(false);
|
|
6166
|
+
}));
|
|
6167
|
+
}
|
|
6168
|
+
else {
|
|
6169
|
+
basketObservable = _this.fetchCurrentBasket(pos.id);
|
|
6170
|
+
}
|
|
6121
6171
|
if (authlessId && userId) {
|
|
6122
6172
|
localStorage.removeItem('_miam/authlessId');
|
|
6123
6173
|
localStorage.removeItem('_miam/authless-forbid-profiling');
|
|
@@ -6859,7 +6909,7 @@
|
|
|
6859
6909
|
return BasketsService;
|
|
6860
6910
|
}(i2$1.Service));
|
|
6861
6911
|
BasketsService.entriesPerPages = 30;
|
|
6862
|
-
BasketsService.ɵfac = function BasketsService_Factory(t) { return new (t || BasketsService)(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(BasketEntriesService), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(RecipesService), i0__namespace.ɵɵinject(AnalyticsService), i0__namespace.ɵɵinject(UserService), i0__namespace.ɵɵinject(ToasterService), i0__namespace.ɵɵinject(IgnoredIngredientsService), i0__namespace.ɵɵinject(StatesService), i0__namespace.ɵɵinject(PriceService)); };
|
|
6912
|
+
BasketsService.ɵfac = function BasketsService_Factory(t) { return new (t || BasketsService)(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(BasketEntriesService), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(RecipesService), i0__namespace.ɵɵinject(AnalyticsService), i0__namespace.ɵɵinject(UserService), i0__namespace.ɵɵinject(ToasterService), i0__namespace.ɵɵinject(IgnoredIngredientsService), i0__namespace.ɵɵinject(StatesService), i0__namespace.ɵɵinject(PriceService), i0__namespace.ɵɵinject(MenusService)); };
|
|
6863
6913
|
BasketsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: BasketsService, factory: BasketsService.ɵfac, providedIn: 'root' });
|
|
6864
6914
|
(function () {
|
|
6865
6915
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasketsService, [{
|
|
@@ -6867,7 +6917,7 @@
|
|
|
6867
6917
|
args: [{
|
|
6868
6918
|
providedIn: 'root'
|
|
6869
6919
|
}]
|
|
6870
|
-
}], function () { return [{ type: i1__namespace$1.HttpClient }, { type: BasketEntriesService }, { type: PointOfSalesService }, { type: RecipesService }, { type: AnalyticsService }, { type: UserService }, { type: ToasterService }, { type: IgnoredIngredientsService }, { type: StatesService }, { type: PriceService }]; }, null);
|
|
6920
|
+
}], function () { return [{ type: i1__namespace$1.HttpClient }, { type: BasketEntriesService }, { type: PointOfSalesService }, { type: RecipesService }, { type: AnalyticsService }, { type: UserService }, { type: ToasterService }, { type: IgnoredIngredientsService }, { type: StatesService }, { type: PriceService }, { type: MenusService }]; }, null);
|
|
6871
6921
|
})();
|
|
6872
6922
|
|
|
6873
6923
|
var BasketRecipeCleanupService = /** @class */ (function () {
|
|
@@ -8151,7 +8201,8 @@
|
|
|
8151
8201
|
_this.scriptsPaths = [
|
|
8152
8202
|
environment$1.mealzComponents + "/catalog/catalog-history/catalog-history.min.js",
|
|
8153
8203
|
environment$1.mealzComponents + "/history-order/history-order.min.js",
|
|
8154
|
-
environment$1.mealzComponents + "/recipe-card/recipe-card.min.js"
|
|
8204
|
+
environment$1.mealzComponents + "/recipe-card/recipe-card.min.js",
|
|
8205
|
+
environment$1.mealzComponents + "/drawer-view-swapper/drawer-view-swapper.min.js"
|
|
8155
8206
|
];
|
|
8156
8207
|
return _this;
|
|
8157
8208
|
}
|
|
@@ -8164,32 +8215,10 @@
|
|
|
8164
8215
|
this.fetchingHTMLLoader$.next(true);
|
|
8165
8216
|
return this.http.get(url, { headers: headers, responseType: 'text' }).pipe(operators.tap(function () { return _this.fetchingHTMLLoader$.next(false); }));
|
|
8166
8217
|
};
|
|
8167
|
-
HistoryService.prototype.
|
|
8168
|
-
var
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
return;
|
|
8172
|
-
}
|
|
8173
|
-
this.loadStyles();
|
|
8174
|
-
rxjs.combineLatest([
|
|
8175
|
-
this.allScriptLoaded$.pipe(operators.filter(function (loaded) { return loaded; })),
|
|
8176
|
-
this.posService.waitForPos.pipe(operators.take(1))
|
|
8177
|
-
]).pipe(operators.take(1)).subscribe(function (_a) {
|
|
8178
|
-
var _b = __read(_a, 2), _ = _b[0], pos = _b[1];
|
|
8179
|
-
var drawerElement = document.querySelector('mealz-drawer');
|
|
8180
|
-
var drawer;
|
|
8181
|
-
if (!drawerElement) {
|
|
8182
|
-
drawer = document.createElement('mealz-drawer');
|
|
8183
|
-
document.body.appendChild(drawer);
|
|
8184
|
-
}
|
|
8185
|
-
else {
|
|
8186
|
-
drawer = drawerElement;
|
|
8187
|
-
}
|
|
8188
|
-
drawer.openDrawer();
|
|
8189
|
-
var drawerDataURL = _this.MEALZ_SSR_API + "/catalog/my-space/drawer";
|
|
8190
|
-
var sessionId = sessionStorage.getItem('_miam/sessionId');
|
|
8191
|
-
drawer.loadDrawerData(drawerDataURL, orderId, sessionId, pos.id);
|
|
8192
|
-
});
|
|
8218
|
+
HistoryService.prototype.removeOrderParameterFromUrl = function () {
|
|
8219
|
+
var url = new URL(window.location.href);
|
|
8220
|
+
url.searchParams.delete('order');
|
|
8221
|
+
window.history.replaceState({}, '', url.toString());
|
|
8193
8222
|
};
|
|
8194
8223
|
HistoryService.prototype.replaceNoHistoryRedirection = function (catalogUrl) {
|
|
8195
8224
|
var anchor = document.querySelector('.mealz-catalog-history__empty__button');
|
|
@@ -8212,11 +8241,12 @@
|
|
|
8212
8241
|
|
|
8213
8242
|
var MEALZ_SSR_API = environment$1.mealzSsrApi + "/v2";
|
|
8214
8243
|
var PlannerSSRService = /** @class */ (function () {
|
|
8215
|
-
function PlannerSSRService(http, suppliersService, userService, posService) {
|
|
8244
|
+
function PlannerSSRService(http, suppliersService, userService, posService, basketsService) {
|
|
8216
8245
|
this.http = http;
|
|
8217
8246
|
this.suppliersService = suppliersService;
|
|
8218
8247
|
this.userService = userService;
|
|
8219
8248
|
this.posService = posService;
|
|
8249
|
+
this.basketsService = basketsService;
|
|
8220
8250
|
this.catalogPlannerLinkUrl = MEALZ_SSR_API + "/styles/planner-link";
|
|
8221
8251
|
this.plannerUrl = MEALZ_SSR_API + "/styles/planner";
|
|
8222
8252
|
this.allScriptLoaded$ = new rxjs.BehaviorSubject(false);
|
|
@@ -8258,10 +8288,46 @@
|
|
|
8258
8288
|
var _this = this;
|
|
8259
8289
|
this.fetchingHTMLLoader$.next(true);
|
|
8260
8290
|
this.resetLoadingStates();
|
|
8291
|
+
var hasAuthlessAndUser = this.getAuthStateForCurrentMenu().hasAuthlessAndUser;
|
|
8292
|
+
var waitForTransfer$ = this.waitForAuthlessTransferIfNeeded(hasAuthlessAndUser);
|
|
8293
|
+
return waitForTransfer$.pipe(operators.switchMap(function () { return _this.fetchAndPrepareCurrentMenuHtml(); }), operators.tap(function () { return _this.fetchingHTMLLoader$.next(false); }));
|
|
8294
|
+
};
|
|
8295
|
+
/**
|
|
8296
|
+
* Reads authless and user identifiers from storage and logs the state.
|
|
8297
|
+
*/
|
|
8298
|
+
PlannerSSRService.prototype.getAuthStateForCurrentMenu = function () {
|
|
8299
|
+
var authlessId = localStorage.getItem('_miam/authlessId');
|
|
8300
|
+
var userId = localStorage.getItem('_miam/userId');
|
|
8301
|
+
var hasAuthlessAndUser = !!authlessId && !!userId;
|
|
8302
|
+
return { hasAuthlessAndUser: hasAuthlessAndUser };
|
|
8303
|
+
};
|
|
8304
|
+
/**
|
|
8305
|
+
* When both authless and user ids exist, waits for the authless basket transfer
|
|
8306
|
+
* to both start and fully complete before proceeding.
|
|
8307
|
+
* Otherwise, only waits for any currently running transfer to finish.
|
|
8308
|
+
*/
|
|
8309
|
+
PlannerSSRService.prototype.waitForAuthlessTransferIfNeeded = function (hasAuthlessAndUser) {
|
|
8310
|
+
var _this = this;
|
|
8311
|
+
if (hasAuthlessAndUser) {
|
|
8312
|
+
return this.basketsService.authlessTransferInProgress$.pipe(
|
|
8313
|
+
// wait until a transfer actually starts
|
|
8314
|
+
operators.skipWhile(function (inProgress) { return !inProgress; }), operators.take(1),
|
|
8315
|
+
// then wait until it fully completes
|
|
8316
|
+
operators.switchMap(function () { return _this.basketsService.authlessTransferInProgress$.pipe(operators.skipWhile(function (inProgress) { return inProgress; }), operators.take(1)); }));
|
|
8317
|
+
}
|
|
8318
|
+
return this.basketsService.authlessTransferInProgress$.pipe(
|
|
8319
|
+
// if a transfer is currently running, wait for it to finish; if not, pass through immediately
|
|
8320
|
+
operators.skipWhile(function (inProgress) { return inProgress; }), operators.take(1));
|
|
8321
|
+
};
|
|
8322
|
+
/**
|
|
8323
|
+
* Fetches the current menu HTML from the SSR API and ensures its assets are loaded.
|
|
8324
|
+
*/
|
|
8325
|
+
PlannerSSRService.prototype.fetchAndPrepareCurrentMenuHtml = function () {
|
|
8326
|
+
var _this = this;
|
|
8261
8327
|
return this.makeSSRRequest('planner/current-menu').pipe(operators.switchMap(function (html) {
|
|
8262
8328
|
_this.extractAndLoadAssets(html);
|
|
8263
8329
|
return _this.loadStyles(_this.plannerUrl).pipe(operators.switchMap(function () { return _this.waitForAssetsLoaded(); }), operators.map(function () { return html; }));
|
|
8264
|
-
})
|
|
8330
|
+
}));
|
|
8265
8331
|
};
|
|
8266
8332
|
PlannerSSRService.prototype.getEntry = function () {
|
|
8267
8333
|
var _this = this;
|
|
@@ -8453,7 +8519,7 @@
|
|
|
8453
8519
|
};
|
|
8454
8520
|
return PlannerSSRService;
|
|
8455
8521
|
}());
|
|
8456
|
-
PlannerSSRService.ɵfac = function PlannerSSRService_Factory(t) { return new (t || PlannerSSRService)(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(SuppliersService), i0__namespace.ɵɵinject(UserService), i0__namespace.ɵɵinject(PointOfSalesService)); };
|
|
8522
|
+
PlannerSSRService.ɵfac = function PlannerSSRService_Factory(t) { return new (t || PlannerSSRService)(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(SuppliersService), i0__namespace.ɵɵinject(UserService), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(BasketsService)); };
|
|
8457
8523
|
PlannerSSRService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: PlannerSSRService, factory: PlannerSSRService.ɵfac, providedIn: 'root' });
|
|
8458
8524
|
(function () {
|
|
8459
8525
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PlannerSSRService, [{
|
|
@@ -8461,7 +8527,7 @@
|
|
|
8461
8527
|
args: [{
|
|
8462
8528
|
providedIn: 'root'
|
|
8463
8529
|
}]
|
|
8464
|
-
}], function () { return [{ type: i1__namespace$1.HttpClient }, { type: SuppliersService }, { type: UserService }, { type: PointOfSalesService }]; }, null);
|
|
8530
|
+
}], function () { return [{ type: i1__namespace$1.HttpClient }, { type: SuppliersService }, { type: UserService }, { type: PointOfSalesService }, { type: BasketsService }]; }, null);
|
|
8465
8531
|
})();
|
|
8466
8532
|
|
|
8467
8533
|
var SMALL_SCREEN_BP = '(min-width: 1023px)';
|
|
@@ -8682,7 +8748,8 @@
|
|
|
8682
8748
|
if (origin.length > 0) {
|
|
8683
8749
|
_this.setOriginIfNecessary(origin);
|
|
8684
8750
|
_this.recipesService.displayRecipeInUrl();
|
|
8685
|
-
|
|
8751
|
+
// Remove order parameter from url to avoid unwanted drawer opening (only in 9.3.x)
|
|
8752
|
+
_this.historyService.removeOrderParameterFromUrl();
|
|
8686
8753
|
}
|
|
8687
8754
|
},
|
|
8688
8755
|
load: function (supplierId) {
|
|
@@ -10734,7 +10801,7 @@
|
|
|
10734
10801
|
env: 'prod',
|
|
10735
10802
|
miamAPI: 'https://api.miam.tech',
|
|
10736
10803
|
miamWeb: 'https://miam.tech',
|
|
10737
|
-
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.
|
|
10804
|
+
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.6/dist',
|
|
10738
10805
|
mealzSsrApi: 'https://ssr-api.mealz.ai',
|
|
10739
10806
|
mealzSdkV10: 'https://cdn.jsdelivr.net/npm/webc-miam@10.3',
|
|
10740
10807
|
lang: 'fr',
|
|
@@ -15314,79 +15381,88 @@
|
|
|
15314
15381
|
i0__namespace.ɵɵproperty("headerHeight", ctx_r1.headerHeight);
|
|
15315
15382
|
}
|
|
15316
15383
|
}
|
|
15384
|
+
function ProductCardComponent_div_0_ng_container_12_ng_miam_promotion_badge_1_Template(rf, ctx) {
|
|
15385
|
+
if (rf & 1) {
|
|
15386
|
+
i0__namespace.ɵɵelement(0, "ng-miam-promotion-badge", 27);
|
|
15387
|
+
}
|
|
15388
|
+
if (rf & 2) {
|
|
15389
|
+
var ctx_r8 = i0__namespace.ɵɵnextContext(3);
|
|
15390
|
+
i0__namespace.ɵɵproperty("priceData", ctx_r8.product.price);
|
|
15391
|
+
}
|
|
15392
|
+
}
|
|
15317
15393
|
function ProductCardComponent_div_0_ng_container_12_ng_container_16_button_1_Template(rf, ctx) {
|
|
15318
15394
|
if (rf & 1) {
|
|
15319
|
-
var
|
|
15320
|
-
i0__namespace.ɵɵelementStart(0, "button",
|
|
15321
|
-
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_12_ng_container_16_button_1_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
15395
|
+
var _r15_1 = i0__namespace.ɵɵgetCurrentView();
|
|
15396
|
+
i0__namespace.ɵɵelementStart(0, "button", 30);
|
|
15397
|
+
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_12_ng_container_16_button_1_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r15_1); var ctx_r14 = i0__namespace.ɵɵnextContext(4); return ctx_r14.addToBasket(); });
|
|
15322
15398
|
i0__namespace.ɵɵpipe(1, "async");
|
|
15323
|
-
i0__namespace.ɵɵelement(2, "img",
|
|
15399
|
+
i0__namespace.ɵɵelement(2, "img", 31);
|
|
15324
15400
|
i0__namespace.ɵɵelementEnd();
|
|
15325
15401
|
}
|
|
15326
15402
|
if (rf & 2) {
|
|
15327
|
-
var
|
|
15328
|
-
i0__namespace.ɵɵproperty("disabled", i0__namespace.ɵɵpipeBind1(1, 1,
|
|
15403
|
+
var ctx_r12 = i0__namespace.ɵɵnextContext(4);
|
|
15404
|
+
i0__namespace.ɵɵproperty("disabled", i0__namespace.ɵɵpipeBind1(1, 1, ctx_r12.recipeDetailsService.allIngredientsToBasketLoading$));
|
|
15329
15405
|
}
|
|
15330
15406
|
}
|
|
15331
15407
|
function ProductCardComponent_div_0_ng_container_12_ng_container_16_button_2_Template(rf, ctx) {
|
|
15332
15408
|
if (rf & 1) {
|
|
15333
|
-
i0__namespace.ɵɵelementStart(0, "button",
|
|
15334
|
-
i0__namespace.ɵɵelement(1, "div",
|
|
15409
|
+
i0__namespace.ɵɵelementStart(0, "button", 32);
|
|
15410
|
+
i0__namespace.ɵɵelement(1, "div", 33);
|
|
15335
15411
|
i0__namespace.ɵɵelementEnd();
|
|
15336
15412
|
}
|
|
15337
15413
|
}
|
|
15338
15414
|
function ProductCardComponent_div_0_ng_container_12_ng_container_16_Template(rf, ctx) {
|
|
15339
15415
|
if (rf & 1) {
|
|
15340
15416
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
15341
|
-
i0__namespace.ɵɵtemplate(1, ProductCardComponent_div_0_ng_container_12_ng_container_16_button_1_Template, 3, 3, "button",
|
|
15342
|
-
i0__namespace.ɵɵtemplate(2, ProductCardComponent_div_0_ng_container_12_ng_container_16_button_2_Template, 2, 0, "button",
|
|
15417
|
+
i0__namespace.ɵɵtemplate(1, ProductCardComponent_div_0_ng_container_12_ng_container_16_button_1_Template, 3, 3, "button", 28);
|
|
15418
|
+
i0__namespace.ɵɵtemplate(2, ProductCardComponent_div_0_ng_container_12_ng_container_16_button_2_Template, 2, 0, "button", 29);
|
|
15343
15419
|
i0__namespace.ɵɵelementContainerEnd();
|
|
15344
15420
|
}
|
|
15345
15421
|
if (rf & 2) {
|
|
15346
|
-
var
|
|
15422
|
+
var ctx_r9 = i0__namespace.ɵɵnextContext(3);
|
|
15347
15423
|
i0__namespace.ɵɵadvance(1);
|
|
15348
|
-
i0__namespace.ɵɵproperty("ngIf", !
|
|
15424
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx_r9.loadingAddToBasket);
|
|
15349
15425
|
i0__namespace.ɵɵadvance(1);
|
|
15350
|
-
i0__namespace.ɵɵproperty("ngIf",
|
|
15426
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r9.loadingAddToBasket);
|
|
15351
15427
|
}
|
|
15352
15428
|
}
|
|
15353
15429
|
function ProductCardComponent_div_0_ng_container_12_ng_container_17_Template(rf, ctx) {
|
|
15354
15430
|
if (rf & 1) {
|
|
15355
|
-
var
|
|
15431
|
+
var _r17_1 = i0__namespace.ɵɵgetCurrentView();
|
|
15356
15432
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
15357
|
-
i0__namespace.ɵɵelementStart(1, "ng-miam-counter-input",
|
|
15358
|
-
i0__namespace.ɵɵlistener("valueChange", function ProductCardComponent_div_0_ng_container_12_ng_container_17_Template_ng_miam_counter_input_valueChange_1_listener($event) { i0__namespace.ɵɵrestoreView(
|
|
15433
|
+
i0__namespace.ɵɵelementStart(1, "ng-miam-counter-input", 34);
|
|
15434
|
+
i0__namespace.ɵɵlistener("valueChange", function ProductCardComponent_div_0_ng_container_12_ng_container_17_Template_ng_miam_counter_input_valueChange_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(3); return ctx_r16.handleCounterChange($event); });
|
|
15359
15435
|
i0__namespace.ɵɵpipe(2, "async");
|
|
15360
15436
|
i0__namespace.ɵɵpipe(3, "async");
|
|
15361
15437
|
i0__namespace.ɵɵelementEnd();
|
|
15362
15438
|
i0__namespace.ɵɵelementContainerEnd();
|
|
15363
15439
|
}
|
|
15364
15440
|
if (rf & 2) {
|
|
15365
|
-
var
|
|
15441
|
+
var ctx_r10 = i0__namespace.ɵɵnextContext(3);
|
|
15366
15442
|
i0__namespace.ɵɵadvance(1);
|
|
15367
|
-
i0__namespace.ɵɵproperty("biColor", true)("value",
|
|
15443
|
+
i0__namespace.ɵɵproperty("biColor", true)("value", ctx_r10.product.basketEntry.quantity)("minusLoading", ctx_r10.ingredientIsRemoved && i0__namespace.ɵɵpipeBind1(2, 5, ctx_r10.recipeDetailsService.updateIngredientFromBasketLoading$))("disable", ctx_r10.updateLoading || ctx_r10.ingredientIsRemoved && i0__namespace.ɵɵpipeBind1(3, 7, ctx_r10.recipeDetailsService.updateIngredientFromBasketLoading$))("debounceTime", 300);
|
|
15368
15444
|
}
|
|
15369
15445
|
}
|
|
15370
15446
|
function ProductCardComponent_div_0_ng_container_12_button_19_Template(rf, ctx) {
|
|
15371
15447
|
if (rf & 1) {
|
|
15372
|
-
var
|
|
15373
|
-
i0__namespace.ɵɵelementStart(0, "button",
|
|
15374
|
-
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_12_button_19_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(
|
|
15375
|
-
i0__namespace.ɵɵelementStart(1, "span",
|
|
15376
|
-
i0__namespace.ɵɵi18n(2,
|
|
15448
|
+
var _r19_1 = i0__namespace.ɵɵgetCurrentView();
|
|
15449
|
+
i0__namespace.ɵɵelementStart(0, "button", 35);
|
|
15450
|
+
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_12_button_19_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r19_1); var ctx_r18 = i0__namespace.ɵɵnextContext(3); return ctx_r18.ignoreProduct(); });
|
|
15451
|
+
i0__namespace.ɵɵelementStart(1, "span", 36);
|
|
15452
|
+
i0__namespace.ɵɵi18n(2, 37);
|
|
15377
15453
|
i0__namespace.ɵɵelementEnd();
|
|
15378
15454
|
i0__namespace.ɵɵelementEnd();
|
|
15379
15455
|
}
|
|
15380
15456
|
}
|
|
15381
15457
|
function ProductCardComponent_div_0_ng_container_12_Template(rf, ctx) {
|
|
15382
15458
|
if (rf & 1) {
|
|
15383
|
-
var
|
|
15459
|
+
var _r21_1 = i0__namespace.ɵɵgetCurrentView();
|
|
15384
15460
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
15385
|
-
i0__namespace.ɵɵ
|
|
15461
|
+
i0__namespace.ɵɵtemplate(1, ProductCardComponent_div_0_ng_container_12_ng_miam_promotion_badge_1_Template, 1, 1, "ng-miam-promotion-badge", 11);
|
|
15386
15462
|
i0__namespace.ɵɵelementStart(2, "div", 12);
|
|
15387
15463
|
i0__namespace.ɵɵelementStart(3, "div", 13);
|
|
15388
15464
|
i0__namespace.ɵɵelementStart(4, "img", 14);
|
|
15389
|
-
i0__namespace.ɵɵlistener("error", function ProductCardComponent_div_0_ng_container_12_Template_img_error_4_listener($event) { i0__namespace.ɵɵrestoreView(
|
|
15465
|
+
i0__namespace.ɵɵlistener("error", function ProductCardComponent_div_0_ng_container_12_Template_img_error_4_listener($event) { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r20 = i0__namespace.ɵɵnextContext(2); return ($event.target["src"] = ctx_r20.contextService.defaultIngredientPicture); });
|
|
15390
15466
|
i0__namespace.ɵɵelementEnd();
|
|
15391
15467
|
i0__namespace.ɵɵelementEnd();
|
|
15392
15468
|
i0__namespace.ɵɵelementStart(5, "div", 15);
|
|
@@ -15411,7 +15487,7 @@
|
|
|
15411
15487
|
i0__namespace.ɵɵelementStart(18, "div", 23);
|
|
15412
15488
|
i0__namespace.ɵɵtemplate(19, ProductCardComponent_div_0_ng_container_12_button_19_Template, 3, 0, "button", 24);
|
|
15413
15489
|
i0__namespace.ɵɵelementStart(20, "button", 25);
|
|
15414
|
-
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_12_Template_button_click_20_listener() { i0__namespace.ɵɵrestoreView(
|
|
15490
|
+
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_container_12_Template_button_click_20_listener() { i0__namespace.ɵɵrestoreView(_r21_1); var ctx_r22 = i0__namespace.ɵɵnextContext(2); return ctx_r22.replaceProduct(ctx_r22.product.basketEntry.status === "initial"); });
|
|
15415
15491
|
i0__namespace.ɵɵelementStart(21, "span");
|
|
15416
15492
|
i0__namespace.ɵɵi18n(22, 26);
|
|
15417
15493
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -15422,7 +15498,7 @@
|
|
|
15422
15498
|
if (rf & 2) {
|
|
15423
15499
|
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
15424
15500
|
i0__namespace.ɵɵadvance(1);
|
|
15425
|
-
i0__namespace.ɵɵproperty("
|
|
15501
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r2.priceService.isDiscountSupported(ctx_r2.product.price));
|
|
15426
15502
|
i0__namespace.ɵɵadvance(3);
|
|
15427
15503
|
i0__namespace.ɵɵpropertyInterpolate("alt", ctx_r2.product.basketEntry.selectedItem.attributes.name);
|
|
15428
15504
|
i0__namespace.ɵɵproperty("src", ctx_r2.product.basketEntry.selectedItem.attributes.image, i0__namespace.ɵɵsanitizeUrl);
|
|
@@ -15444,15 +15520,15 @@
|
|
|
15444
15520
|
}
|
|
15445
15521
|
function ProductCardComponent_div_0_ng_template_13_ng_container_0_Template(rf, ctx) {
|
|
15446
15522
|
if (rf & 1) {
|
|
15447
|
-
var
|
|
15523
|
+
var _r26_1 = i0__namespace.ɵɵgetCurrentView();
|
|
15448
15524
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
15449
|
-
i0__namespace.ɵɵelementStart(1, "span",
|
|
15450
|
-
i0__namespace.ɵɵi18n(2,
|
|
15525
|
+
i0__namespace.ɵɵelementStart(1, "span", 38);
|
|
15526
|
+
i0__namespace.ɵɵi18n(2, 39);
|
|
15451
15527
|
i0__namespace.ɵɵelementEnd();
|
|
15452
|
-
i0__namespace.ɵɵelementStart(3, "button",
|
|
15453
|
-
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_template_13_ng_container_0_Template_button_click_3_listener() { i0__namespace.ɵɵrestoreView(
|
|
15528
|
+
i0__namespace.ɵɵelementStart(3, "button", 40);
|
|
15529
|
+
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_template_13_ng_container_0_Template_button_click_3_listener() { i0__namespace.ɵɵrestoreView(_r26_1); var ctx_r25 = i0__namespace.ɵɵnextContext(3); return ctx_r25.replaceProduct(true); });
|
|
15454
15530
|
i0__namespace.ɵɵelementStart(4, "span");
|
|
15455
|
-
i0__namespace.ɵɵi18n(5,
|
|
15531
|
+
i0__namespace.ɵɵi18n(5, 41);
|
|
15456
15532
|
i0__namespace.ɵɵelementEnd();
|
|
15457
15533
|
i0__namespace.ɵɵelementEnd();
|
|
15458
15534
|
i0__namespace.ɵɵelementContainerEnd();
|
|
@@ -15460,27 +15536,27 @@
|
|
|
15460
15536
|
}
|
|
15461
15537
|
function ProductCardComponent_div_0_ng_template_13_ng_container_1_Template(rf, ctx) {
|
|
15462
15538
|
if (rf & 1) {
|
|
15463
|
-
var
|
|
15539
|
+
var _r28_1 = i0__namespace.ɵɵgetCurrentView();
|
|
15464
15540
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
15465
|
-
i0__namespace.ɵɵelement(1, "img",
|
|
15466
|
-
i0__namespace.ɵɵelementStart(2, "div",
|
|
15467
|
-
i0__namespace.ɵɵelement(3, "img",
|
|
15468
|
-
i0__namespace.ɵɵelementStart(4, "span",
|
|
15469
|
-
i0__namespace.ɵɵi18n(5,
|
|
15541
|
+
i0__namespace.ɵɵelement(1, "img", 42);
|
|
15542
|
+
i0__namespace.ɵɵelementStart(2, "div", 43);
|
|
15543
|
+
i0__namespace.ɵɵelement(3, "img", 44);
|
|
15544
|
+
i0__namespace.ɵɵelementStart(4, "span", 45);
|
|
15545
|
+
i0__namespace.ɵɵi18n(5, 46);
|
|
15470
15546
|
i0__namespace.ɵɵelementEnd();
|
|
15471
15547
|
i0__namespace.ɵɵelementEnd();
|
|
15472
|
-
i0__namespace.ɵɵelementStart(6, "button",
|
|
15473
|
-
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_template_13_ng_container_1_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(
|
|
15548
|
+
i0__namespace.ɵɵelementStart(6, "button", 47);
|
|
15549
|
+
i0__namespace.ɵɵlistener("click", function ProductCardComponent_div_0_ng_template_13_ng_container_1_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r28_1); var ctx_r27 = i0__namespace.ɵɵnextContext(3); return ctx_r27.replaceProduct(true); });
|
|
15474
15550
|
i0__namespace.ɵɵelementStart(7, "span");
|
|
15475
|
-
i0__namespace.ɵɵi18n(8,
|
|
15551
|
+
i0__namespace.ɵɵi18n(8, 48);
|
|
15476
15552
|
i0__namespace.ɵɵelementEnd();
|
|
15477
15553
|
i0__namespace.ɵɵelementEnd();
|
|
15478
15554
|
i0__namespace.ɵɵelementContainerEnd();
|
|
15479
15555
|
}
|
|
15480
15556
|
if (rf & 2) {
|
|
15481
|
-
var
|
|
15557
|
+
var ctx_r24 = i0__namespace.ɵɵnextContext(3);
|
|
15482
15558
|
i0__namespace.ɵɵadvance(1);
|
|
15483
|
-
i0__namespace.ɵɵproperty("src",
|
|
15559
|
+
i0__namespace.ɵɵproperty("src", ctx_r24.product.ingredient.picture || ctx_r24.contextService.defaultIngredientPicture, i0__namespace.ɵɵsanitizeUrl);
|
|
15484
15560
|
}
|
|
15485
15561
|
}
|
|
15486
15562
|
function ProductCardComponent_div_0_ng_template_13_Template(rf, ctx) {
|
|
@@ -15497,16 +15573,16 @@
|
|
|
15497
15573
|
}
|
|
15498
15574
|
function ProductCardComponent_div_0_div_15_Template(rf, ctx) {
|
|
15499
15575
|
if (rf & 1) {
|
|
15500
|
-
i0__namespace.ɵɵelementStart(0, "div",
|
|
15501
|
-
i0__namespace.ɵɵelementStart(1, "div",
|
|
15576
|
+
i0__namespace.ɵɵelementStart(0, "div", 49);
|
|
15577
|
+
i0__namespace.ɵɵelementStart(1, "div", 50);
|
|
15502
15578
|
i0__namespace.ɵɵelementStart(2, "span");
|
|
15503
|
-
i0__namespace.ɵɵi18n(3,
|
|
15579
|
+
i0__namespace.ɵɵi18n(3, 51);
|
|
15504
15580
|
i0__namespace.ɵɵelementEnd();
|
|
15505
15581
|
i0__namespace.ɵɵelementStart(4, "span");
|
|
15506
15582
|
i0__namespace.ɵɵtext(5);
|
|
15507
15583
|
i0__namespace.ɵɵelementEnd();
|
|
15508
15584
|
i0__namespace.ɵɵelementStart(6, "span");
|
|
15509
|
-
i0__namespace.ɵɵi18n(7,
|
|
15585
|
+
i0__namespace.ɵɵi18n(7, 52);
|
|
15510
15586
|
i0__namespace.ɵɵelementEnd();
|
|
15511
15587
|
i0__namespace.ɵɵelementEnd();
|
|
15512
15588
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -15862,7 +15938,7 @@
|
|
|
15862
15938
|
else {
|
|
15863
15939
|
i18n_14 = $localize(templateObject_8$9 || (templateObject_8$9 = __makeTemplateObject([":\u241Ff0ee2f84e20252199737bc9757b04e75979cb9fe\u241F8253051398336962047: repas"], [":\u241Ff0ee2f84e20252199737bc9757b04e75979cb9fe\u241F8253051398336962047: repas"])));
|
|
15864
15940
|
}
|
|
15865
|
-
return [["class", "miam-product-card__container", 3, "ngClass", 4, "ngIf"], [1, "miam-product-card__container", 3, "ngClass"], [3, "headerHeight", "replacedClicked", 4, "ngIf"], [1, "miam-product-card__header", 3, "ngClass"], [1, "miam-product-card__header-name", "miam-ds-text", "size-l", "weight-xxl", 3, "ngClass"], [1, "miam-product-card__header-quantity", "miam-ds-text", "size-s", "weight-l", 3, "ngClass"], [1, "miam-product-card__content", 3, "ngClass"], [4, "ngIf", "ngIfElse"], ["disabledProduct", ""], ["class", "miam-product-card__footer", 4, "ngIf"], [3, "headerHeight", "replacedClicked"], [3, "priceData"], [1, "miam-product-card__selected-product"], [1, "miam-product-card__picture-column"], [1, "miam-product-card__picture", 3, "alt", "src", "error"], [1, "miam-product-card__info-column"], [1, "miam-ds-text", "size-xs", "weight-xl", "miam-product-card__details", "product-brand"], [1, "miam-ds-text", "size-xs", "miam-product-card__details", "product-fullname"], [3, "isSponsored", "item", "price"], [1, "miam-product-card__lower-action"], [1, "miam-product-card__price", "miam-ds-text", "size-m", "weight-xxl", 3, "oldPrice", "price"], [1, "miam-product-card__cta"], [4, "ngIf"], [1, "miam-product-card__footer__actions"], ["class", "miam-ds-button miam-product-card__ignore-product ghost small", 3, "click", 4, "ngIf"], [1, "miam-product-card__replace-product", "miam-ds-button", "ghost", 3, "click"], i18n_0, ["class", "miam-ds-button miam-product-card__add-product square primary", "aria-label", "Ajouter au panier", 3, "disabled", "click", 4, "ngIf"], ["class", "miam-ds-button miam-product-card__loading-button square primary", "aria-label", "Chargement", 4, "ngIf"], ["aria-label", "Ajouter au panier", 1, "miam-ds-button", "miam-product-card__add-product", "square", "primary", 3, "disabled", "click"], ["alt", "", "aria-hidden", "true", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Basket.svg"], ["aria-label", "Chargement", 1, "miam-ds-button", "miam-product-card__loading-button", "square", "primary"], [1, "miam-ds-loader"], ["minRange", "0", 3, "biColor", "value", "minusLoading", "disable", "debounceTime", "valueChange"], [1, "miam-ds-button", "miam-product-card__ignore-product", "ghost", "small", 3, "click"], [1, "miam-product-card__disabled-text"], i18n_2, [1, "miam-ds-text", "miam-product-card__disabled-text"], i18n_4, [1, "miam-product-card__select-product", "miam-ds-button", "ghost", 3, "click"], i18n_6, ["alt", "Image de l'ingr\u00E9dient", 1, "miam-ds-avatar", 3, "src"], [1, "miam-ds-badge", "warning"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/WarningFill.svg", "alt", "", "aria-hidden", "true"], [1, "miam-ds-text", "size-xs", "weight-l"], i18n_8, [1, "miam-product-card__select-product", "miam-ds-button", "primary", "reverse", "small", 3, "click"], i18n_10, [1, "miam-product-card__footer"], [1, "miam-ds-text", "size-xs", "weight-xl", "light-text"], i18n_12, i18n_14];
|
|
15941
|
+
return [["class", "miam-product-card__container", 3, "ngClass", 4, "ngIf"], [1, "miam-product-card__container", 3, "ngClass"], [3, "headerHeight", "replacedClicked", 4, "ngIf"], [1, "miam-product-card__header", 3, "ngClass"], [1, "miam-product-card__header-name", "miam-ds-text", "size-l", "weight-xxl", 3, "ngClass"], [1, "miam-product-card__header-quantity", "miam-ds-text", "size-s", "weight-l", 3, "ngClass"], [1, "miam-product-card__content", 3, "ngClass"], [4, "ngIf", "ngIfElse"], ["disabledProduct", ""], ["class", "miam-product-card__footer", 4, "ngIf"], [3, "headerHeight", "replacedClicked"], [3, "priceData", 4, "ngIf"], [1, "miam-product-card__selected-product"], [1, "miam-product-card__picture-column"], [1, "miam-product-card__picture", 3, "alt", "src", "error"], [1, "miam-product-card__info-column"], [1, "miam-ds-text", "size-xs", "weight-xl", "miam-product-card__details", "product-brand"], [1, "miam-ds-text", "size-xs", "miam-product-card__details", "product-fullname"], [3, "isSponsored", "item", "price"], [1, "miam-product-card__lower-action"], [1, "miam-product-card__price", "miam-ds-text", "size-m", "weight-xxl", 3, "oldPrice", "price"], [1, "miam-product-card__cta"], [4, "ngIf"], [1, "miam-product-card__footer__actions"], ["class", "miam-ds-button miam-product-card__ignore-product ghost small", 3, "click", 4, "ngIf"], [1, "miam-product-card__replace-product", "miam-ds-button", "ghost", 3, "click"], i18n_0, [3, "priceData"], ["class", "miam-ds-button miam-product-card__add-product square primary", "aria-label", "Ajouter au panier", 3, "disabled", "click", 4, "ngIf"], ["class", "miam-ds-button miam-product-card__loading-button square primary", "aria-label", "Chargement", 4, "ngIf"], ["aria-label", "Ajouter au panier", 1, "miam-ds-button", "miam-product-card__add-product", "square", "primary", 3, "disabled", "click"], ["alt", "", "aria-hidden", "true", "src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/Basket.svg"], ["aria-label", "Chargement", 1, "miam-ds-button", "miam-product-card__loading-button", "square", "primary"], [1, "miam-ds-loader"], ["minRange", "0", 3, "biColor", "value", "minusLoading", "disable", "debounceTime", "valueChange"], [1, "miam-ds-button", "miam-product-card__ignore-product", "ghost", "small", 3, "click"], [1, "miam-product-card__disabled-text"], i18n_2, [1, "miam-ds-text", "miam-product-card__disabled-text"], i18n_4, [1, "miam-product-card__select-product", "miam-ds-button", "ghost", 3, "click"], i18n_6, ["alt", "Image de l'ingr\u00E9dient", 1, "miam-ds-avatar", 3, "src"], [1, "miam-ds-badge", "warning"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/WarningFill.svg", "alt", "", "aria-hidden", "true"], [1, "miam-ds-text", "size-xs", "weight-l"], i18n_8, [1, "miam-product-card__select-product", "miam-ds-button", "primary", "reverse", "small", 3, "click"], i18n_10, [1, "miam-product-card__footer"], [1, "miam-ds-text", "size-xs", "weight-xl", "light-text"], i18n_12, i18n_14];
|
|
15866
15942
|
}, template: function ProductCardComponent_Template(rf, ctx) {
|
|
15867
15943
|
if (rf & 1) {
|
|
15868
15944
|
i0__namespace.ɵɵtemplate(0, ProductCardComponent_div_0_Template, 16, 30, "div", 0);
|
|
@@ -15870,7 +15946,7 @@
|
|
|
15870
15946
|
if (rf & 2) {
|
|
15871
15947
|
i0__namespace.ɵɵproperty("ngIf", ctx.product.basketEntry);
|
|
15872
15948
|
}
|
|
15873
|
-
}, directives: [i1__namespace.NgIf, i1__namespace.NgClass, OutOfStockOverlayComponent,
|
|
15949
|
+
}, directives: [i1__namespace.NgIf, i1__namespace.NgClass, OutOfStockOverlayComponent, ProductBadgesComponent, PriceComponent, PromotionBadgeComponent, CounterInputComponent], pipes: [CapitalizeFirstLetterPipe, i1__namespace.CurrencyPipe, i1__namespace.AsyncPipe], styles: [".miam-product-card__container{display:flex;flex-direction:column;box-sizing:border-box;height:100%;border-radius:8px;overflow:hidden;border:1px solid var(--miam-ds-color-primary-100,#e4eaec);background:var(--miam-ds-color-primary-text,#fff);transition:all .3s;position:relative}.miam-product-card__container.added{border:1px solid var(--miam-ds-color-primary,#24748f);background:var(--miam-ds-color-primary-text,#fff)}.miam-product-card__container .miam-product-card__header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;padding:8px;color:var(--miam-ds-color-neutral-black,#0f191f);background:var(--miam-ds-color-primary-100,#e4eaec);transition:all .3s}.miam-product-card__container .miam-product-card__header.added{background:var(--miam-ds-color-primary,#24748f);color:var(--core-background-background-primary,#fff)}.miam-product-card__container .miam-product-card__header.disabled{background:var(--miam-ds-color-neutral-200,#d9dde1)}.miam-product-card__container .miam-product-card__header.unavailable{background-color:var(--miam-ds-color-neutral-50,#f7f8f9)}.miam-product-card__container .miam-product-card__header .miam-product-card__header-quantity{text-align:right}.miam-product-card__container .miam-product-card__content{padding:12px;height:100%;display:flex;gap:8px;flex-direction:column;background-color:var(--miam-ds-color-neutral-white,#fff);transition:background-color .3s}.miam-product-card__container .miam-product-card__content.disabled,.miam-product-card__container .miam-product-card__content.unavailable{justify-content:center;align-items:center;padding:12px;text-align:center}.miam-product-card__container .miam-product-card__content.disabled{background-color:var(--miam-ds-color-neutral-200,#d9dde1)}.miam-product-card__container .miam-product-card__content.unavailable{background-color:var(--miam-ds-color-neutral-50,#f7f8f9)}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;height:100%;gap:12px}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__picture{height:120px;width:120px}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column{display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__details{font-size:14px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--miam-ds-color-neutral-black,#0f191f)}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__details.product-brand{text-transform:uppercase;line-height:24px}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__details.product-price-per-unit{font-size:12px}.miam-product-card__container .miam-product-card__content .miam-product-card__selected-product .miam-product-card__info-column .miam-product-card__link{font-size:14px}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta{display:flex;align-items:center;gap:12px}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-ds-button.square{padding:8px;height:40px;width:40px}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-product-card__loading-button{padding:14px}@media (max-width:1024px){.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__cta .miam-ds-button.primary:hover:not(:disabled){background-color:var(--miam-ds-color-primary)}}.miam-product-card__container .miam-product-card__content .miam-product-card__lower-action .miam-product-card__price{color:var(--miam-ds-color-neutral-black,#0f191f);line-height:0}.miam-product-card__container .miam-product-card__content .miam-product-card__footer__actions{display:flex;align-items:center;justify-content:center;gap:28px}.miam-product-card__container .miam-product-card__content .miam-ds-avatar{height:64px;width:64px}.miam-product-card__container .miam-product-card__content .miam-ds-badge.warning{display:inline-flex}.miam-product-card__container .miam-product-card__content .miam-ds-badge.warning img{margin-right:4px}.miam-product-card__container .miam-product-card__disabled-text{color:var(--miam-ds-color-neutral-black,#0f191f)}.miam-product-card__container .miam-product-card__footer{display:flex;flex-direction:column;align-items:center;background:var(--miam-ds-color-primary-50,#f0f3f4);padding:8px}.miam-product-card__container .miam-product-card__footer .light-text{color:var(--miam-ds-color-neutral-black,#0f191f);opacity:.5}"], encapsulation: 2, changeDetection: 0 });
|
|
15874
15950
|
(function () {
|
|
15875
15951
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ProductCardComponent, [{
|
|
15876
15952
|
type: i0.Component,
|
|
@@ -29760,6 +29836,12 @@
|
|
|
29760
29836
|
var _this = this;
|
|
29761
29837
|
this.subscriptions.push(this.recipesService.displayedRecipe$.subscribe(function (result) {
|
|
29762
29838
|
var _a;
|
|
29839
|
+
// SSR meals planner now owns recipe-details.
|
|
29840
|
+
// If an SSR planner is present, skip opening the SDK recipe-details to avoid duplicates.
|
|
29841
|
+
var isMealsPlannerDisplayed = !!document.querySelector('webc-miam-meals-planner');
|
|
29842
|
+
if (isMealsPlannerDisplayed) {
|
|
29843
|
+
return;
|
|
29844
|
+
}
|
|
29763
29845
|
_this.registerTrace({ originPath: '', props: { recipe_id: (_a = result === null || result === void 0 ? void 0 : result.recipe) === null || _a === void 0 ? void 0 : _a.id } });
|
|
29764
29846
|
if (!(result === null || result === void 0 ? void 0 : result.recipe)) {
|
|
29765
29847
|
_this.handleEmptyRecipe(result);
|
|
@@ -30703,6 +30785,7 @@
|
|
|
30703
30785
|
exports.MealsPlannerFormComponent = MealsPlannerFormComponent;
|
|
30704
30786
|
exports.MealsPlannerLinkComponent = MealsPlannerLinkComponent;
|
|
30705
30787
|
exports.MealsPlannerModule = MealsPlannerModule;
|
|
30788
|
+
exports.MenusService = MenusService;
|
|
30706
30789
|
exports.MiamInterceptor = MiamInterceptor;
|
|
30707
30790
|
exports.ModalComponent = ModalComponent;
|
|
30708
30791
|
exports.NgMiamModule = NgMiamModule;
|