ng-miam 10.0.4 → 10.1.0
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 +111 -68
- 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/_services/analytics.service.js +39 -19
- package/esm2015/lib/_services/baskets.service.js +5 -3
- package/esm2015/lib/_services/context.service.js +15 -7
- package/esm2015/lib/_services/new-recipe-details.service.js +10 -1
- package/esm2015/lib/_services/no-supplier-add-to-cart-cta.service.js +52 -0
- package/esm2015/lib/_services/replace-item.service.js +4 -7
- package/esm2015/lib/_types/builded/mealz-internal-interface.js +1 -1
- package/esm2015/lib/_web-components/index.js +2 -2
- package/esm2015/lib/_web-components/no-supplier-add-to-cart-cta/no-supplier-add-to-cart-cta.component.js +53 -0
- package/esm2015/lib/_web-components/web-components.module.js +6 -6
- package/esm2015/lib/environments/version.js +2 -2
- package/fesm2015/ng-miam.js +105 -62
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/analytics.service.d.ts.map +1 -1
- package/lib/_services/baskets.service.d.ts.map +1 -1
- package/lib/_services/context.service.d.ts.map +1 -1
- package/lib/_services/new-recipe-details.service.d.ts.map +1 -1
- package/lib/_services/{add-to-cart-cta.service.d.ts → no-supplier-add-to-cart-cta.service.d.ts} +5 -5
- package/lib/_services/no-supplier-add-to-cart-cta.service.d.ts.map +1 -0
- package/lib/_services/replace-item.service.d.ts +0 -1
- package/lib/_services/replace-item.service.d.ts.map +1 -1
- package/lib/_types/builded/mealz-internal-interface.d.ts +13 -0
- package/lib/_types/builded/mealz-internal-interface.d.ts.map +1 -1
- package/lib/_web-components/index.d.ts +1 -1
- package/lib/_web-components/index.d.ts.map +1 -1
- package/lib/_web-components/no-supplier-add-to-cart-cta/no-supplier-add-to-cart-cta.component.d.ts +19 -0
- package/lib/_web-components/no-supplier-add-to-cart-cta/no-supplier-add-to-cart-cta.component.d.ts.map +1 -0
- package/lib/_web-components/web-components.module.d.ts +4 -4
- package/lib/_web-components/web-components.module.d.ts.map +1 -1
- package/lib/environments/version.d.ts +1 -1
- package/package.json +1 -1
- package/esm2015/lib/_services/add-to-cart-cta.service.js +0 -46
- package/esm2015/lib/_web-components/add-to-cart-cta/add-to-cart-cta.component.js +0 -52
- package/lib/_services/add-to-cart-cta.service.d.ts.map +0 -1
- package/lib/_web-components/add-to-cart-cta/add-to-cart-cta.component.d.ts +0 -18
- package/lib/_web-components/add-to-cart-cta/add-to-cart-cta.component.d.ts.map +0 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -3435,7 +3435,7 @@
|
|
|
3435
3435
|
EventJourney["EMPTY"] = "";
|
|
3436
3436
|
})(EventJourney || (EventJourney = {}));
|
|
3437
3437
|
|
|
3438
|
-
var VERSION = "10.0
|
|
3438
|
+
var VERSION = "10.1.0"; // TODO: replace by ##VERSION## and update it in the CI/CD
|
|
3439
3439
|
|
|
3440
3440
|
var ContextRegistryService = /** @class */ (function () {
|
|
3441
3441
|
function ContextRegistryService() {
|
|
@@ -3580,26 +3580,46 @@
|
|
|
3580
3580
|
var detectedJourney = journey !== null && journey !== void 0 ? journey : detectJourney();
|
|
3581
3581
|
var isBulk = actions.length > 1;
|
|
3582
3582
|
actions.forEach(function (action) {
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3583
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3584
|
+
try {
|
|
3585
|
+
var params = action.params;
|
|
3586
|
+
// Determine add_source: replacement if previousItem exists, otherwise unit or bulk based on actions count
|
|
3587
|
+
var addSource = void 0;
|
|
3588
|
+
if (params.previousItem) {
|
|
3589
|
+
addSource = 'replacement';
|
|
3590
|
+
}
|
|
3591
|
+
else if (isBulk) {
|
|
3592
|
+
addSource = 'bulk';
|
|
3593
|
+
}
|
|
3594
|
+
else {
|
|
3595
|
+
addSource = 'unit';
|
|
3596
|
+
}
|
|
3597
|
+
// Legacy flows (from-ingredient / replacement) provide a basketEntry.
|
|
3598
|
+
var basketEntry = params.basketEntry;
|
|
3599
|
+
// ADD_ITEM flows only provide an `item` on params.
|
|
3600
|
+
var itemFromParams = params.item;
|
|
3601
|
+
var item = (basketEntry === null || basketEntry === void 0 ? void 0 : basketEntry.selectedItem) || itemFromParams;
|
|
3602
|
+
if (!item) {
|
|
3603
|
+
mealzError('[Mealz] sendAddProductsEvents - missing item/basketEntry in action params', { action: action });
|
|
3604
|
+
return;
|
|
3605
|
+
}
|
|
3606
|
+
var entryName = (_c = (_a = basketEntry === null || basketEntry === void 0 ? void 0 : basketEntry.name) !== null && _a !== void 0 ? _a : (_b = item.attributes) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '';
|
|
3607
|
+
var quantity = (_e = (_d = basketEntry === null || basketEntry === void 0 ? void 0 : basketEntry.quantity) !== null && _d !== void 0 ? _d : params.quantity) !== null && _e !== void 0 ? _e : 1;
|
|
3608
|
+
var recipeId = (_f = params.recipeId) !== null && _f !== void 0 ? _f : null;
|
|
3609
|
+
var originPath = (_h = (_g = params.eventTrace) === null || _g === void 0 ? void 0 : _g.originPath) !== null && _h !== void 0 ? _h : '';
|
|
3610
|
+
_this.sendEvent('entry.added', originPath, {
|
|
3611
|
+
entry_name: entryName,
|
|
3612
|
+
item_id: item.id,
|
|
3613
|
+
ext_item_id: (_j = item.attributes) === null || _j === void 0 ? void 0 : _j['ext-id'],
|
|
3614
|
+
item_ean: item.ean,
|
|
3615
|
+
product_quantity: quantity.toString(),
|
|
3616
|
+
recipe_id: recipeId,
|
|
3617
|
+
add_source: addSource
|
|
3618
|
+
}, detectedJourney);
|
|
3590
3619
|
}
|
|
3591
|
-
|
|
3592
|
-
|
|
3620
|
+
catch (error) {
|
|
3621
|
+
mealzError('[Mealz] sendAddProductsEvents - unexpected error while sending analytics', { error: error, action: action });
|
|
3593
3622
|
}
|
|
3594
|
-
_this.sendEvent('entry.added', action.params.eventTrace.originPath, {
|
|
3595
|
-
entry_name: action.params.basketEntry.name,
|
|
3596
|
-
item_id: action.params.basketEntry.selectedItem.id,
|
|
3597
|
-
ext_item_id: action.params.basketEntry.selectedItem.attributes['ext-id'],
|
|
3598
|
-
item_ean: action.params.basketEntry.selectedItem.ean,
|
|
3599
|
-
product_quantity: action.params.basketEntry.quantity.toString(),
|
|
3600
|
-
recipe_id: action.params.recipeId,
|
|
3601
|
-
add_source: addSource
|
|
3602
|
-
}, detectedJourney);
|
|
3603
3623
|
});
|
|
3604
3624
|
};
|
|
3605
3625
|
AnalyticsService.prototype.sendRemoveProductsEvents = function (actions, journey) {
|
|
@@ -6673,8 +6693,10 @@
|
|
|
6673
6693
|
? 'item-replacement'
|
|
6674
6694
|
: 'meals-space-recipe-details';
|
|
6675
6695
|
_this.analyticsService.sendAddProductsEvents(itemsToAdd, journey);
|
|
6676
|
-
}), operators.switchMap(function () { return _this.reloadBasket(); }), operators.switchMap(function () { return rxjs.of(null); }),
|
|
6677
|
-
|
|
6696
|
+
}), operators.switchMap(function () { return _this.reloadBasket(); }), operators.switchMap(function () { return rxjs.of(null); }), operators.catchError(function (error) {
|
|
6697
|
+
mealzDebug('[BasketsService] addItemsToBasket - error occurred', { error: error, itemsToAdd: itemsToAdd });
|
|
6698
|
+
return rxjs.of(null);
|
|
6699
|
+
}));
|
|
6678
6700
|
};
|
|
6679
6701
|
/**
|
|
6680
6702
|
* Removes the specified ingredients from the basket HTTP request.
|
|
@@ -9611,6 +9633,7 @@
|
|
|
9611
9633
|
*/
|
|
9612
9634
|
ReplaceItemService.prototype.selectItem = function (item) {
|
|
9613
9635
|
var _this = this;
|
|
9636
|
+
var _a, _b;
|
|
9614
9637
|
var deletedBasketEntry = deepCloneWithClass(this.basketEntry);
|
|
9615
9638
|
deletedBasketEntry.quantity = 0;
|
|
9616
9639
|
deletedBasketEntry.selectedItem.extId = this.previousItem.extId;
|
|
@@ -9619,7 +9642,7 @@
|
|
|
9619
9642
|
_this.rollbackReplace();
|
|
9620
9643
|
});
|
|
9621
9644
|
this.basketSynchroService.addToActionList([removeIngredient]);
|
|
9622
|
-
var guests = +this.recipe.modifiedGuests || +this.recipe.guests || 4;
|
|
9645
|
+
var guests = +((_a = this.recipe) === null || _a === void 0 ? void 0 : _a.modifiedGuests) || +((_b = this.recipe) === null || _b === void 0 ? void 0 : _b.guests) || 4;
|
|
9623
9646
|
return (this.ingredient && this.recipe ?
|
|
9624
9647
|
this.basketsService.basketEntryFromIngredient(this.ingredient.id, guests, true, item.id) :
|
|
9625
9648
|
rxjs.of(this.basketEntry)).pipe(operators.switchMap(function (newEntry) {
|
|
@@ -9647,13 +9670,9 @@
|
|
|
9647
9670
|
this.replaceProductFromPreviewOpen$.next(state ? this.basketEntry : null);
|
|
9648
9671
|
};
|
|
9649
9672
|
ReplaceItemService.prototype.changeAdditionModalState = function (state) {
|
|
9650
|
-
this.addProductMode =
|
|
9673
|
+
this.addProductMode = state;
|
|
9651
9674
|
this.additionModalOpen$.next(state);
|
|
9652
9675
|
};
|
|
9653
|
-
ReplaceItemService.prototype.showProductSection = function () {
|
|
9654
|
-
this.productAdded$.next('');
|
|
9655
|
-
this.changeAdditionModalState(false);
|
|
9656
|
-
};
|
|
9657
9676
|
/**
|
|
9658
9677
|
* Replaces the selected item in the given basket entry with the given item.
|
|
9659
9678
|
* If the basket entry currently has a selected item, it will be removed.
|
|
@@ -10501,6 +10520,15 @@
|
|
|
10501
10520
|
this.checkIfPosIsInitializedAndValid();
|
|
10502
10521
|
}
|
|
10503
10522
|
this.recipe = recipe;
|
|
10523
|
+
// When called outside the usual recipe display flow (e.g. directly from
|
|
10524
|
+
// ContextService.addAllIngredientsFromRecipeId), the recipe instance coming
|
|
10525
|
+
// from RecipesService.get() may not have modifiedGuests set. In the normal
|
|
10526
|
+
// UI flow, RecipesService.displayObject() ensures modifiedGuests is
|
|
10527
|
+
// initialized before emitting displayedRecipe$. We mirror that behavior here
|
|
10528
|
+
// so downstream logic (pricing, basket actions, etc.) always has a value.
|
|
10529
|
+
if (!this.recipe.modifiedGuests) {
|
|
10530
|
+
this.recipe.modifiedGuests = +this.recipe.guests || 0;
|
|
10531
|
+
}
|
|
10504
10532
|
this.recipeDetailsProductsService.recipeId = this.recipe.id;
|
|
10505
10533
|
this.recipeDetailsProductsPlannerService.setRecipe(this.recipe.id, +this.recipe.modifiedGuests);
|
|
10506
10534
|
var loadingObservable;
|
|
@@ -11137,6 +11165,7 @@
|
|
|
11137
11165
|
},
|
|
11138
11166
|
basket: {
|
|
11139
11167
|
recipePricesInBasket$: function () { return _this.basketsService.recipePricesInBasket$(); },
|
|
11168
|
+
guestsForRecipe: function (recipeId) { return _this.basketsService.guestsForRecipe(recipeId); },
|
|
11140
11169
|
removeRecipe: function (recipeId, analyticsPath) { return _this.basketUtilsService.removeRecipe(recipeId, analyticsPath); },
|
|
11141
11170
|
buildPreview: function () { return _this.basketUtilsService.buildPreview(); },
|
|
11142
11171
|
basketPreviewState$: this.basketUtilsService.basketPreviewState$,
|
|
@@ -11252,7 +11281,8 @@
|
|
|
11252
11281
|
removeProduct: function (basketEntry, path) {
|
|
11253
11282
|
var eventTrace = { originPath: path, props: {} };
|
|
11254
11283
|
_this.basketUtilsService.removeProduct(basketEntry, eventTrace);
|
|
11255
|
-
}
|
|
11284
|
+
},
|
|
11285
|
+
entryIsBeingUpdated: function (entryId) { return _this.basketsService.entryIsBeingUpdated(entryId); },
|
|
11256
11286
|
},
|
|
11257
11287
|
pos: {
|
|
11258
11288
|
currentPos: function () { return _this.posService.pos$; },
|
|
@@ -11285,6 +11315,7 @@
|
|
|
11285
11315
|
},
|
|
11286
11316
|
productAddition: {
|
|
11287
11317
|
open: function () { return _this.replaceItemService.changeAdditionModalState(true); },
|
|
11318
|
+
close: function () { return _this.replaceItemService.changeAdditionModalState(false); },
|
|
11288
11319
|
productAdded$: this.replaceItemService.productAdded$
|
|
11289
11320
|
},
|
|
11290
11321
|
productReplacement: {
|
|
@@ -11330,17 +11361,17 @@
|
|
|
11330
11361
|
})); }
|
|
11331
11362
|
},
|
|
11332
11363
|
noSupplier: {
|
|
11333
|
-
addRecipeToBasketFromIdAndOpenPreview: function (recipeId) {
|
|
11364
|
+
addRecipeToBasketFromIdAndOpenPreview: function (recipeId, guests) {
|
|
11334
11365
|
if (localStorage.getItem('_miam/noSupplier/posId')) {
|
|
11335
11366
|
// if a store has been set
|
|
11336
|
-
_this.addAllIngredientsFromRecipeId(recipeId).subscribe();
|
|
11367
|
+
_this.addAllIngredientsFromRecipeId(recipeId, guests).subscribe();
|
|
11337
11368
|
}
|
|
11338
11369
|
else {
|
|
11339
11370
|
// if no store has been set
|
|
11340
11371
|
_this.displaySupplierSelector$.next(true);
|
|
11341
11372
|
// Wait for the store to be selected
|
|
11342
11373
|
_this.storeLocatorService.newStoreSelected$.pipe(operators.take(1)).subscribe(function () {
|
|
11343
|
-
_this.addAllIngredientsFromRecipeId(recipeId).subscribe();
|
|
11374
|
+
_this.addAllIngredientsFromRecipeId(recipeId, guests).subscribe();
|
|
11344
11375
|
});
|
|
11345
11376
|
}
|
|
11346
11377
|
return rxjs.of(void 0);
|
|
@@ -11456,11 +11487,16 @@
|
|
|
11456
11487
|
}
|
|
11457
11488
|
});
|
|
11458
11489
|
};
|
|
11459
|
-
ContextService.prototype.addAllIngredientsFromRecipeId = function (recipeId) {
|
|
11490
|
+
ContextService.prototype.addAllIngredientsFromRecipeId = function (recipeId, guests) {
|
|
11460
11491
|
var _this = this;
|
|
11461
11492
|
var eventTrace = { originPath: '/locator', props: { recipe_id: recipeId } };
|
|
11462
11493
|
return this.recipesService.get(recipeId, { include: ['ingredients', 'recipe-steps', 'recipe-type', 'sponsors', 'tags', 'recipe-provider'] })
|
|
11463
|
-
.pipe(operators.
|
|
11494
|
+
.pipe(operators.map(function (recipe) {
|
|
11495
|
+
if (guests && guests > 0) {
|
|
11496
|
+
recipe.modifiedGuests = guests;
|
|
11497
|
+
}
|
|
11498
|
+
return recipe;
|
|
11499
|
+
}), operators.switchMap(function (recipe) { return _this.newRecipeDetailsService.setupRecipe(recipe); }), operators.tap(function () {
|
|
11464
11500
|
// Wait for the loading to complete and open basket
|
|
11465
11501
|
_this.waitForIngredientsToFinish().pipe(operators.tap(function () {
|
|
11466
11502
|
_this.basketUtilsService.openBasket('/locator', 1);
|
|
@@ -21806,39 +21842,45 @@
|
|
|
21806
21842
|
})();
|
|
21807
21843
|
var templateObject_1;
|
|
21808
21844
|
|
|
21809
|
-
var
|
|
21810
|
-
__extends(
|
|
21811
|
-
function
|
|
21845
|
+
var NoSupplierAddToCartCtaService = /** @class */ (function (_super) {
|
|
21846
|
+
__extends(NoSupplierAddToCartCtaService, _super);
|
|
21847
|
+
function NoSupplierAddToCartCtaService(http, posService, httpUtils) {
|
|
21812
21848
|
var _this = _super.call(this, http) || this;
|
|
21813
21849
|
_this.http = http;
|
|
21814
21850
|
_this.posService = posService;
|
|
21815
21851
|
_this.httpUtils = httpUtils;
|
|
21816
21852
|
_this.fetchingHTMLLoader$ = new rxjs.BehaviorSubject(false);
|
|
21817
|
-
_this.componentStylesUrl = _this.MEALZ_SSR_API + "/styles/add-to-cart-cta";
|
|
21853
|
+
_this.componentStylesUrl = _this.MEALZ_SSR_API + "/styles/no-supplier-add-to-cart-cta";
|
|
21818
21854
|
_this.scriptsPaths = [
|
|
21819
|
-
environment$1.mealzComponents + "/
|
|
21855
|
+
environment$1.mealzComponents + "/drawer/drawer.min.js",
|
|
21856
|
+
environment$1.mealzComponents + "/drawer-view-swapper/drawer-view-swapper.min.js",
|
|
21857
|
+
environment$1.mealzComponents + "/no-supplier-add-to-cart-cta/no-supplier-add-to-cart-cta.min.js"
|
|
21820
21858
|
];
|
|
21821
21859
|
return _this;
|
|
21822
21860
|
}
|
|
21823
|
-
|
|
21861
|
+
NoSupplierAddToCartCtaService.prototype.displayNoSupplierAddToCartCta = function (recipeId, guests) {
|
|
21824
21862
|
var _this = this;
|
|
21825
|
-
var pos = this.posService.pos$.getValue();
|
|
21826
|
-
var url = this.MEALZ_SSR_API + "/add-to-cart-cta?recipe_id=" + recipeId;
|
|
21827
|
-
if (pos === null || pos === void 0 ? void 0 : pos.id) {
|
|
21828
|
-
url += "&store_id=" + pos.id;
|
|
21829
|
-
}
|
|
21830
21863
|
var headers = this.httpUtils.buildHeaders();
|
|
21831
21864
|
this.loadStyles();
|
|
21832
21865
|
this.loadComponentScripts();
|
|
21833
21866
|
this.fetchingHTMLLoader$.next(true);
|
|
21834
|
-
return this.
|
|
21867
|
+
return this.posService.posWasInitialized().pipe(operators.take(1), operators.map(function (wasInitialized) { return wasInitialized ? _this.posService.pos$.value : null; }), operators.switchMap(function (pos) {
|
|
21868
|
+
var url = _this.MEALZ_SSR_API + "/no-supplier-add-to-cart-cta?recipe_id=" + recipeId;
|
|
21869
|
+
if (pos === null || pos === void 0 ? void 0 : pos.id) {
|
|
21870
|
+
url += "&store_id=" + pos.id;
|
|
21871
|
+
}
|
|
21872
|
+
if (guests && guests > 0) {
|
|
21873
|
+
url += "&guests=" + guests;
|
|
21874
|
+
}
|
|
21875
|
+
return _this.http.get(url, { headers: headers, responseType: 'text' });
|
|
21876
|
+
}), operators.tap(function () { return _this.fetchingHTMLLoader$.next(false); }));
|
|
21835
21877
|
};
|
|
21836
|
-
return
|
|
21878
|
+
return NoSupplierAddToCartCtaService;
|
|
21837
21879
|
}(LoadSsrScriptsAndLinksService));
|
|
21838
|
-
|
|
21839
|
-
|
|
21880
|
+
NoSupplierAddToCartCtaService.ɵfac = function NoSupplierAddToCartCtaService_Factory(t) { return new (t || NoSupplierAddToCartCtaService)(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(PointOfSalesService), i0__namespace.ɵɵinject(HttpUtilsService)); };
|
|
21881
|
+
NoSupplierAddToCartCtaService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: NoSupplierAddToCartCtaService, factory: NoSupplierAddToCartCtaService.ɵfac, providedIn: 'root' });
|
|
21840
21882
|
(function () {
|
|
21841
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(
|
|
21883
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NoSupplierAddToCartCtaService, [{
|
|
21842
21884
|
type: i0.Injectable,
|
|
21843
21885
|
args: [{
|
|
21844
21886
|
providedIn: 'root'
|
|
@@ -21846,35 +21888,34 @@
|
|
|
21846
21888
|
}], function () { return [{ type: i1__namespace.HttpClient }, { type: PointOfSalesService }, { type: HttpUtilsService }]; }, null);
|
|
21847
21889
|
})();
|
|
21848
21890
|
|
|
21849
|
-
var
|
|
21850
|
-
function
|
|
21851
|
-
this.
|
|
21891
|
+
var NoSupplierAddToCartCtaComponent = /** @class */ (function () {
|
|
21892
|
+
function NoSupplierAddToCartCtaComponent(noSupplierAddToCartCtaService, sanitizer, cdr) {
|
|
21893
|
+
this.noSupplierAddToCartCtaService = noSupplierAddToCartCtaService;
|
|
21852
21894
|
this.sanitizer = sanitizer;
|
|
21853
21895
|
this.cdr = cdr;
|
|
21854
|
-
this.recipeId = '14989'; // Default recipe ID for backward compatibility
|
|
21855
21896
|
this.clicked = new i0.EventEmitter();
|
|
21856
21897
|
this.ctaHTML = null;
|
|
21857
21898
|
}
|
|
21858
|
-
|
|
21899
|
+
NoSupplierAddToCartCtaComponent.prototype.ngOnInit = function () {
|
|
21859
21900
|
this.loadComponent();
|
|
21860
21901
|
};
|
|
21861
|
-
|
|
21902
|
+
NoSupplierAddToCartCtaComponent.prototype.loadComponent = function () {
|
|
21862
21903
|
var _this = this;
|
|
21863
|
-
this.
|
|
21904
|
+
this.noSupplierAddToCartCtaService.displayNoSupplierAddToCartCta(this.recipeId, this.guests).pipe(operators.take(1)).subscribe({
|
|
21864
21905
|
next: function (html) {
|
|
21865
21906
|
_this.ctaHTML = _this.sanitizer.bypassSecurityTrustHtml(html);
|
|
21866
21907
|
_this.clicked.emit();
|
|
21867
21908
|
_this.cdr.detectChanges();
|
|
21868
21909
|
},
|
|
21869
21910
|
error: function (error) {
|
|
21870
|
-
console.error('Error loading add-to-cart-cta component:', error);
|
|
21911
|
+
console.error('Error loading no-supplier-add-to-cart-cta component:', error);
|
|
21871
21912
|
}
|
|
21872
21913
|
});
|
|
21873
21914
|
};
|
|
21874
|
-
return
|
|
21915
|
+
return NoSupplierAddToCartCtaComponent;
|
|
21875
21916
|
}());
|
|
21876
|
-
|
|
21877
|
-
|
|
21917
|
+
NoSupplierAddToCartCtaComponent.ɵfac = function NoSupplierAddToCartCtaComponent_Factory(t) { return new (t || NoSupplierAddToCartCtaComponent)(i0__namespace.ɵɵdirectiveInject(NoSupplierAddToCartCtaService), i0__namespace.ɵɵdirectiveInject(i2__namespace.DomSanitizer), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
21918
|
+
NoSupplierAddToCartCtaComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: NoSupplierAddToCartCtaComponent, selectors: [["ng-miam-no-supplier-add-to-cart-cta"]], inputs: { recipeId: "recipeId", guests: "guests" }, outputs: { clicked: "clicked" }, decls: 1, vars: 1, consts: [[3, "innerHTML"]], template: function NoSupplierAddToCartCtaComponent_Template(rf, ctx) {
|
|
21878
21919
|
if (rf & 1) {
|
|
21879
21920
|
i0__namespace.ɵɵelement(0, "div", 0);
|
|
21880
21921
|
}
|
|
@@ -21883,15 +21924,17 @@
|
|
|
21883
21924
|
}
|
|
21884
21925
|
}, encapsulation: 2, changeDetection: 0 });
|
|
21885
21926
|
(function () {
|
|
21886
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(
|
|
21927
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NoSupplierAddToCartCtaComponent, [{
|
|
21887
21928
|
type: i0.Component,
|
|
21888
21929
|
args: [{
|
|
21889
|
-
selector: 'ng-miam-add-to-cart-cta',
|
|
21930
|
+
selector: 'ng-miam-no-supplier-add-to-cart-cta',
|
|
21890
21931
|
template: '<div [innerHTML]="ctaHTML"></div>',
|
|
21891
21932
|
encapsulation: i0.ViewEncapsulation.None,
|
|
21892
21933
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
21893
21934
|
}]
|
|
21894
|
-
}], function () { return [{ type:
|
|
21935
|
+
}], function () { return [{ type: NoSupplierAddToCartCtaService }, { type: i2__namespace.DomSanitizer }, { type: i0__namespace.ChangeDetectorRef }]; }, { recipeId: [{
|
|
21936
|
+
type: i0.Input
|
|
21937
|
+
}], guests: [{
|
|
21895
21938
|
type: i0.Input
|
|
21896
21939
|
}], clicked: [{
|
|
21897
21940
|
type: i0.Output
|
|
@@ -21901,7 +21944,7 @@
|
|
|
21901
21944
|
var WEB_COMPONENTS = [
|
|
21902
21945
|
RecipeHelperComponent,
|
|
21903
21946
|
RecipeTagsComponent,
|
|
21904
|
-
|
|
21947
|
+
NoSupplierAddToCartCtaComponent
|
|
21905
21948
|
];
|
|
21906
21949
|
// Tag names as imported in client application
|
|
21907
21950
|
// Warning : do not use caps, use dashed case only
|
|
@@ -21911,7 +21954,7 @@
|
|
|
21911
21954
|
'recipe-tags',
|
|
21912
21955
|
'toaster-stack',
|
|
21913
21956
|
'basket-transfer-modal',
|
|
21914
|
-
'add-to-cart-cta'
|
|
21957
|
+
'no-supplier-add-to-cart-cta'
|
|
21915
21958
|
];
|
|
21916
21959
|
var WEBC_MODULES = [
|
|
21917
21960
|
ListScanModule,
|
|
@@ -21942,7 +21985,7 @@
|
|
|
21942
21985
|
(function () {
|
|
21943
21986
|
(typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(WebComponentsModule, { declarations: [RecipeHelperComponent,
|
|
21944
21987
|
RecipeTagsComponent,
|
|
21945
|
-
|
|
21988
|
+
NoSupplierAddToCartCtaComponent], imports: [i2$1.CommonModule,
|
|
21946
21989
|
i6.FormsModule,
|
|
21947
21990
|
i6.ReactiveFormsModule,
|
|
21948
21991
|
ComponentsModule,
|
|
@@ -21957,7 +22000,7 @@
|
|
|
21957
22000
|
PreferencesModule,
|
|
21958
22001
|
RecipePricingModule, RecipeHelperComponent,
|
|
21959
22002
|
RecipeTagsComponent,
|
|
21960
|
-
|
|
22003
|
+
NoSupplierAddToCartCtaComponent] });
|
|
21961
22004
|
})();
|
|
21962
22005
|
(function () {
|
|
21963
22006
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WebComponentsModule, [{
|
|
@@ -22092,7 +22135,6 @@
|
|
|
22092
22135
|
exports.AccordionContentDirective = AccordionContentDirective;
|
|
22093
22136
|
exports.AccordionTitleDirective = AccordionTitleDirective;
|
|
22094
22137
|
exports.AddRecipeCardComponent = AddRecipeCardComponent;
|
|
22095
|
-
exports.AddToCartCtaComponent = AddToCartCtaComponent;
|
|
22096
22138
|
exports.AnalyticsService = AnalyticsService;
|
|
22097
22139
|
exports.BASKET_ENTRY_SPARSE_FIELDS = BASKET_ENTRY_SPARSE_FIELDS;
|
|
22098
22140
|
exports.BASKET_SPARSE_FIELDS = BASKET_SPARSE_FIELDS;
|
|
@@ -22139,6 +22181,7 @@
|
|
|
22139
22181
|
exports.MiamInterceptor = MiamInterceptor;
|
|
22140
22182
|
exports.ModalComponent = ModalComponent;
|
|
22141
22183
|
exports.NgMiamModule = NgMiamModule;
|
|
22184
|
+
exports.NoSupplierAddToCartCtaComponent = NoSupplierAddToCartCtaComponent;
|
|
22142
22185
|
exports.OutOfStockOverlayComponent = OutOfStockOverlayComponent;
|
|
22143
22186
|
exports.Package = Package;
|
|
22144
22187
|
exports.PackageService = PackageService;
|