ng-miam 9.1.7 → 9.1.9
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 +20 -34
- 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/recipes.service.js +3 -3
- package/esm2015/lib/_web-components/preferences/preferences.component.js +19 -18
- package/esm2015/lib/environments/environment.js +2 -10
- package/esm2015/lib/environments/environment.prod.js +2 -10
- package/esm2015/lib/environments/version.js +2 -2
- package/fesm2015/ng-miam.js +20 -34
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/recipes.service.d.ts +2 -2
- package/lib/_services/recipes.service.d.ts.map +1 -1
- package/lib/_web-components/preferences/preferences.component.d.ts +4 -3
- package/lib/_web-components/preferences/preferences.component.d.ts.map +1 -1
- package/lib/environments/environment.d.ts +0 -1
- package/lib/environments/environment.d.ts.map +1 -1
- package/lib/environments/environment.prod.d.ts +0 -1
- package/lib/environments/environment.prod.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
|
@@ -1680,15 +1680,7 @@
|
|
|
1680
1680
|
miamWeb: 'https://miam.tech',
|
|
1681
1681
|
mealzComponents: 'https://unpkg.com/mealz-components@1.2/dist',
|
|
1682
1682
|
mealzSsrApi: 'https://ssr-api.mealz.ai',
|
|
1683
|
-
lang: 'fr'
|
|
1684
|
-
tagsWhitelist: [
|
|
1685
|
-
'diet_sans-gluten',
|
|
1686
|
-
'diet_sans-lactose',
|
|
1687
|
-
'diet_vegan',
|
|
1688
|
-
'diet_veggie',
|
|
1689
|
-
'equipment_four',
|
|
1690
|
-
'equipment_plaque-de-cuisson'
|
|
1691
|
-
]
|
|
1683
|
+
lang: 'fr'
|
|
1692
1684
|
};
|
|
1693
1685
|
|
|
1694
1686
|
var Ingredient = /** @class */ (function (_super) {
|
|
@@ -3515,7 +3507,7 @@
|
|
|
3515
3507
|
EventJourney["EMPTY"] = "";
|
|
3516
3508
|
})(EventJourney || (EventJourney = {}));
|
|
3517
3509
|
|
|
3518
|
-
var VERSION = '9.1.
|
|
3510
|
+
var VERSION = '9.1.9'; // TODO: replace by ##VERSION## and update it in the CI/CD
|
|
3519
3511
|
|
|
3520
3512
|
var ContextRegistryService = /** @class */ (function () {
|
|
3521
3513
|
function ContextRegistryService() {
|
|
@@ -5048,7 +5040,7 @@
|
|
|
5048
5040
|
_this.displayedRecipe$ = new rxjs.BehaviorSubject(null);
|
|
5049
5041
|
_this.displayHelper$ = new rxjs.BehaviorSubject(false);
|
|
5050
5042
|
_this.displayedRecipeChanged$ = new rxjs.BehaviorSubject(null);
|
|
5051
|
-
_this.recipeDetailsOpened$ = new rxjs.
|
|
5043
|
+
_this.recipeDetailsOpened$ = new rxjs.Subject();
|
|
5052
5044
|
_this.hidden = new i0.EventEmitter();
|
|
5053
5045
|
_this.suggestionsPrimaryButtonActions = { display: true, addToBasket: true };
|
|
5054
5046
|
_this.recipesPrimaryButtonActions = { display: true, addToBasket: true };
|
|
@@ -9845,15 +9837,7 @@
|
|
|
9845
9837
|
miamWeb: 'https://miam.tech',
|
|
9846
9838
|
mealzComponents: 'https://unpkg.com/mealz-components@1.2/dist',
|
|
9847
9839
|
mealzSsrApi: 'https://ssr-api.mealz.ai',
|
|
9848
|
-
lang: 'fr'
|
|
9849
|
-
tagsWhitelist: [
|
|
9850
|
-
'diet_sans-gluten',
|
|
9851
|
-
'diet_sans-lactose',
|
|
9852
|
-
'diet_vegan',
|
|
9853
|
-
'diet_veggie',
|
|
9854
|
-
'equipment_four',
|
|
9855
|
-
'equipment_plaque-de-cuisson'
|
|
9856
|
-
]
|
|
9840
|
+
lang: 'fr'
|
|
9857
9841
|
};
|
|
9858
9842
|
|
|
9859
9843
|
var MiamInterceptor = /** @class */ (function () {
|
|
@@ -24241,15 +24225,16 @@
|
|
|
24241
24225
|
i0__namespace.ɵɵlistener("click", function PreferencesComponent_ng_container_5_div_30_Template_div_click_0_listener() { i0__namespace.ɵɵrestoreView(_r22_1); var equipment_r20 = ctx.$implicit; var ctx_r21 = i0__namespace.ɵɵnextContext(2); return ctx_r21.toggleTag(equipment_r20); });
|
|
24242
24226
|
i0__namespace.ɵɵelementStart(1, "div", 43);
|
|
24243
24227
|
i0__namespace.ɵɵtext(2);
|
|
24228
|
+
i0__namespace.ɵɵpipe(3, "titlecase");
|
|
24244
24229
|
i0__namespace.ɵɵelementEnd();
|
|
24245
|
-
i0__namespace.ɵɵelement(
|
|
24230
|
+
i0__namespace.ɵɵelement(4, "input", 39);
|
|
24246
24231
|
i0__namespace.ɵɵelementEnd();
|
|
24247
24232
|
}
|
|
24248
24233
|
if (rf & 2) {
|
|
24249
24234
|
var equipment_r20 = ctx.$implicit;
|
|
24250
24235
|
i0__namespace.ɵɵadvance(2);
|
|
24251
|
-
i0__namespace.ɵɵtextInterpolate1(" ", equipment_r20.tag.name, " ");
|
|
24252
|
-
i0__namespace.ɵɵadvance(
|
|
24236
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(3, 2, equipment_r20.tag.name), " ");
|
|
24237
|
+
i0__namespace.ɵɵadvance(2);
|
|
24253
24238
|
i0__namespace.ɵɵproperty("checked", equipment_r20.checked);
|
|
24254
24239
|
}
|
|
24255
24240
|
}
|
|
@@ -24308,7 +24293,7 @@
|
|
|
24308
24293
|
i0__namespace.ɵɵelementStart(27, "ng-miam-accordion-content");
|
|
24309
24294
|
i0__namespace.ɵɵelementStart(28, "ng-miam-accordion-content");
|
|
24310
24295
|
i0__namespace.ɵɵelementStart(29, "div", 21);
|
|
24311
|
-
i0__namespace.ɵɵtemplate(30, PreferencesComponent_ng_container_5_div_30_Template,
|
|
24296
|
+
i0__namespace.ɵɵtemplate(30, PreferencesComponent_ng_container_5_div_30_Template, 5, 4, "div", 22);
|
|
24312
24297
|
i0__namespace.ɵɵelementEnd();
|
|
24313
24298
|
i0__namespace.ɵɵelementEnd();
|
|
24314
24299
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -24364,13 +24349,14 @@
|
|
|
24364
24349
|
})(PreferenceView || (PreferenceView = {}));
|
|
24365
24350
|
var PreferencesComponent = /** @class */ (function (_super) {
|
|
24366
24351
|
__extends(PreferencesComponent, _super);
|
|
24367
|
-
function PreferencesComponent(analyticsService, tagsService, cdr, preferencesService, recipesService, contextService) {
|
|
24352
|
+
function PreferencesComponent(analyticsService, tagsService, cdr, preferencesService, recipesService, contextService, suppliersService) {
|
|
24368
24353
|
var _this = _super.call(this, analyticsService) || this;
|
|
24369
24354
|
_this.tagsService = tagsService;
|
|
24370
24355
|
_this.cdr = cdr;
|
|
24371
24356
|
_this.preferencesService = preferencesService;
|
|
24372
24357
|
_this.recipesService = recipesService;
|
|
24373
24358
|
_this.contextService = contextService;
|
|
24359
|
+
_this.suppliersService = suppliersService;
|
|
24374
24360
|
_this.isOpenChange = new i0.EventEmitter();
|
|
24375
24361
|
_this.preferencesChanged = new i0.EventEmitter();
|
|
24376
24362
|
_this._isOpen = false;
|
|
@@ -24420,6 +24406,9 @@
|
|
|
24420
24406
|
this.openedModalSubscriptions.push(this.preferencesService.guests$.subscribe(function () { return _this.cdr.detectChanges(); }));
|
|
24421
24407
|
this.subscriptions.push(this.preferencesService.isOpened$.subscribe(function (result) {
|
|
24422
24408
|
_this.isOpen = result;
|
|
24409
|
+
}), this.suppliersService.supplier$.pipe(operators.filter(function (supplier) { return !!supplier; })).subscribe(function (supplier) {
|
|
24410
|
+
_this.supplierId = supplier.id;
|
|
24411
|
+
_this.fetchTags();
|
|
24423
24412
|
}));
|
|
24424
24413
|
};
|
|
24425
24414
|
PreferencesComponent.prototype.ngAfterViewInit = function () {
|
|
@@ -24431,15 +24420,15 @@
|
|
|
24431
24420
|
};
|
|
24432
24421
|
PreferencesComponent.prototype.fetchTags = function () {
|
|
24433
24422
|
var _this = this;
|
|
24434
|
-
this.openedModalSubscriptions.push(this.tagsService.all({ remotefilter: { tag_type: 'diet' } }).pipe(operators.skipWhile(function (res) { return res.is_loading; })).subscribe(function (res) {
|
|
24435
|
-
_this.diets =
|
|
24423
|
+
this.openedModalSubscriptions.push(this.tagsService.all({ remotefilter: { tag_type: 'diet', for_supplier: this.supplierId } }).pipe(operators.skipWhile(function (res) { return res.is_loading; })).subscribe(function (res) {
|
|
24424
|
+
_this.diets = res.data.map(function (d) { return ({
|
|
24436
24425
|
tag: d,
|
|
24437
24426
|
checked: _this.preferencesService.tagShouldBeChecked(d, false),
|
|
24438
24427
|
without: false
|
|
24439
24428
|
}); });
|
|
24440
24429
|
_this.cdr.detectChanges();
|
|
24441
|
-
}), this.tagsService.all({ remotefilter: { tag_type: 'equipment' } }).pipe(operators.skipWhile(function (res) { return res.is_loading; })).subscribe(function (res) {
|
|
24442
|
-
_this.equipments =
|
|
24430
|
+
}), this.tagsService.all({ remotefilter: { tag_type: 'equipment', for_supplier: this.supplierId } }).pipe(operators.skipWhile(function (res) { return res.is_loading; })).subscribe(function (res) {
|
|
24431
|
+
_this.equipments = res.data.map(function (e) { return ({
|
|
24443
24432
|
tag: e,
|
|
24444
24433
|
checked: _this.preferencesService.tagShouldBeChecked(e, true),
|
|
24445
24434
|
without: true
|
|
@@ -24544,9 +24533,6 @@
|
|
|
24544
24533
|
PreferencesComponent.prototype.currentPath = function () {
|
|
24545
24534
|
return 'preferences';
|
|
24546
24535
|
};
|
|
24547
|
-
PreferencesComponent.prototype.whitelistedTags = function (tags) {
|
|
24548
|
-
return tags.filter(function (tag) { return environment$1.tagsWhitelist.includes(tag.id); });
|
|
24549
|
-
};
|
|
24550
24536
|
PreferencesComponent.prototype.updateFiltersInCache = function (closeModal) {
|
|
24551
24537
|
var _this = this;
|
|
24552
24538
|
if (closeModal === void 0) { closeModal = false; }
|
|
@@ -24565,7 +24551,7 @@
|
|
|
24565
24551
|
};
|
|
24566
24552
|
return PreferencesComponent;
|
|
24567
24553
|
}(EventTracerComponent));
|
|
24568
|
-
PreferencesComponent.ɵfac = function PreferencesComponent_Factory(t) { return new (t || PreferencesComponent)(i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(TagsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PreferencesService), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ContextService)); };
|
|
24554
|
+
PreferencesComponent.ɵfac = function PreferencesComponent_Factory(t) { return new (t || PreferencesComponent)(i0__namespace.ɵɵdirectiveInject(AnalyticsService), i0__namespace.ɵɵdirectiveInject(TagsService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PreferencesService), i0__namespace.ɵɵdirectiveInject(RecipesService), i0__namespace.ɵɵdirectiveInject(ContextService), i0__namespace.ɵɵdirectiveInject(SuppliersService)); };
|
|
24569
24555
|
PreferencesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: PreferencesComponent, selectors: [["ng-miam-preferences"]], inputs: { filters: "filters", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange", preferencesChanged: "preferencesChanged" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 6, consts: function () {
|
|
24570
24556
|
var i18n_0;
|
|
24571
24557
|
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
@@ -24676,7 +24662,7 @@
|
|
|
24676
24662
|
encapsulation: i0.ViewEncapsulation.None,
|
|
24677
24663
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
24678
24664
|
}]
|
|
24679
|
-
}], function () { return [{ type: AnalyticsService }, { type: TagsService }, { type: i0__namespace.ChangeDetectorRef }, { type: PreferencesService }, { type: RecipesService }, { type: ContextService }]; }, { filters: [{
|
|
24665
|
+
}], function () { return [{ type: AnalyticsService }, { type: TagsService }, { type: i0__namespace.ChangeDetectorRef }, { type: PreferencesService }, { type: RecipesService }, { type: ContextService }, { type: SuppliersService }]; }, { filters: [{
|
|
24680
24666
|
type: i0.Input
|
|
24681
24667
|
}], isOpenChange: [{
|
|
24682
24668
|
type: i0.Output
|