ng-miam 9.0.2 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ng-miam.umd.js +210 -140
- 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/_models/basket-preview-line.js +2 -2
- package/esm2015/lib/_services/basket-transfer.service.js +20 -11
- package/esm2015/lib/_services/baskets.service.js +20 -16
- package/esm2015/lib/_services/states.service.js +17 -0
- package/esm2015/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.js +29 -8
- package/esm2015/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.component.js +36 -14
- package/esm2015/lib/_web-components/basket-preview/replace-item/replace-item.component.js +2 -2
- package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +91 -96
- package/esm2015/lib/environments/version.js +2 -2
- package/fesm2015/ng-miam.js +199 -140
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_models/basket-preview-line.d.ts.map +1 -1
- package/lib/_services/basket-transfer.service.d.ts +5 -1
- package/lib/_services/basket-transfer.service.d.ts.map +1 -1
- package/lib/_services/baskets.service.d.ts +5 -3
- package/lib/_services/baskets.service.d.ts.map +1 -1
- package/lib/_services/states.service.d.ts +9 -0
- package/lib/_services/states.service.d.ts.map +1 -0
- package/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.d.ts.map +1 -1
- package/lib/_web-components/basket-preview/basket-preview-line/basket-preview-line.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
|
@@ -1728,7 +1728,7 @@
|
|
|
1728
1728
|
var price = parseFloat(beItem['unit-price']);
|
|
1729
1729
|
var recipesCount = (_a = entry.recipesIds) === null || _a === void 0 ? void 0 : _a.length;
|
|
1730
1730
|
if (item && beItem && price !== null && price !== undefined) {
|
|
1731
|
-
Object.assign(line, Object.assign({ id: entry.id, record: entry, isRecipe: false, inlineTag: recipesCount && recipesCount > 1 ? "Pour " + recipesCount + " repas" : null, title: entry.name, picture: item.attributes.image, description: [(item.attributes.brand ? item.attributes.brand : '') + " " + item.attributes.name + " | " + item.capacity], price: "" + price.toFixed(2), count: entry.
|
|
1731
|
+
Object.assign(line, Object.assign({ id: entry.id, record: entry, isRecipe: false, inlineTag: recipesCount && recipesCount > 1 ? "Pour " + recipesCount + " repas" : null, title: entry.name, picture: item.attributes.image, description: [(item.attributes.brand ? item.attributes.brand : '') + " " + item.attributes.name + " | " + item.capacity], price: "" + price.toFixed(2), count: entry.quantity + entry.quantityToAdd }, (recipe && {
|
|
1732
1732
|
recipe: recipe,
|
|
1733
1733
|
ingredient: ingredient
|
|
1734
1734
|
})));
|
|
@@ -3176,7 +3176,7 @@
|
|
|
3176
3176
|
}], function () { return [{ type: i1__namespace.HttpClient }]; }, null);
|
|
3177
3177
|
})();
|
|
3178
3178
|
|
|
3179
|
-
var VERSION = '9.0.
|
|
3179
|
+
var VERSION = '9.0.4'; // TODO: replace by ##VERSION## and update it in the CI/CD
|
|
3180
3180
|
|
|
3181
3181
|
/**
|
|
3182
3182
|
* Analytics library cannot refer to "this." so we use a global variable
|
|
@@ -4273,12 +4273,29 @@
|
|
|
4273
4273
|
}], function () { return [{ type: i1__namespace.HttpClient }, { type: RecipeProviderService }, { type: RecipeStatusService }, { type: RecipeTypeService }, { type: SuppliersService }, { type: PointOfSalesService }, { type: IngredientsService }, { type: RecipeStepsService }, { type: SponsorService }, { type: PackageService }, { type: TagsService }, { type: RecipeLikesService }, { type: SeoService }, { type: PreferencesService }, { type: StoreLocatorService }]; }, null);
|
|
4274
4274
|
})();
|
|
4275
4275
|
|
|
4276
|
+
var StatesService = /** @class */ (function () {
|
|
4277
|
+
function StatesService() {
|
|
4278
|
+
this.callAuthlessTransfer = new rxjs.Subject();
|
|
4279
|
+
}
|
|
4280
|
+
return StatesService;
|
|
4281
|
+
}());
|
|
4282
|
+
StatesService.ɵfac = function StatesService_Factory(t) { return new (t || StatesService)(); };
|
|
4283
|
+
StatesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: StatesService, factory: StatesService.ɵfac, providedIn: 'root' });
|
|
4284
|
+
(function () {
|
|
4285
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(StatesService, [{
|
|
4286
|
+
type: i0.Injectable,
|
|
4287
|
+
args: [{
|
|
4288
|
+
providedIn: 'root'
|
|
4289
|
+
}]
|
|
4290
|
+
}], function () { return []; }, null);
|
|
4291
|
+
})();
|
|
4292
|
+
|
|
4276
4293
|
var BASKET_SPARSE_FIELDS = {
|
|
4277
4294
|
baskets: ['total-price', 'pricebook-key', 'recipes-infos', 'completion', 'status']
|
|
4278
4295
|
};
|
|
4279
4296
|
var BasketsService = /** @class */ (function (_super) {
|
|
4280
4297
|
__extends(BasketsService, _super);
|
|
4281
|
-
function BasketsService(http, basketEntriesService, posService, recipesService, analyticsService, usersService, toasterService, ignoredBasketsService) {
|
|
4298
|
+
function BasketsService(http, basketEntriesService, posService, recipesService, analyticsService, usersService, toasterService, ignoredBasketsService, statesService) {
|
|
4282
4299
|
var _this = _super.call(this) || this;
|
|
4283
4300
|
_this.http = http;
|
|
4284
4301
|
_this.basketEntriesService = basketEntriesService;
|
|
@@ -4288,14 +4305,15 @@
|
|
|
4288
4305
|
_this.usersService = usersService;
|
|
4289
4306
|
_this.toasterService = toasterService;
|
|
4290
4307
|
_this.ignoredBasketsService = ignoredBasketsService;
|
|
4308
|
+
_this.statesService = statesService;
|
|
4291
4309
|
_this.resource = Basket;
|
|
4292
4310
|
_this.type = 'baskets';
|
|
4293
4311
|
_this._basket$ = new rxjs.BehaviorSubject(null);
|
|
4294
4312
|
_this._basketPreview$ = new rxjs.BehaviorSubject(null);
|
|
4295
4313
|
_this.basketStats$ = new rxjs.BehaviorSubject(null);
|
|
4296
4314
|
_this.currentAndPreviewFetching = new rxjs.BehaviorSubject(false);
|
|
4297
|
-
_this.basketIsFetching = false;
|
|
4298
|
-
_this.basketPreviewIsCalculating = false;
|
|
4315
|
+
_this.basketIsFetching$ = new rxjs.BehaviorSubject(false);
|
|
4316
|
+
_this.basketPreviewIsCalculating$ = new rxjs.BehaviorSubject(false);
|
|
4299
4317
|
_this.basketInitCalled = false;
|
|
4300
4318
|
_this.recipesAdded = new i0.EventEmitter();
|
|
4301
4319
|
_this.confirming = new rxjs.BehaviorSubject(false);
|
|
@@ -4317,8 +4335,8 @@
|
|
|
4317
4335
|
* But if initBasket is not called, the basket will only be fetched the 1st time it is needed.
|
|
4318
4336
|
*/
|
|
4319
4337
|
get: function () {
|
|
4320
|
-
if (!this._basket$.value && !this.basketIsFetching) {
|
|
4321
|
-
this.basketIsFetching
|
|
4338
|
+
if (!this._basket$.value && !this.basketIsFetching$.value) {
|
|
4339
|
+
this.basketIsFetching$.next(true);
|
|
4322
4340
|
this.initBasket();
|
|
4323
4341
|
}
|
|
4324
4342
|
return this._basket$;
|
|
@@ -4332,8 +4350,8 @@
|
|
|
4332
4350
|
* or if loadPreview is called before
|
|
4333
4351
|
*/
|
|
4334
4352
|
get: function () {
|
|
4335
|
-
if (!this._basketPreview$.value && !this.basketPreviewIsCalculating) {
|
|
4336
|
-
this.basketPreviewIsCalculating
|
|
4353
|
+
if (!this._basketPreview$.value && !this.basketPreviewIsCalculating$.value) {
|
|
4354
|
+
this.basketPreviewIsCalculating$.next(true);
|
|
4337
4355
|
this.initBasket();
|
|
4338
4356
|
}
|
|
4339
4357
|
return this._basketPreview$;
|
|
@@ -4359,7 +4377,13 @@
|
|
|
4359
4377
|
*/
|
|
4360
4378
|
get: function () {
|
|
4361
4379
|
var _this = this;
|
|
4362
|
-
return this._entries
|
|
4380
|
+
return rxjs.combineLatest([this._entries$, this.basketPreviewIsCalculating$]).pipe(operators.skipWhile(function (_b) {
|
|
4381
|
+
var _c = __read(_b, 2), b = _c[0], bpCalculating = _c[1];
|
|
4382
|
+
return !b || !_this.basketInitCalled || bpCalculating;
|
|
4383
|
+
}), operators.take(1), operators.map(function (_b) {
|
|
4384
|
+
var _c = __read(_b, 1), b = _c[0];
|
|
4385
|
+
return b;
|
|
4386
|
+
}));
|
|
4363
4387
|
},
|
|
4364
4388
|
enumerable: false,
|
|
4365
4389
|
configurable: true
|
|
@@ -4517,6 +4541,7 @@
|
|
|
4517
4541
|
};
|
|
4518
4542
|
BasketsService.prototype.transferAuthlessBasket = function (posId, authlessId) {
|
|
4519
4543
|
var _this = this;
|
|
4544
|
+
this.statesService.callAuthlessTransfer.next();
|
|
4520
4545
|
var transferAuthlessBasketUrl = environment$1.miamAPI + "/api/v1/baskets/transfer_authless?point_of_sale_id=" + posId + "&authless_user_id=" + authlessId;
|
|
4521
4546
|
return this.http.patch(transferAuthlessBasketUrl, {}).pipe(operators.switchMap(function (response) {
|
|
4522
4547
|
var confirmedBasket = _this.new();
|
|
@@ -5088,10 +5113,10 @@
|
|
|
5088
5113
|
*/
|
|
5089
5114
|
BasketsService.prototype.updateLocalBasket = function (basket) {
|
|
5090
5115
|
var _this = this;
|
|
5091
|
-
this.basketPreviewIsCalculating
|
|
5116
|
+
this.basketPreviewIsCalculating$.next(true);
|
|
5092
5117
|
this._basket$.next(basket);
|
|
5093
5118
|
return this.loadPreview().pipe(operators.tap(function () {
|
|
5094
|
-
_this.basketIsFetching
|
|
5119
|
+
_this.basketIsFetching$.next(false);
|
|
5095
5120
|
_this.currentAndPreviewFetching.next(false);
|
|
5096
5121
|
}));
|
|
5097
5122
|
};
|
|
@@ -5103,7 +5128,7 @@
|
|
|
5103
5128
|
BasketsService.prototype.fillBasket = function (res) {
|
|
5104
5129
|
var basket = this.new();
|
|
5105
5130
|
basket.fill(res);
|
|
5106
|
-
this.basketPreviewIsCalculating
|
|
5131
|
+
this.basketPreviewIsCalculating$.next(true);
|
|
5107
5132
|
this._basket$.next(basket);
|
|
5108
5133
|
return this.loadPreview();
|
|
5109
5134
|
};
|
|
@@ -5124,7 +5149,7 @@
|
|
|
5124
5149
|
var lineEntries = _this.groupBasketEntries(recipes, entries);
|
|
5125
5150
|
var lines = _this.recipesAndLineEntriesToBasketPreviewLine(recipes, lineEntries);
|
|
5126
5151
|
_this._basketPreview$.next(lines);
|
|
5127
|
-
_this.basketPreviewIsCalculating
|
|
5152
|
+
_this.basketPreviewIsCalculating$.next(false);
|
|
5128
5153
|
_this.basketStats$.next(_this.buildStats(lines));
|
|
5129
5154
|
}));
|
|
5130
5155
|
}));
|
|
@@ -5217,7 +5242,7 @@
|
|
|
5217
5242
|
return BasketsService;
|
|
5218
5243
|
}(i2.Service));
|
|
5219
5244
|
BasketsService.entriesPerPages = 30;
|
|
5220
|
-
BasketsService.ɵfac = function BasketsService_Factory(t) { return new (t || BasketsService)(i0__namespace.ɵɵinject(i1__namespace.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)); };
|
|
5245
|
+
BasketsService.ɵfac = function BasketsService_Factory(t) { return new (t || BasketsService)(i0__namespace.ɵɵinject(i1__namespace.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)); };
|
|
5221
5246
|
BasketsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: BasketsService, factory: BasketsService.ɵfac, providedIn: 'root' });
|
|
5222
5247
|
(function () {
|
|
5223
5248
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasketsService, [{
|
|
@@ -5225,7 +5250,7 @@
|
|
|
5225
5250
|
args: [{
|
|
5226
5251
|
providedIn: 'root'
|
|
5227
5252
|
}]
|
|
5228
|
-
}], function () { return [{ type: i1__namespace.HttpClient }, { type: BasketEntriesService }, { type: PointOfSalesService }, { type: RecipesService }, { type: AnalyticsService }, { type: UserService }, { type: ToasterService }, { type: IgnoredIngredientsService }]; }, null);
|
|
5253
|
+
}], function () { return [{ type: i1__namespace.HttpClient }, { type: BasketEntriesService }, { type: PointOfSalesService }, { type: RecipesService }, { type: AnalyticsService }, { type: UserService }, { type: ToasterService }, { type: IgnoredIngredientsService }, { type: StatesService }]; }, null);
|
|
5229
5254
|
})();
|
|
5230
5255
|
|
|
5231
5256
|
var ItemsComparator = /** @class */ (function () {
|
|
@@ -9160,7 +9185,7 @@
|
|
|
9160
9185
|
}(BasketAction));
|
|
9161
9186
|
|
|
9162
9187
|
var BasketTransferService = /** @class */ (function () {
|
|
9163
|
-
function BasketTransferService(basketsService, contextService, posService, http, userService, recipesService, suppliersService, basketSynchroService) {
|
|
9188
|
+
function BasketTransferService(basketsService, contextService, posService, http, userService, recipesService, suppliersService, basketSynchroService, statesService) {
|
|
9164
9189
|
this.basketsService = basketsService;
|
|
9165
9190
|
this.contextService = contextService;
|
|
9166
9191
|
this.posService = posService;
|
|
@@ -9169,16 +9194,21 @@
|
|
|
9169
9194
|
this.recipesService = recipesService;
|
|
9170
9195
|
this.suppliersService = suppliersService;
|
|
9171
9196
|
this.basketSynchroService = basketSynchroService;
|
|
9197
|
+
this.statesService = statesService;
|
|
9172
9198
|
this.basketIsBeingTransferred = new rxjs.BehaviorSubject(false);
|
|
9173
9199
|
this.transferComplete$ = new rxjs.Subject();
|
|
9174
9200
|
this.previousBasketEntries = [];
|
|
9175
9201
|
this.subscriptions = [];
|
|
9176
|
-
this.subscriptions.push(this.startTransferOnSupplierLoaded(), this.checkBasketStatus());
|
|
9202
|
+
this.subscriptions.push(this.startTransferOnSupplierLoaded(), this.checkAuthlessTransfer(), this.checkBasketStatus());
|
|
9177
9203
|
}
|
|
9178
9204
|
BasketTransferService.prototype.startTransferOnSupplierLoaded = function () {
|
|
9179
9205
|
var _this = this;
|
|
9180
9206
|
return this.suppliersService.supplier$.pipe(operators.skipWhile(function (s) { return !s; }), operators.take(1)).subscribe(function () { return _this.handleBasketTransfer(); });
|
|
9181
9207
|
};
|
|
9208
|
+
BasketTransferService.prototype.checkAuthlessTransfer = function () {
|
|
9209
|
+
var _this = this;
|
|
9210
|
+
return this.statesService.callAuthlessTransfer.pipe(operators.take(1)).subscribe(function () { return _this.updateRetailerBasket(); });
|
|
9211
|
+
};
|
|
9182
9212
|
BasketTransferService.prototype.checkBasketStatus = function () {
|
|
9183
9213
|
var _this = this;
|
|
9184
9214
|
return this.basketsService._basket$.pipe(operators.skipWhile(function (b) { return !b; }), operators.map(function (basket) { return basket.attributes.status === 'transferring'; })).subscribe(function (transferring) {
|
|
@@ -9281,15 +9311,19 @@
|
|
|
9281
9311
|
BasketTransferService.prototype.updateRetailerBasket = function () {
|
|
9282
9312
|
var _this = this;
|
|
9283
9313
|
this.basketsService.activeBasketEntries().pipe(operators.skip(1), operators.take(1), operators.switchMap(function (entries) {
|
|
9284
|
-
|
|
9285
|
-
var transferAction = new BasketTransferAction(basketEntry, {}, _this.basketsService, undefined, _this.suppliersService);
|
|
9286
|
-
_this.handleActionErrors(transferAction);
|
|
9287
|
-
return transferAction;
|
|
9288
|
-
});
|
|
9289
|
-
_this.basketSynchroService.addToActionList(transferActions);
|
|
9314
|
+
_this.createTransferAction(entries);
|
|
9290
9315
|
return entries;
|
|
9291
9316
|
})).subscribe();
|
|
9292
9317
|
};
|
|
9318
|
+
BasketTransferService.prototype.createTransferAction = function (entries) {
|
|
9319
|
+
var _this = this;
|
|
9320
|
+
var transferActions = this.filterNewAndUpdatedEntries(entries).map(function (basketEntry) {
|
|
9321
|
+
var transferAction = new BasketTransferAction(basketEntry, {}, _this.basketsService, undefined, _this.suppliersService);
|
|
9322
|
+
_this.handleActionErrors(transferAction);
|
|
9323
|
+
return transferAction;
|
|
9324
|
+
});
|
|
9325
|
+
this.basketSynchroService.addToActionList(transferActions);
|
|
9326
|
+
};
|
|
9293
9327
|
BasketTransferService.prototype.handleActionErrors = function (action) {
|
|
9294
9328
|
var _this = this;
|
|
9295
9329
|
action.onTimeout.pipe(operators.take(1)).subscribe(function () {
|
|
@@ -9340,7 +9374,7 @@
|
|
|
9340
9374
|
};
|
|
9341
9375
|
return BasketTransferService;
|
|
9342
9376
|
}());
|
|
9343
|
-
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), i0__namespace.ɵɵinject(RecipesService), i0__namespace.ɵɵinject(SuppliersService), i0__namespace.ɵɵinject(BasketsSynchronizerService)); };
|
|
9377
|
+
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), i0__namespace.ɵɵinject(RecipesService), i0__namespace.ɵɵinject(SuppliersService), i0__namespace.ɵɵinject(BasketsSynchronizerService), i0__namespace.ɵɵinject(StatesService)); };
|
|
9344
9378
|
BasketTransferService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: BasketTransferService, factory: BasketTransferService.ɵfac, providedIn: 'root' });
|
|
9345
9379
|
(function () {
|
|
9346
9380
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BasketTransferService, [{
|
|
@@ -9348,7 +9382,7 @@
|
|
|
9348
9382
|
args: [{
|
|
9349
9383
|
providedIn: 'root'
|
|
9350
9384
|
}]
|
|
9351
|
-
}], function () { return [{ type: BasketsService }, { type: ContextService }, { type: PointOfSalesService }, { type: i1__namespace.HttpClient }, { type: UserService }, { type: RecipesService }, { type: SuppliersService }, { type: BasketsSynchronizerService }]; }, null);
|
|
9385
|
+
}], function () { return [{ type: BasketsService }, { type: ContextService }, { type: PointOfSalesService }, { type: i1__namespace.HttpClient }, { type: UserService }, { type: RecipesService }, { type: SuppliersService }, { type: BasketsSynchronizerService }, { type: StatesService }]; }, null);
|
|
9352
9386
|
})();
|
|
9353
9387
|
|
|
9354
9388
|
var CampaignStatus = /** @class */ (function (_super) {
|
|
@@ -17129,17 +17163,17 @@
|
|
|
17129
17163
|
var _r28 = i0__namespace.ɵɵreference(23);
|
|
17130
17164
|
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
17131
17165
|
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r2.line.id);
|
|
17132
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction3(
|
|
17166
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction3(26, _c35, ctx_r2.line.hasEntries() || ctx_r2.line.displayMode, ctx_r2.expanded, ctx_r2.selectItem));
|
|
17133
17167
|
i0__namespace.ɵɵadvance(3);
|
|
17134
17168
|
i0__namespace.ɵɵproperty("ngIf", !ctx_r2.uniqueLine && !ctx_r2.line.displayMode);
|
|
17135
17169
|
i0__namespace.ɵɵadvance(2);
|
|
17136
17170
|
i0__namespace.ɵɵproperty("alt", (ctx_r2.line.isRecipe ? "recipe" : "product") + " picture")("src", ctx_r2.line.picture, i0__namespace.ɵɵsanitizeUrl);
|
|
17137
17171
|
i0__namespace.ɵɵadvance(1);
|
|
17138
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(
|
|
17172
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(30, _c36, ctx_r2.line.inlineTag));
|
|
17139
17173
|
i0__namespace.ɵɵadvance(1);
|
|
17140
17174
|
i0__namespace.ɵɵproperty("ngIf", ctx_r2.sponsorised);
|
|
17141
17175
|
i0__namespace.ɵɵadvance(3);
|
|
17142
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(11,
|
|
17176
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(11, 24, ctx_r2.line.title));
|
|
17143
17177
|
i0__namespace.ɵɵadvance(3);
|
|
17144
17178
|
i0__namespace.ɵɵproperty("ngIf", ctx_r2.line.description.length > 0);
|
|
17145
17179
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -17157,7 +17191,7 @@
|
|
|
17157
17191
|
i0__namespace.ɵɵadvance(4);
|
|
17158
17192
|
i0__namespace.ɵɵproperty("ngIf", ctx_r2.line.isRecipe);
|
|
17159
17193
|
i0__namespace.ɵɵadvance(1);
|
|
17160
|
-
i0__namespace.ɵɵproperty("value", ctx_r2.line.count)("minRange", ctx_r2.line.isRecipe ? 1 : 0)("disable", ctx_r2.disableCounter);
|
|
17194
|
+
i0__namespace.ɵɵproperty("debounceTime", 300)("value", ctx_r2.line.count)("minRange", ctx_r2.line.isRecipe ? 1 : 0)("disable", ctx_r2.disableCounter);
|
|
17161
17195
|
i0__namespace.ɵɵadvance(1);
|
|
17162
17196
|
i0__namespace.ɵɵproperty("ngIf", ctx_r2.line.isRecipe);
|
|
17163
17197
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -17239,11 +17273,12 @@
|
|
|
17239
17273
|
fields: { recipe: ['number-of-guests'], ingredients: ['name', 'quantity', 'unit'] }
|
|
17240
17274
|
}).pipe(operators.switchMap(function (recipe) {
|
|
17241
17275
|
_this.legacyRecipe = recipe;
|
|
17242
|
-
var requests = recipe.relationships.ingredients.data.map(function (ing) { return _this.basketsService.basketEntryFromIngredient(ing.id, _this.line.count).pipe(operators.
|
|
17276
|
+
var requests = recipe.relationships.ingredients.data.map(function (ing) { return _this.basketsService.basketEntryFromIngredient(ing.id, _this.line.count).pipe(operators.map(function (entry) {
|
|
17243
17277
|
if (_this.legacyIngredientsEntries === undefined) {
|
|
17244
17278
|
_this.legacyIngredientsEntries = [];
|
|
17245
17279
|
}
|
|
17246
17280
|
_this.legacyIngredientsEntries.push({ ing: ing, entry: entry });
|
|
17281
|
+
return { ing: ing, entry: entry };
|
|
17247
17282
|
})); });
|
|
17248
17283
|
return rxjs.forkJoin(requests);
|
|
17249
17284
|
}));
|
|
@@ -17252,8 +17287,8 @@
|
|
|
17252
17287
|
if (this.line.count === count) {
|
|
17253
17288
|
return;
|
|
17254
17289
|
}
|
|
17255
|
-
this.line.count = count;
|
|
17256
17290
|
if (this.line.hasEntries() || this.line.displayMode) {
|
|
17291
|
+
this.line.count = count;
|
|
17257
17292
|
this.countChanged.emit(this.line);
|
|
17258
17293
|
// Force refresh recipe entries
|
|
17259
17294
|
this.buildEntriesLines(true);
|
|
@@ -17269,9 +17304,26 @@
|
|
|
17269
17304
|
this.removed.emit(this.line);
|
|
17270
17305
|
return;
|
|
17271
17306
|
}
|
|
17272
|
-
this.line.record
|
|
17307
|
+
var newBasketEntry = deepCloneWithClass(this.line.record);
|
|
17308
|
+
newBasketEntry.quantity = count;
|
|
17309
|
+
var updateQuantity = new UpdateIngredientAction(newBasketEntry, {
|
|
17310
|
+
eventTrace: this.eventTrace,
|
|
17311
|
+
recipeId: this.line.id,
|
|
17312
|
+
}, this.basketsService);
|
|
17313
|
+
rxjs.merge(updateQuantity.onTimeout, updateQuantity.onError).pipe(operators.take(1)).subscribe(function () {
|
|
17314
|
+
// Required to refresh basket entry row
|
|
17315
|
+
var previousValue = _this.line.count;
|
|
17316
|
+
_this.line.count = null;
|
|
17317
|
+
_this.cdr.detectChanges();
|
|
17318
|
+
_this.line.count = previousValue;
|
|
17319
|
+
_this.cdr.detectChanges();
|
|
17320
|
+
});
|
|
17321
|
+
this.basketSynchroService.addToActionList([updateQuantity]);
|
|
17322
|
+
updateQuantity.onSuccess.pipe(operators.take(1)).subscribe(function () {
|
|
17323
|
+
_this.line.count = newBasketEntry.quantity;
|
|
17324
|
+
_this.subscriptions.push(_this.basketsService.reloadBasket().subscribe(function () { return _this.cdr.detectChanges(); }));
|
|
17325
|
+
});
|
|
17273
17326
|
mealzSharedAnalytics.sendEntryChangeQuantityEvent(this.path, this.line.record.name, this.line.record.selectedItem.id, this.line.record.selectedItem.attributes['ext-id'], this.line.record.selectedItem.attributes.ean, this.line.record.attributes.quantity.toString(), (_a = this.line.recipe) === null || _a === void 0 ? void 0 : _a.id);
|
|
17274
|
-
this.subscriptions.push(this.line.record.save().pipe(operators.switchMap(function () { return _this.basketsService.reloadBasket(); })).subscribe(function () { return _this.cdr.detectChanges(); }));
|
|
17275
17327
|
};
|
|
17276
17328
|
BasketPreviewLineComponent.prototype.toggleExpanded = function (event) {
|
|
17277
17329
|
if (!this.line.hasEntries() ||
|
|
@@ -17323,10 +17375,13 @@
|
|
|
17323
17375
|
if (countChanged === void 0) { countChanged = false; }
|
|
17324
17376
|
if (this.legacyMode) {
|
|
17325
17377
|
var entries_1 = __spread(this.line.entries.found, this.line.entries.notFound, this.line.entries.oftenDeleted, this.line.entries.removed);
|
|
17326
|
-
this.initRecipesAndIngredients(countChanged).pipe(operators.tap(function () {
|
|
17378
|
+
this.initRecipesAndIngredients(countChanged).pipe(operators.tap(function (refetchedEntries) {
|
|
17327
17379
|
_this.entriesLines$.next(entries_1
|
|
17328
17380
|
.filter(function (entry) { return _this.line.entries.found.map(function (e) { return e.id; }).includes(entry.id); })
|
|
17329
|
-
.map(function (entry) {
|
|
17381
|
+
.map(function (entry) {
|
|
17382
|
+
var foundUpdatedEntry = refetchedEntries.find(function (ie) { return ie.entry.id === entry.id; });
|
|
17383
|
+
return BasketPreviewLine.fromBasketEntry(foundUpdatedEntry.entry, _this.legacyRecipe, foundUpdatedEntry.ing);
|
|
17384
|
+
}));
|
|
17330
17385
|
_this.subscriptions.push(_this.initSponsorisedEntries());
|
|
17331
17386
|
})).subscribe();
|
|
17332
17387
|
}
|
|
@@ -17571,11 +17626,11 @@
|
|
|
17571
17626
|
else {
|
|
17572
17627
|
i18n_33 = $localize(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject([":\u241F1eacd4f46056d28691469ea02279e20c0642e699\u241F8327069019640670106:Calcul des ingr\u00E9dients..."], [":\u241F1eacd4f46056d28691469ea02279e20c0642e699\u241F8327069019640670106:Calcul des ingr\u00E9dients..."])));
|
|
17573
17628
|
}
|
|
17574
|
-
return [[4, "ngIf", "ngIfElse"], ["legacyView", ""], [1, "miam-basket-preview-line", 3, "id"], [1, "miam-basket-preview-line__left", 3, "ngClass"], [1, "miam-basket-preview-line__picture"], [3, "alt", "src", "click", "error"], ["class", "miam-basket-preview-line__counter", 4, "ngIf"], [1, "miam-basket-preview-line__right"], [1, "miam-basket-preview-line__top"], [1, "miam-basket-preview-line__infos"], [1, "miam-basket-preview-line__title", "miam-ds-text", "weight-xxl", "size-m", 3, "click"], [1, "miam-basket-preview-line__product-count", "miam-ds-text", "weight-l", "size-s"], [4, "ngIf"], [3, "selectedOption", "options", "optionSelected", 4, "ngIf"], [1, "miam-basket-preview-line__remove", "miam-ds-button", "ghost", 3, "ngClass", "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/trash.svg", "alt", "remove recipe", 4, "ngIf", "ngIfElse"], ["removeLoader", ""], [1, "miam-basket-preview-line__link", "miam-ds-button", "ghost", 3, "click"], i18n_0, ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/arrow-right.svg", "alt", "arrow right"], [1, "miam-basket-preview-line__counter"], [1, "miam-ds-text", "weight-xxl", "size-m"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter.svg", "alt", "people"], i18n_2, i18n_4, [1, "miam-basket-preview-line__price-label", "miam-ds-text", "weight-xxl", 3, "price"], [1, "miam-basket-preview-line__price-per-person-label", "miam-ds-text", "weight-l", "size-xs"], i18n_6, [3, "price"], i18n_8, [3, "selectedOption", "options", "optionSelected"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/trash.svg", "alt", "remove recipe"], [1, "miam-ds-loader"], [1, "miam-basket-preview-line", "legacy", 3, "id", "ngClass", "click"], [1, "miam-basket-preview-line__item"], [1, "miam-basket-preview-line__item__left"], ["class", "miam-ds-button ghost square miam-basket-preview-line__item__remove", 3, "ngClass", "click", 4, "ngIf"], [1, "miam-basket-preview-line__item__picture"], [1, "miam-basket-preview-line__item__details", 3, "ngClass"], ["class", "miam-basket-preview-line__item__sponsorised", 4, "ngIf"], [1, "miam-basket-preview-line__item__title", 3, "click"], [1, "miam-basket-preview-line__item__description"], [1, "miam-basket-preview-line__item__actions"], ["class", "miam-basket-preview-line__item__showDetails", 3, "ngClass", 4, "ngIf"], ["class", "miam-basket-preview-line__item__showDetails", 4, "ngIf"], ["class", "miam-basket-preview-line__item__change", 3, "click", 4, "ngIf"], ["class", "miam-basket-preview-line__item__inlineTag__container", 4, "ngIf"], [1, "miam-basket-preview-line__item__right"], ["class", "miam-basket-preview-line__item__price", 4, "ngIf", "ngIfElse"], ["pricePerguest", ""], [1, "miam-basket-preview-line__item__count"], ["class", "miam-basket-preview-line__item__count__for", 4, "ngIf"], [3, "value", "minRange", "disable", "valueChange"], ["class", "miam-basket-preview-line__item__count__people", 4, "ngIf"], ["class", "miam-basket-preview-line__add__button", 4, "ngIf"], ["class", "miam-basket-preview-lines", 4, "ngIf"], [1, "miam-ds-button", "ghost", "square", "miam-basket-preview-line__item__remove", 3, "ngClass", "click"], [3, "iconName", "height", "width", 4, "ngIf", "ngIfElse"], [3, "iconName", "height", "width"], [1, "miam-basket-preview-line__item__sponsorised"], i18n_13, ["class", "miam-basket-preview-line__item__description__part", 4, "ngFor", "ngForOf"], i18n_15, [1, "miam-basket-preview-line__item__description__part"], [1, "miam-basket-preview-line__item__showDetails", 3, "ngClass"], i18n_17, i18n_19, [1, "miam-basket-preview-line__item__showDetails"], i18n_22, [1, "miam-basket-preview-line__item__change", 3, "click"], [1, "miam-basket-preview-line__item__change__link", 3, "ngClass"], i18n_24, [1, "miam-basket-preview-line__item__inlineTag__container"], [1, "miam-basket-preview-line__item__inlineTag"], [4, "ngFor", "ngForOf"], [1, "miam-basket-preview-line__item__price"], [3, "recipeId", "serves"], [1, "miam-basket-preview-line__item__count__for"], i18n_27, [1, "miam-basket-preview-line__item__count__people"], i18n_29, i18n_31, [1, "miam-basket-preview-line__add__button"], [1, "m-button-primary", 3, "click"], ["primaryColor", "#fff", 3, "width", "height", "iconName"], [1, "miam-basket-preview-lines"], ["loader", ""], [3, "line", "sponsorised", "displayItemsUnitaryPrice", "originTrace", "blockStates", "legacyMode", "removed", "replaceItem", 4, "ngFor", "ngForOf"], ["mode", "unavailable", 3, "entries", "alwaysExpanded", 4, "ngIf"], ["mode", "oftenDeleted", 3, "entries", "alwaysExpanded", "entryAdded", 4, "ngIf"], ["mode", "removed", 3, "entries", "alwaysExpanded", "reduced", "entryAdded", 4, "ngIf"], [3, "line", "sponsorised", "displayItemsUnitaryPrice", "originTrace", "blockStates", "legacyMode", "removed", "replaceItem"], ["mode", "unavailable", 3, "entries", "alwaysExpanded"], ["mode", "oftenDeleted", 3, "entries", "alwaysExpanded", "entryAdded"], ["mode", "removed", 3, "entries", "alwaysExpanded", "reduced", "entryAdded"], [1, "miam-basket-preview-line__loader-container"], i18n_33];
|
|
17629
|
+
return [[4, "ngIf", "ngIfElse"], ["legacyView", ""], [1, "miam-basket-preview-line", 3, "id"], [1, "miam-basket-preview-line__left", 3, "ngClass"], [1, "miam-basket-preview-line__picture"], [3, "alt", "src", "click", "error"], ["class", "miam-basket-preview-line__counter", 4, "ngIf"], [1, "miam-basket-preview-line__right"], [1, "miam-basket-preview-line__top"], [1, "miam-basket-preview-line__infos"], [1, "miam-basket-preview-line__title", "miam-ds-text", "weight-xxl", "size-m", 3, "click"], [1, "miam-basket-preview-line__product-count", "miam-ds-text", "weight-l", "size-s"], [4, "ngIf"], [3, "selectedOption", "options", "optionSelected", 4, "ngIf"], [1, "miam-basket-preview-line__remove", "miam-ds-button", "ghost", 3, "ngClass", "click"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/trash.svg", "alt", "remove recipe", 4, "ngIf", "ngIfElse"], ["removeLoader", ""], [1, "miam-basket-preview-line__link", "miam-ds-button", "ghost", 3, "click"], i18n_0, ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/arrow-right.svg", "alt", "arrow right"], [1, "miam-basket-preview-line__counter"], [1, "miam-ds-text", "weight-xxl", "size-m"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/recipe-counter.svg", "alt", "people"], i18n_2, i18n_4, [1, "miam-basket-preview-line__price-label", "miam-ds-text", "weight-xxl", 3, "price"], [1, "miam-basket-preview-line__price-per-person-label", "miam-ds-text", "weight-l", "size-xs"], i18n_6, [3, "price"], i18n_8, [3, "selectedOption", "options", "optionSelected"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/icons/trash.svg", "alt", "remove recipe"], [1, "miam-ds-loader"], [1, "miam-basket-preview-line", "legacy", 3, "id", "ngClass", "click"], [1, "miam-basket-preview-line__item"], [1, "miam-basket-preview-line__item__left"], ["class", "miam-ds-button ghost square miam-basket-preview-line__item__remove", 3, "ngClass", "click", 4, "ngIf"], [1, "miam-basket-preview-line__item__picture"], [1, "miam-basket-preview-line__item__details", 3, "ngClass"], ["class", "miam-basket-preview-line__item__sponsorised", 4, "ngIf"], [1, "miam-basket-preview-line__item__title", 3, "click"], [1, "miam-basket-preview-line__item__description"], [1, "miam-basket-preview-line__item__actions"], ["class", "miam-basket-preview-line__item__showDetails", 3, "ngClass", 4, "ngIf"], ["class", "miam-basket-preview-line__item__showDetails", 4, "ngIf"], ["class", "miam-basket-preview-line__item__change", 3, "click", 4, "ngIf"], ["class", "miam-basket-preview-line__item__inlineTag__container", 4, "ngIf"], [1, "miam-basket-preview-line__item__right"], ["class", "miam-basket-preview-line__item__price", 4, "ngIf", "ngIfElse"], ["pricePerguest", ""], [1, "miam-basket-preview-line__item__count"], ["class", "miam-basket-preview-line__item__count__for", 4, "ngIf"], [3, "debounceTime", "value", "minRange", "disable", "valueChange"], ["class", "miam-basket-preview-line__item__count__people", 4, "ngIf"], ["class", "miam-basket-preview-line__add__button", 4, "ngIf"], ["class", "miam-basket-preview-lines", 4, "ngIf"], [1, "miam-ds-button", "ghost", "square", "miam-basket-preview-line__item__remove", 3, "ngClass", "click"], [3, "iconName", "height", "width", 4, "ngIf", "ngIfElse"], [3, "iconName", "height", "width"], [1, "miam-basket-preview-line__item__sponsorised"], i18n_13, ["class", "miam-basket-preview-line__item__description__part", 4, "ngFor", "ngForOf"], i18n_15, [1, "miam-basket-preview-line__item__description__part"], [1, "miam-basket-preview-line__item__showDetails", 3, "ngClass"], i18n_17, i18n_19, [1, "miam-basket-preview-line__item__showDetails"], i18n_22, [1, "miam-basket-preview-line__item__change", 3, "click"], [1, "miam-basket-preview-line__item__change__link", 3, "ngClass"], i18n_24, [1, "miam-basket-preview-line__item__inlineTag__container"], [1, "miam-basket-preview-line__item__inlineTag"], [4, "ngFor", "ngForOf"], [1, "miam-basket-preview-line__item__price"], [3, "recipeId", "serves"], [1, "miam-basket-preview-line__item__count__for"], i18n_27, [1, "miam-basket-preview-line__item__count__people"], i18n_29, i18n_31, [1, "miam-basket-preview-line__add__button"], [1, "m-button-primary", 3, "click"], ["primaryColor", "#fff", 3, "width", "height", "iconName"], [1, "miam-basket-preview-lines"], ["loader", ""], [3, "line", "sponsorised", "displayItemsUnitaryPrice", "originTrace", "blockStates", "legacyMode", "removed", "replaceItem", 4, "ngFor", "ngForOf"], ["mode", "unavailable", 3, "entries", "alwaysExpanded", 4, "ngIf"], ["mode", "oftenDeleted", 3, "entries", "alwaysExpanded", "entryAdded", 4, "ngIf"], ["mode", "removed", 3, "entries", "alwaysExpanded", "reduced", "entryAdded", 4, "ngIf"], [3, "line", "sponsorised", "displayItemsUnitaryPrice", "originTrace", "blockStates", "legacyMode", "removed", "replaceItem"], ["mode", "unavailable", 3, "entries", "alwaysExpanded"], ["mode", "oftenDeleted", 3, "entries", "alwaysExpanded", "entryAdded"], ["mode", "removed", 3, "entries", "alwaysExpanded", "reduced", "entryAdded"], [1, "miam-basket-preview-line__loader-container"], i18n_33];
|
|
17575
17630
|
}, template: function BasketPreviewLineComponent_Template(rf, ctx) {
|
|
17576
17631
|
if (rf & 1) {
|
|
17577
17632
|
i0__namespace.ɵɵtemplate(0, BasketPreviewLineComponent_ng_container_0_Template, 28, 20, "ng-container", 0);
|
|
17578
|
-
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_Template, 30,
|
|
17633
|
+
i0__namespace.ɵɵtemplate(1, BasketPreviewLineComponent_ng_template_1_Template, 30, 32, "ng-template", null, 1, i0__namespace.ɵɵtemplateRefExtractor);
|
|
17579
17634
|
}
|
|
17580
17635
|
if (rf & 2) {
|
|
17581
17636
|
var _r1 = i0__namespace.ɵɵreference(2);
|
|
@@ -17968,7 +18023,7 @@
|
|
|
17968
18023
|
i0__namespace.ɵɵadvance(3);
|
|
17969
18024
|
i0__namespace.ɵɵtextInterpolate1("", i0__namespace.ɵɵpipeBind1(4, 3, ctx_r5.basketEntry.name), " :");
|
|
17970
18025
|
i0__namespace.ɵɵadvance(3);
|
|
17971
|
-
i0__namespace.ɵɵtextInterpolate2(" ", ctx_r5.modifiedIngQty, " ", ctx_r5.ingredient == null ? null : ctx_r5.ingredient.attributes.unit, " ");
|
|
18026
|
+
i0__namespace.ɵɵtextInterpolate2(" ", ctx_r5.modifiedIngQty || (ctx_r5.ingredient == null ? null : ctx_r5.ingredient.quantity), " ", ctx_r5.ingredient == null ? null : ctx_r5.ingredient.attributes.unit, " ");
|
|
17972
18027
|
}
|
|
17973
18028
|
}
|
|
17974
18029
|
function ReplaceItemComponent_div_14_div_19_Template(rf, ctx) {
|
|
@@ -18723,11 +18778,11 @@
|
|
|
18723
18778
|
i0__namespace.ɵɵadvance(1);
|
|
18724
18779
|
i0__namespace.ɵɵproperty("ngIf", ctx_r9.contextService.noSupplier);
|
|
18725
18780
|
i0__namespace.ɵɵadvance(1);
|
|
18726
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx_r9.lines)
|
|
18781
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r9.lines);
|
|
18727
18782
|
i0__namespace.ɵɵadvance(1);
|
|
18728
18783
|
i0__namespace.ɵɵproperty("ngIf", ctx_r9.blockStates == null ? null : ctx_r9.blockStates.value == null ? null : ctx_r9.blockStates.value.overlayOpen);
|
|
18729
18784
|
i0__namespace.ɵɵadvance(1);
|
|
18730
|
-
i0__namespace.ɵɵproperty("ngIf", !i0__namespace.ɵɵpipeBind1(5,
|
|
18785
|
+
i0__namespace.ɵɵproperty("ngIf", !i0__namespace.ɵɵpipeBind1(5, 4, ctx_r9.loading) && (!ctx_r9.lines || ctx_r9.lines.length === 0));
|
|
18731
18786
|
}
|
|
18732
18787
|
}
|
|
18733
18788
|
function BasketPreviewBlockComponent_div_2_ng_container_1_div_5_ng_miam_product_addition_card_1_Template(rf, ctx) {
|
|
@@ -18813,7 +18868,7 @@
|
|
|
18813
18868
|
i0__namespace.ɵɵtemplate(2, BasketPreviewBlockComponent_div_2_ng_container_1_div_2_Template, 5, 2, "div", 8);
|
|
18814
18869
|
i0__namespace.ɵɵtemplate(3, BasketPreviewBlockComponent_div_2_ng_container_1_ng_miam_slider_tabs_3_Template, 1, 1, "ng-miam-slider-tabs", 9);
|
|
18815
18870
|
i0__namespace.ɵɵelementEnd();
|
|
18816
|
-
i0__namespace.ɵɵtemplate(4, BasketPreviewBlockComponent_div_2_ng_container_1_div_4_Template, 6,
|
|
18871
|
+
i0__namespace.ɵɵtemplate(4, BasketPreviewBlockComponent_div_2_ng_container_1_div_4_Template, 6, 6, "div", 10);
|
|
18817
18872
|
i0__namespace.ɵɵtemplate(5, BasketPreviewBlockComponent_div_2_ng_container_1_div_5_Template, 3, 3, "div", 11);
|
|
18818
18873
|
i0__namespace.ɵɵtemplate(6, BasketPreviewBlockComponent_div_2_ng_container_1_div_6_Template, 5, 2, "div", 12);
|
|
18819
18874
|
i0__namespace.ɵɵpipe(7, "async");
|
|
@@ -19025,8 +19080,28 @@
|
|
|
19025
19080
|
}));
|
|
19026
19081
|
};
|
|
19027
19082
|
BasketPreviewBlockComponent.prototype.updateRecipe = function (line) {
|
|
19028
|
-
|
|
19029
|
-
this.
|
|
19083
|
+
var _this = this;
|
|
19084
|
+
this.basketsService.updateRecipesInBasket([line.id], line.count, this.eventTrace, true);
|
|
19085
|
+
this.subscriptions.push(this.recipeService.getIngredientsByRecipeId(line.id).pipe(operators.switchMap(function (recipe) {
|
|
19086
|
+
var requests = recipe.ingredients.map(function (ing) { return _this.basketsService.basketEntryFromIngredient(ing.id, line.count); });
|
|
19087
|
+
return rxjs.forkJoin(requests);
|
|
19088
|
+
})).subscribe(function (basketEntries) {
|
|
19089
|
+
var updateActions = basketEntries
|
|
19090
|
+
.filter(function (basketEntry) { return basketEntry.id !== '-1' && basketEntry.recipesIds.includes(+line.id); })
|
|
19091
|
+
.map(function (basketEntry) {
|
|
19092
|
+
var newBasketEntry = deepCloneWithClass(basketEntry); // Clone for immutability
|
|
19093
|
+
return new UpdateRecipeFromGuestAction(newBasketEntry, {
|
|
19094
|
+
eventTrace: _this.eventTrace,
|
|
19095
|
+
recipeId: line.id,
|
|
19096
|
+
}, _this.basketsService);
|
|
19097
|
+
});
|
|
19098
|
+
_this.basketSynchroService.addToActionList(updateActions);
|
|
19099
|
+
rxjs.merge.apply(void 0, __spread(updateActions.map(function (action) { return action.onTimeout; }), updateActions.map(function (action) { return action.onError; }))).pipe(operators.take(1))
|
|
19100
|
+
.subscribe(function () {
|
|
19101
|
+
_this.loadPreviewAndProductsWhenBasketIsReady();
|
|
19102
|
+
});
|
|
19103
|
+
_this.guestCountChanged.emit(line.count);
|
|
19104
|
+
}));
|
|
19030
19105
|
};
|
|
19031
19106
|
BasketPreviewBlockComponent.prototype.closeOverlay = function () {
|
|
19032
19107
|
if (this.blockStates.getValue() && this.blockStates.getValue().lineComponent) {
|
|
@@ -19190,7 +19265,7 @@
|
|
|
19190
19265
|
else {
|
|
19191
19266
|
i18n_15 = $localize(templateObject_8$6 || (templateObject_8$6 = __makeTemplateObject([":\u241Fbbc408c854684447d02f0dd5b027598d8d31ab18\u241F5055873666849956816:Veuillez s\u00E9lectionner un autre magasin"], [":\u241Fbbc408c854684447d02f0dd5b027598d8d31ab18\u241F5055873666849956816:Veuillez s\u00E9lectionner un autre magasin"])));
|
|
19192
19267
|
}
|
|
19193
|
-
return [[1, "miam-basket-preview-block__anchor"], ["previewBlockTop", ""], ["class", "miam-basket-preview-block", 4, "ngIf", "ngIfElse"], ["cors", ""], ["noPos", ""], [1, "miam-basket-preview-block"], [4, "ngIf", "ngIfElse"], [1, "miam-basket-preview-block__header"], ["class", "miam-basket-preview-block__title miam-ds-text", 3, "ngClass", 4, "ngIf"], ["tabs", i18n_0, 3, "selectedTabIndex", "selectedTabIndexChange", 4, "ngIf"], ["class", "miam-basket-preview-block__lines", 4, "ngIf"], ["class", "miam-basket-preview-block__products", 4, "ngIf"], ["class", "miam-basket-preview-block__lines__loader", 4, "ngIf"], [1, "miam-basket-preview-block__title", "miam-ds-text", 3, "ngClass"], [1, "number"], i18n_2, ["tabs", i18n_0, 3, "selectedTabIndex", "selectedTabIndexChange"], [1, "miam-basket-preview-block__lines"], [4, "ngIf"], [3, "line", "blockStates", "recipesAlwaysExpanded", "itemsAlwaysExpanded", "displayItemsUnitaryPrice", "legacyMode", "originTrace", "ngStyle", "removed", "countChanged", "replaceItem", 4, "ngFor", "ngForOf"
|
|
19268
|
+
return [[1, "miam-basket-preview-block__anchor"], ["previewBlockTop", ""], ["class", "miam-basket-preview-block", 4, "ngIf", "ngIfElse"], ["cors", ""], ["noPos", ""], [1, "miam-basket-preview-block"], [4, "ngIf", "ngIfElse"], [1, "miam-basket-preview-block__header"], ["class", "miam-basket-preview-block__title miam-ds-text", 3, "ngClass", 4, "ngIf"], ["tabs", i18n_0, 3, "selectedTabIndex", "selectedTabIndexChange", 4, "ngIf"], ["class", "miam-basket-preview-block__lines", 4, "ngIf"], ["class", "miam-basket-preview-block__products", 4, "ngIf"], ["class", "miam-basket-preview-block__lines__loader", 4, "ngIf"], [1, "miam-basket-preview-block__title", "miam-ds-text", 3, "ngClass"], [1, "number"], i18n_2, ["tabs", i18n_0, 3, "selectedTabIndex", "selectedTabIndexChange"], [1, "miam-basket-preview-block__lines"], [4, "ngIf"], [3, "line", "blockStates", "recipesAlwaysExpanded", "itemsAlwaysExpanded", "displayItemsUnitaryPrice", "legacyMode", "originTrace", "ngStyle", "removed", "countChanged", "replaceItem", 4, "ngFor", "ngForOf"], [3, "originTrace", "recipe", "ingredient", "basketEntry", "loadOnSelect", "selected", 4, "ngIf"], ["class", "miam-basket-preview-block__lines__not-found", 4, "ngIf"], [3, "line", "blockStates", "recipesAlwaysExpanded", "itemsAlwaysExpanded", "displayItemsUnitaryPrice", "legacyMode", "originTrace", "ngStyle", "removed", "countChanged", "replaceItem"], [3, "originTrace", "recipe", "ingredient", "basketEntry", "loadOnSelect", "selected"], [1, "miam-basket-preview-block__lines__not-found"], i18n_5, i18n_7, [1, "miam-basket-preview-block__products"], [4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "basketEntry", "replaceButtonClicked"], ["class", "miam-basket-preview-block__products-separator", 4, "ngIf"], [1, "miam-basket-preview-block__products-separator"], [1, "miam-basket-preview-block__lines__loader"], i18n_9, i18n_11, [1, "miam-basket-preview-block__noPos"], i18n_13, i18n_15];
|
|
19194
19269
|
}, template: function BasketPreviewBlockComponent_Template(rf, ctx) {
|
|
19195
19270
|
if (rf & 1) {
|
|
19196
19271
|
i0__namespace.ɵɵelement(0, "div", 0, 1);
|
|
@@ -28596,11 +28671,11 @@
|
|
|
28596
28671
|
i0__namespace.ɵɵproperty("recipe", ctx_r6.recipeDetailsService.recipe)("originTrace", ctx_r6.eventTrace);
|
|
28597
28672
|
}
|
|
28598
28673
|
}
|
|
28599
|
-
function
|
|
28674
|
+
function RecipeDetailsComponent_div_0_div_3_img_16_Template(rf, ctx) {
|
|
28600
28675
|
if (rf & 1) {
|
|
28601
28676
|
var _r18_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28602
28677
|
i0__namespace.ɵɵelementStart(0, "img", 39);
|
|
28603
|
-
i0__namespace.ɵɵlistener("error", function
|
|
28678
|
+
i0__namespace.ɵɵlistener("error", function RecipeDetailsComponent_div_0_div_3_img_16_Template_img_error_0_listener($event) { i0__namespace.ɵɵrestoreView(_r18_1); var ctx_r17 = i0__namespace.ɵɵnextContext(3); return ($event.target["src"] = ctx_r17.contextService.defaultRecipePicture); });
|
|
28604
28679
|
i0__namespace.ɵɵelementEnd();
|
|
28605
28680
|
}
|
|
28606
28681
|
if (rf & 2) {
|
|
@@ -28608,7 +28683,7 @@
|
|
|
28608
28683
|
i0__namespace.ɵɵproperty("src", ctx_r7.recipeDetailsService.recipe == null ? null : ctx_r7.recipeDetailsService.recipe.attributes["media-url"], i0__namespace.ɵɵsanitizeUrl);
|
|
28609
28684
|
}
|
|
28610
28685
|
}
|
|
28611
|
-
function
|
|
28686
|
+
function RecipeDetailsComponent_div_0_div_3_youtube_player_17_Template(rf, ctx) {
|
|
28612
28687
|
if (rf & 1) {
|
|
28613
28688
|
i0__namespace.ɵɵelement(0, "youtube-player", 40);
|
|
28614
28689
|
}
|
|
@@ -28617,7 +28692,7 @@
|
|
|
28617
28692
|
i0__namespace.ɵɵproperty("videoId", ctx_r8.recipeDetailsService.recipe.videoId)("width", ctx_r8.playerWidth)("height", ctx_r8.playerHeight)("playerVars", ctx_r8.playerVars);
|
|
28618
28693
|
}
|
|
28619
28694
|
}
|
|
28620
|
-
function
|
|
28695
|
+
function RecipeDetailsComponent_div_0_div_3_div_18_Template(rf, ctx) {
|
|
28621
28696
|
if (rf & 1) {
|
|
28622
28697
|
i0__namespace.ɵɵelementStart(0, "div", 41);
|
|
28623
28698
|
i0__namespace.ɵɵelement(1, "img", 42);
|
|
@@ -28629,11 +28704,11 @@
|
|
|
28629
28704
|
i0__namespace.ɵɵproperty("src", ctx_r9.recipeDetailsService.recipe.filigraneLogoUrl, i0__namespace.ɵɵsanitizeUrl);
|
|
28630
28705
|
}
|
|
28631
28706
|
}
|
|
28632
|
-
function
|
|
28707
|
+
function RecipeDetailsComponent_div_0_div_3_ng_miam_addon_link_20_Template(rf, ctx) {
|
|
28633
28708
|
if (rf & 1) {
|
|
28634
28709
|
var _r20_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28635
28710
|
i0__namespace.ɵɵelementStart(0, "ng-miam-addon-link", 43);
|
|
28636
|
-
i0__namespace.ɵɵlistener("showAddon", function
|
|
28711
|
+
i0__namespace.ɵɵlistener("showAddon", function RecipeDetailsComponent_div_0_div_3_ng_miam_addon_link_20_Template_ng_miam_addon_link_showAddon_0_listener() { i0__namespace.ɵɵrestoreView(_r20_1); var ctx_r19 = i0__namespace.ɵɵnextContext(3); return ctx_r19.toggleAddon(); });
|
|
28637
28712
|
i0__namespace.ɵɵelementEnd();
|
|
28638
28713
|
}
|
|
28639
28714
|
if (rf & 2) {
|
|
@@ -28641,7 +28716,7 @@
|
|
|
28641
28716
|
i0__namespace.ɵɵproperty("hasStorytelling", ctx_r10.sponsorHasStorytelling)("recipe", ctx_r10.recipeDetailsService.recipe);
|
|
28642
28717
|
}
|
|
28643
28718
|
}
|
|
28644
|
-
function
|
|
28719
|
+
function RecipeDetailsComponent_div_0_div_3_ng_miam_like_button_30_Template(rf, ctx) {
|
|
28645
28720
|
if (rf & 1) {
|
|
28646
28721
|
i0__namespace.ɵɵelement(0, "ng-miam-like-button", 38);
|
|
28647
28722
|
}
|
|
@@ -28650,20 +28725,20 @@
|
|
|
28650
28725
|
i0__namespace.ɵɵproperty("recipe", ctx_r11.recipeDetailsService.recipe)("originTrace", ctx_r11.eventTrace);
|
|
28651
28726
|
}
|
|
28652
28727
|
}
|
|
28653
|
-
function
|
|
28728
|
+
function RecipeDetailsComponent_div_0_div_3_ng_miam_store_locator_link_35_Template(rf, ctx) {
|
|
28654
28729
|
if (rf & 1) {
|
|
28655
28730
|
i0__namespace.ɵɵelement(0, "ng-miam-store-locator-link");
|
|
28656
28731
|
}
|
|
28657
28732
|
}
|
|
28658
28733
|
var _c3$1 = function (a0) { return { "hidden": a0 }; };
|
|
28659
|
-
function
|
|
28734
|
+
function RecipeDetailsComponent_div_0_div_3_ng_container_36_Template(rf, ctx) {
|
|
28660
28735
|
if (rf & 1) {
|
|
28661
28736
|
var _r22_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28662
28737
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
28663
28738
|
i0__namespace.ɵɵelement(1, "ng-miam-recipe-details-infos", 44);
|
|
28664
28739
|
i0__namespace.ɵɵelementStart(2, "div", 45);
|
|
28665
28740
|
i0__namespace.ɵɵelementStart(3, "ng-miam-slider-tabs", 46);
|
|
28666
|
-
i0__namespace.ɵɵlistener("selectedTabIndexChange", function
|
|
28741
|
+
i0__namespace.ɵɵlistener("selectedTabIndexChange", function RecipeDetailsComponent_div_0_div_3_ng_container_36_Template_ng_miam_slider_tabs_selectedTabIndexChange_3_listener($event) { i0__namespace.ɵɵrestoreView(_r22_1); var ctx_r21 = i0__namespace.ɵɵnextContext(3); return ctx_r21.activeTabIndex = $event; })("selectedTabIndexChange", function RecipeDetailsComponent_div_0_div_3_ng_container_36_Template_ng_miam_slider_tabs_selectedTabIndexChange_3_listener() { i0__namespace.ɵɵrestoreView(_r22_1); var ctx_r23 = i0__namespace.ɵɵnextContext(3); return ctx_r23.cdr.detectChanges(); });
|
|
28667
28742
|
i0__namespace.ɵɵelementEnd();
|
|
28668
28743
|
i0__namespace.ɵɵelementEnd();
|
|
28669
28744
|
i0__namespace.ɵɵelementContainerEnd();
|
|
@@ -28678,11 +28753,11 @@
|
|
|
28678
28753
|
i0__namespace.ɵɵproperty("selectedTabIndex", ctx_r13.activeTabIndex);
|
|
28679
28754
|
}
|
|
28680
28755
|
}
|
|
28681
|
-
function
|
|
28756
|
+
function RecipeDetailsComponent_div_0_div_3_ng_container_37_ng_miam_products_picker_1_Template(rf, ctx) {
|
|
28682
28757
|
if (rf & 1) {
|
|
28683
28758
|
var _r27_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28684
28759
|
i0__namespace.ɵɵelementStart(0, "ng-miam-products-picker", 49);
|
|
28685
|
-
i0__namespace.ɵɵlistener("closeModal", function
|
|
28760
|
+
i0__namespace.ɵɵlistener("closeModal", function RecipeDetailsComponent_div_0_div_3_ng_container_37_ng_miam_products_picker_1_Template_ng_miam_products_picker_closeModal_0_listener() { i0__namespace.ɵɵrestoreView(_r27_1); var ctx_r26 = i0__namespace.ɵɵnextContext(4); return ctx_r26.close(); })("guestsChange", function RecipeDetailsComponent_div_0_div_3_ng_container_37_ng_miam_products_picker_1_Template_ng_miam_products_picker_guestsChange_0_listener($event) { i0__namespace.ɵɵrestoreView(_r27_1); var ctx_r28 = i0__namespace.ɵɵnextContext(4); return ctx_r28.updateGuests($event); });
|
|
28686
28761
|
i0__namespace.ɵɵelementEnd();
|
|
28687
28762
|
}
|
|
28688
28763
|
if (rf & 2) {
|
|
@@ -28690,11 +28765,11 @@
|
|
|
28690
28765
|
i0__namespace.ɵɵproperty("originTrace", ctx_r24.eventTrace);
|
|
28691
28766
|
}
|
|
28692
28767
|
}
|
|
28693
|
-
function
|
|
28768
|
+
function RecipeDetailsComponent_div_0_div_3_ng_container_37_ng_miam_no_pos_selected_2_Template(rf, ctx) {
|
|
28694
28769
|
if (rf & 1) {
|
|
28695
28770
|
var _r30_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28696
28771
|
i0__namespace.ɵɵelementStart(0, "ng-miam-no-pos-selected", 50);
|
|
28697
|
-
i0__namespace.ɵɵlistener("posSelected", function
|
|
28772
|
+
i0__namespace.ɵɵlistener("posSelected", function RecipeDetailsComponent_div_0_div_3_ng_container_37_ng_miam_no_pos_selected_2_Template_ng_miam_no_pos_selected_posSelected_0_listener() { i0__namespace.ɵɵrestoreView(_r30_1); var ctx_r29 = i0__namespace.ɵɵnextContext(4); return ctx_r29.checkPos(); });
|
|
28698
28773
|
i0__namespace.ɵɵelementEnd();
|
|
28699
28774
|
}
|
|
28700
28775
|
if (rf & 2) {
|
|
@@ -28702,11 +28777,11 @@
|
|
|
28702
28777
|
i0__namespace.ɵɵproperty("invalidPos", ctx_r25.recipeDetailsService.invalidPosDisplay);
|
|
28703
28778
|
}
|
|
28704
28779
|
}
|
|
28705
|
-
function
|
|
28780
|
+
function RecipeDetailsComponent_div_0_div_3_ng_container_37_Template(rf, ctx) {
|
|
28706
28781
|
if (rf & 1) {
|
|
28707
28782
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
28708
|
-
i0__namespace.ɵɵtemplate(1,
|
|
28709
|
-
i0__namespace.ɵɵtemplate(2,
|
|
28783
|
+
i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_ng_container_37_ng_miam_products_picker_1_Template, 1, 1, "ng-miam-products-picker", 47);
|
|
28784
|
+
i0__namespace.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_3_ng_container_37_ng_miam_no_pos_selected_2_Template, 1, 1, "ng-miam-no-pos-selected", 48);
|
|
28710
28785
|
i0__namespace.ɵɵelementContainerEnd();
|
|
28711
28786
|
}
|
|
28712
28787
|
if (rf & 2) {
|
|
@@ -28717,7 +28792,7 @@
|
|
|
28717
28792
|
i0__namespace.ɵɵproperty("ngIf", ctx_r14.recipeDetailsService.noPosDisplay || ctx_r14.recipeDetailsService.invalidPosDisplay);
|
|
28718
28793
|
}
|
|
28719
28794
|
}
|
|
28720
|
-
function
|
|
28795
|
+
function RecipeDetailsComponent_div_0_div_3_div_38_Template(rf, ctx) {
|
|
28721
28796
|
if (rf & 1) {
|
|
28722
28797
|
i0__namespace.ɵɵelementStart(0, "div", 51);
|
|
28723
28798
|
i0__namespace.ɵɵelement(1, "ng-miam-recipe-details-ingredients", 52);
|
|
@@ -28732,25 +28807,25 @@
|
|
|
28732
28807
|
i0__namespace.ɵɵproperty("recipe", ctx_r15.recipeDetailsService.recipe);
|
|
28733
28808
|
}
|
|
28734
28809
|
}
|
|
28735
|
-
function
|
|
28810
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_1_span_7_Template(rf, ctx) {
|
|
28736
28811
|
if (rf & 1) {
|
|
28737
28812
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
28738
28813
|
i0__namespace.ɵɵi18n(1, 65);
|
|
28739
28814
|
i0__namespace.ɵɵelementEnd();
|
|
28740
28815
|
}
|
|
28741
28816
|
}
|
|
28742
|
-
function
|
|
28817
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_1_span_8_Template(rf, ctx) {
|
|
28743
28818
|
if (rf & 1) {
|
|
28744
28819
|
i0__namespace.ɵɵelementStart(0, "span");
|
|
28745
28820
|
i0__namespace.ɵɵi18n(1, 66);
|
|
28746
28821
|
i0__namespace.ɵɵelementEnd();
|
|
28747
28822
|
}
|
|
28748
28823
|
}
|
|
28749
|
-
function
|
|
28824
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_1_Template(rf, ctx) {
|
|
28750
28825
|
if (rf & 1) {
|
|
28751
28826
|
var _r41_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28752
28827
|
i0__namespace.ɵɵelementStart(0, "button", 59);
|
|
28753
|
-
i0__namespace.ɵɵlistener("click", function
|
|
28828
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_1_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r41_1); var ctx_r40 = i0__namespace.ɵɵnextContext(6); return ctx_r40.recipeDetailsService.addAllIngredientsToBasket(ctx_r40.eventTrace); });
|
|
28754
28829
|
i0__namespace.ɵɵelement(1, "img", 60);
|
|
28755
28830
|
i0__namespace.ɵɵelementStart(2, "div", 61);
|
|
28756
28831
|
i0__namespace.ɵɵelementStart(3, "span");
|
|
@@ -28759,18 +28834,16 @@
|
|
|
28759
28834
|
i0__namespace.ɵɵelementStart(5, "span");
|
|
28760
28835
|
i0__namespace.ɵɵtext(6);
|
|
28761
28836
|
i0__namespace.ɵɵelementEnd();
|
|
28762
|
-
i0__namespace.ɵɵtemplate(7,
|
|
28763
|
-
i0__namespace.ɵɵtemplate(8,
|
|
28837
|
+
i0__namespace.ɵɵtemplate(7, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_1_span_7_Template, 2, 0, "span", 35);
|
|
28838
|
+
i0__namespace.ɵɵtemplate(8, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_1_span_8_Template, 2, 0, "span", 35);
|
|
28764
28839
|
i0__namespace.ɵɵelementStart(9, "div", 63);
|
|
28765
28840
|
i0__namespace.ɵɵtext(10, " ( ");
|
|
28766
28841
|
i0__namespace.ɵɵelementStart(11, "span");
|
|
28767
|
-
i0__namespace.ɵɵ
|
|
28768
|
-
i0__namespace.ɵɵ
|
|
28769
|
-
i0__namespace.ɵɵpipe(14, "currency");
|
|
28842
|
+
i0__namespace.ɵɵtext(12);
|
|
28843
|
+
i0__namespace.ɵɵpipe(13, "currency");
|
|
28770
28844
|
i0__namespace.ɵɵelementEnd();
|
|
28771
|
-
i0__namespace.ɵɵelement(
|
|
28772
|
-
i0__namespace.ɵɵ
|
|
28773
|
-
i0__namespace.ɵɵtext(17, " ) ");
|
|
28845
|
+
i0__namespace.ɵɵelement(14, "div", 64);
|
|
28846
|
+
i0__namespace.ɵɵtext(15, " ) ");
|
|
28774
28847
|
i0__namespace.ɵɵelementEnd();
|
|
28775
28848
|
i0__namespace.ɵɵelementEnd();
|
|
28776
28849
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -28784,26 +28857,26 @@
|
|
|
28784
28857
|
i0__namespace.ɵɵadvance(1);
|
|
28785
28858
|
i0__namespace.ɵɵproperty("ngIf", ctx_r36.recipeDetailsService.remainingBasketEntries.length > 1);
|
|
28786
28859
|
i0__namespace.ɵɵadvance(3);
|
|
28787
|
-
i0__namespace.ɵɵclassProp("hidden",
|
|
28788
|
-
i0__namespace.ɵɵadvance(
|
|
28789
|
-
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(
|
|
28860
|
+
i0__namespace.ɵɵclassProp("hidden", ctx_r36.recipeDetailsService.ingredientToBasketLoading$.value);
|
|
28861
|
+
i0__namespace.ɵɵadvance(1);
|
|
28862
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(13, 8, ctx_r36.recipeDetailsService.recipePrice.remaining, ctx_r36.currencyService.code), " ");
|
|
28790
28863
|
i0__namespace.ɵɵadvance(2);
|
|
28791
|
-
i0__namespace.ɵɵclassProp("hidden", !
|
|
28864
|
+
i0__namespace.ɵɵclassProp("hidden", !ctx_r36.recipeDetailsService.ingredientToBasketLoading$.value);
|
|
28792
28865
|
}
|
|
28793
28866
|
}
|
|
28794
|
-
function
|
|
28867
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_3_Template(rf, ctx) {
|
|
28795
28868
|
if (rf & 1) {
|
|
28796
28869
|
i0__namespace.ɵɵelementStart(0, "button", 67);
|
|
28797
28870
|
i0__namespace.ɵɵelement(1, "div", 64);
|
|
28798
28871
|
i0__namespace.ɵɵelementEnd();
|
|
28799
28872
|
}
|
|
28800
28873
|
}
|
|
28801
|
-
function
|
|
28874
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_Template(rf, ctx) {
|
|
28802
28875
|
if (rf & 1) {
|
|
28803
28876
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
28804
|
-
i0__namespace.ɵɵtemplate(1,
|
|
28877
|
+
i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_1_Template, 16, 11, "button", 57);
|
|
28805
28878
|
i0__namespace.ɵɵpipe(2, "async");
|
|
28806
|
-
i0__namespace.ɵɵtemplate(3,
|
|
28879
|
+
i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_button_3_Template, 2, 0, "button", 58);
|
|
28807
28880
|
i0__namespace.ɵɵpipe(4, "async");
|
|
28808
28881
|
i0__namespace.ɵɵelementContainerEnd();
|
|
28809
28882
|
}
|
|
@@ -28815,11 +28888,11 @@
|
|
|
28815
28888
|
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(4, 4, ctx_r34.recipeDetailsService.allIngredientsToBasketLoading$));
|
|
28816
28889
|
}
|
|
28817
28890
|
}
|
|
28818
|
-
function
|
|
28891
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_div_2_button_4_Template(rf, ctx) {
|
|
28819
28892
|
if (rf & 1) {
|
|
28820
28893
|
var _r44_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28821
28894
|
i0__namespace.ɵɵelementStart(0, "button", 72);
|
|
28822
|
-
i0__namespace.ɵɵlistener("click", function
|
|
28895
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_div_2_button_4_Template_button_click_0_listener() { i0__namespace.ɵɵrestoreView(_r44_1); var ctx_r43 = i0__namespace.ɵɵnextContext(6); return ctx_r43.close(true); });
|
|
28823
28896
|
i0__namespace.ɵɵelementStart(1, "span", 73);
|
|
28824
28897
|
i0__namespace.ɵɵi18n(2, 74);
|
|
28825
28898
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -28827,17 +28900,17 @@
|
|
|
28827
28900
|
i0__namespace.ɵɵelementEnd();
|
|
28828
28901
|
}
|
|
28829
28902
|
}
|
|
28830
|
-
function
|
|
28903
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_div_2_Template(rf, ctx) {
|
|
28831
28904
|
if (rf & 1) {
|
|
28832
28905
|
var _r46_1 = i0__namespace.ɵɵgetCurrentView();
|
|
28833
28906
|
i0__namespace.ɵɵelementStart(0, "div", 68);
|
|
28834
28907
|
i0__namespace.ɵɵelementStart(1, "button", 69);
|
|
28835
|
-
i0__namespace.ɵɵlistener("click", function
|
|
28908
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_div_2_Template_button_click_1_listener() { i0__namespace.ɵɵrestoreView(_r46_1); var ctx_r45 = i0__namespace.ɵɵnextContext(5); return ctx_r45.confirm(); });
|
|
28836
28909
|
i0__namespace.ɵɵelementStart(2, "span", 61);
|
|
28837
28910
|
i0__namespace.ɵɵi18n(3, 70);
|
|
28838
28911
|
i0__namespace.ɵɵelementEnd();
|
|
28839
28912
|
i0__namespace.ɵɵelementEnd();
|
|
28840
|
-
i0__namespace.ɵɵtemplate(4,
|
|
28913
|
+
i0__namespace.ɵɵtemplate(4, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_div_2_button_4_Template, 4, 0, "button", 71);
|
|
28841
28914
|
i0__namespace.ɵɵelementEnd();
|
|
28842
28915
|
}
|
|
28843
28916
|
if (rf & 2) {
|
|
@@ -28848,11 +28921,11 @@
|
|
|
28848
28921
|
i0__namespace.ɵɵproperty("ngIf", ctx_r35.contextService.noSupplier);
|
|
28849
28922
|
}
|
|
28850
28923
|
}
|
|
28851
|
-
function
|
|
28924
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_Template(rf, ctx) {
|
|
28852
28925
|
if (rf & 1) {
|
|
28853
28926
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
28854
|
-
i0__namespace.ɵɵtemplate(1,
|
|
28855
|
-
i0__namespace.ɵɵtemplate(2,
|
|
28927
|
+
i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_ng_container_1_Template, 5, 6, "ng-container", 35);
|
|
28928
|
+
i0__namespace.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_div_2_Template, 5, 3, "div", 56);
|
|
28856
28929
|
i0__namespace.ɵɵelementContainerEnd();
|
|
28857
28930
|
}
|
|
28858
28931
|
if (rf & 2) {
|
|
@@ -28863,7 +28936,7 @@
|
|
|
28863
28936
|
i0__namespace.ɵɵproperty("ngIf", ctx_r31.recipeDetailsService.remainingBasketEntries.length === 0);
|
|
28864
28937
|
}
|
|
28865
28938
|
}
|
|
28866
|
-
function
|
|
28939
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_ng_container_2_Template(rf, ctx) {
|
|
28867
28940
|
if (rf & 1) {
|
|
28868
28941
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
28869
28942
|
i0__namespace.ɵɵelement(1, "ng-miam-recipe-pricing", 75);
|
|
@@ -28875,40 +28948,38 @@
|
|
|
28875
28948
|
i0__namespace.ɵɵproperty("recipeId", ctx_r32.recipeDetailsService.recipe.id)("serves", ctx_r32.recipeDetailsService.recipe.modifiedGuests)("fetchPricingOnScroll", false);
|
|
28876
28949
|
}
|
|
28877
28950
|
}
|
|
28878
|
-
function
|
|
28951
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_div_3_Template(rf, ctx) {
|
|
28879
28952
|
if (rf & 1) {
|
|
28880
28953
|
i0__namespace.ɵɵelementStart(0, "div", 76);
|
|
28881
28954
|
i0__namespace.ɵɵelementStart(1, "div", 77);
|
|
28882
28955
|
i0__namespace.ɵɵelement(2, "ng-miam-price", 78);
|
|
28883
28956
|
i0__namespace.ɵɵpipe(3, "async");
|
|
28884
28957
|
i0__namespace.ɵɵpipe(4, "async");
|
|
28885
|
-
i0__namespace.ɵɵpipe(5, "
|
|
28886
|
-
i0__namespace.ɵɵ
|
|
28887
|
-
i0__namespace.ɵɵ
|
|
28958
|
+
i0__namespace.ɵɵpipe(5, "currency");
|
|
28959
|
+
i0__namespace.ɵɵelement(6, "div", 79);
|
|
28960
|
+
i0__namespace.ɵɵpipe(7, "async");
|
|
28888
28961
|
i0__namespace.ɵɵpipe(8, "async");
|
|
28889
|
-
i0__namespace.ɵɵpipe(9, "async");
|
|
28890
|
-
i0__namespace.ɵɵpipe(10, "async");
|
|
28891
28962
|
i0__namespace.ɵɵelementEnd();
|
|
28892
|
-
i0__namespace.ɵɵelementStart(
|
|
28893
|
-
i0__namespace.ɵɵi18n(
|
|
28963
|
+
i0__namespace.ɵɵelementStart(9, "span", 80);
|
|
28964
|
+
i0__namespace.ɵɵi18n(10, 81);
|
|
28894
28965
|
i0__namespace.ɵɵelementEnd();
|
|
28895
28966
|
i0__namespace.ɵɵelementEnd();
|
|
28896
28967
|
}
|
|
28897
28968
|
if (rf & 2) {
|
|
28898
28969
|
var ctx_r33 = i0__namespace.ɵɵnextContext(4);
|
|
28899
28970
|
i0__namespace.ɵɵadvance(2);
|
|
28900
|
-
i0__namespace.ɵɵclassProp("hidden",
|
|
28901
|
-
i0__namespace.ɵɵproperty("price", i0__namespace.ɵɵpipeBind2(
|
|
28902
|
-
i0__namespace.ɵɵadvance(
|
|
28903
|
-
i0__namespace.ɵɵclassProp("hidden", !(
|
|
28971
|
+
i0__namespace.ɵɵclassProp("hidden", ctx_r33.recipeDetailsService.ingredientToBasketLoading$.value || i0__namespace.ɵɵpipeBind1(3, 5, ctx_r33.recipeDetailsService.updateIngredientFromBasketLoading$) || i0__namespace.ɵɵpipeBind1(4, 7, ctx_r33.basketSynchroService.hasPendingActions()));
|
|
28972
|
+
i0__namespace.ɵɵproperty("price", i0__namespace.ɵɵpipeBind2(5, 9, ctx_r33.recipeDetailsService.recipePrice.inBasket, ctx_r33.currencyService.code));
|
|
28973
|
+
i0__namespace.ɵɵadvance(4);
|
|
28974
|
+
i0__namespace.ɵɵclassProp("hidden", !(ctx_r33.recipeDetailsService.ingredientToBasketLoading$.value || i0__namespace.ɵɵpipeBind1(7, 12, ctx_r33.recipeDetailsService.updateIngredientFromBasketLoading$) || i0__namespace.ɵɵpipeBind1(8, 14, ctx_r33.basketSynchroService.hasPendingActions())));
|
|
28904
28975
|
}
|
|
28905
28976
|
}
|
|
28906
|
-
function
|
|
28977
|
+
function RecipeDetailsComponent_div_0_div_3_div_39_Template(rf, ctx) {
|
|
28907
28978
|
if (rf & 1) {
|
|
28908
28979
|
i0__namespace.ɵɵelementStart(0, "div", 54);
|
|
28909
|
-
i0__namespace.ɵɵtemplate(1,
|
|
28910
|
-
i0__namespace.ɵɵtemplate(2,
|
|
28911
|
-
i0__namespace.ɵɵtemplate(3,
|
|
28980
|
+
i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_1_Template, 3, 2, "ng-container", 35);
|
|
28981
|
+
i0__namespace.ɵɵtemplate(2, RecipeDetailsComponent_div_0_div_3_div_39_ng_container_2_Template, 2, 3, "ng-container", 35);
|
|
28982
|
+
i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_div_39_div_3_Template, 11, 16, "div", 55);
|
|
28912
28983
|
i0__namespace.ɵɵelementEnd();
|
|
28913
28984
|
}
|
|
28914
28985
|
if (rf & 2) {
|
|
@@ -28946,46 +29017,45 @@
|
|
|
28946
29017
|
i0__namespace.ɵɵlistener("valueChange", function RecipeDetailsComponent_div_0_div_3_Template_ng_miam_counter_input_valueChange_12_listener($event) { i0__namespace.ɵɵrestoreView(_r48_1); var ctx_r50 = i0__namespace.ɵɵnextContext(2); return ctx_r50.updateGuests($event); });
|
|
28947
29018
|
i0__namespace.ɵɵpipe(13, "async");
|
|
28948
29019
|
i0__namespace.ɵɵpipe(14, "async");
|
|
28949
|
-
i0__namespace.ɵɵ
|
|
28950
|
-
i0__namespace.ɵɵtext(16, " > ");
|
|
29020
|
+
i0__namespace.ɵɵtext(15, " > ");
|
|
28951
29021
|
i0__namespace.ɵɵelementEnd();
|
|
28952
29022
|
i0__namespace.ɵɵelementEnd();
|
|
28953
|
-
i0__namespace.ɵɵtemplate(
|
|
28954
|
-
i0__namespace.ɵɵtemplate(
|
|
28955
|
-
i0__namespace.ɵɵtemplate(
|
|
29023
|
+
i0__namespace.ɵɵtemplate(16, RecipeDetailsComponent_div_0_div_3_img_16_Template, 1, 1, "img", 19);
|
|
29024
|
+
i0__namespace.ɵɵtemplate(17, RecipeDetailsComponent_div_0_div_3_youtube_player_17_Template, 1, 4, "youtube-player", 20);
|
|
29025
|
+
i0__namespace.ɵɵtemplate(18, RecipeDetailsComponent_div_0_div_3_div_18_Template, 2, 1, "div", 21);
|
|
28956
29026
|
i0__namespace.ɵɵelementEnd();
|
|
28957
|
-
i0__namespace.ɵɵelementStart(
|
|
28958
|
-
i0__namespace.ɵɵtemplate(
|
|
28959
|
-
i0__namespace.ɵɵelement(
|
|
29027
|
+
i0__namespace.ɵɵelementStart(19, "div", 22);
|
|
29028
|
+
i0__namespace.ɵɵtemplate(20, RecipeDetailsComponent_div_0_div_3_ng_miam_addon_link_20_Template, 1, 2, "ng-miam-addon-link", 23);
|
|
29029
|
+
i0__namespace.ɵɵelement(21, "hr", 24);
|
|
28960
29030
|
i0__namespace.ɵɵelementEnd();
|
|
28961
|
-
i0__namespace.ɵɵelementStart(
|
|
28962
|
-
i0__namespace.ɵɵelementStart(
|
|
28963
|
-
i0__namespace.ɵɵelementStart(
|
|
28964
|
-
i0__namespace.ɵɵelementStart(
|
|
28965
|
-
i0__namespace.ɵɵlistener("click", function
|
|
28966
|
-
i0__namespace.ɵɵelement(
|
|
29031
|
+
i0__namespace.ɵɵelementStart(22, "div", 25);
|
|
29032
|
+
i0__namespace.ɵɵelementStart(23, "div", 26);
|
|
29033
|
+
i0__namespace.ɵɵelementStart(24, "div", 27);
|
|
29034
|
+
i0__namespace.ɵɵelementStart(25, "button", 28);
|
|
29035
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_25_listener() { i0__namespace.ɵɵrestoreView(_r48_1); var ctx_r51 = i0__namespace.ɵɵnextContext(2); return ctx_r51.close(); });
|
|
29036
|
+
i0__namespace.ɵɵelement(26, "img", 29);
|
|
28967
29037
|
i0__namespace.ɵɵelementEnd();
|
|
28968
29038
|
i0__namespace.ɵɵelementEnd();
|
|
28969
|
-
i0__namespace.ɵɵelementStart(
|
|
28970
|
-
i0__namespace.ɵɵtext(
|
|
29039
|
+
i0__namespace.ɵɵelementStart(27, "span", 30);
|
|
29040
|
+
i0__namespace.ɵɵtext(28);
|
|
28971
29041
|
i0__namespace.ɵɵelementEnd();
|
|
28972
|
-
i0__namespace.ɵɵelementStart(
|
|
28973
|
-
i0__namespace.ɵɵtemplate(
|
|
28974
|
-
i0__namespace.ɵɵpipe(
|
|
28975
|
-
i0__namespace.ɵɵelementStart(
|
|
28976
|
-
i0__namespace.ɵɵelementStart(
|
|
28977
|
-
i0__namespace.ɵɵlistener("click", function
|
|
28978
|
-
i0__namespace.ɵɵelement(
|
|
29042
|
+
i0__namespace.ɵɵelementStart(29, "div", 31);
|
|
29043
|
+
i0__namespace.ɵɵtemplate(30, RecipeDetailsComponent_div_0_div_3_ng_miam_like_button_30_Template, 1, 2, "ng-miam-like-button", 17);
|
|
29044
|
+
i0__namespace.ɵɵpipe(31, "async");
|
|
29045
|
+
i0__namespace.ɵɵelementStart(32, "div", 32);
|
|
29046
|
+
i0__namespace.ɵɵelementStart(33, "button", 33);
|
|
29047
|
+
i0__namespace.ɵɵlistener("click", function RecipeDetailsComponent_div_0_div_3_Template_button_click_33_listener() { i0__namespace.ɵɵrestoreView(_r48_1); var ctx_r52 = i0__namespace.ɵɵnextContext(2); return ctx_r52.close(); });
|
|
29048
|
+
i0__namespace.ɵɵelement(34, "img", 34);
|
|
28979
29049
|
i0__namespace.ɵɵelementEnd();
|
|
28980
29050
|
i0__namespace.ɵɵelementEnd();
|
|
28981
29051
|
i0__namespace.ɵɵelementEnd();
|
|
28982
29052
|
i0__namespace.ɵɵelementEnd();
|
|
28983
|
-
i0__namespace.ɵɵtemplate(
|
|
29053
|
+
i0__namespace.ɵɵtemplate(35, RecipeDetailsComponent_div_0_div_3_ng_miam_store_locator_link_35_Template, 1, 0, "ng-miam-store-locator-link", 35);
|
|
28984
29054
|
i0__namespace.ɵɵelementEnd();
|
|
28985
|
-
i0__namespace.ɵɵtemplate(
|
|
28986
|
-
i0__namespace.ɵɵtemplate(
|
|
28987
|
-
i0__namespace.ɵɵtemplate(
|
|
28988
|
-
i0__namespace.ɵɵtemplate(
|
|
29055
|
+
i0__namespace.ɵɵtemplate(36, RecipeDetailsComponent_div_0_div_3_ng_container_36_Template, 4, 5, "ng-container", 35);
|
|
29056
|
+
i0__namespace.ɵɵtemplate(37, RecipeDetailsComponent_div_0_div_3_ng_container_37_Template, 3, 2, "ng-container", 35);
|
|
29057
|
+
i0__namespace.ɵɵtemplate(38, RecipeDetailsComponent_div_0_div_3_div_38_Template, 3, 2, "div", 36);
|
|
29058
|
+
i0__namespace.ɵɵtemplate(39, RecipeDetailsComponent_div_0_div_3_div_39_Template, 4, 5, "div", 37);
|
|
28989
29059
|
i0__namespace.ɵɵelementEnd();
|
|
28990
29060
|
}
|
|
28991
29061
|
if (rf & 2) {
|
|
@@ -28995,8 +29065,8 @@
|
|
|
28995
29065
|
i0__namespace.ɵɵadvance(9);
|
|
28996
29066
|
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(11, 20, ctx_r4.userService.isLogged$));
|
|
28997
29067
|
i0__namespace.ɵɵadvance(2);
|
|
28998
|
-
i0__namespace.ɵɵproperty("floating", true)("value", ctx_r4.recipeDetailsService.recipe.modifiedGuests)("minRange", 1)("debounceTime", 300)("disable",
|
|
28999
|
-
i0__namespace.ɵɵadvance(
|
|
29068
|
+
i0__namespace.ɵɵproperty("floating", true)("value", ctx_r4.recipeDetailsService.recipe.modifiedGuests)("minRange", 1)("debounceTime", 300)("disable", ctx_r4.recipeDetailsService.ingredientToBasketLoading$.value || i0__namespace.ɵɵpipeBind1(13, 22, ctx_r4.recipeDetailsService.updateIngredientFromBasketLoading$) || i0__namespace.ɵɵpipeBind1(14, 24, ctx_r4.basketSynchroService.hasPendingActions()));
|
|
29069
|
+
i0__namespace.ɵɵadvance(4);
|
|
29000
29070
|
i0__namespace.ɵɵproperty("ngIf", !ctx_r4.showVideo);
|
|
29001
29071
|
i0__namespace.ɵɵadvance(1);
|
|
29002
29072
|
i0__namespace.ɵɵproperty("ngIf", ctx_r4.showVideo && ctx_r4.playerWidth);
|
|
@@ -29009,7 +29079,7 @@
|
|
|
29009
29079
|
i0__namespace.ɵɵadvance(5);
|
|
29010
29080
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r4.recipeDetailsService.recipe == null ? null : ctx_r4.recipeDetailsService.recipe.attributes["title"], " ");
|
|
29011
29081
|
i0__namespace.ɵɵadvance(2);
|
|
29012
|
-
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(
|
|
29082
|
+
i0__namespace.ɵɵproperty("ngIf", i0__namespace.ɵɵpipeBind1(31, 26, ctx_r4.userService.isLogged$) && !ctx_r4.contextService.noSupplier);
|
|
29013
29083
|
i0__namespace.ɵɵadvance(5);
|
|
29014
29084
|
i0__namespace.ɵɵproperty("ngIf", ctx_r4.contextService.noSupplier);
|
|
29015
29085
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -29027,7 +29097,7 @@
|
|
|
29027
29097
|
i0__namespace.ɵɵelementStart(0, "div", 3);
|
|
29028
29098
|
i0__namespace.ɵɵtemplate(1, RecipeDetailsComponent_div_0_div_1_Template, 1, 0, "div", 4);
|
|
29029
29099
|
i0__namespace.ɵɵpipe(2, "async");
|
|
29030
|
-
i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_Template,
|
|
29100
|
+
i0__namespace.ɵɵtemplate(3, RecipeDetailsComponent_div_0_div_3_Template, 40, 28, "div", 5);
|
|
29031
29101
|
i0__namespace.ɵɵpipe(4, "async");
|
|
29032
29102
|
i0__namespace.ɵɵelementEnd();
|
|
29033
29103
|
}
|