ng-miam 10.4.0 → 10.5.1
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 +37 -11
- 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 +5 -2
- package/esm2015/lib/_services/context.service.js +18 -7
- package/esm2015/lib/_services/recipe-likes.service.js +8 -2
- package/esm2015/lib/_types/builded/mealz-internal-interface.js +1 -1
- package/esm2015/lib/environments/environment.js +2 -2
- package/esm2015/lib/environments/environment.prod.js +2 -2
- package/esm2015/lib/environments/version.js +2 -2
- package/fesm2015/ng-miam.js +31 -11
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/analytics.service.d.ts.map +1 -1
- package/lib/_services/context.service.d.ts +2 -1
- package/lib/_services/context.service.d.ts.map +1 -1
- package/lib/_services/recipe-likes.service.d.ts +1 -1
- package/lib/_services/recipe-likes.service.d.ts.map +1 -1
- package/lib/_types/builded/mealz-internal-interface.d.ts +8 -4
- package/lib/_types/builded/mealz-internal-interface.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
|
@@ -1640,7 +1640,7 @@
|
|
|
1640
1640
|
env: 'prod',
|
|
1641
1641
|
miamAPI: 'https://api.miam.tech',
|
|
1642
1642
|
miamWeb: 'https://miam.tech',
|
|
1643
|
-
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.
|
|
1643
|
+
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.8/dist',
|
|
1644
1644
|
mealzSsrApi: 'https://ssr-api.mealz.ai',
|
|
1645
1645
|
lang: 'fr',
|
|
1646
1646
|
analyticsEnabled: true // Only used in DEV mode
|
|
@@ -3440,7 +3440,7 @@
|
|
|
3440
3440
|
EventJourney["EMPTY"] = "";
|
|
3441
3441
|
})(EventJourney || (EventJourney = {}));
|
|
3442
3442
|
|
|
3443
|
-
var VERSION = "10.
|
|
3443
|
+
var VERSION = "10.5.1"; // TODO: replace by ##VERSION## and update it in the CI/CD
|
|
3444
3444
|
|
|
3445
3445
|
var ContextRegistryService = /** @class */ (function () {
|
|
3446
3446
|
function ContextRegistryService() {
|
|
@@ -3563,7 +3563,10 @@
|
|
|
3563
3563
|
var _this = this;
|
|
3564
3564
|
var detectedJourney = journey !== null && journey !== void 0 ? journey : detectJourney();
|
|
3565
3565
|
actions.forEach(function (action) {
|
|
3566
|
-
_this.sendEvent('recipe.add', action.params.eventTrace.originPath, {
|
|
3566
|
+
_this.sendEvent('recipe.add', action.params.eventTrace.originPath, {
|
|
3567
|
+
recipe_id: action.params.recipeId,
|
|
3568
|
+
category_id: action.params.eventTrace.props.category_id
|
|
3569
|
+
}, detectedJourney);
|
|
3567
3570
|
});
|
|
3568
3571
|
};
|
|
3569
3572
|
AnalyticsService.prototype.sendUpdateGuestsEvents = function (actions, journey) {
|
|
@@ -4568,10 +4571,18 @@
|
|
|
4568
4571
|
}
|
|
4569
4572
|
return this.isCleaning.asObservable().pipe(operators.skipWhile(function (isCleaning) { return isCleaning; }), operators.take(1), operators.switchMap(function () { return _this.afterCleanAddLikesToRecipes(recipes); }));
|
|
4570
4573
|
};
|
|
4571
|
-
RecipeLikesService.prototype.getLikeHTML = function (recipeId) {
|
|
4574
|
+
RecipeLikesService.prototype.getLikeHTML = function (recipeId, path, categoryId) {
|
|
4575
|
+
if (path === void 0) { path = ''; }
|
|
4576
|
+
if (categoryId === void 0) { categoryId = null; }
|
|
4572
4577
|
var headers = this.httpUtils.buildHeaders();
|
|
4573
4578
|
var params = new URLSearchParams();
|
|
4574
4579
|
params.append('recipe-id', recipeId);
|
|
4580
|
+
if (path) {
|
|
4581
|
+
params.append('path', path);
|
|
4582
|
+
}
|
|
4583
|
+
if (categoryId) {
|
|
4584
|
+
params.append('category-id', categoryId);
|
|
4585
|
+
}
|
|
4575
4586
|
var url = MEALZ_SSR_API$1 + '/like-button?' + params;
|
|
4576
4587
|
return this.http.get(url, {
|
|
4577
4588
|
headers: headers,
|
|
@@ -10978,6 +10989,7 @@
|
|
|
10978
10989
|
this.orderHistoryEnabled = false;
|
|
10979
10990
|
this.enableMealsPlanner$ = new rxjs.BehaviorSubject(false);
|
|
10980
10991
|
this.displaySupplierSelector$ = new rxjs.BehaviorSubject(false);
|
|
10992
|
+
this.noSupplier$ = new rxjs.ReplaySubject(1);
|
|
10981
10993
|
this.preferencesChanged = new i0.EventEmitter();
|
|
10982
10994
|
this.mealz = {
|
|
10983
10995
|
paymentStarted: function (totalPrice) {
|
|
@@ -11145,6 +11157,8 @@
|
|
|
11145
11157
|
_this.basketHandler.resetMealz();
|
|
11146
11158
|
}
|
|
11147
11159
|
if (_this.origin.value) {
|
|
11160
|
+
_this.noSupplier = false;
|
|
11161
|
+
_this.noSupplier$.next(false);
|
|
11148
11162
|
_this.suppliersService.loadSupplier(supplierId.toString()).subscribe();
|
|
11149
11163
|
if (!_this.loggedOnSession) {
|
|
11150
11164
|
localStorage.removeItem('_miam/userId');
|
|
@@ -11180,6 +11194,7 @@
|
|
|
11180
11194
|
_this.fakeCartService.pushToFakeCart(products);
|
|
11181
11195
|
});
|
|
11182
11196
|
_this.basketHandler.noSupplier$.next(true);
|
|
11197
|
+
_this.noSupplier$.next(true);
|
|
11183
11198
|
}
|
|
11184
11199
|
else {
|
|
11185
11200
|
localStorage.removeItem('_miam/noSupplier/posId');
|
|
@@ -11325,11 +11340,13 @@
|
|
|
11325
11340
|
getGuestsForRecipe: function (recipeId) { return _this.mealsPlannerService.getGuestsForRecipe(recipeId); }
|
|
11326
11341
|
},
|
|
11327
11342
|
recipes: {
|
|
11328
|
-
openDetails: function (recipeId, guests, initialTabIndex, path, categoryId) {
|
|
11343
|
+
openDetails: function (recipeId, guests, initialTabIndex, path, plannerOrCategoryId, categoryId) {
|
|
11329
11344
|
if (initialTabIndex === void 0) { initialTabIndex = 0; }
|
|
11330
11345
|
if (path === void 0) { path = ''; }
|
|
11346
|
+
if (plannerOrCategoryId === void 0) { plannerOrCategoryId = null; }
|
|
11331
11347
|
if (categoryId === void 0) { categoryId = null; }
|
|
11332
|
-
|
|
11348
|
+
var resolvedCategoryId = typeof plannerOrCategoryId === 'string' ? plannerOrCategoryId : categoryId;
|
|
11349
|
+
return _this.recipesService.openRecipeDetails(recipeId, guests, initialTabIndex, path, resolvedCategoryId);
|
|
11333
11350
|
},
|
|
11334
11351
|
loadAndSetupRecipe: function (recipeId, guests) { return _this.loadAndSetupRecipe(recipeId, guests); },
|
|
11335
11352
|
replaceBasketEntry: function (basketEntry, ignoreSelected) { return _this.recipeDetailsProductsService.replaceBasketEntry(basketEntry, ignoreSelected); },
|
|
@@ -11352,9 +11369,13 @@
|
|
|
11352
11369
|
remainingBasketEntries$: this.newRecipeDetailsService.remainingBasketEntries$,
|
|
11353
11370
|
recipePrice$: this.recipeDetailsProductsService.recipePrice$,
|
|
11354
11371
|
orderHistoryDate$: this.newRecipeDetailsService.orderHistoryDate$,
|
|
11355
|
-
updateRecipeLike: function (recipeLikeId, recipeId, isPast, path) {
|
|
11372
|
+
updateRecipeLike: function (recipeLikeId, recipeId, isPast, path, categoryId) {
|
|
11356
11373
|
if (path === void 0) { path = ''; }
|
|
11357
|
-
|
|
11374
|
+
if (categoryId === void 0) { categoryId = null; }
|
|
11375
|
+
var eventTrace = {
|
|
11376
|
+
originPath: path,
|
|
11377
|
+
props: Object.assign({ recipe_id: recipeId }, (categoryId ? { category_id: categoryId } : {}))
|
|
11378
|
+
};
|
|
11358
11379
|
var recipeLike = _this.recipeLikesService.prepareRecipeLikeForUpdate(recipeId, recipeLikeId, isPast);
|
|
11359
11380
|
_this.recipeLikesService.updateLike(recipeId, recipeLike, eventTrace);
|
|
11360
11381
|
},
|
|
@@ -11413,7 +11434,8 @@
|
|
|
11413
11434
|
supplier: {
|
|
11414
11435
|
getToken: function () { return _this.suppliersService.token; },
|
|
11415
11436
|
currentSupplier: function () { return _this.suppliersService.supplier$; },
|
|
11416
|
-
isNoSupplier: function () { return _this.noSupplier; }
|
|
11437
|
+
isNoSupplier: function () { return _this.noSupplier; },
|
|
11438
|
+
noSupplier$: this.noSupplier$
|
|
11417
11439
|
},
|
|
11418
11440
|
user: {
|
|
11419
11441
|
getLanguage: function () { return _this.userService.language; },
|
|
@@ -11441,7 +11463,11 @@
|
|
|
11441
11463
|
}
|
|
11442
11464
|
},
|
|
11443
11465
|
html: {
|
|
11444
|
-
like: function (recipeId
|
|
11466
|
+
like: function (recipeId, path, categoryId) {
|
|
11467
|
+
if (path === void 0) { path = ''; }
|
|
11468
|
+
if (categoryId === void 0) { categoryId = null; }
|
|
11469
|
+
return _this.recipeLikesService.getLikeHTML(recipeId, path, categoryId);
|
|
11470
|
+
}
|
|
11445
11471
|
},
|
|
11446
11472
|
getStickyHeaderHeight: function () { return _this.supplierHeaderHeight$; },
|
|
11447
11473
|
preferences: {
|
|
@@ -13005,7 +13031,7 @@
|
|
|
13005
13031
|
env: 'prod',
|
|
13006
13032
|
miamAPI: 'https://api.miam.tech',
|
|
13007
13033
|
miamWeb: 'https://miam.tech',
|
|
13008
|
-
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.
|
|
13034
|
+
mealzComponents: 'https://cdn.jsdelivr.net/npm/mealz-components@2.8/dist',
|
|
13009
13035
|
mealzSsrApi: 'https://ssr-api.mealz.ai',
|
|
13010
13036
|
lang: 'fr',
|
|
13011
13037
|
analyticsEnabled: true // Only used in DEV mode
|