ng-miam 6.0.1 → 6.0.2
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 +73 -29
- 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/package.js +2 -1
- package/esm2015/lib/_services/baskets-synchronizing/baskets-synchronizer.service.js +29 -2
- package/esm2015/lib/_services/context.service.js +8 -4
- package/esm2015/lib/_types/builded/miam-interface.js +1 -1
- package/esm2015/lib/_web-components/catalog-list/catalog-list.component.js +5 -2
- package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +1 -1
- package/esm2015/lib/_web-components/recipe-tags/recipe-tags.component.js +30 -24
- package/fesm2015/ng-miam.js +69 -29
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_models/package.d.ts +1 -0
- package/lib/_services/baskets-synchronizing/baskets-synchronizer.service.d.ts +5 -0
- package/lib/_types/builded/miam-interface.d.ts +13 -2
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -2162,6 +2162,7 @@
|
|
|
2162
2162
|
'catalog-category': false,
|
|
2163
2163
|
'catalog-position': '',
|
|
2164
2164
|
'recipes-count': '',
|
|
2165
|
+
'media-url': '',
|
|
2165
2166
|
settings: {}
|
|
2166
2167
|
};
|
|
2167
2168
|
_this.relationships = {
|
|
@@ -4142,7 +4143,34 @@
|
|
|
4142
4143
|
if (itemsToAdd.length === 0) {
|
|
4143
4144
|
return;
|
|
4144
4145
|
}
|
|
4145
|
-
this.
|
|
4146
|
+
if (this.pushBasketEntriesToBasket) {
|
|
4147
|
+
this.pushBasketEntriesAndManagePFTs(itemsToAdd);
|
|
4148
|
+
}
|
|
4149
|
+
else {
|
|
4150
|
+
this.pushProductsToBasket(itemsToAdd);
|
|
4151
|
+
}
|
|
4152
|
+
};
|
|
4153
|
+
// DEPRECATED: REMOVE AS SOON AS WE CAN
|
|
4154
|
+
BasketsSynchronizerService.prototype.pushBasketEntriesAndManagePFTs = function (itemsToAdd) {
|
|
4155
|
+
var _this = this;
|
|
4156
|
+
this.basketsService.basketEntries().pipe(operators.take(1)).subscribe(function (entries) {
|
|
4157
|
+
_this.pushBasketEntriesToBasket(itemsToAdd.map(function (i) {
|
|
4158
|
+
var entry = entries.find(function (e) { return e.selectedItem.attributes['ext-id'] === i.id; }) ?
|
|
4159
|
+
entries.find(function (e) { return e.selectedItem.attributes['ext-id'] === i.id; }) :
|
|
4160
|
+
undefined;
|
|
4161
|
+
if (entry) {
|
|
4162
|
+
var bei = entry.attributes['basket-entries-items'].find(function (b) { return String(b.item_id) === entry.selectedItem.id; }) || {};
|
|
4163
|
+
Object.assign(entry.selectedItem.attributes, {
|
|
4164
|
+
// tslint:disable-next-line: no-string-literal
|
|
4165
|
+
'pft-checksum': bei['pft_checksum'],
|
|
4166
|
+
// tslint:disable-next-line: no-string-literal
|
|
4167
|
+
'pft-plages': bei['pft_plages']
|
|
4168
|
+
});
|
|
4169
|
+
return { basketEntry: entry, quantity: i.quantity };
|
|
4170
|
+
}
|
|
4171
|
+
return { removedId: i.id, quantity: i.quantity };
|
|
4172
|
+
}));
|
|
4173
|
+
});
|
|
4146
4174
|
};
|
|
4147
4175
|
/**
|
|
4148
4176
|
* Remove entries from Miam's basket if there are entries that need to be removed
|
|
@@ -4256,6 +4284,9 @@
|
|
|
4256
4284
|
definePushProductsToBasket: function (pushProductsToBasket) {
|
|
4257
4285
|
_this.basketHandler.pushProductsToBasket = pushProductsToBasket;
|
|
4258
4286
|
},
|
|
4287
|
+
definePushBasketEntriesToBasket: function (pushBasketEntriesToBasket) {
|
|
4288
|
+
_this.basketHandler.pushBasketEntriesToBasket = pushBasketEntriesToBasket;
|
|
4289
|
+
},
|
|
4259
4290
|
retailerBasketChanged: function (comparableProducts) {
|
|
4260
4291
|
_this.basketHandler.retailerBasketChanged(comparableProducts);
|
|
4261
4292
|
_this.suppliersService.lastSupplierBasket = comparableProducts;
|
|
@@ -4296,11 +4327,12 @@
|
|
|
4296
4327
|
addRecipe: function (recipeId, guests) {
|
|
4297
4328
|
return _this.listsService.appendRecipeToList(recipeId, guests, { originPath: 'client', props: { recipe_id: recipeId } });
|
|
4298
4329
|
},
|
|
4299
|
-
hasRecipe: function (recipeId) { return _this.listsService.recipeIsInList(recipeId); }
|
|
4330
|
+
hasRecipe: function (recipeId) { return _this.listsService.recipeIsInList(recipeId); },
|
|
4331
|
+
recipeCount: this.listsService.list$.pipe(operators.skipWhile(function (l) { return !l; }), operators.map(function (l) { return l.attributes['recipes-ids'].length; }))
|
|
4300
4332
|
},
|
|
4301
4333
|
pos: {
|
|
4302
|
-
|
|
4303
|
-
_this.posService.loadPosWithExtId(
|
|
4334
|
+
load: function (externalId) {
|
|
4335
|
+
_this.posService.loadPosWithExtId(externalId);
|
|
4304
4336
|
}
|
|
4305
4337
|
},
|
|
4306
4338
|
recipes: {
|
|
@@ -17912,11 +17944,11 @@
|
|
|
17912
17944
|
var _r17_1 = i0.ɵɵgetCurrentView();
|
|
17913
17945
|
i0.ɵɵelementStart(0, "div", 17);
|
|
17914
17946
|
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_template_1_div_0_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r17_1); var ctx_r16 = i0.ɵɵnextContext(2); return ctx_r16.toggleModal(); });
|
|
17915
|
-
i0.ɵɵelementStart(1, "span");
|
|
17947
|
+
i0.ɵɵelementStart(1, "span", 18);
|
|
17916
17948
|
i0.ɵɵtext(2);
|
|
17917
17949
|
i0.ɵɵelementEnd();
|
|
17918
17950
|
i0.ɵɵelementStart(3, "span");
|
|
17919
|
-
i0.ɵɵi18n(4,
|
|
17951
|
+
i0.ɵɵi18n(4, 19);
|
|
17920
17952
|
i0.ɵɵelementEnd();
|
|
17921
17953
|
i0.ɵɵelementEnd();
|
|
17922
17954
|
}
|
|
@@ -17926,46 +17958,55 @@
|
|
|
17926
17958
|
i0.ɵɵtextInterpolate(ctx_r14.recipePreviewLines.length);
|
|
17927
17959
|
}
|
|
17928
17960
|
}
|
|
17929
|
-
function
|
|
17961
|
+
function RecipeTagsComponent_ng_template_1_ng_miam_modal_1_div_2_Template(rf, ctx) {
|
|
17930
17962
|
if (rf & 1) {
|
|
17931
|
-
var
|
|
17963
|
+
var _r23_1 = i0.ɵɵgetCurrentView();
|
|
17932
17964
|
i0.ɵɵelementStart(0, "div", 11, 12);
|
|
17933
17965
|
i0.ɵɵelementStart(2, "ng-miam-icon", 13);
|
|
17934
|
-
i0.ɵɵlistener("click", function
|
|
17966
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_template_1_ng_miam_modal_1_div_2_Template_ng_miam_icon_click_2_listener() { i0.ɵɵrestoreView(_r23_1); var recipeLine_r19 = ctx.$implicit; var ctx_r22 = i0.ɵɵnextContext(3); return ctx_r22.toggleRecipe(recipeLine_r19.id); });
|
|
17935
17967
|
i0.ɵɵelementEnd();
|
|
17936
17968
|
i0.ɵɵelementStart(3, "span", 14);
|
|
17937
|
-
i0.ɵɵlistener("click", function
|
|
17969
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_template_1_ng_miam_modal_1_div_2_Template_span_click_3_listener() { i0.ɵɵrestoreView(_r23_1); var recipeLine_r19 = ctx.$implicit; var ctx_r24 = i0.ɵɵnextContext(3); return ctx_r24.toggleRecipe(recipeLine_r19.id); });
|
|
17938
17970
|
i0.ɵɵtext(4);
|
|
17939
17971
|
i0.ɵɵelementEnd();
|
|
17940
17972
|
i0.ɵɵelementEnd();
|
|
17941
17973
|
}
|
|
17942
17974
|
if (rf & 2) {
|
|
17943
|
-
var
|
|
17944
|
-
var
|
|
17975
|
+
var recipeLine_r19 = ctx.$implicit;
|
|
17976
|
+
var ctx_r18 = i0.ɵɵnextContext(3);
|
|
17945
17977
|
i0.ɵɵadvance(2);
|
|
17946
|
-
i0.ɵɵproperty("iconName",
|
|
17978
|
+
i0.ɵɵproperty("iconName", ctx_r18.icon.Meal);
|
|
17947
17979
|
i0.ɵɵadvance(2);
|
|
17948
|
-
i0.ɵɵtextInterpolate(
|
|
17980
|
+
i0.ɵɵtextInterpolate(recipeLine_r19.title);
|
|
17949
17981
|
}
|
|
17950
17982
|
}
|
|
17951
|
-
function
|
|
17983
|
+
function RecipeTagsComponent_ng_template_1_ng_miam_modal_1_Template(rf, ctx) {
|
|
17952
17984
|
if (rf & 1) {
|
|
17953
|
-
var
|
|
17954
|
-
i0.ɵɵ
|
|
17955
|
-
i0.ɵɵ
|
|
17956
|
-
i0.ɵɵ
|
|
17957
|
-
i0.ɵɵ
|
|
17958
|
-
i0.ɵɵtemplate(3, RecipeTagsComponent_ng_template_1_div_3_Template, 5, 2, "div", 5);
|
|
17985
|
+
var _r26_1 = i0.ɵɵgetCurrentView();
|
|
17986
|
+
i0.ɵɵelementStart(0, "ng-miam-modal", 20);
|
|
17987
|
+
i0.ɵɵlistener("close", function RecipeTagsComponent_ng_template_1_ng_miam_modal_1_Template_ng_miam_modal_close_0_listener() { i0.ɵɵrestoreView(_r26_1); var ctx_r25 = i0.ɵɵnextContext(2); return ctx_r25.toggleModal(); });
|
|
17988
|
+
i0.ɵɵelementStart(1, "div", 4);
|
|
17989
|
+
i0.ɵɵtemplate(2, RecipeTagsComponent_ng_template_1_ng_miam_modal_1_div_2_Template, 5, 2, "div", 5);
|
|
17959
17990
|
i0.ɵɵelementEnd();
|
|
17960
17991
|
i0.ɵɵelementEnd();
|
|
17961
17992
|
}
|
|
17993
|
+
if (rf & 2) {
|
|
17994
|
+
var ctx_r15 = i0.ɵɵnextContext(2);
|
|
17995
|
+
i0.ɵɵproperty("isAngularComponent", true)("expanded", ctx_r15.modalIsOpened)("noHeaderMode", false)("recipesCount", ctx_r15.recipePreviewLines.length);
|
|
17996
|
+
i0.ɵɵadvance(2);
|
|
17997
|
+
i0.ɵɵproperty("ngForOf", ctx_r15.recipePreviewLines);
|
|
17998
|
+
}
|
|
17999
|
+
}
|
|
18000
|
+
function RecipeTagsComponent_ng_template_1_Template(rf, ctx) {
|
|
18001
|
+
if (rf & 1) {
|
|
18002
|
+
i0.ɵɵtemplate(0, RecipeTagsComponent_ng_template_1_div_0_Template, 5, 1, "div", 15);
|
|
18003
|
+
i0.ɵɵtemplate(1, RecipeTagsComponent_ng_template_1_ng_miam_modal_1_Template, 3, 5, "ng-miam-modal", 16);
|
|
18004
|
+
}
|
|
17962
18005
|
if (rf & 2) {
|
|
17963
18006
|
var ctx_r2 = i0.ɵɵnextContext();
|
|
17964
18007
|
i0.ɵɵproperty("ngIf", (ctx_r2.recipePreviewLines == null ? null : ctx_r2.recipePreviewLines.length) > 0);
|
|
17965
18008
|
i0.ɵɵadvance(1);
|
|
17966
|
-
i0.ɵɵproperty("
|
|
17967
|
-
i0.ɵɵadvance(2);
|
|
17968
|
-
i0.ɵɵproperty("ngForOf", ctx_r2.recipePreviewLines);
|
|
18009
|
+
i0.ɵɵproperty("ngIf", (ctx_r2.recipePreviewLines == null ? null : ctx_r2.recipePreviewLines.length) > 0);
|
|
17969
18010
|
}
|
|
17970
18011
|
}
|
|
17971
18012
|
var RecipeTagsComponent = /** @class */ (function (_super) {
|
|
@@ -18061,17 +18102,17 @@
|
|
|
18061
18102
|
else {
|
|
18062
18103
|
i18n_4 = $localize(templateObject_1$s || (templateObject_1$s = __makeTemplateObject([":\u241F3c5bb82ed6e0c7ec470e7e044e3d12f9642d5356\u241F8273924711540568207:repas"], [":\u241F3c5bb82ed6e0c7ec470e7e044e3d12f9642d5356\u241F8273924711540568207:repas"])));
|
|
18063
18104
|
}
|
|
18064
|
-
return [[4, "ngIf", "ngIfElse"], ["reduced", ""], ["class", "miam-recipe-tags__container", 3, "ngStyle", 4, "ngIf"], [1, "miam-recipe-tags__container", 3, "ngStyle"], [1, "miam-recipe-tags__container__list"], ["class", "miam-recipe-tags__list__badge", 4, "ngFor", "ngForOf"], [1, "miam-recipe-tags__container__toggle", 3, "ngClass"], [1, "miam-recipe-tags__toggle__open", 3, "click"], [1, "miam-recipe-tags__toggle__ligne"], [1, "miam-recipe-tags__toggle__close", 3, "ngStyle", "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-white)", 3, "iconName"], [1, "miam-recipe-tags__list__badge"], ["tag", ""], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-tags__badge__icon", 3, "iconName", "click"], [1, "miam-recipe-tag__badge__text", 3, "click"], ["class", "miam-recipe-tags__recipes", 3, "click", 4, "ngIf"], [
|
|
18105
|
+
return [[4, "ngIf", "ngIfElse"], ["reduced", ""], ["class", "miam-recipe-tags__container", 3, "ngStyle", 4, "ngIf"], [1, "miam-recipe-tags__container", 3, "ngStyle"], [1, "miam-recipe-tags__container__list"], ["class", "miam-recipe-tags__list__badge", 4, "ngFor", "ngForOf"], [1, "miam-recipe-tags__container__toggle", 3, "ngClass"], [1, "miam-recipe-tags__toggle__open", 3, "click"], [1, "miam-recipe-tags__toggle__ligne"], [1, "miam-recipe-tags__toggle__close", 3, "ngStyle", "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-white)", 3, "iconName"], [1, "miam-recipe-tags__list__badge"], ["tag", ""], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-tags__badge__icon", 3, "iconName", "click"], [1, "miam-recipe-tag__badge__text", 3, "click"], ["class", "miam-recipe-tags__recipes", 3, "click", 4, "ngIf"], ["class", "miam-recipe-tags__modal", 3, "isAngularComponent", "expanded", "noHeaderMode", "recipesCount", "close", 4, "ngIf"], [1, "miam-recipe-tags__recipes", 3, "click"], [1, "miam-recipe-tags__recipes__count"], i18n_4, [1, "miam-recipe-tags__modal", 3, "isAngularComponent", "expanded", "noHeaderMode", "recipesCount", "close"]];
|
|
18065
18106
|
}, template: function RecipeTagsComponent_Template(rf, ctx) {
|
|
18066
18107
|
if (rf & 1) {
|
|
18067
18108
|
i0.ɵɵtemplate(0, RecipeTagsComponent_ng_container_0_Template, 2, 1, "ng-container", 0);
|
|
18068
|
-
i0.ɵɵtemplate(1, RecipeTagsComponent_ng_template_1_Template,
|
|
18109
|
+
i0.ɵɵtemplate(1, RecipeTagsComponent_ng_template_1_Template, 2, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
18069
18110
|
}
|
|
18070
18111
|
if (rf & 2) {
|
|
18071
18112
|
var _r1 = i0.ɵɵreference(2);
|
|
18072
18113
|
i0.ɵɵproperty("ngIf", !ctx.reduce)("ngIfElse", _r1);
|
|
18073
18114
|
}
|
|
18074
|
-
}, directives: [i2.NgIf, i2.NgStyle, i2.NgForOf, i2.NgClass, IconComponent, ModalComponent], pipes: [EllipsisPipe], styles: [".miam-recipe-tags__container__list{display:flex;flex:1 1;flex-wrap:wrap;gap:8px}.miam-recipe-tags__container__list .miam-recipe-tags__list__badge{align-items:center;border:1px solid #e9e9e9;border-radius:100px;box-sizing:border-box;cursor:pointer;display:flex;height:24px;max-width:50vw;padding:0 8px 0 0;position:relative}.miam-recipe-tags__container__list .miam-recipe-tags__list__badge .miam-recipe-tags__badge__icon{background:var(--m-color-primary);border-radius:100px 0 0 100px;flex:none;flex-grow:0;order:0;padding:4px 8px}.miam-recipe-tags__container__list .miam-recipe-tags__list__badge .miam-recipe-tag__badge__text{color:#676767;flex:1;font-size:12px;line-height:16px;margin:0 8px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.miam-recipe-tags__container{display:flex;margin-top:16px;overflow:hidden;padding:0 8px;transition:height .25s cubic-bezier(0,0,.2,1)}.miam-recipe-tags__container .miam-recipe-tags__container__toggle{align-items:center;display:flex;flex-direction:column;visibility:visible;width:80px}.miam-recipe-tags__container .miam-recipe-tags__container__toggle.miam-recipe-tags__container__toggle__hidden{visibility:hidden}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__open{background:#f6f6f6;border-radius:100px;cursor:pointer;display:flex;height:24px;justify-content:center;min-width:40px;padding:4px 8px}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__ligne{background-color:var(--m-color-grey);flex:1;transform:height 1s linear;width:2px}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__close{background:var(--m-color-primary);border-radius:100px;cursor:pointer;min-width:40px;transition:opacity .2s linear}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__close ng-miam-icon .icon-container{transform:rotate(180deg)}.miam-recipe-tags__recipes{align-items:center;border:1px solid #e9e9e9;border-radius:100px;box-sizing:border-box;cursor:pointer;display:flex;height:24px;max-width:50vw;padding:0 8px 0 0;position:relative}.miam-recipe-tags__modal .miam-modal{-webkit-animation-name:none;animation-name:none;height:auto;right:50%;top:50%;transform:translate3d(50%,-50%,0)}.miam-recipe-tags__modal .miam-modal .miam-modal__container .miam-recipe-tags__container__list{display:flex;flex-flow:row wrap;max-width:480px;padding:24px}@media (max-width:1023px){.miam-recipe-tags__modal .miam-modal .miam-modal__container .miam-recipe-tags__container__list{flex-flow:column}}"], encapsulation: 2, changeDetection: 0 });
|
|
18115
|
+
}, directives: [i2.NgIf, i2.NgStyle, i2.NgForOf, i2.NgClass, IconComponent, ModalComponent], pipes: [EllipsisPipe], styles: [".miam-recipe-tags__container__list{display:flex;flex:1 1;flex-wrap:wrap;gap:8px}.miam-recipe-tags__container__list .miam-recipe-tags__list__badge{align-items:center;border:1px solid #e9e9e9;border-radius:100px;box-sizing:border-box;cursor:pointer;display:flex;height:24px;max-width:50vw;padding:0 8px 0 0;position:relative}.miam-recipe-tags__container__list .miam-recipe-tags__list__badge .miam-recipe-tags__badge__icon{background:var(--m-color-primary);border-radius:100px 0 0 100px;flex:none;flex-grow:0;order:0;padding:4px 8px}.miam-recipe-tags__container__list .miam-recipe-tags__list__badge .miam-recipe-tag__badge__text{color:#676767;flex:1;font-size:12px;line-height:16px;margin:0 8px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.miam-recipe-tags__container{display:flex;margin-top:16px;overflow:hidden;padding:0 8px;transition:height .25s cubic-bezier(0,0,.2,1)}.miam-recipe-tags__container .miam-recipe-tags__container__toggle{align-items:center;display:flex;flex-direction:column;visibility:visible;width:80px}.miam-recipe-tags__container .miam-recipe-tags__container__toggle.miam-recipe-tags__container__toggle__hidden{visibility:hidden}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__open{background:#f6f6f6;border-radius:100px;cursor:pointer;display:flex;height:24px;justify-content:center;min-width:40px;padding:4px 8px}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__ligne{background-color:var(--m-color-grey);flex:1;transform:height 1s linear;width:2px}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__close{background:var(--m-color-primary);border-radius:100px;cursor:pointer;min-width:40px;transition:opacity .2s linear}.miam-recipe-tags__container .miam-recipe-tags__container__toggle .miam-recipe-tags__toggle__close ng-miam-icon .icon-container{transform:rotate(180deg)}.miam-recipe-tags__recipes{align-items:center;border:1px solid #e9e9e9;border-radius:100px;box-sizing:border-box;cursor:pointer;display:flex;height:24px;max-width:50vw;padding:0 8px 0 0;position:relative}.miam-recipe-tags__recipes .miam-recipe-tags__recipes__count{margin-right:4px}.miam-recipe-tags__modal .miam-modal{-webkit-animation-name:none;animation-name:none;height:auto;right:50%;top:50%;transform:translate3d(50%,-50%,0)}.miam-recipe-tags__modal .miam-modal .miam-modal__container .miam-recipe-tags__container__list{display:flex;flex-flow:row wrap;max-width:480px;padding:24px}@media (max-width:1023px){.miam-recipe-tags__modal .miam-modal .miam-modal__container .miam-recipe-tags__container__list{flex-flow:column}}"], encapsulation: 2, changeDetection: 0 });
|
|
18075
18116
|
/*@__PURE__*/ (function () {
|
|
18076
18117
|
i0.ɵsetClassMetadata(RecipeTagsComponent, [{
|
|
18077
18118
|
type: i0.Component,
|
|
@@ -20017,13 +20058,16 @@
|
|
|
20017
20058
|
};
|
|
20018
20059
|
CatalogListComponent.prototype.loadRecipesPage = function (page) {
|
|
20019
20060
|
var _this = this;
|
|
20061
|
+
var _a;
|
|
20020
20062
|
if (this.noMoreRecipes) {
|
|
20021
20063
|
return rxjs.of([]);
|
|
20022
20064
|
}
|
|
20023
20065
|
// keep a copy of the filters when request is sent, so we can check they are still the same when it is received
|
|
20024
20066
|
// Because if it's not the case we have to ignore the results
|
|
20025
20067
|
var requestFilters = this.filters.copy();
|
|
20026
|
-
return this.recipesService.filter(requestFilters, { size: 20, number: page }, null, this.randomMode,
|
|
20068
|
+
return this.recipesService.filter(requestFilters, { size: 20, number: page }, null, this.randomMode,
|
|
20069
|
+
// tslint:disable-next-line: no-string-literal
|
|
20070
|
+
((_a = requestFilters.additionalFilters) === null || _a === void 0 ? void 0 : _a.filters['packages']) ? 'position' : '').pipe(operators.switchMap(function (result) { return _this.processResults(result, requestFilters, page); }));
|
|
20027
20071
|
};
|
|
20028
20072
|
CatalogListComponent.prototype.processResults = function (results, requestFilters, page) {
|
|
20029
20073
|
var _this = this;
|
|
@@ -22059,7 +22103,7 @@
|
|
|
22059
22103
|
i0.ɵɵadvance(2);
|
|
22060
22104
|
i0.ɵɵproperty("ngIf", !ctx.creatingRecipe)("ngIfElse", _r2);
|
|
22061
22105
|
}
|
|
22062
|
-
}, directives: [i2.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, RecipeStepperComponent], pipes: [i2.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon{cursor:pointer;margin-right:20px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;padding:
|
|
22106
|
+
}, directives: [i2.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, RecipeStepperComponent], pipes: [i2.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon{cursor:pointer;margin-right:20px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;padding:48px 24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{padding:24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;color:var(--miam-color-primary);cursor:pointer;display:flex;padding:4px 8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{align-items:center;background:var(--m-color-primary);border-radius:0 0 20px 20px;cursor:pointer;display:flex;height:50px;justify-content:space-around;left:unset;position:absolute;right:50px;width:200px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{color:var(--m-color-white);font-weight:700}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{border-radius:20px 20px 0 0;bottom:0;left:8px;position:fixed;right:8px;width:auto;z-index:2}}"], encapsulation: 2, changeDetection: 0 });
|
|
22063
22107
|
/*@__PURE__*/ (function () {
|
|
22064
22108
|
i0.ɵsetClassMetadata(RecipeCatalogComponent, [{
|
|
22065
22109
|
type: i0.Component,
|