ng-miam 4.1.2 → 4.2.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 +324 -97
- 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/_components/abstracts/abstract-recipe-card.component.js +4 -3
- package/esm2015/lib/_services/context.service.js +12 -2
- package/esm2015/lib/_services/groceries-lists.service.js +25 -3
- package/esm2015/lib/_services/recipes.service.js +3 -3
- package/esm2015/lib/_utils/synchro-basket/basket-handler.js +4 -1
- package/esm2015/lib/_utils/synchro-basket/basket-handling/baskets-comparator.js +4 -1
- package/esm2015/lib/_utils/synchro-basket/basket-handling/comparison-map.js +7 -1
- package/esm2015/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.js +14 -5
- package/esm2015/lib/_web-components/catalog-category/catalog-category.component.js +1 -1
- package/esm2015/lib/_web-components/catalog-header/catalog-header.component.js +20 -20
- package/esm2015/lib/_web-components/list-scan/files-inputs/files-inputs.component.js +2 -2
- package/esm2015/lib/_web-components/modal/modal.component.js +57 -16
- package/esm2015/lib/_web-components/modal/modal.module.js +6 -2
- package/esm2015/lib/_web-components/recipe-details/recipe-details.component.js +2 -2
- package/esm2015/lib/_web-components/recipe-modal/recipe-modal.component.js +51 -18
- package/esm2015/lib/_web-components/recipe-tags/recipe-tags.component.js +108 -36
- package/fesm2015/ng-miam.js +299 -98
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/context.service.d.ts +3 -0
- package/lib/_services/groceries-lists.service.d.ts +11 -0
- package/lib/_services/recipes.service.d.ts +3 -1
- package/lib/_utils/synchro-basket/basket-handler.d.ts +1 -0
- package/lib/_utils/synchro-basket/basket-handling/baskets-comparator.d.ts +1 -0
- package/lib/_utils/synchro-basket/basket-handling/comparison-map.d.ts +1 -0
- package/lib/_web-components/basket-preview/basket-preview-block/basket-preview-block.component.d.ts +3 -2
- package/lib/_web-components/modal/modal.component.d.ts +5 -1
- package/lib/_web-components/modal/modal.module.d.ts +2 -1
- package/lib/_web-components/recipe-modal/recipe-modal.component.d.ts +14 -4
- package/lib/_web-components/recipe-tags/recipe-tags.component.d.ts +5 -1
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -516,6 +516,13 @@
|
|
|
516
516
|
this.addEntryInMapFromRetailer(retailerBasket);
|
|
517
517
|
this._setFromMiam(miamBasket);
|
|
518
518
|
}
|
|
519
|
+
ComparisonMap.prototype.setAllProductsAsRetailers = function () {
|
|
520
|
+
var _this = this;
|
|
521
|
+
Object.keys(this._extIdToComparisonItem).forEach(function (extId) {
|
|
522
|
+
_this._extIdToComparisonItem[extId].miamQuantity = 0;
|
|
523
|
+
_this._extIdToComparisonItem[extId].miamTargetQuantity = 0;
|
|
524
|
+
});
|
|
525
|
+
};
|
|
519
526
|
/**
|
|
520
527
|
*
|
|
521
528
|
* @param extId
|
|
@@ -756,6 +763,9 @@
|
|
|
756
763
|
var toRemoveFromMiam = this._comparisonMap.resolveFromRetailer();
|
|
757
764
|
this.sendUpdateToMiam(toRemoveFromMiam);
|
|
758
765
|
}
|
|
766
|
+
BasketsComparator.prototype.setAllProductsAsRetailers = function () {
|
|
767
|
+
this._comparisonMap.setAllProductsAsRetailers();
|
|
768
|
+
};
|
|
759
769
|
/**
|
|
760
770
|
*
|
|
761
771
|
* @param {*} basket
|
|
@@ -820,6 +830,9 @@
|
|
|
820
830
|
function BasketHandler(wrapper) {
|
|
821
831
|
this.basketWrapper = wrapper;
|
|
822
832
|
}
|
|
833
|
+
BasketHandler.prototype.setAllProductsAsRetailers = function () {
|
|
834
|
+
this.comparator.setAllProductsAsRetailers();
|
|
835
|
+
};
|
|
823
836
|
/**
|
|
824
837
|
* Handle payment first if necessary then start basket synchronization
|
|
825
838
|
*/
|
|
@@ -1450,12 +1463,35 @@
|
|
|
1450
1463
|
}));
|
|
1451
1464
|
}));
|
|
1452
1465
|
};
|
|
1466
|
+
/**
|
|
1467
|
+
* Will create a temporary list and set it in _list$. The list won't be marked as current and thus
|
|
1468
|
+
* will not be reused
|
|
1469
|
+
*/
|
|
1470
|
+
GroceriesListsService.prototype.createTemporaryList = function () {
|
|
1471
|
+
var _this = this;
|
|
1472
|
+
this.listIsFetching = true;
|
|
1473
|
+
this.new().save({ include: ['groceries-entries'] }).subscribe(function (temporaryList) {
|
|
1474
|
+
_this._list$.next(_this.afterSave(temporaryList));
|
|
1475
|
+
_this.listIsFetching = false;
|
|
1476
|
+
});
|
|
1477
|
+
};
|
|
1478
|
+
/**
|
|
1479
|
+
* save() returns an object that isn't a resource so methods aren't attached, so we have to do a little trick
|
|
1480
|
+
* @param res result of the save
|
|
1481
|
+
* @returns correct GroceriesList with the right attributes & methods
|
|
1482
|
+
*/
|
|
1483
|
+
GroceriesListsService.prototype.afterSave = function (res) {
|
|
1484
|
+
var list = this.new();
|
|
1485
|
+
list.fill(res);
|
|
1486
|
+
return list;
|
|
1487
|
+
};
|
|
1453
1488
|
GroceriesListsService.prototype.saveList = function (list, openBasket) {
|
|
1454
1489
|
var _this = this;
|
|
1455
1490
|
if (openBasket === void 0) { openBasket = false; }
|
|
1456
1491
|
delete (list.attributes['recipes-ids']);
|
|
1457
|
-
|
|
1458
|
-
|
|
1492
|
+
delete (list.relationships['groceries-entries']);
|
|
1493
|
+
return list.save({ include: ['groceries-entries'] }).pipe(operators.skipWhile(function (l) { return l.is_loading; }), operators.tap(function (l) {
|
|
1494
|
+
_this._list$.next(_this.afterSave(l));
|
|
1459
1495
|
if (_this.saveOperationType === 'ADD') {
|
|
1460
1496
|
_this.recipeWasAdded$.next(list.recipeInfos);
|
|
1461
1497
|
}
|
|
@@ -3889,12 +3925,12 @@
|
|
|
3889
3925
|
});
|
|
3890
3926
|
};
|
|
3891
3927
|
RecipesService.prototype.displayObject = function (recipe, _c) {
|
|
3892
|
-
var _d = _c.previewAllowed, previewAllowed = _d === void 0 ? true : _d, _e = _c.guests, guests = _e === void 0 ? null : _e, _f = _c.previewMode, previewMode = _f === void 0 ? false : _f;
|
|
3928
|
+
var _d = _c.previewAllowed, previewAllowed = _d === void 0 ? true : _d, _e = _c.guests, guests = _e === void 0 ? null : _e, _f = _c.previewMode, previewMode = _f === void 0 ? false : _f, _g = _c.wasAdded, wasAdded = _g === void 0 ? false : _g;
|
|
3893
3929
|
if (!recipe) {
|
|
3894
3930
|
return;
|
|
3895
3931
|
}
|
|
3896
3932
|
recipe.modifiedGuests = guests || +recipe.guests;
|
|
3897
|
-
this.displayedRecipe$.next({ previewAllowed: previewAllowed, recipe: recipe, previewMode: previewMode });
|
|
3933
|
+
this.displayedRecipe$.next({ previewAllowed: previewAllowed, recipe: recipe, previewMode: previewMode, wasAdded: wasAdded });
|
|
3898
3934
|
if (!previewMode) {
|
|
3899
3935
|
this.recipeEventsService.sendEvent(recipe, this.recipeEventsService.ACTION_DISPLAYED);
|
|
3900
3936
|
}
|
|
@@ -4270,8 +4306,16 @@
|
|
|
4270
4306
|
},
|
|
4271
4307
|
removeEntries: function (entries) { return _this.basketsService.removeBasketEntries(entries); },
|
|
4272
4308
|
initBasketSynchro: function () {
|
|
4309
|
+
// We need to initialise the basket and list or the basketSync might not work
|
|
4310
|
+
_this.basketsService.initBasket();
|
|
4273
4311
|
_this.basketHandler = new BasketHandler(_this.basketWrapper);
|
|
4274
4312
|
_this.basketHandler.initBasketProcess();
|
|
4313
|
+
},
|
|
4314
|
+
// Modify the comparion-map to make it as is all products were added by the retailer. Useful to reset the list without emptying the retailer's basket
|
|
4315
|
+
setAllProductsAsRetailers: function () {
|
|
4316
|
+
if (_this.basketHandler) {
|
|
4317
|
+
_this.basketHandler.setAllProductsAsRetailers();
|
|
4318
|
+
}
|
|
4275
4319
|
}
|
|
4276
4320
|
},
|
|
4277
4321
|
basketMapper: {
|
|
@@ -4312,7 +4356,9 @@
|
|
|
4312
4356
|
list: {
|
|
4313
4357
|
reset: function () { return _this.listsService.resetList().subscribe(); },
|
|
4314
4358
|
addRecipe: function (recipeId, guests) { return _this.listsService.appendRecipeToList(recipeId, guests, 'client'); },
|
|
4315
|
-
hasRecipe: function (recipeId) { return _this.listsService.recipeIsInList(recipeId); }
|
|
4359
|
+
hasRecipe: function (recipeId) { return _this.listsService.recipeIsInList(recipeId); },
|
|
4360
|
+
createTemporaryList: function () { return _this.listsService.createTemporaryList(); },
|
|
4361
|
+
refresh: function () { return _this.listsService.refreshCurrentList(); }
|
|
4316
4362
|
},
|
|
4317
4363
|
pos: {
|
|
4318
4364
|
load: function (posId) {
|
|
@@ -10078,17 +10124,22 @@
|
|
|
10078
10124
|
i0.ɵɵelementStart(0, "div", 24);
|
|
10079
10125
|
i0.ɵɵelement(1, "ng-miam-loader");
|
|
10080
10126
|
i0.ɵɵelementStart(2, "div");
|
|
10081
|
-
i0.ɵɵtext(3
|
|
10127
|
+
i0.ɵɵtext(3);
|
|
10082
10128
|
i0.ɵɵelementEnd();
|
|
10083
10129
|
i0.ɵɵelementEnd();
|
|
10084
10130
|
}
|
|
10131
|
+
if (rf & 2) {
|
|
10132
|
+
var ctx_r9 = i0.ɵɵnextContext(3);
|
|
10133
|
+
i0.ɵɵadvance(3);
|
|
10134
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r9.recipeId ? "Chargement du repas..." : "Chargement des repas...", " ");
|
|
10135
|
+
}
|
|
10085
10136
|
}
|
|
10086
10137
|
function BasketPreviewBlockComponent_div_0_ng_container_2_Template(rf, ctx) {
|
|
10087
10138
|
if (rf & 1) {
|
|
10088
10139
|
i0.ɵɵelementContainerStart(0);
|
|
10089
10140
|
i0.ɵɵtemplate(1, BasketPreviewBlockComponent_div_0_ng_container_2_h3_1_Template, 5, 5, "h3", 6);
|
|
10090
10141
|
i0.ɵɵtemplate(2, BasketPreviewBlockComponent_div_0_ng_container_2_div_2_Template, 5, 5, "div", 7);
|
|
10091
|
-
i0.ɵɵtemplate(3, BasketPreviewBlockComponent_div_0_ng_container_2_div_3_Template, 4,
|
|
10142
|
+
i0.ɵɵtemplate(3, BasketPreviewBlockComponent_div_0_ng_container_2_div_3_Template, 4, 1, "div", 8);
|
|
10092
10143
|
i0.ɵɵpipe(4, "async");
|
|
10093
10144
|
i0.ɵɵelementContainerEnd();
|
|
10094
10145
|
}
|
|
@@ -10175,6 +10226,11 @@
|
|
|
10175
10226
|
this.basketsService.basketStats$.pipe(operators.tap(function (stats) { return _this.statsUpdated.emit(stats); })).subscribe()
|
|
10176
10227
|
];
|
|
10177
10228
|
};
|
|
10229
|
+
BasketPreviewBlockComponent.prototype.ngOnChanges = function (changes) {
|
|
10230
|
+
if (Object.keys(changes).includes('recipeId')) {
|
|
10231
|
+
this.loading.next(true);
|
|
10232
|
+
}
|
|
10233
|
+
};
|
|
10178
10234
|
BasketPreviewBlockComponent.prototype.ngOnDestroy = function () {
|
|
10179
10235
|
this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
10180
10236
|
};
|
|
@@ -10257,7 +10313,7 @@
|
|
|
10257
10313
|
var _t;
|
|
10258
10314
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.lineComponents = _t);
|
|
10259
10315
|
}
|
|
10260
|
-
}, inputs: { recipeId: "recipeId", showNotice: "showNotice", recipesAlwaysExpanded: "recipesAlwaysExpanded", itemsAlwaysExpanded: "itemsAlwaysExpanded", displayItemsUnitaryPrice: "displayItemsUnitaryPrice" }, outputs: { statsUpdated: "statsUpdated", guestCountChanged: "guestCountChanged", loading: "loading" }, decls: 5, vars: 2, consts: [["class", "miam-basket-preview-block", 4, "ngIf", "ngIfElse"], ["cors", ""], ["noPos", ""], [1, "miam-basket-preview-block"], ["previewBlockTop", ""], [4, "ngIf", "ngIfElse"], ["class", "miam-basket-preview-block__header", 4, "ngIf"], ["class", "miam-basket-preview-block__lines", 4, "ngIf"], ["class", "miam-basket-preview-block__lines__loader", 4, "ngIf"], [1, "miam-basket-preview-block__header"], [1, "miam-basket-preview-block__header__actions"], ["class", "m-button-secondary miam-basket-preview-block__header__empty-basket", 3, "click", 4, "ngIf"], [1, "miam-basket-preview-block__header__chevron", 3, "ngClass", "click"], ["height", "32", "width", "32", 3, "iconName"], [1, "m-button-secondary", "miam-basket-preview-block__header__empty-basket", 3, "click"], ["primaryColor", "var(--m-color-secondary)", 3, "iconName"], [1, "miam-basket-preview-block__lines"], [3, "line", "blockStates", "uniqueLine", "recipesAlwaysExpanded", "itemsAlwaysExpanded", "displayItemsUnitaryPrice", "ngStyle", "removed", "countChanged", "replaceItem", 4, "ngFor", "ngForOf"], [3, "line", "selected", 4, "ngIf"], ["class", "miam-basket-preview-block__lines__not-found", 4, "ngIf"], [3, "line", "blockStates", "uniqueLine", "recipesAlwaysExpanded", "itemsAlwaysExpanded", "displayItemsUnitaryPrice", "ngStyle", "removed", "countChanged", "replaceItem"], [3, "line", "selected"], [1, "miam-basket-preview-block__lines__not-found"], [4, "ngIf"], [1, "miam-basket-preview-block__lines__loader"], [1, "miam-basket-preview-block__noPos"]], template: function BasketPreviewBlockComponent_Template(rf, ctx) {
|
|
10316
|
+
}, inputs: { recipeId: "recipeId", showNotice: "showNotice", recipesAlwaysExpanded: "recipesAlwaysExpanded", itemsAlwaysExpanded: "itemsAlwaysExpanded", displayItemsUnitaryPrice: "displayItemsUnitaryPrice" }, outputs: { statsUpdated: "statsUpdated", guestCountChanged: "guestCountChanged", loading: "loading" }, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 2, consts: [["class", "miam-basket-preview-block", 4, "ngIf", "ngIfElse"], ["cors", ""], ["noPos", ""], [1, "miam-basket-preview-block"], ["previewBlockTop", ""], [4, "ngIf", "ngIfElse"], ["class", "miam-basket-preview-block__header", 4, "ngIf"], ["class", "miam-basket-preview-block__lines", 4, "ngIf"], ["class", "miam-basket-preview-block__lines__loader", 4, "ngIf"], [1, "miam-basket-preview-block__header"], [1, "miam-basket-preview-block__header__actions"], ["class", "m-button-secondary miam-basket-preview-block__header__empty-basket", 3, "click", 4, "ngIf"], [1, "miam-basket-preview-block__header__chevron", 3, "ngClass", "click"], ["height", "32", "width", "32", 3, "iconName"], [1, "m-button-secondary", "miam-basket-preview-block__header__empty-basket", 3, "click"], ["primaryColor", "var(--m-color-secondary)", 3, "iconName"], [1, "miam-basket-preview-block__lines"], [3, "line", "blockStates", "uniqueLine", "recipesAlwaysExpanded", "itemsAlwaysExpanded", "displayItemsUnitaryPrice", "ngStyle", "removed", "countChanged", "replaceItem", 4, "ngFor", "ngForOf"], [3, "line", "selected", 4, "ngIf"], ["class", "miam-basket-preview-block__lines__not-found", 4, "ngIf"], [3, "line", "blockStates", "uniqueLine", "recipesAlwaysExpanded", "itemsAlwaysExpanded", "displayItemsUnitaryPrice", "ngStyle", "removed", "countChanged", "replaceItem"], [3, "line", "selected"], [1, "miam-basket-preview-block__lines__not-found"], [4, "ngIf"], [1, "miam-basket-preview-block__lines__loader"], [1, "miam-basket-preview-block__noPos"]], template: function BasketPreviewBlockComponent_Template(rf, ctx) {
|
|
10261
10317
|
if (rf & 1) {
|
|
10262
10318
|
i0.ɵɵtemplate(0, BasketPreviewBlockComponent_div_0_Template, 4, 4, "div", 0);
|
|
10263
10319
|
i0.ɵɵtemplate(1, BasketPreviewBlockComponent_ng_template_1_Template, 1, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
@@ -10267,7 +10323,7 @@
|
|
|
10267
10323
|
var _r1 = i0.ɵɵreference(2);
|
|
10268
10324
|
i0.ɵɵproperty("ngIf", !ctx.corsIssues)("ngIfElse", _r1);
|
|
10269
10325
|
}
|
|
10270
|
-
}, directives: [i3.NgIf, i3.NgClass, IconComponent, i3.NgForOf, BasketPreviewLineComponent, i3.NgStyle, ReplaceItemComponent, LoaderComponent, CORSOverlayComponent], pipes: [i3.AsyncPipe], styles: [":host ::-webkit-scrollbar{cursor:-webkit-grab;height:7px;width:5px}:host ::-webkit-scrollbar-track{background:var(--m-color-grey)}:host ::-webkit-scrollbar-thumb{background:var(--m-color-primary);border-radius:5px}.miam-basket-preview-block{position:relative}.miam-basket-preview-block .miam-basket-preview-block__recipe__link{-webkit-tap-highlight-color:transparent;color:var(--m-color-grey-text);cursor:pointer;position:absolute;right:300px;text-decoration:underline;top:60px;transition:var(--m-default-transition)}@media (min-width:1022px){.miam-basket-preview-block .miam-basket-preview-block__recipe__link:hover{color:var(--m-color-primary)}}.miam-basket-preview-block .miam-basket-preview-block__header{display:flex;justify-content:space-between;margin-bottom:0;padding-bottom:10px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions{align-items:center;display:flex}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__empty-basket{margin-right:20px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__empty-basket .fa-trash-alt{margin-right:8px;margin-top:-1px;width:13px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__chevron{cursor:pointer;transition-duration:.5s}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__chevron svg{width:18px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__chevron__down{transform:rotate(-180deg)}.miam-basket-preview-block .miam-basket-preview-block__lines{transition:height .3s}.miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__not-found{margin-left:20px;margin-top:15px}.miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__loader,.miam-basket-preview-block .miam-basket-preview-block__lines__loader{align-items:center;display:flex;flex-direction:column;justify-content:center}.miam-basket-preview-block .miam-basket-preview-block__lines__loader{padding:10px}.miam-basket-preview-block .miam-basket-preview-block__noPos{font-size:17px}"], encapsulation: 2, changeDetection: 0 });
|
|
10326
|
+
}, directives: [i3.NgIf, i3.NgClass, IconComponent, i3.NgForOf, BasketPreviewLineComponent, i3.NgStyle, ReplaceItemComponent, LoaderComponent, CORSOverlayComponent], pipes: [i3.AsyncPipe], styles: [":host ::-webkit-scrollbar{cursor:-webkit-grab;height:7px;width:5px}:host ::-webkit-scrollbar-track{background:var(--m-color-grey)}:host ::-webkit-scrollbar-thumb{background:var(--m-color-primary);border-radius:5px}.miam-basket-preview-block{height:100%;position:relative}.miam-basket-preview-block .miam-basket-preview-block__recipe__link{-webkit-tap-highlight-color:transparent;color:var(--m-color-grey-text);cursor:pointer;position:absolute;right:300px;text-decoration:underline;top:60px;transition:var(--m-default-transition)}@media (min-width:1022px){.miam-basket-preview-block .miam-basket-preview-block__recipe__link:hover{color:var(--m-color-primary)}}.miam-basket-preview-block .miam-basket-preview-block__header{display:flex;justify-content:space-between;margin-bottom:0;padding-bottom:10px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions{align-items:center;display:flex}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__empty-basket{margin-right:20px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__empty-basket .fa-trash-alt{margin-right:8px;margin-top:-1px;width:13px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__chevron{cursor:pointer;transition-duration:.5s}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__header__chevron svg{width:18px}.miam-basket-preview-block .miam-basket-preview-block__header .miam-basket-preview-block__header__actions .miam-basket-preview-block__chevron__down{transform:rotate(-180deg)}.miam-basket-preview-block .miam-basket-preview-block__lines{transition:height .3s}.miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__not-found{margin-left:20px;margin-top:15px}.miam-basket-preview-block .miam-basket-preview-block__lines .miam-basket-preview-block__lines__loader,.miam-basket-preview-block .miam-basket-preview-block__lines__loader{align-items:center;display:flex;flex-direction:column;justify-content:center}.miam-basket-preview-block .miam-basket-preview-block__lines__loader{padding:10px}.miam-basket-preview-block .miam-basket-preview-block__noPos{font-size:17px}"], encapsulation: 2, changeDetection: 0 });
|
|
10271
10327
|
/*@__PURE__*/ (function () {
|
|
10272
10328
|
i0.ɵsetClassMetadata(BasketPreviewBlockComponent, [{
|
|
10273
10329
|
type: i0.Component,
|
|
@@ -10496,7 +10552,8 @@
|
|
|
10496
10552
|
AbstractRecipeCardComponent.prototype.addRecipeActionOK = function (display) {
|
|
10497
10553
|
var _this = this;
|
|
10498
10554
|
this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).subscribe(function (recipeIsInList) {
|
|
10499
|
-
|
|
10555
|
+
var recipeWasAdded = !recipeIsInList;
|
|
10556
|
+
if (recipeWasAdded) {
|
|
10500
10557
|
_this.recipeEventsService.sendEvent(_this.recipe, _this.recipeEventsService.ACTION_ADDED);
|
|
10501
10558
|
}
|
|
10502
10559
|
_this.subscriptions.push(_this.groceriesListsService.appendRecipeToList(_this.recipe.id, _this.recipe.modifiedGuests, _this.cardType)
|
|
@@ -10504,7 +10561,7 @@
|
|
|
10504
10561
|
_this.toggleButtonLoader(false);
|
|
10505
10562
|
}));
|
|
10506
10563
|
if (display) {
|
|
10507
|
-
_this.recipeService.displayObject(_this.recipe, { guests: +_this.recipe.modifiedGuests, previewMode: true });
|
|
10564
|
+
_this.recipeService.displayObject(_this.recipe, { guests: +_this.recipe.modifiedGuests, previewMode: true, wasAdded: recipeWasAdded });
|
|
10508
10565
|
}
|
|
10509
10566
|
}));
|
|
10510
10567
|
};
|
|
@@ -11914,7 +11971,7 @@
|
|
|
11914
11971
|
if (rf & 2) {
|
|
11915
11972
|
i0.ɵɵproperty("ngIf", !ctx.hide);
|
|
11916
11973
|
}
|
|
11917
|
-
}, directives: [i3.NgIf, IconComponent, i3.NgStyle, i3.NgForOf, LoaderComponent, CatalogRecipeCardComponent, CatalogArticleCardComponent], pipes: [i3.AsyncPipe], styles: [".miam-catalog-category__slider{-webkit-backdrop-filter:blur(12px);align-items:center;backdrop-filter:blur(12px);background-color:rgba(32,32,32,.3);cursor:pointer;display:flex;height:calc(100% - 28px);justify-content:center;margin:12px 0 16px;position:absolute;top:0;width:48px}@media (max-width:1022px){.miam-catalog-category__slider{display:none}}.miam-catalog-category{display:flex;flex-direction:column;margin-bottom:40px}.miam-catalog-category .miam-catalog-category__header{align-items:flex-end;display:flex;flex-direction:row;margin-bottom:16px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left{flex:1}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__title{-webkit-tap-highlight-color:transparent;color:var(--m-color-black);cursor:pointer;font-size:24px;font-weight:700;line-height:34px;margin-bottom:4px}@media (min-width:1022px){.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__title:hover{text-decoration:underline}}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__subtitle{color:var(--m-color-black);font-size:14px;line-height:22px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right{align-items:center;display:flex}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right .miam-catalog-category__link{-webkit-tap-highlight-color:transparent;color:var(--m-color-primary);cursor:pointer;font-size:16px;line-height:24px}@media (min-width:1022px){.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right .miam-catalog-category__link:hover{text-decoration:underline}}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right ng-miam-icon{margin-top:3px}.miam-catalog-category .miam-catalog-category__header .icon-container{cursor:pointer;margin-bottom:3px;transform:rotate(-90deg)}.miam-catalog-category .miam-catalog-category__content{height:calc(var(--m-catalog-card-height) + var(--m-catalog-cards-spacing));margin:calc(0px - var(--m-catalog-cards-spacing)/2);overflow:hidden;padding:0;position:relative;width:calc(100% + var(--m-catalog-cards-spacing))}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards{display:flex;flex-direction:row;flex-wrap:wrap;transition-duration:.5s}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards .miam-catalog-category__loader{color:var(--m-color-grey-text);font-size:20px;font-weight:700;text-align:center;width:100%}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards .miam-catalog-category__loader .loader{height:80px;margin-bottom:16px;margin-left:calc(50% - 40px);margin-top:80px;width:80px}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__slider__left,.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__slider__right{display:none}@media (max-width:1095px){.miam-catalog-category .miam-catalog-category__content{overflow-x:auto}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards{flex-wrap:nowrap}}@media (max-width:607px){.miam-catalog-category .miam-catalog-category__header{align-items:flex-start;flex-direction:column;margin-bottom:8px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left{margin-bottom:4px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__title{margin-bottom:0}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right{align-self:flex-end}}"], encapsulation: 2, changeDetection: 0 });
|
|
11974
|
+
}, directives: [i3.NgIf, IconComponent, i3.NgStyle, i3.NgForOf, LoaderComponent, CatalogRecipeCardComponent, CatalogArticleCardComponent], pipes: [i3.AsyncPipe], styles: [".miam-catalog-category__slider{-webkit-backdrop-filter:blur(12px);align-items:center;backdrop-filter:blur(12px);background-color:rgba(32,32,32,.3);cursor:pointer;display:flex;height:calc(100% - 28px);justify-content:center;margin:12px 0 16px;position:absolute;top:0;width:48px}@media (max-width:1022px){.miam-catalog-category__slider{display:none}}.miam-catalog-category{display:flex;flex-direction:column;margin-bottom:40px}.miam-catalog-category .miam-catalog-category__header{align-items:flex-end;display:flex;flex-direction:row;margin-bottom:16px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left{flex:1}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__title{-webkit-tap-highlight-color:transparent;color:var(--m-color-black);cursor:pointer;font-size:24px;font-weight:700;line-height:34px;margin-bottom:4px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}@media (min-width:1022px){.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__title:hover{text-decoration:underline}}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__subtitle{color:var(--m-color-black);font-size:14px;line-height:22px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right{align-items:center;display:flex}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right .miam-catalog-category__link{-webkit-tap-highlight-color:transparent;color:var(--m-color-primary);cursor:pointer;font-size:16px;line-height:24px}@media (min-width:1022px){.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right .miam-catalog-category__link:hover{text-decoration:underline}}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right ng-miam-icon{margin-top:3px}.miam-catalog-category .miam-catalog-category__header .icon-container{cursor:pointer;margin-bottom:3px;transform:rotate(-90deg)}.miam-catalog-category .miam-catalog-category__content{height:calc(var(--m-catalog-card-height) + var(--m-catalog-cards-spacing));margin:calc(0px - var(--m-catalog-cards-spacing)/2);overflow:hidden;padding:0;position:relative;width:calc(100% + var(--m-catalog-cards-spacing))}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards{display:flex;flex-direction:row;flex-wrap:wrap;transition-duration:.5s}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards .miam-catalog-category__loader{color:var(--m-color-grey-text);font-size:20px;font-weight:700;text-align:center;width:100%}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards .miam-catalog-category__loader .loader{height:80px;margin-bottom:16px;margin-left:calc(50% - 40px);margin-top:80px;width:80px}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__slider__left,.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__slider__right{display:none}@media (max-width:1095px){.miam-catalog-category .miam-catalog-category__content{overflow-x:auto}.miam-catalog-category .miam-catalog-category__content .miam-catalog-category__cards{flex-wrap:nowrap}}@media (max-width:607px){.miam-catalog-category .miam-catalog-category__header{align-items:flex-start;flex-direction:column;margin-bottom:8px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left{margin-bottom:4px}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__left .miam-catalog-category__title{margin-bottom:0}.miam-catalog-category .miam-catalog-category__header .miam-catalog-category__right{align-self:flex-end}}"], encapsulation: 2, changeDetection: 0 });
|
|
11918
11975
|
/*@__PURE__*/ (function () {
|
|
11919
11976
|
i0.ɵsetClassMetadata(CatalogCategoryComponent, [{
|
|
11920
11977
|
type: i0.Component,
|
|
@@ -11960,9 +12017,9 @@
|
|
|
11960
12017
|
i0.ɵɵproperty("iconName", ctx_r0.icon.ChevronDown);
|
|
11961
12018
|
}
|
|
11962
12019
|
}
|
|
11963
|
-
function
|
|
12020
|
+
function CatalogHeaderComponent_a_9_Template(rf, ctx) {
|
|
11964
12021
|
if (rf & 1) {
|
|
11965
|
-
i0.ɵɵelementStart(0, "
|
|
12022
|
+
i0.ɵɵelementStart(0, "a", 16);
|
|
11966
12023
|
i0.ɵɵtext(1);
|
|
11967
12024
|
i0.ɵɵelementEnd();
|
|
11968
12025
|
}
|
|
@@ -11974,7 +12031,7 @@
|
|
|
11974
12031
|
}
|
|
11975
12032
|
function CatalogHeaderComponent_div_11_img_1_Template(rf, ctx) {
|
|
11976
12033
|
if (rf & 1) {
|
|
11977
|
-
i0.ɵɵelement(0, "img",
|
|
12034
|
+
i0.ɵɵelement(0, "img", 19);
|
|
11978
12035
|
}
|
|
11979
12036
|
if (rf & 2) {
|
|
11980
12037
|
var ctx_r6 = i0.ɵɵnextContext(2);
|
|
@@ -11983,8 +12040,8 @@
|
|
|
11983
12040
|
}
|
|
11984
12041
|
function CatalogHeaderComponent_div_11_Template(rf, ctx) {
|
|
11985
12042
|
if (rf & 1) {
|
|
11986
|
-
i0.ɵɵelementStart(0, "div",
|
|
11987
|
-
i0.ɵɵtemplate(1, CatalogHeaderComponent_div_11_img_1_Template, 1, 1, "img",
|
|
12043
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
12044
|
+
i0.ɵɵtemplate(1, CatalogHeaderComponent_div_11_img_1_Template, 1, 1, "img", 18);
|
|
11988
12045
|
i0.ɵɵelementEnd();
|
|
11989
12046
|
}
|
|
11990
12047
|
if (rf & 2) {
|
|
@@ -11996,12 +12053,12 @@
|
|
|
11996
12053
|
function CatalogHeaderComponent_div_13_Template(rf, ctx) {
|
|
11997
12054
|
if (rf & 1) {
|
|
11998
12055
|
var _r8_1 = i0.ɵɵgetCurrentView();
|
|
11999
|
-
i0.ɵɵelementStart(0, "div",
|
|
12000
|
-
i0.ɵɵelementStart(1, "input",
|
|
12056
|
+
i0.ɵɵelementStart(0, "div", 20);
|
|
12057
|
+
i0.ɵɵelementStart(1, "input", 21);
|
|
12001
12058
|
i0.ɵɵlistener("ngModelChange", function CatalogHeaderComponent_div_13_Template_input_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.searchString = $event; })("keydown.enter", function CatalogHeaderComponent_div_13_Template_input_keydown_enter_1_listener() { i0.ɵɵrestoreView(_r8_1); var ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.emitSearchString(); })("blur", function CatalogHeaderComponent_div_13_Template_input_blur_1_listener() { i0.ɵɵrestoreView(_r8_1); var ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.emitSearchString(); });
|
|
12002
12059
|
i0.ɵɵelementEnd();
|
|
12003
|
-
i0.ɵɵelementStart(2, "button",
|
|
12004
|
-
i0.ɵɵelementStart(3, "ng-miam-icon",
|
|
12060
|
+
i0.ɵɵelementStart(2, "button", 22);
|
|
12061
|
+
i0.ɵɵelementStart(3, "ng-miam-icon", 23);
|
|
12005
12062
|
i0.ɵɵlistener("click", function CatalogHeaderComponent_div_13_Template_ng_miam_icon_click_3_listener() { i0.ɵɵrestoreView(_r8_1); var ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.emitSearchString(); });
|
|
12006
12063
|
i0.ɵɵelementEnd();
|
|
12007
12064
|
i0.ɵɵelementEnd();
|
|
@@ -12024,7 +12081,7 @@
|
|
|
12024
12081
|
}
|
|
12025
12082
|
function CatalogHeaderComponent_button_15_div_3_Template(rf, ctx) {
|
|
12026
12083
|
if (rf & 1) {
|
|
12027
|
-
i0.ɵɵelementStart(0, "div",
|
|
12084
|
+
i0.ɵɵelementStart(0, "div", 28);
|
|
12028
12085
|
i0.ɵɵtext(1);
|
|
12029
12086
|
i0.ɵɵelementEnd();
|
|
12030
12087
|
}
|
|
@@ -12038,11 +12095,11 @@
|
|
|
12038
12095
|
function CatalogHeaderComponent_button_15_Template(rf, ctx) {
|
|
12039
12096
|
if (rf & 1) {
|
|
12040
12097
|
var _r15_1 = i0.ɵɵgetCurrentView();
|
|
12041
|
-
i0.ɵɵelementStart(0, "button",
|
|
12098
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
12042
12099
|
i0.ɵɵlistener("click", function CatalogHeaderComponent_button_15_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.filterButtonPressed.emit(); });
|
|
12043
|
-
i0.ɵɵelement(1, "ng-miam-icon",
|
|
12044
|
-
i0.ɵɵtemplate(2, CatalogHeaderComponent_button_15_span_2_Template, 2, 0, "span",
|
|
12045
|
-
i0.ɵɵtemplate(3, CatalogHeaderComponent_button_15_div_3_Template, 2, 1, "div",
|
|
12100
|
+
i0.ɵɵelement(1, "ng-miam-icon", 25);
|
|
12101
|
+
i0.ɵɵtemplate(2, CatalogHeaderComponent_button_15_span_2_Template, 2, 0, "span", 26);
|
|
12102
|
+
i0.ɵɵtemplate(3, CatalogHeaderComponent_button_15_div_3_Template, 2, 1, "div", 27);
|
|
12046
12103
|
i0.ɵɵelementEnd();
|
|
12047
12104
|
}
|
|
12048
12105
|
if (rf & 2) {
|
|
@@ -12067,10 +12124,10 @@
|
|
|
12067
12124
|
function CatalogHeaderComponent_button_16_Template(rf, ctx) {
|
|
12068
12125
|
if (rf & 1) {
|
|
12069
12126
|
var _r18_1 = i0.ɵɵgetCurrentView();
|
|
12070
|
-
i0.ɵɵelementStart(0, "button",
|
|
12127
|
+
i0.ɵɵelementStart(0, "button", 29);
|
|
12071
12128
|
i0.ɵɵlistener("click", function CatalogHeaderComponent_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18_1); var ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.favoritesButtonPressed.emit(); });
|
|
12072
|
-
i0.ɵɵelement(1, "ng-miam-icon",
|
|
12073
|
-
i0.ɵɵtemplate(2, CatalogHeaderComponent_button_16_span_2_Template, 2, 0, "span",
|
|
12129
|
+
i0.ɵɵelement(1, "ng-miam-icon", 25);
|
|
12130
|
+
i0.ɵɵtemplate(2, CatalogHeaderComponent_button_16_span_2_Template, 2, 0, "span", 26);
|
|
12074
12131
|
i0.ɵɵelementEnd();
|
|
12075
12132
|
}
|
|
12076
12133
|
if (rf & 2) {
|
|
@@ -12119,7 +12176,7 @@
|
|
|
12119
12176
|
return CatalogHeaderComponent;
|
|
12120
12177
|
}());
|
|
12121
12178
|
CatalogHeaderComponent.ɵfac = function CatalogHeaderComponent_Factory(t) { return new (t || CatalogHeaderComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService)); };
|
|
12122
|
-
CatalogHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CatalogHeaderComponent, selectors: [["ng-miam-catalog-header"]], inputs: { title: "title", homeLabel: "homeLabel", pictureUrl: "pictureUrl", titlePictureUrl: "titlePictureUrl", searchBarHidden: "searchBarHidden", filterButtonHidden: "filterButtonHidden", favoritesButtonHidden: "favoritesButtonHidden", filterBadgeCount: "filterBadgeCount" }, outputs: { returnButtonPressed: "returnButtonPressed", filterButtonPressed: "filterButtonPressed", favoritesButtonPressed: "favoritesButtonPressed", searchStringChanged: "searchStringChanged" }, features: [i0.ɵɵNgOnChangesFeature], decls: 17, vars: 18, consts: [[1, "miam-catalog-header", 3, "ngClass"], [1, "miam-catalog-header__content"], [1, "miam-catalog-header__nav"], ["href", "/"], ["width", "18", "height", "18", 3, "iconName", "primaryColor"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], ["href", "javascript:void(0)", 3, "click"], ["class", "chevron-right", "width", "24", "height", "24", 3, "iconName", 4, "ngIf"], [4, "ngIf"], [1, "miam-catalog-header__title-and-search"], ["class", "miam-catalog-header__title", 4, "ngIf"], [1, "miam-catalog-header__search-and-filters", 3, "ngClass"], ["class", "miam-catalog-header__searchbar", 4, "ngIf"], [1, "miam-catalog-header__controls"], ["class", "miam-catalog-header__controls__filter m-button-primary", 3, "ngClass", "click", 4, "ngIf"], ["class", "miam-catalog-header__controls__favorites", 3, "ngClass", "click", 4, "ngIf"], [1, "miam-catalog-header__title"], [3, "src", 4, "ngIf"], [3, "src"], [1, "miam-catalog-header__searchbar"], ["type", "text", "placeholder", "Chercher un ingr\u00E9dient ou un repas", 1, "miam-catalog-header__searchbar__input", 3, "ngModel", "ngModelChange", "keydown.enter", "blur"], [1, "miam-catalog-header__searchbar__button", "m-button-primary"], ["width", "20", "height", "20", 1, "miam-catalog-header__searchbar__icon", 3, "iconName", "click"], [1, "miam-catalog-header__controls__filter", "m-button-primary", 3, "ngClass", "click"], ["width", "18", "height", "18", 3, "iconName"], ["class", "miam-catalog-header__controls__filter-badge", 4, "ngIf"], [1, "miam-catalog-header__controls__filter-badge"], [1, "miam-catalog-header__controls__favorites", 3, "ngClass", "click"]], template: function CatalogHeaderComponent_Template(rf, ctx) {
|
|
12179
|
+
CatalogHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CatalogHeaderComponent, selectors: [["ng-miam-catalog-header"]], inputs: { title: "title", homeLabel: "homeLabel", pictureUrl: "pictureUrl", titlePictureUrl: "titlePictureUrl", searchBarHidden: "searchBarHidden", filterButtonHidden: "filterButtonHidden", favoritesButtonHidden: "favoritesButtonHidden", filterBadgeCount: "filterBadgeCount" }, outputs: { returnButtonPressed: "returnButtonPressed", filterButtonPressed: "filterButtonPressed", favoritesButtonPressed: "favoritesButtonPressed", searchStringChanged: "searchStringChanged" }, features: [i0.ɵɵNgOnChangesFeature], decls: 17, vars: 18, consts: [[1, "miam-catalog-header", 3, "ngClass"], [1, "miam-catalog-header__content"], [1, "miam-catalog-header__nav"], ["href", "/"], ["width", "18", "height", "18", 3, "iconName", "primaryColor"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], ["href", "javascript:void(0)", 3, "click"], ["class", "chevron-right", "width", "24", "height", "24", 3, "iconName", 4, "ngIf"], ["href", "javascript:void(0)", 4, "ngIf"], [1, "miam-catalog-header__title-and-search"], ["class", "miam-catalog-header__title", 4, "ngIf"], [1, "miam-catalog-header__search-and-filters", 3, "ngClass"], ["class", "miam-catalog-header__searchbar", 4, "ngIf"], [1, "miam-catalog-header__controls"], ["class", "miam-catalog-header__controls__filter m-button-primary", 3, "ngClass", "click", 4, "ngIf"], ["class", "miam-catalog-header__controls__favorites", 3, "ngClass", "click", 4, "ngIf"], ["href", "javascript:void(0)"], [1, "miam-catalog-header__title"], [3, "src", 4, "ngIf"], [3, "src"], [1, "miam-catalog-header__searchbar"], ["type", "text", "placeholder", "Chercher un ingr\u00E9dient ou un repas", 1, "miam-catalog-header__searchbar__input", 3, "ngModel", "ngModelChange", "keydown.enter", "blur"], [1, "miam-catalog-header__searchbar__button", "m-button-primary"], ["width", "20", "height", "20", 1, "miam-catalog-header__searchbar__icon", 3, "iconName", "click"], [1, "miam-catalog-header__controls__filter", "m-button-primary", 3, "ngClass", "click"], ["width", "18", "height", "18", 3, "iconName"], [4, "ngIf"], ["class", "miam-catalog-header__controls__filter-badge", 4, "ngIf"], [1, "miam-catalog-header__controls__filter-badge"], [1, "miam-catalog-header__controls__favorites", 3, "ngClass", "click"]], template: function CatalogHeaderComponent_Template(rf, ctx) {
|
|
12123
12180
|
if (rf & 1) {
|
|
12124
12181
|
i0.ɵɵelementStart(0, "div", 0);
|
|
12125
12182
|
i0.ɵɵelementStart(1, "div", 1);
|
|
@@ -12133,7 +12190,7 @@
|
|
|
12133
12190
|
i0.ɵɵtext(7);
|
|
12134
12191
|
i0.ɵɵelementEnd();
|
|
12135
12192
|
i0.ɵɵtemplate(8, CatalogHeaderComponent_ng_miam_icon_8_Template, 1, 1, "ng-miam-icon", 7);
|
|
12136
|
-
i0.ɵɵtemplate(9,
|
|
12193
|
+
i0.ɵɵtemplate(9, CatalogHeaderComponent_a_9_Template, 2, 1, "a", 8);
|
|
12137
12194
|
i0.ɵɵelementEnd();
|
|
12138
12195
|
i0.ɵɵelementStart(10, "div", 9);
|
|
12139
12196
|
i0.ɵɵtemplate(11, CatalogHeaderComponent_div_11_Template, 2, 1, "div", 10);
|
|
@@ -13493,41 +13550,83 @@
|
|
|
13493
13550
|
i0.ɵɵelement(0, "slot", 12);
|
|
13494
13551
|
}
|
|
13495
13552
|
}
|
|
13553
|
+
function ModalComponent_ng_container_0_button_12_span_1_Template(rf, ctx) {
|
|
13554
|
+
if (rf & 1) {
|
|
13555
|
+
i0.ɵɵelementStart(0, "span");
|
|
13556
|
+
i0.ɵɵtext(1);
|
|
13557
|
+
i0.ɵɵelementEnd();
|
|
13558
|
+
}
|
|
13559
|
+
if (rf & 2) {
|
|
13560
|
+
var ctx_r6 = i0.ɵɵnextContext(3);
|
|
13561
|
+
i0.ɵɵadvance(1);
|
|
13562
|
+
i0.ɵɵtextInterpolate(ctx_r6.cancelButtonText);
|
|
13563
|
+
}
|
|
13564
|
+
}
|
|
13565
|
+
function ModalComponent_ng_container_0_button_12_ng_miam_loader_2_Template(rf, ctx) {
|
|
13566
|
+
if (rf & 1) {
|
|
13567
|
+
i0.ɵɵelement(0, "ng-miam-loader");
|
|
13568
|
+
}
|
|
13569
|
+
}
|
|
13496
13570
|
function ModalComponent_ng_container_0_button_12_Template(rf, ctx) {
|
|
13497
13571
|
if (rf & 1) {
|
|
13498
|
-
var
|
|
13572
|
+
var _r9_1 = i0.ɵɵgetCurrentView();
|
|
13499
13573
|
i0.ɵɵelementStart(0, "button", 13);
|
|
13500
|
-
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_button_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
13501
|
-
i0.ɵɵ
|
|
13574
|
+
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_button_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9_1); var ctx_r8 = i0.ɵɵnextContext(2); return ctx_r8.onCancel(); });
|
|
13575
|
+
i0.ɵɵtemplate(1, ModalComponent_ng_container_0_button_12_span_1_Template, 2, 1, "span", 0);
|
|
13576
|
+
i0.ɵɵtemplate(2, ModalComponent_ng_container_0_button_12_ng_miam_loader_2_Template, 1, 0, "ng-miam-loader", 0);
|
|
13502
13577
|
i0.ɵɵelementEnd();
|
|
13503
13578
|
}
|
|
13504
13579
|
if (rf & 2) {
|
|
13505
13580
|
var ctx_r4 = i0.ɵɵnextContext(2);
|
|
13581
|
+
i0.ɵɵproperty("disabled", ctx_r4.cancelButtonDisabled);
|
|
13506
13582
|
i0.ɵɵadvance(1);
|
|
13507
|
-
i0.ɵɵ
|
|
13583
|
+
i0.ɵɵproperty("ngIf", !ctx_r4.cancelButtonIsLoading);
|
|
13584
|
+
i0.ɵɵadvance(1);
|
|
13585
|
+
i0.ɵɵproperty("ngIf", ctx_r4.cancelButtonIsLoading);
|
|
13586
|
+
}
|
|
13587
|
+
}
|
|
13588
|
+
function ModalComponent_ng_container_0_button_13_span_1_Template(rf, ctx) {
|
|
13589
|
+
if (rf & 1) {
|
|
13590
|
+
i0.ɵɵelementStart(0, "span");
|
|
13591
|
+
i0.ɵɵtext(1);
|
|
13592
|
+
i0.ɵɵelementEnd();
|
|
13593
|
+
}
|
|
13594
|
+
if (rf & 2) {
|
|
13595
|
+
var ctx_r10 = i0.ɵɵnextContext(3);
|
|
13596
|
+
i0.ɵɵadvance(1);
|
|
13597
|
+
i0.ɵɵtextInterpolate(ctx_r10.confirmButtonText);
|
|
13598
|
+
}
|
|
13599
|
+
}
|
|
13600
|
+
function ModalComponent_ng_container_0_button_13_ng_miam_loader_2_Template(rf, ctx) {
|
|
13601
|
+
if (rf & 1) {
|
|
13602
|
+
i0.ɵɵelement(0, "ng-miam-loader");
|
|
13508
13603
|
}
|
|
13509
13604
|
}
|
|
13510
13605
|
function ModalComponent_ng_container_0_button_13_Template(rf, ctx) {
|
|
13511
13606
|
if (rf & 1) {
|
|
13512
|
-
var
|
|
13607
|
+
var _r13_1 = i0.ɵɵgetCurrentView();
|
|
13513
13608
|
i0.ɵɵelementStart(0, "button", 14);
|
|
13514
|
-
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_button_13_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
13515
|
-
i0.ɵɵ
|
|
13609
|
+
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_button_13_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13_1); var ctx_r12 = i0.ɵɵnextContext(2); return ctx_r12.onConfirm(); });
|
|
13610
|
+
i0.ɵɵtemplate(1, ModalComponent_ng_container_0_button_13_span_1_Template, 2, 1, "span", 0);
|
|
13611
|
+
i0.ɵɵtemplate(2, ModalComponent_ng_container_0_button_13_ng_miam_loader_2_Template, 1, 0, "ng-miam-loader", 0);
|
|
13516
13612
|
i0.ɵɵelementEnd();
|
|
13517
13613
|
}
|
|
13518
13614
|
if (rf & 2) {
|
|
13519
13615
|
var ctx_r5 = i0.ɵɵnextContext(2);
|
|
13616
|
+
i0.ɵɵproperty("disabled", ctx_r5.confirmButtonDisabled);
|
|
13520
13617
|
i0.ɵɵadvance(1);
|
|
13521
|
-
i0.ɵɵ
|
|
13618
|
+
i0.ɵɵproperty("ngIf", !ctx_r5.confirmButtonIsLoading);
|
|
13619
|
+
i0.ɵɵadvance(1);
|
|
13620
|
+
i0.ɵɵproperty("ngIf", ctx_r5.confirmButtonIsLoading);
|
|
13522
13621
|
}
|
|
13523
13622
|
}
|
|
13524
13623
|
var _c0$l = function (a0, a1) { return { "with-header": a0, "without-header": a1 }; };
|
|
13525
13624
|
function ModalComponent_ng_container_0_Template(rf, ctx) {
|
|
13526
13625
|
if (rf & 1) {
|
|
13527
|
-
var
|
|
13626
|
+
var _r15_1 = i0.ɵɵgetCurrentView();
|
|
13528
13627
|
i0.ɵɵelementContainerStart(0);
|
|
13529
13628
|
i0.ɵɵelementStart(1, "div", 1);
|
|
13530
|
-
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_Template_div_click_1_listener() { i0.ɵɵrestoreView(
|
|
13629
|
+
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r15_1); var ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onClose(); });
|
|
13531
13630
|
i0.ɵɵelementEnd();
|
|
13532
13631
|
i0.ɵɵelementStart(2, "div", 2);
|
|
13533
13632
|
i0.ɵɵelementStart(3, "div", 3);
|
|
@@ -13536,14 +13635,14 @@
|
|
|
13536
13635
|
i0.ɵɵtext(6);
|
|
13537
13636
|
i0.ɵɵelementEnd();
|
|
13538
13637
|
i0.ɵɵelementStart(7, "ng-miam-icon", 6);
|
|
13539
|
-
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_Template_ng_miam_icon_click_7_listener() { i0.ɵɵrestoreView(
|
|
13638
|
+
i0.ɵɵlistener("click", function ModalComponent_ng_container_0_Template_ng_miam_icon_click_7_listener() { i0.ɵɵrestoreView(_r15_1); var ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onClose(); });
|
|
13540
13639
|
i0.ɵɵelementEnd();
|
|
13541
13640
|
i0.ɵɵelementEnd();
|
|
13542
13641
|
i0.ɵɵtemplate(8, ModalComponent_ng_container_0_ng_content_8_Template, 1, 0, "ng-content", 7);
|
|
13543
13642
|
i0.ɵɵtemplate(9, ModalComponent_ng_container_0_ng_template_9_Template, 1, 0, "ng-template", null, 8, i0.ɵɵtemplateRefExtractor);
|
|
13544
13643
|
i0.ɵɵelementStart(11, "div", 9);
|
|
13545
|
-
i0.ɵɵtemplate(12, ModalComponent_ng_container_0_button_12_Template,
|
|
13546
|
-
i0.ɵɵtemplate(13, ModalComponent_ng_container_0_button_13_Template,
|
|
13644
|
+
i0.ɵɵtemplate(12, ModalComponent_ng_container_0_button_12_Template, 3, 3, "button", 10);
|
|
13645
|
+
i0.ɵɵtemplate(13, ModalComponent_ng_container_0_button_13_Template, 3, 3, "button", 11);
|
|
13547
13646
|
i0.ɵɵelementEnd();
|
|
13548
13647
|
i0.ɵɵelementEnd();
|
|
13549
13648
|
i0.ɵɵelementEnd();
|
|
@@ -13656,7 +13755,7 @@
|
|
|
13656
13755
|
return ModalComponent;
|
|
13657
13756
|
}());
|
|
13658
13757
|
ModalComponent.ɵfac = function ModalComponent_Factory(t) { return new (t || ModalComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$2.MediaMatcher), i0.ɵɵdirectiveInject(ContextService)); };
|
|
13659
|
-
ModalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ModalComponent, selectors: [["ng-miam-modal"]], inputs: { title: "title", expanded: "expanded", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", isAngularComponent: "isAngularComponent", noHeaderMode: "noHeaderMode", containerElement: "containerElement" }, outputs: { expandedChange: "expandedChange", close: "close", cancel: "cancel", confirm: "confirm" }, features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c1$c, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "miam-shadow-overlay", 3, "click"], [1, "miam-modal", 3, "ngClass"], [1, "miam-modal__container"], [1, "miam-modal__header"], [1, "miam-modal__title"], ["primaryColor", "var(--m-color-grey-text-dark)", 1, "miam-modal__close__icon", 3, "width", "height", "iconName", "click"], [4, "ngIf", "ngIfElse"], ["isWebC", ""], [1, "miam-modal__actions"], ["class", "m-button-secondary", 3, "click", 4, "ngIf"], ["class", "m-button-primary", 3, "click", 4, "ngIf"], ["name", "modal-content"], [1, "m-button-secondary", 3, "click"], [1, "m-button-primary", 3, "click"]], template: function ModalComponent_Template(rf, ctx) {
|
|
13758
|
+
ModalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ModalComponent, selectors: [["ng-miam-modal"]], inputs: { title: "title", expanded: "expanded", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", isAngularComponent: "isAngularComponent", confirmButtonIsLoading: "confirmButtonIsLoading", cancelButtonIsLoading: "cancelButtonIsLoading", confirmButtonDisabled: "confirmButtonDisabled", cancelButtonDisabled: "cancelButtonDisabled", noHeaderMode: "noHeaderMode", containerElement: "containerElement" }, outputs: { expandedChange: "expandedChange", close: "close", cancel: "cancel", confirm: "confirm" }, features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c1$c, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "miam-shadow-overlay", 3, "click"], [1, "miam-modal", 3, "ngClass"], [1, "miam-modal__container"], [1, "miam-modal__header"], [1, "miam-modal__title"], ["primaryColor", "var(--m-color-grey-text-dark)", 1, "miam-modal__close__icon", 3, "width", "height", "iconName", "click"], [4, "ngIf", "ngIfElse"], ["isWebC", ""], [1, "miam-modal__actions"], ["class", "m-button-secondary", 3, "disabled", "click", 4, "ngIf"], ["class", "m-button-primary", 3, "disabled", "click", 4, "ngIf"], ["name", "modal-content"], [1, "m-button-secondary", 3, "disabled", "click"], [1, "m-button-primary", 3, "disabled", "click"]], template: function ModalComponent_Template(rf, ctx) {
|
|
13660
13759
|
if (rf & 1) {
|
|
13661
13760
|
i0.ɵɵprojectionDef();
|
|
13662
13761
|
i0.ɵɵtemplate(0, ModalComponent_ng_container_0_Template, 14, 12, "ng-container", 0);
|
|
@@ -13664,7 +13763,7 @@
|
|
|
13664
13763
|
if (rf & 2) {
|
|
13665
13764
|
i0.ɵɵproperty("ngIf", ctx.expanded);
|
|
13666
13765
|
}
|
|
13667
|
-
}, directives: [i3.NgIf, i3.NgClass, IconComponent], styles: [".miam-shadow-overlay{-webkit-animation-duration:.3s;-webkit-animation-name:show;-webkit-animation-timing-function:ease-in-out;-webkit-tap-highlight-color:transparent;animation-duration:.3s;animation-name:show;animation-timing-function:ease-in-out;background:var(--m-color-black);height:100vh;left:0;opacity:.6;position:fixed;top:0;width:100vw;z-index:var(--m-z-index-modal-overlay)}.miam-modal{-webkit-animation-duration:.5s;-webkit-animation-name:open;-webkit-animation-timing-function:cubic-bezier(.75,0,.2,1);animation-duration:.5s;animation-name:open;animation-timing-function:cubic-bezier(.75,0,.2,1);background-color:var(--m-color-white);height:100%;max-width:1200px;overflow-x:hidden;overflow-y:auto;position:fixed;right:0;top:0;width:80%;z-index:var(--m-z-index-modal)}@media print{.miam-modal{height:unset!important;overflow-y:unset!important;position:unset!important}}@-webkit-keyframes open{0%{right:-1200px}to{right:0}}@keyframes open{0%{right:-1200px}to{right:0}}.miam-modal.with-header .miam-modal__header{background-color:var(--m-color-grey);color:var(--m-color-grey-text-dark);display:flex;flex-direction:row;justify-content:space-between}.miam-modal.with-header .miam-modal__title{color:var(--m-color-grey-text-dark);font-size:var(--m-font-size-large);font-weight:700;overflow:hidden;padding:20px;text-overflow:ellipsis}.miam-modal.with-header .miam-modal__close__icon{-webkit-tap-highlight-color:transparent;height:40px}.miam-modal.without-header .miam-modal__close__icon{border-radius:var(--m-border-radius-circle);display:flex;height:60px;justify-items:center;position:absolute;right:0;top:0;z-index:var(--m-z-index-position-absolute-high)}.miam-modal .miam-modal__container{display:flex;flex-direction:column;height:100%;position:relative}.miam-modal .miam-modal__container .miam-modal__close__icon{cursor:pointer;margin:10px}@media print{.miam-modal .miam-modal__container .miam-modal__close__icon{display:none}}.miam-modal .miam-modal__container .miam-modal__actions{align-items:center;display:flex;justify-content:space-evenly;margin:20px}@-webkit-keyframes show{0%{opacity:0}to{opacity:.6}}@keyframes show{0%{opacity:0}to{opacity:.6}}@media (max-width:1022px){.miam-modal{-webkit-animation-duration:.5s;-webkit-animation-name:openBottomSheet;-webkit-animation-timing-function:cubic-bezier(.075,.82,.165,1);animation-duration:.5s;animation-name:openBottomSheet;animation-timing-function:cubic-bezier(.075,.82,.165,1);background-color:var(--m-color-white);bottom:0;left:0;max-width:100vw;overflow-x:hidden;overflow-y:hidden;position:fixed;right:0;top:100vh;top:unset;width:100vw;z-index:var(--m-z-index-modal)}.miam-modal.with-header .miam-modal__header{align-items:center;background-color:unset}.miam-modal.with-header .miam-modal__title{padding:0 0 0 16px}.miam-modal.with-header ng-miam-icon.miam-modal__close__icon .icon-container{align-items:center;border:1px solid var(--m-color-light-slate);border-radius:36px;display:grid}.miam-modal.with-header ng-miam-icon.miam-modal__close__icon .icon-container svg{fill:var(--m-color-white);height:24px!important;width:24px!important}.miam-modal.without-header .miam-modal__close__icon{height:28px;z-index:8}.miam-modal .miam-modal__actions{background-color:var(--m-color-white);bottom:0;left:0;margin:0!important;position:fixed;right:0;z-index:8}.miam-modal .miam-modal__actions button{font-size:12px;height:44px;margin:16px 5px 5px 0;padding:5px}.miam-modal .miam-modal__actions button:first-of-type{margin:16px 5px 5px}@-webkit-keyframes openBottomSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes openBottomSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}}"], encapsulation: 2, changeDetection: 0 });
|
|
13766
|
+
}, directives: [i3.NgIf, i3.NgClass, IconComponent, LoaderComponent], styles: [".miam-shadow-overlay{-webkit-animation-duration:.3s;-webkit-animation-name:show;-webkit-animation-timing-function:ease-in-out;-webkit-tap-highlight-color:transparent;animation-duration:.3s;animation-name:show;animation-timing-function:ease-in-out;background:var(--m-color-black);height:100vh;left:0;opacity:.6;position:fixed;top:0;width:100vw;z-index:var(--m-z-index-modal-overlay)}.miam-modal{-webkit-animation-duration:.5s;-webkit-animation-name:open;-webkit-animation-timing-function:cubic-bezier(.75,0,.2,1);animation-duration:.5s;animation-name:open;animation-timing-function:cubic-bezier(.75,0,.2,1);background-color:var(--m-color-white);height:100%;max-width:1200px;overflow-x:hidden;overflow-y:auto;position:fixed;right:0;top:0;width:80%;z-index:var(--m-z-index-modal)}@media print{.miam-modal{height:unset!important;overflow-y:unset!important;position:unset!important}}@-webkit-keyframes open{0%{right:-1200px}to{right:0}}@keyframes open{0%{right:-1200px}to{right:0}}.miam-modal.with-header .miam-modal__header{background-color:var(--m-color-grey);color:var(--m-color-grey-text-dark);display:flex;flex-direction:row;justify-content:space-between}.miam-modal.with-header .miam-modal__title{color:var(--m-color-grey-text-dark);font-size:var(--m-font-size-large);font-weight:700;overflow:hidden;padding:20px;text-overflow:ellipsis}.miam-modal.with-header .miam-modal__close__icon{-webkit-tap-highlight-color:transparent;height:40px}.miam-modal.without-header .miam-modal__close__icon{border-radius:var(--m-border-radius-circle);display:flex;height:60px;justify-items:center;position:absolute;right:0;top:0;z-index:var(--m-z-index-position-absolute-high)}.miam-modal .miam-modal__container{display:flex;flex-direction:column;height:100%;position:relative}.miam-modal .miam-modal__container .miam-modal__close__icon{cursor:pointer;margin:10px}@media print{.miam-modal .miam-modal__container .miam-modal__close__icon{display:none}}.miam-modal .miam-modal__container .miam-modal__actions{align-items:center;display:flex;justify-content:space-evenly;margin:20px}@-webkit-keyframes show{0%{opacity:0}to{opacity:.6}}@keyframes show{0%{opacity:0}to{opacity:.6}}@media (max-width:1022px){.miam-modal{-webkit-animation-duration:.5s;-webkit-animation-name:openBottomSheet;-webkit-animation-timing-function:cubic-bezier(.075,.82,.165,1);animation-duration:.5s;animation-name:openBottomSheet;animation-timing-function:cubic-bezier(.075,.82,.165,1);background-color:var(--m-color-white);bottom:0;left:0;max-width:100vw;overflow-x:hidden;overflow-y:hidden;position:fixed;right:0;top:100vh;top:unset;width:100vw;z-index:var(--m-z-index-modal)}.miam-modal.with-header .miam-modal__header{align-items:center;background-color:unset}.miam-modal.with-header .miam-modal__title{padding:0 0 0 16px}.miam-modal.with-header ng-miam-icon.miam-modal__close__icon .icon-container{align-items:center;border:1px solid var(--m-color-light-slate);border-radius:36px;display:grid}.miam-modal.with-header ng-miam-icon.miam-modal__close__icon .icon-container svg{fill:var(--m-color-white);height:24px!important;width:24px!important}.miam-modal.without-header .miam-modal__close__icon{height:28px;z-index:8}.miam-modal .miam-modal__actions{background-color:var(--m-color-white);bottom:0;left:0;margin:0!important;position:fixed;right:0;z-index:8}.miam-modal .miam-modal__actions button{font-size:12px;height:44px;margin:16px 5px 5px 0;padding:5px}.miam-modal .miam-modal__actions button:first-of-type{margin:16px 5px 5px}@-webkit-keyframes openBottomSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes openBottomSheet{0%{transform:translateY(100%)}to{transform:translateY(0)}}}"], encapsulation: 2, changeDetection: 0 });
|
|
13668
13767
|
/*@__PURE__*/ (function () {
|
|
13669
13768
|
i0.ɵsetClassMetadata(ModalComponent, [{
|
|
13670
13769
|
type: i0.Component,
|
|
@@ -13685,6 +13784,14 @@
|
|
|
13685
13784
|
type: i0.Input
|
|
13686
13785
|
}], isAngularComponent: [{
|
|
13687
13786
|
type: i0.Input
|
|
13787
|
+
}], confirmButtonIsLoading: [{
|
|
13788
|
+
type: i0.Input
|
|
13789
|
+
}], cancelButtonIsLoading: [{
|
|
13790
|
+
type: i0.Input
|
|
13791
|
+
}], confirmButtonDisabled: [{
|
|
13792
|
+
type: i0.Input
|
|
13793
|
+
}], cancelButtonDisabled: [{
|
|
13794
|
+
type: i0.Input
|
|
13688
13795
|
}], noHeaderMode: [{
|
|
13689
13796
|
type: i0.Input
|
|
13690
13797
|
}], containerElement: [{
|
|
@@ -14548,11 +14655,13 @@
|
|
|
14548
14655
|
i3.CommonModule,
|
|
14549
14656
|
i15.FormsModule,
|
|
14550
14657
|
ComponentsModule,
|
|
14658
|
+
LoaderModule
|
|
14551
14659
|
]] });
|
|
14552
14660
|
(function () {
|
|
14553
14661
|
(typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ModalModule, { declarations: [ModalComponent], imports: [i3.CommonModule,
|
|
14554
14662
|
i15.FormsModule,
|
|
14555
|
-
ComponentsModule
|
|
14663
|
+
ComponentsModule,
|
|
14664
|
+
LoaderModule], exports: [ModalComponent] });
|
|
14556
14665
|
})();
|
|
14557
14666
|
/*@__PURE__*/ (function () {
|
|
14558
14667
|
i0.ɵsetClassMetadata(ModalModule, [{
|
|
@@ -14562,6 +14671,7 @@
|
|
|
14562
14671
|
i3.CommonModule,
|
|
14563
14672
|
i15.FormsModule,
|
|
14564
14673
|
ComponentsModule,
|
|
14674
|
+
LoaderModule
|
|
14565
14675
|
],
|
|
14566
14676
|
declarations: [
|
|
14567
14677
|
ModalComponent
|
|
@@ -16379,7 +16489,7 @@
|
|
|
16379
16489
|
var _t;
|
|
16380
16490
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topContainerImg = _t.first);
|
|
16381
16491
|
}
|
|
16382
|
-
}, inputs: { recipe: "recipe", previewAllowed: "previewAllowed", ingredientsPictures: "ingredientsPictures", forceDisplayTags: "forceDisplayTags", displayTagsIcons: "displayTagsIcons", displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture" }, outputs: { recipeAdded: "recipeAdded", recipeChanged: "recipeChanged", recipeError: "recipeError" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: [["class", "miam-recipe-details", 4, "ngIf", "ngIfElse"], ["addon", ""], [1, "miam-recipe-details"], ["mainContainer", ""], [1, "miam-recipe-details__header"], [1, "miam-recipe-details__bookmark"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg", 4, "ngIf", "ngIfElse"], ["stamp", ""], ["class", "miam-recipe-details__title", 4, "ngIf"], [1, "miam-recipe-details__header__link", 3, "href"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__summary"], [1, "miam-recipe-details__summary__container"], [1, "miam-recipe-details__sponsor"], [3, "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [3, "src", "ngClass", 4, "ngIf"], [3, "videoId", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__actionbar"], [1, "miam-recipe-details__actionbar__group"], ["class", "miam-recipe-details__actions__icon", 3, "recipe", "width", "height", 4, "ngIf"], ["primaryColor", "var(--m-color-primary)", 1, "miam-recipe-details__actions__icon", 3, "width", "height", "iconName", "click"], ["primaryColor", "var(--m-color-grey02)", "secondaryColor", "var(--m-color-grey07)", 1, "miam-recipe-details__actions__icon", 3, "width", "height", "iconName", "click"], [3, "recipe", "displayTags", "displayTagsIcons", 4, "ngIf"], ["id", "miam-recipe-details__content", 1, "miam-recipe-details__content"], ["class", "miam-recipe-details__title", "id", "miam-recipe-details__title", 4, "ngIf"], ["class", "miam-recipe-details__content__description", 4, "ngIf"], [3, "recipe", "ingredientsPictures", "recipeChanged"], [3, "recipe"], [1, "miam-recipe-details__action__container"], [1, "miam-recipe-details__price"], ["guestsText", "par personne", 3, "recipe", "serves", 4, "ngIf"], ["class", "miam-recipe-details__addbasket", 3, "ngClass", "click", 4, "ngIf"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-stamp.svg"], [1, "miam-recipe-details__title"], [3, "recipe", "showAddon"], [3, "src", "ngClass"], [3, "videoId", "width", "height"], [1, "miam-recipe-details__actions__icon", 3, "recipe", "width", "height"], [3, "recipe", "displayTags", "displayTagsIcons"], ["id", "miam-recipe-details__title", 1, "miam-recipe-details__title"], [1, "miam-recipe-details__content__description"], ["guestsText", "par personne", 3, "recipe", "serves"], [1, "miam-recipe-details__addbasket", 3, "ngClass", "click"], ["class", "miam-recipe-details__addbasket__cta", 4, "ngIf", "ngIfElse"], ["addLoader", ""], [1, "miam-recipe-details__addbasket__cta"], ["primaryColor", "#fff", 3, "width", "height", "iconName", 4, "ngIf"], ["primaryColor", "#fff", 3, "width", "height", "iconName"], [3, "recipe", "hideAddon"]], template: function RecipeDetailsComponent_Template(rf, ctx) {
|
|
16492
|
+
}, inputs: { recipe: "recipe", previewAllowed: "previewAllowed", ingredientsPictures: "ingredientsPictures", forceDisplayTags: "forceDisplayTags", displayTagsIcons: "displayTagsIcons", displayPricing: "displayPricing", displayAddedOnPicture: "displayAddedOnPicture" }, outputs: { recipeAdded: "recipeAdded", recipeChanged: "recipeChanged", recipeError: "recipeError" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: [["class", "miam-recipe-details", 4, "ngIf", "ngIfElse"], ["addon", ""], [1, "miam-recipe-details"], ["mainContainer", ""], [1, "miam-recipe-details__header"], [1, "miam-recipe-details__bookmark"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg", 4, "ngIf", "ngIfElse"], ["stamp", ""], ["class", "miam-recipe-details__title", 4, "ngIf"], [1, "miam-recipe-details__header__link", 3, "href"], [1, "miam-recipe-details__container"], [1, "miam-recipe-details__summary"], [1, "miam-recipe-details__summary__container"], [1, "miam-recipe-details__sponsor"], [3, "recipe", "showAddon", 4, "ngIf"], [1, "miam-recipe-details__picture"], ["topContainerImg", ""], [3, "src", "ngClass", 4, "ngIf"], [3, "videoId", "width", "height", 4, "ngIf"], [1, "miam-recipe-details__actionbar"], [1, "miam-recipe-details__actionbar__group"], ["class", "miam-recipe-details__actions__icon like", 3, "recipe", "width", "height", 4, "ngIf"], ["primaryColor", "var(--m-color-primary)", 1, "miam-recipe-details__actions__icon", "print", 3, "width", "height", "iconName", "click"], ["primaryColor", "var(--m-color-grey02)", "secondaryColor", "var(--m-color-grey07)", 1, "miam-recipe-details__actions__icon", "help", 3, "width", "height", "iconName", "click"], [3, "recipe", "displayTags", "displayTagsIcons", 4, "ngIf"], ["id", "miam-recipe-details__content", 1, "miam-recipe-details__content"], ["class", "miam-recipe-details__title", "id", "miam-recipe-details__title", 4, "ngIf"], ["class", "miam-recipe-details__content__description", 4, "ngIf"], [3, "recipe", "ingredientsPictures", "recipeChanged"], [3, "recipe"], [1, "miam-recipe-details__action__container"], [1, "miam-recipe-details__price"], ["guestsText", "par personne", 3, "recipe", "serves", 4, "ngIf"], ["class", "miam-recipe-details__addbasket", 3, "ngClass", "click", 4, "ngIf"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-bookmark.svg"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-details/recipe-details-stamp.svg"], [1, "miam-recipe-details__title"], [3, "recipe", "showAddon"], [3, "src", "ngClass"], [3, "videoId", "width", "height"], [1, "miam-recipe-details__actions__icon", "like", 3, "recipe", "width", "height"], [3, "recipe", "displayTags", "displayTagsIcons"], ["id", "miam-recipe-details__title", 1, "miam-recipe-details__title"], [1, "miam-recipe-details__content__description"], ["guestsText", "par personne", 3, "recipe", "serves"], [1, "miam-recipe-details__addbasket", 3, "ngClass", "click"], ["class", "miam-recipe-details__addbasket__cta", 4, "ngIf", "ngIfElse"], ["addLoader", ""], [1, "miam-recipe-details__addbasket__cta"], ["primaryColor", "#fff", 3, "width", "height", "iconName", 4, "ngIf"], ["primaryColor", "#fff", 3, "width", "height", "iconName"], [3, "recipe", "hideAddon"]], template: function RecipeDetailsComponent_Template(rf, ctx) {
|
|
16383
16493
|
if (rf & 1) {
|
|
16384
16494
|
i0.ɵɵtemplate(0, RecipeDetailsComponent_div_0_Template, 38, 25, "div", 0);
|
|
16385
16495
|
i0.ɵɵtemplate(1, RecipeDetailsComponent_ng_template_1_Template, 1, 1, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
@@ -17810,65 +17920,135 @@
|
|
|
17810
17920
|
})();
|
|
17811
17921
|
|
|
17812
17922
|
var _c0$y = ["tag"];
|
|
17813
|
-
function
|
|
17923
|
+
function RecipeTagsComponent_ng_container_0_div_1_div_2_Template(rf, ctx) {
|
|
17814
17924
|
if (rf & 1) {
|
|
17815
|
-
var
|
|
17816
|
-
i0.ɵɵelementStart(0, "div",
|
|
17817
|
-
i0.ɵɵelementStart(2, "ng-miam-icon",
|
|
17818
|
-
i0.ɵɵlistener("click", function
|
|
17925
|
+
var _r9_1 = i0.ɵɵgetCurrentView();
|
|
17926
|
+
i0.ɵɵelementStart(0, "div", 11, 12);
|
|
17927
|
+
i0.ɵɵelementStart(2, "ng-miam-icon", 13);
|
|
17928
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_container_0_div_1_div_2_Template_ng_miam_icon_click_2_listener() { i0.ɵɵrestoreView(_r9_1); var recipeLine_r5 = ctx.$implicit; var ctx_r8 = i0.ɵɵnextContext(3); return ctx_r8.toggleRecipe(recipeLine_r5.id); });
|
|
17819
17929
|
i0.ɵɵelementEnd();
|
|
17820
|
-
i0.ɵɵelementStart(3, "span",
|
|
17821
|
-
i0.ɵɵlistener("click", function
|
|
17930
|
+
i0.ɵɵelementStart(3, "span", 14);
|
|
17931
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_container_0_div_1_div_2_Template_span_click_3_listener() { i0.ɵɵrestoreView(_r9_1); var recipeLine_r5 = ctx.$implicit; var ctx_r10 = i0.ɵɵnextContext(3); return ctx_r10.toggleRecipe(recipeLine_r5.id); });
|
|
17822
17932
|
i0.ɵɵtext(4);
|
|
17823
17933
|
i0.ɵɵpipe(5, "ellipsis");
|
|
17824
17934
|
i0.ɵɵelementEnd();
|
|
17825
17935
|
i0.ɵɵelementEnd();
|
|
17826
17936
|
}
|
|
17827
17937
|
if (rf & 2) {
|
|
17828
|
-
var
|
|
17829
|
-
var
|
|
17938
|
+
var recipeLine_r5 = ctx.$implicit;
|
|
17939
|
+
var ctx_r4 = i0.ɵɵnextContext(3);
|
|
17830
17940
|
i0.ɵɵadvance(2);
|
|
17831
|
-
i0.ɵɵproperty("iconName",
|
|
17941
|
+
i0.ɵɵproperty("iconName", ctx_r4.icon.Meal);
|
|
17832
17942
|
i0.ɵɵadvance(2);
|
|
17833
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(5, 2,
|
|
17943
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(5, 2, recipeLine_r5.title, 6));
|
|
17834
17944
|
}
|
|
17835
17945
|
}
|
|
17836
17946
|
var _c1$h = function (a0) { return { "height.px": a0 }; };
|
|
17837
17947
|
var _c2$6 = function (a0) { return { "miam-recipe-tags__container__toggle__hidden": a0 }; };
|
|
17838
17948
|
var _c3$3 = function (a0) { return { "opacity": a0 }; };
|
|
17839
|
-
function
|
|
17949
|
+
function RecipeTagsComponent_ng_container_0_div_1_Template(rf, ctx) {
|
|
17840
17950
|
if (rf & 1) {
|
|
17841
|
-
var
|
|
17842
|
-
i0.ɵɵelementStart(0, "div",
|
|
17843
|
-
i0.ɵɵelementStart(1, "div",
|
|
17844
|
-
i0.ɵɵtemplate(2,
|
|
17951
|
+
var _r12_1 = i0.ɵɵgetCurrentView();
|
|
17952
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
17953
|
+
i0.ɵɵelementStart(1, "div", 4);
|
|
17954
|
+
i0.ɵɵtemplate(2, RecipeTagsComponent_ng_container_0_div_1_div_2_Template, 6, 5, "div", 5);
|
|
17845
17955
|
i0.ɵɵelementEnd();
|
|
17846
|
-
i0.ɵɵelementStart(3, "div",
|
|
17847
|
-
i0.ɵɵelementStart(4, "span",
|
|
17848
|
-
i0.ɵɵlistener("click", function
|
|
17956
|
+
i0.ɵɵelementStart(3, "div", 6);
|
|
17957
|
+
i0.ɵɵelementStart(4, "span", 7);
|
|
17958
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_container_0_div_1_Template_span_click_4_listener() { i0.ɵɵrestoreView(_r12_1); var ctx_r11 = i0.ɵɵnextContext(2); return ctx_r11.toggleList(); });
|
|
17849
17959
|
i0.ɵɵtext(5);
|
|
17850
17960
|
i0.ɵɵelementEnd();
|
|
17851
|
-
i0.ɵɵelement(6, "div",
|
|
17852
|
-
i0.ɵɵelementStart(7, "span",
|
|
17853
|
-
i0.ɵɵlistener("click", function
|
|
17854
|
-
i0.ɵɵelement(8, "ng-miam-icon",
|
|
17961
|
+
i0.ɵɵelement(6, "div", 8);
|
|
17962
|
+
i0.ɵɵelementStart(7, "span", 9);
|
|
17963
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_container_0_div_1_Template_span_click_7_listener() { i0.ɵɵrestoreView(_r12_1); var ctx_r13 = i0.ɵɵnextContext(2); return ctx_r13.toggleList(); });
|
|
17964
|
+
i0.ɵɵelement(8, "ng-miam-icon", 10);
|
|
17855
17965
|
i0.ɵɵelementEnd();
|
|
17856
17966
|
i0.ɵɵelementEnd();
|
|
17857
17967
|
i0.ɵɵelementEnd();
|
|
17858
17968
|
}
|
|
17859
17969
|
if (rf & 2) {
|
|
17860
|
-
var
|
|
17861
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(6, _c1$h,
|
|
17970
|
+
var ctx_r3 = i0.ɵɵnextContext(2);
|
|
17971
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(6, _c1$h, ctx_r3.isListOpen ? 32 * ctx_r3.rowCount : 24));
|
|
17862
17972
|
i0.ɵɵadvance(2);
|
|
17863
|
-
i0.ɵɵproperty("ngForOf",
|
|
17973
|
+
i0.ɵɵproperty("ngForOf", ctx_r3.recipePreviewLines);
|
|
17864
17974
|
i0.ɵɵadvance(1);
|
|
17865
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$6, !
|
|
17975
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$6, !ctx_r3.rowCount || ctx_r3.wrappedItemsCount === 0));
|
|
17866
17976
|
i0.ɵɵadvance(2);
|
|
17867
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
17977
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r3.isListOpen ? " " : "+" + ctx_r3.wrappedItemsCount, "");
|
|
17868
17978
|
i0.ɵɵadvance(2);
|
|
17869
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(10, _c3$3,
|
|
17979
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(10, _c3$3, ctx_r3.isListOpen ? 1 : 0));
|
|
17870
17980
|
i0.ɵɵadvance(1);
|
|
17871
|
-
i0.ɵɵproperty("iconName",
|
|
17981
|
+
i0.ɵɵproperty("iconName", ctx_r3.icon.ChevronDown);
|
|
17982
|
+
}
|
|
17983
|
+
}
|
|
17984
|
+
function RecipeTagsComponent_ng_container_0_Template(rf, ctx) {
|
|
17985
|
+
if (rf & 1) {
|
|
17986
|
+
i0.ɵɵelementContainerStart(0);
|
|
17987
|
+
i0.ɵɵtemplate(1, RecipeTagsComponent_ng_container_0_div_1_Template, 9, 12, "div", 2);
|
|
17988
|
+
i0.ɵɵelementContainerEnd();
|
|
17989
|
+
}
|
|
17990
|
+
if (rf & 2) {
|
|
17991
|
+
var ctx_r0 = i0.ɵɵnextContext();
|
|
17992
|
+
i0.ɵɵadvance(1);
|
|
17993
|
+
i0.ɵɵproperty("ngIf", (ctx_r0.recipePreviewLines == null ? null : ctx_r0.recipePreviewLines.length) > 0);
|
|
17994
|
+
}
|
|
17995
|
+
}
|
|
17996
|
+
function RecipeTagsComponent_ng_template_1_div_0_Template(rf, ctx) {
|
|
17997
|
+
if (rf & 1) {
|
|
17998
|
+
var _r17_1 = i0.ɵɵgetCurrentView();
|
|
17999
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
18000
|
+
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(); });
|
|
18001
|
+
i0.ɵɵelementStart(1, "span");
|
|
18002
|
+
i0.ɵɵtext(2);
|
|
18003
|
+
i0.ɵɵelementEnd();
|
|
18004
|
+
i0.ɵɵelementEnd();
|
|
18005
|
+
}
|
|
18006
|
+
if (rf & 2) {
|
|
18007
|
+
var ctx_r14 = i0.ɵɵnextContext(2);
|
|
18008
|
+
i0.ɵɵadvance(2);
|
|
18009
|
+
i0.ɵɵtextInterpolate1("", ctx_r14.recipePreviewLines.length, " recettes");
|
|
18010
|
+
}
|
|
18011
|
+
}
|
|
18012
|
+
function RecipeTagsComponent_ng_template_1_div_3_Template(rf, ctx) {
|
|
18013
|
+
if (rf & 1) {
|
|
18014
|
+
var _r22_1 = i0.ɵɵgetCurrentView();
|
|
18015
|
+
i0.ɵɵelementStart(0, "div", 11, 12);
|
|
18016
|
+
i0.ɵɵelementStart(2, "ng-miam-icon", 13);
|
|
18017
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_template_1_div_3_Template_ng_miam_icon_click_2_listener() { i0.ɵɵrestoreView(_r22_1); var recipeLine_r18 = ctx.$implicit; var ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.toggleRecipe(recipeLine_r18.id); });
|
|
18018
|
+
i0.ɵɵelementEnd();
|
|
18019
|
+
i0.ɵɵelementStart(3, "span", 14);
|
|
18020
|
+
i0.ɵɵlistener("click", function RecipeTagsComponent_ng_template_1_div_3_Template_span_click_3_listener() { i0.ɵɵrestoreView(_r22_1); var recipeLine_r18 = ctx.$implicit; var ctx_r23 = i0.ɵɵnextContext(2); return ctx_r23.toggleRecipe(recipeLine_r18.id); });
|
|
18021
|
+
i0.ɵɵtext(4);
|
|
18022
|
+
i0.ɵɵelementEnd();
|
|
18023
|
+
i0.ɵɵelementEnd();
|
|
18024
|
+
}
|
|
18025
|
+
if (rf & 2) {
|
|
18026
|
+
var recipeLine_r18 = ctx.$implicit;
|
|
18027
|
+
var ctx_r15 = i0.ɵɵnextContext(2);
|
|
18028
|
+
i0.ɵɵadvance(2);
|
|
18029
|
+
i0.ɵɵproperty("iconName", ctx_r15.icon.Meal);
|
|
18030
|
+
i0.ɵɵadvance(2);
|
|
18031
|
+
i0.ɵɵtextInterpolate(recipeLine_r18.title);
|
|
18032
|
+
}
|
|
18033
|
+
}
|
|
18034
|
+
function RecipeTagsComponent_ng_template_1_Template(rf, ctx) {
|
|
18035
|
+
if (rf & 1) {
|
|
18036
|
+
var _r25_1 = i0.ɵɵgetCurrentView();
|
|
18037
|
+
i0.ɵɵtemplate(0, RecipeTagsComponent_ng_template_1_div_0_Template, 3, 1, "div", 15);
|
|
18038
|
+
i0.ɵɵelementStart(1, "ng-miam-modal", 16);
|
|
18039
|
+
i0.ɵɵlistener("close", function RecipeTagsComponent_ng_template_1_Template_ng_miam_modal_close_1_listener() { i0.ɵɵrestoreView(_r25_1); var ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.toggleModal(); });
|
|
18040
|
+
i0.ɵɵelementStart(2, "div", 4);
|
|
18041
|
+
i0.ɵɵtemplate(3, RecipeTagsComponent_ng_template_1_div_3_Template, 5, 2, "div", 5);
|
|
18042
|
+
i0.ɵɵelementEnd();
|
|
18043
|
+
i0.ɵɵelementEnd();
|
|
18044
|
+
}
|
|
18045
|
+
if (rf & 2) {
|
|
18046
|
+
var ctx_r2 = i0.ɵɵnextContext();
|
|
18047
|
+
i0.ɵɵproperty("ngIf", (ctx_r2.recipePreviewLines == null ? null : ctx_r2.recipePreviewLines.length) > 0);
|
|
18048
|
+
i0.ɵɵadvance(1);
|
|
18049
|
+
i0.ɵɵproperty("isAngularComponent", true)("expanded", ctx_r2.modalIsOpened)("noHeaderMode", false)("title", ctx_r2.modalTitle);
|
|
18050
|
+
i0.ɵɵadvance(2);
|
|
18051
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.recipePreviewLines);
|
|
17872
18052
|
}
|
|
17873
18053
|
}
|
|
17874
18054
|
var RecipeTagsComponent = /** @class */ (function () {
|
|
@@ -17877,7 +18057,9 @@
|
|
|
17877
18057
|
this.basketService = basketService;
|
|
17878
18058
|
this.contexteservice = contexteservice;
|
|
17879
18059
|
this.recipeDetailPreviewAllowed = true;
|
|
18060
|
+
this.reduce = false;
|
|
17880
18061
|
this.icon = exports.Icon;
|
|
18062
|
+
this.modalIsOpened = false;
|
|
17881
18063
|
this.subscriptions = [];
|
|
17882
18064
|
}
|
|
17883
18065
|
RecipeTagsComponent.prototype.ngOnChanges = function (simpleChanges) {
|
|
@@ -17934,6 +18116,13 @@
|
|
|
17934
18116
|
this.isListOpen = !this.isListOpen;
|
|
17935
18117
|
this.cdr.detectChanges();
|
|
17936
18118
|
};
|
|
18119
|
+
RecipeTagsComponent.prototype.toggleModal = function () {
|
|
18120
|
+
if (!this.modalIsOpened) {
|
|
18121
|
+
this.modalTitle = 'Utilisé dans ' + this.recipePreviewLines.length + ' recettes';
|
|
18122
|
+
}
|
|
18123
|
+
this.modalIsOpened = !this.modalIsOpened;
|
|
18124
|
+
this.cdr.detectChanges();
|
|
18125
|
+
};
|
|
17937
18126
|
return RecipeTagsComponent;
|
|
17938
18127
|
}());
|
|
17939
18128
|
RecipeTagsComponent.ɵfac = function RecipeTagsComponent_Factory(t) { return new (t || RecipeTagsComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(BasketsService), i0.ɵɵdirectiveInject(ContextService)); };
|
|
@@ -17945,14 +18134,16 @@
|
|
|
17945
18134
|
var _t;
|
|
17946
18135
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tags = _t);
|
|
17947
18136
|
}
|
|
17948
|
-
}, inputs: { extId: "extId", recipeDetailPreviewAllowed: "recipeDetailPreviewAllowed" }, features: [i0.ɵɵNgOnChangesFeature], decls:
|
|
18137
|
+
}, inputs: { extId: "extId", recipeDetailPreviewAllowed: "recipeDetailPreviewAllowed", reduce: "reduce" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: [[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"], [1, "miam-recipe-tags__modal", 3, "isAngularComponent", "expanded", "noHeaderMode", "title", "close"], [1, "miam-recipe-tags__recipes", 3, "click"]], template: function RecipeTagsComponent_Template(rf, ctx) {
|
|
17949
18138
|
if (rf & 1) {
|
|
17950
|
-
i0.ɵɵtemplate(0,
|
|
18139
|
+
i0.ɵɵtemplate(0, RecipeTagsComponent_ng_container_0_Template, 2, 1, "ng-container", 0);
|
|
18140
|
+
i0.ɵɵtemplate(1, RecipeTagsComponent_ng_template_1_Template, 4, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
17951
18141
|
}
|
|
17952
18142
|
if (rf & 2) {
|
|
17953
|
-
i0.ɵɵ
|
|
18143
|
+
var _r1 = i0.ɵɵreference(2);
|
|
18144
|
+
i0.ɵɵproperty("ngIf", !ctx.reduce)("ngIfElse", _r1);
|
|
17954
18145
|
}
|
|
17955
|
-
}, directives: [i3.NgIf, i3.NgStyle, i3.NgForOf, i3.NgClass, IconComponent], pipes: [EllipsisPipe], styles: [".miam-recipe-
|
|
18146
|
+
}, directives: [i3.NgIf, i3.NgStyle, i3.NgForOf, i3.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 });
|
|
17956
18147
|
/*@__PURE__*/ (function () {
|
|
17957
18148
|
i0.ɵsetClassMetadata(RecipeTagsComponent, [{
|
|
17958
18149
|
type: i0.Component,
|
|
@@ -17967,6 +18158,8 @@
|
|
|
17967
18158
|
type: i0.Input
|
|
17968
18159
|
}], recipeDetailPreviewAllowed: [{
|
|
17969
18160
|
type: i0.Input
|
|
18161
|
+
}], reduce: [{
|
|
18162
|
+
type: i0.Input
|
|
17970
18163
|
}], tags: [{
|
|
17971
18164
|
type: i0.ViewChildren,
|
|
17972
18165
|
args: ['tag']
|
|
@@ -18309,7 +18502,7 @@
|
|
|
18309
18502
|
var _r8_1 = i0.ɵɵgetCurrentView();
|
|
18310
18503
|
i0.ɵɵelementStart(0, "div", 5);
|
|
18311
18504
|
i0.ɵɵelementStart(1, "ng-miam-basket-preview-block", 6);
|
|
18312
|
-
i0.ɵɵlistener("guestCountChanged", function RecipeModalComponent_div_2_Template_ng_miam_basket_preview_block_guestCountChanged_1_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.updateRecipeGuests($event); });
|
|
18505
|
+
i0.ɵɵlistener("guestCountChanged", function RecipeModalComponent_div_2_Template_ng_miam_basket_preview_block_guestCountChanged_1_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.updateRecipeGuests($event); })("loading", function RecipeModalComponent_div_2_Template_ng_miam_basket_preview_block_loading_1_listener($event) { i0.ɵɵrestoreView(_r8_1); var ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.setModalClosable($event); });
|
|
18313
18506
|
i0.ɵɵelementEnd();
|
|
18314
18507
|
i0.ɵɵelementEnd();
|
|
18315
18508
|
}
|
|
@@ -18320,14 +18513,20 @@
|
|
|
18320
18513
|
}
|
|
18321
18514
|
}
|
|
18322
18515
|
var RecipeModalComponent = /** @class */ (function () {
|
|
18323
|
-
function RecipeModalComponent(cdr, recipesService, printService, elRef, groceriesListsService) {
|
|
18516
|
+
function RecipeModalComponent(cdr, recipesService, printService, elRef, groceriesListsService, basketsService) {
|
|
18324
18517
|
this.cdr = cdr;
|
|
18325
18518
|
this.recipesService = recipesService;
|
|
18326
18519
|
this.printService = printService;
|
|
18327
18520
|
this.elRef = elRef;
|
|
18328
18521
|
this.groceriesListsService = groceriesListsService;
|
|
18522
|
+
this.basketsService = basketsService;
|
|
18329
18523
|
this.show = false;
|
|
18330
18524
|
this.previewMode = false;
|
|
18525
|
+
this.canCloseModal = true;
|
|
18526
|
+
this.removeIsLoading = false;
|
|
18527
|
+
this.basketChangedSinceOpened = false; // true if show = true and basket is different since last time show was false
|
|
18528
|
+
this.recipeWasAdded = false;
|
|
18529
|
+
this.hasChangesOnClose = new i0.EventEmitter(false);
|
|
18331
18530
|
}
|
|
18332
18531
|
RecipeModalComponent.prototype.ngOnInit = function () {
|
|
18333
18532
|
var _this = this;
|
|
@@ -18338,6 +18537,7 @@
|
|
|
18338
18537
|
_this.cdr.detectChanges();
|
|
18339
18538
|
}
|
|
18340
18539
|
else {
|
|
18540
|
+
_this.recipeWasAdded = result.wasAdded;
|
|
18341
18541
|
_this.recipe = result.recipe;
|
|
18342
18542
|
_this.previewMode = result.previewMode;
|
|
18343
18543
|
_this.previewAllowed = result.previewAllowed;
|
|
@@ -18350,21 +18550,39 @@
|
|
|
18350
18550
|
_this.cdr.detectChanges();
|
|
18351
18551
|
}
|
|
18352
18552
|
});
|
|
18553
|
+
this.basketsService._basket$.subscribe(function () {
|
|
18554
|
+
if (_this.show) {
|
|
18555
|
+
_this.basketChangedSinceOpened = true;
|
|
18556
|
+
}
|
|
18557
|
+
});
|
|
18353
18558
|
};
|
|
18354
18559
|
RecipeModalComponent.prototype.hide = function () {
|
|
18355
|
-
this.
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18560
|
+
if (this.canCloseModal) {
|
|
18561
|
+
this.show = false;
|
|
18562
|
+
this.previewMode = false;
|
|
18563
|
+
this.recipesService.hide();
|
|
18564
|
+
this.printService.dissmissPrinting();
|
|
18565
|
+
this.hasChangesOnClose.emit(this.basketChangedSinceOpened);
|
|
18566
|
+
this.basketChangedSinceOpened = false;
|
|
18567
|
+
this.cdr.detectChanges();
|
|
18568
|
+
}
|
|
18360
18569
|
};
|
|
18361
18570
|
RecipeModalComponent.prototype.togglePreviewMode = function () {
|
|
18362
18571
|
this.previewMode = !this.previewMode;
|
|
18363
18572
|
this.cdr.detectChanges();
|
|
18364
18573
|
};
|
|
18365
18574
|
RecipeModalComponent.prototype.removeRecipe = function () {
|
|
18366
|
-
this
|
|
18367
|
-
this.
|
|
18575
|
+
var _this = this;
|
|
18576
|
+
if (this.canCloseModal) {
|
|
18577
|
+
this.removeIsLoading = true;
|
|
18578
|
+
this.cdr.detectChanges();
|
|
18579
|
+
this.groceriesListsService.removeRecipeFromList(this.recipe.id).subscribe(function () {
|
|
18580
|
+
// if remove and recipe was added, then no change was made to basket, and if removed and not added it's a change to the basket
|
|
18581
|
+
_this.basketChangedSinceOpened = !_this.recipeWasAdded;
|
|
18582
|
+
_this.removeIsLoading = false;
|
|
18583
|
+
_this.hide();
|
|
18584
|
+
});
|
|
18585
|
+
}
|
|
18368
18586
|
};
|
|
18369
18587
|
RecipeModalComponent.prototype.updateRecipeGuests = function (guests) {
|
|
18370
18588
|
this.recipe.modifiedGuests = guests;
|
|
@@ -18379,10 +18597,16 @@
|
|
|
18379
18597
|
});
|
|
18380
18598
|
this.recipesService.displayedRecipeChanged.emit();
|
|
18381
18599
|
};
|
|
18600
|
+
/**
|
|
18601
|
+
* If the preview is opened and loading, block the user from closing the modal
|
|
18602
|
+
*/
|
|
18603
|
+
RecipeModalComponent.prototype.setModalClosable = function (previewLoading) {
|
|
18604
|
+
this.canCloseModal = !(previewLoading && this.previewMode);
|
|
18605
|
+
};
|
|
18382
18606
|
return RecipeModalComponent;
|
|
18383
18607
|
}());
|
|
18384
|
-
RecipeModalComponent.ɵfac = function RecipeModalComponent_Factory(t) { return new (t || RecipeModalComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PrintService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(GroceriesListsService)); };
|
|
18385
|
-
RecipeModalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], decls: 3, vars:
|
|
18608
|
+
RecipeModalComponent.ɵfac = function RecipeModalComponent_Factory(t) { return new (t || RecipeModalComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(PrintService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(BasketsService)); };
|
|
18609
|
+
RecipeModalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RecipeModalComponent, selectors: [["ng-miam-recipe-modal"]], outputs: { hasChangesOnClose: "hasChangesOnClose" }, decls: 3, vars: 12, consts: [[3, "isAngularComponent", "noHeaderMode", "expanded", "title", "cancelButtonText", "confirmButtonText", "cancelButtonDisabled", "confirmButtonDisabled", "cancelButtonIsLoading", "expandedChange", "close", "cancel", "confirm"], [3, "recipe", "previewAllowed", "recipeAdded", "recipeChanged", "recipeError", 4, "ngIf"], ["class", "miam-wrapper-preview", 4, "ngIf"], [3, "recipe", "previewAllowed", "recipeAdded", "recipeChanged", "recipeError"], ["details", ""], [1, "miam-wrapper-preview"], [3, "recipeId", "guestCountChanged", "loading"]], template: function RecipeModalComponent_Template(rf, ctx) {
|
|
18386
18610
|
if (rf & 1) {
|
|
18387
18611
|
i0.ɵɵelementStart(0, "ng-miam-modal", 0);
|
|
18388
18612
|
i0.ɵɵlistener("expandedChange", function RecipeModalComponent_Template_ng_miam_modal_expandedChange_0_listener($event) { return ctx.show = $event; })("close", function RecipeModalComponent_Template_ng_miam_modal_close_0_listener() { return ctx.hide(); })("cancel", function RecipeModalComponent_Template_ng_miam_modal_cancel_0_listener() { return ctx.removeRecipe(); })("confirm", function RecipeModalComponent_Template_ng_miam_modal_confirm_0_listener() { return ctx.hide(); });
|
|
@@ -18391,13 +18615,13 @@
|
|
|
18391
18615
|
i0.ɵɵelementEnd();
|
|
18392
18616
|
}
|
|
18393
18617
|
if (rf & 2) {
|
|
18394
|
-
i0.ɵɵproperty("isAngularComponent", true)("noHeaderMode", true)("expanded", ctx.show)("noHeaderMode", !ctx.previewMode)("title", ctx.previewMode ? "1 repas ajout\u00E9 \u00E0 votre panier :" : "")("cancelButtonText", ctx.previewMode ? "Retirer le repas" : "")("confirmButtonText", ctx.previewMode ? "Ok, continuer mes courses" : "");
|
|
18618
|
+
i0.ɵɵproperty("isAngularComponent", true)("noHeaderMode", true)("expanded", ctx.show)("noHeaderMode", !ctx.previewMode)("title", ctx.previewMode ? "1 repas ajout\u00E9 \u00E0 votre panier :" : "")("cancelButtonText", ctx.previewMode ? "Retirer le repas" : "")("confirmButtonText", ctx.previewMode ? "Ok, continuer mes courses" : "")("cancelButtonDisabled", !ctx.canCloseModal)("confirmButtonDisabled", !ctx.canCloseModal)("cancelButtonIsLoading", ctx.removeIsLoading);
|
|
18395
18619
|
i0.ɵɵadvance(1);
|
|
18396
18620
|
i0.ɵɵproperty("ngIf", ctx.recipe && !ctx.previewMode);
|
|
18397
18621
|
i0.ɵɵadvance(1);
|
|
18398
18622
|
i0.ɵɵproperty("ngIf", ctx.previewMode);
|
|
18399
18623
|
}
|
|
18400
|
-
}, directives: [ModalComponent, i3.NgIf, RecipeDetailsComponent, BasketPreviewBlockComponent], styles: [".miam-wrapper-preview
|
|
18624
|
+
}, directives: [ModalComponent, i3.NgIf, RecipeDetailsComponent, BasketPreviewBlockComponent], styles: [".miam-wrapper-preview{background-color:#fff;flex:1;overflow-y:auto;padding:20px}@media (max-width:1022px){.miam-wrapper-preview{padding-bottom:80px}}.miam-wrapper-preview::-webkit-scrollbar{cursor:-webkit-grab;height:7px;width:5px}.miam-wrapper-preview::-webkit-scrollbar-track{background:var(--m-color-grey)}.miam-wrapper-preview::-webkit-scrollbar-thumb{background:var(--m-color-primary);border-radius:5px}"], encapsulation: 2, changeDetection: 0 });
|
|
18401
18625
|
/*@__PURE__*/ (function () {
|
|
18402
18626
|
i0.ɵsetClassMetadata(RecipeModalComponent, [{
|
|
18403
18627
|
type: i0.Component,
|
|
@@ -18405,9 +18629,12 @@
|
|
|
18405
18629
|
selector: 'ng-miam-recipe-modal',
|
|
18406
18630
|
templateUrl: './recipe-modal.component.html',
|
|
18407
18631
|
styleUrls: ['./recipe-modal.component.scss'],
|
|
18408
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
18632
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
18633
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
18409
18634
|
}]
|
|
18410
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: PrintService }, { type: i0.ElementRef }, { type: GroceriesListsService }]; },
|
|
18635
|
+
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: PrintService }, { type: i0.ElementRef }, { type: GroceriesListsService }, { type: BasketsService }]; }, { hasChangesOnClose: [{
|
|
18636
|
+
type: i0.Output
|
|
18637
|
+
}] });
|
|
18411
18638
|
})();
|
|
18412
18639
|
|
|
18413
18640
|
var _c0$A = ["recipeCard"];
|