ng-miam 6.5.0 → 6.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ng-miam.umd.js +769 -758
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +2 -2
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_services/baskets-synchronizing/baskets-synchronizer.service.js +3 -3
- package/esm2015/lib/_services/interceptor.service.js +2 -2
- package/esm2015/lib/_services/recipes.service.js +15 -2
- package/esm2015/lib/_types/recipe-filters.js +1 -1
- package/esm2015/lib/_web-components/recipe-cards/catalog-recipe-card/catalog-recipe-card.component.js +4 -4
- package/esm2015/lib/_web-components/recipe-cards/recipe-card/recipe-card.component.js +4 -4
- package/esm2015/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.js +19 -22
- package/esm2015/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.js +27 -25
- package/esm2015/lib/_web-components/recipe-catalog/recipe-catalog.component.js +79 -82
- package/fesm2015/ng-miam.js +458 -445
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/recipes.service.d.ts +5 -2
- package/lib/_types/recipe-filters.d.ts +2 -0
- package/lib/_web-components/recipe-catalog/catalog-category/catalog-category.component.d.ts +2 -3
- package/lib/_web-components/recipe-catalog/catalog-list/catalog-list.component.d.ts +3 -5
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -1514,6 +1514,111 @@
|
|
|
1514
1514
|
}], function () { return []; }, null);
|
|
1515
1515
|
})();
|
|
1516
1516
|
|
|
1517
|
+
var Ingredient = /** @class */ (function (_super) {
|
|
1518
|
+
__extends(Ingredient, _super);
|
|
1519
|
+
function Ingredient() {
|
|
1520
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1521
|
+
_this.attributes = {
|
|
1522
|
+
name: '',
|
|
1523
|
+
quantity: '',
|
|
1524
|
+
unit: '',
|
|
1525
|
+
importance: '',
|
|
1526
|
+
active: true,
|
|
1527
|
+
'forced-eans': [],
|
|
1528
|
+
'picture-url': '',
|
|
1529
|
+
position: -1
|
|
1530
|
+
};
|
|
1531
|
+
_this.relationships = {
|
|
1532
|
+
recipe: new i1.DocumentResource(),
|
|
1533
|
+
'quantity-unit': new i1.DocumentResource()
|
|
1534
|
+
};
|
|
1535
|
+
return _this;
|
|
1536
|
+
}
|
|
1537
|
+
Object.defineProperty(Ingredient.prototype, "quantity", {
|
|
1538
|
+
get: function () {
|
|
1539
|
+
if (this.attributes.quantity) {
|
|
1540
|
+
// /!\ toLocalString can transphorm an dot into a coma
|
|
1541
|
+
return parseFloat(this.attributes.quantity).toString();
|
|
1542
|
+
}
|
|
1543
|
+
else {
|
|
1544
|
+
return '1';
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
enumerable: false,
|
|
1548
|
+
configurable: true
|
|
1549
|
+
});
|
|
1550
|
+
Object.defineProperty(Ingredient.prototype, "picture", {
|
|
1551
|
+
get: function () {
|
|
1552
|
+
return this.attributes['picture-url'];
|
|
1553
|
+
},
|
|
1554
|
+
enumerable: false,
|
|
1555
|
+
configurable: true
|
|
1556
|
+
});
|
|
1557
|
+
return Ingredient;
|
|
1558
|
+
}(i1.Resource));
|
|
1559
|
+
|
|
1560
|
+
var Package = /** @class */ (function (_super) {
|
|
1561
|
+
__extends(Package, _super);
|
|
1562
|
+
function Package() {
|
|
1563
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1564
|
+
_this.attributes = {
|
|
1565
|
+
title: '',
|
|
1566
|
+
'author-id': '',
|
|
1567
|
+
// system: '',
|
|
1568
|
+
editable: false,
|
|
1569
|
+
shared: false,
|
|
1570
|
+
'catalog-category': false,
|
|
1571
|
+
'catalog-position': '',
|
|
1572
|
+
'recipes-count': '',
|
|
1573
|
+
'media-url': '',
|
|
1574
|
+
settings: {}
|
|
1575
|
+
};
|
|
1576
|
+
_this.relationships = {
|
|
1577
|
+
provider: new i1.DocumentResource(),
|
|
1578
|
+
status: new i1.DocumentResource(),
|
|
1579
|
+
recipes: new i1.DocumentCollection(),
|
|
1580
|
+
'shared-suppliers': new i1.DocumentCollection()
|
|
1581
|
+
};
|
|
1582
|
+
return _this;
|
|
1583
|
+
}
|
|
1584
|
+
Object.defineProperty(Package.prototype, "title", {
|
|
1585
|
+
get: function () {
|
|
1586
|
+
return this.attributes.title;
|
|
1587
|
+
},
|
|
1588
|
+
enumerable: false,
|
|
1589
|
+
configurable: true
|
|
1590
|
+
});
|
|
1591
|
+
Object.defineProperty(Package.prototype, "status", {
|
|
1592
|
+
get: function () {
|
|
1593
|
+
return this.relationships && this.relationships.status && this.relationships.status.data;
|
|
1594
|
+
},
|
|
1595
|
+
enumerable: false,
|
|
1596
|
+
configurable: true
|
|
1597
|
+
});
|
|
1598
|
+
Object.defineProperty(Package.prototype, "subtitle", {
|
|
1599
|
+
get: function () {
|
|
1600
|
+
// tslint:disable-next-line: no-string-literal
|
|
1601
|
+
return this.attributes.settings.subtitle;
|
|
1602
|
+
},
|
|
1603
|
+
enumerable: false,
|
|
1604
|
+
configurable: true
|
|
1605
|
+
});
|
|
1606
|
+
return Package;
|
|
1607
|
+
}(i1.Resource));
|
|
1608
|
+
|
|
1609
|
+
var QuantityUnit = /** @class */ (function (_super) {
|
|
1610
|
+
__extends(QuantityUnit, _super);
|
|
1611
|
+
function QuantityUnit() {
|
|
1612
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
1613
|
+
_this.attributes = {
|
|
1614
|
+
name: '',
|
|
1615
|
+
plural: ''
|
|
1616
|
+
};
|
|
1617
|
+
return _this;
|
|
1618
|
+
}
|
|
1619
|
+
return QuantityUnit;
|
|
1620
|
+
}(i1.Resource));
|
|
1621
|
+
|
|
1517
1622
|
var Recipe = /** @class */ (function (_super) {
|
|
1518
1623
|
__extends(Recipe, _super);
|
|
1519
1624
|
function Recipe() {
|
|
@@ -1802,14 +1907,6 @@
|
|
|
1802
1907
|
return Recipe;
|
|
1803
1908
|
}(i1.Resource));
|
|
1804
1909
|
|
|
1805
|
-
var RecipePricing = /** @class */ (function () {
|
|
1806
|
-
function RecipePricing(attrs) {
|
|
1807
|
-
if (attrs === void 0) { attrs = {}; }
|
|
1808
|
-
Object.assign(this, attrs);
|
|
1809
|
-
}
|
|
1810
|
-
return RecipePricing;
|
|
1811
|
-
}());
|
|
1812
|
-
|
|
1813
1910
|
var RecipeProvider = /** @class */ (function (_super) {
|
|
1814
1911
|
__extends(RecipeProvider, _super);
|
|
1815
1912
|
function RecipeProvider() {
|
|
@@ -1826,39 +1923,6 @@
|
|
|
1826
1923
|
return RecipeProvider;
|
|
1827
1924
|
}(i1.Resource));
|
|
1828
1925
|
|
|
1829
|
-
var RecipeProviderService = /** @class */ (function (_super) {
|
|
1830
|
-
__extends(RecipeProviderService, _super);
|
|
1831
|
-
function RecipeProviderService() {
|
|
1832
|
-
var _this = _super.call(this) || this;
|
|
1833
|
-
_this.resource = RecipeProvider;
|
|
1834
|
-
_this.type = 'recipe-providers';
|
|
1835
|
-
_this.register();
|
|
1836
|
-
return _this;
|
|
1837
|
-
}
|
|
1838
|
-
RecipeProviderService.prototype.init = function (id) {
|
|
1839
|
-
this.register();
|
|
1840
|
-
return this.loadCachedProvider(id).toPromise();
|
|
1841
|
-
};
|
|
1842
|
-
RecipeProviderService.prototype.getCached = function () {
|
|
1843
|
-
return this.provider;
|
|
1844
|
-
};
|
|
1845
|
-
RecipeProviderService.prototype.loadCachedProvider = function (id) {
|
|
1846
|
-
var _this = this;
|
|
1847
|
-
return rxjs.of(id).pipe(operators.switchMap(function () { return _this.get(id); }), operators.tap(function (status) { return _this.provider = status; }));
|
|
1848
|
-
};
|
|
1849
|
-
return RecipeProviderService;
|
|
1850
|
-
}(i1.Service));
|
|
1851
|
-
RecipeProviderService.ɵfac = function RecipeProviderService_Factory(t) { return new (t || RecipeProviderService)(); };
|
|
1852
|
-
RecipeProviderService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeProviderService, factory: RecipeProviderService.ɵfac, providedIn: 'root' });
|
|
1853
|
-
/*@__PURE__*/ (function () {
|
|
1854
|
-
i0.ɵsetClassMetadata(RecipeProviderService, [{
|
|
1855
|
-
type: i0.Injectable,
|
|
1856
|
-
args: [{
|
|
1857
|
-
providedIn: 'root'
|
|
1858
|
-
}]
|
|
1859
|
-
}], function () { return []; }, null);
|
|
1860
|
-
})();
|
|
1861
|
-
|
|
1862
1926
|
var RecipeStatus = /** @class */ (function (_super) {
|
|
1863
1927
|
__extends(RecipeStatus, _super);
|
|
1864
1928
|
function RecipeStatus() {
|
|
@@ -1939,111 +2003,65 @@
|
|
|
1939
2003
|
return RecipeStatus;
|
|
1940
2004
|
}(i1.Resource));
|
|
1941
2005
|
|
|
1942
|
-
var
|
|
1943
|
-
__extends(
|
|
1944
|
-
function
|
|
1945
|
-
var _this = _super.
|
|
1946
|
-
_this.
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
_this.
|
|
2006
|
+
var RecipeStep = /** @class */ (function (_super) {
|
|
2007
|
+
__extends(RecipeStep, _super);
|
|
2008
|
+
function RecipeStep() {
|
|
2009
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2010
|
+
_this.attributes = {
|
|
2011
|
+
'step-number': 0,
|
|
2012
|
+
title: '',
|
|
2013
|
+
description: '',
|
|
2014
|
+
'media-url': null
|
|
2015
|
+
};
|
|
2016
|
+
_this.relationships = {
|
|
2017
|
+
recipe: new i1.DocumentResource()
|
|
2018
|
+
};
|
|
1953
2019
|
return _this;
|
|
1954
2020
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
return this.deleted$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
|
|
1972
|
-
},
|
|
1973
|
-
enumerable: false,
|
|
1974
|
-
configurable: true
|
|
1975
|
-
});
|
|
1976
|
-
Object.defineProperty(RecipeStatusService.prototype, "inactive", {
|
|
1977
|
-
get: function () {
|
|
1978
|
-
return this.inactive$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
|
|
1979
|
-
},
|
|
1980
|
-
enumerable: false,
|
|
1981
|
-
configurable: true
|
|
1982
|
-
});
|
|
1983
|
-
Object.defineProperty(RecipeStatusService.prototype, "validatedValue", {
|
|
1984
|
-
/** Only if you are sure value has been loaded */
|
|
1985
|
-
get: function () {
|
|
1986
|
-
return this.validated$.getValue();
|
|
1987
|
-
},
|
|
1988
|
-
enumerable: false,
|
|
1989
|
-
configurable: true
|
|
1990
|
-
});
|
|
1991
|
-
Object.defineProperty(RecipeStatusService.prototype, "draftValue", {
|
|
1992
|
-
/** Only if you are sure value has been loaded */
|
|
2021
|
+
return RecipeStep;
|
|
2022
|
+
}(i1.Resource));
|
|
2023
|
+
|
|
2024
|
+
var Tag = /** @class */ (function (_super) {
|
|
2025
|
+
__extends(Tag, _super);
|
|
2026
|
+
function Tag() {
|
|
2027
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2028
|
+
_this.attributes = {
|
|
2029
|
+
'tag-type-id': '',
|
|
2030
|
+
name: '',
|
|
2031
|
+
'icon-url': '',
|
|
2032
|
+
'picture-url': ''
|
|
2033
|
+
};
|
|
2034
|
+
return _this;
|
|
2035
|
+
}
|
|
2036
|
+
Object.defineProperty(Tag.prototype, "tagType", {
|
|
1993
2037
|
get: function () {
|
|
1994
|
-
return this.
|
|
2038
|
+
return this.attributes['tag-type-id'];
|
|
1995
2039
|
},
|
|
1996
2040
|
enumerable: false,
|
|
1997
2041
|
configurable: true
|
|
1998
2042
|
});
|
|
1999
|
-
Object.defineProperty(
|
|
2000
|
-
/** Only if you are sure value has been loaded */
|
|
2043
|
+
Object.defineProperty(Tag.prototype, "name", {
|
|
2001
2044
|
get: function () {
|
|
2002
|
-
return this.
|
|
2045
|
+
return this.attributes.name;
|
|
2003
2046
|
},
|
|
2004
2047
|
enumerable: false,
|
|
2005
2048
|
configurable: true
|
|
2006
2049
|
});
|
|
2007
|
-
|
|
2008
|
-
|
|
2050
|
+
return Tag;
|
|
2051
|
+
}(i1.Resource));
|
|
2052
|
+
|
|
2053
|
+
var RecipeType = /** @class */ (function (_super) {
|
|
2054
|
+
__extends(RecipeType, _super);
|
|
2055
|
+
function RecipeType() {
|
|
2056
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2057
|
+
_this.attributes = {
|
|
2058
|
+
name: ''
|
|
2059
|
+
};
|
|
2060
|
+
return _this;
|
|
2061
|
+
}
|
|
2062
|
+
Object.defineProperty(RecipeType.prototype, "name", {
|
|
2009
2063
|
get: function () {
|
|
2010
|
-
return this.
|
|
2011
|
-
},
|
|
2012
|
-
enumerable: false,
|
|
2013
|
-
configurable: true
|
|
2014
|
-
});
|
|
2015
|
-
RecipeStatusService.prototype.fetchStatuses = function () {
|
|
2016
|
-
var _this = this;
|
|
2017
|
-
this.get('validated').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (validated) { return _this.validated$.next(validated); });
|
|
2018
|
-
this.get('draft').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (draft) { return _this.draft$.next(draft); });
|
|
2019
|
-
this.get('deleted').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (deleted) { return _this.deleted$.next(deleted); });
|
|
2020
|
-
this.get('inactive').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (inactive) { return _this.inactive$.next(inactive); });
|
|
2021
|
-
};
|
|
2022
|
-
return RecipeStatusService;
|
|
2023
|
-
}(i1.Service));
|
|
2024
|
-
RecipeStatusService.ɵfac = function RecipeStatusService_Factory(t) { return new (t || RecipeStatusService)(); };
|
|
2025
|
-
RecipeStatusService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeStatusService, factory: RecipeStatusService.ɵfac, providedIn: 'root' });
|
|
2026
|
-
/*@__PURE__*/ (function () {
|
|
2027
|
-
i0.ɵsetClassMetadata(RecipeStatusService, [{
|
|
2028
|
-
type: i0.Injectable,
|
|
2029
|
-
args: [{
|
|
2030
|
-
providedIn: 'root'
|
|
2031
|
-
}]
|
|
2032
|
-
}], function () { return []; }, null);
|
|
2033
|
-
})();
|
|
2034
|
-
|
|
2035
|
-
var RecipeType = /** @class */ (function (_super) {
|
|
2036
|
-
__extends(RecipeType, _super);
|
|
2037
|
-
function RecipeType() {
|
|
2038
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2039
|
-
_this.attributes = {
|
|
2040
|
-
name: ''
|
|
2041
|
-
};
|
|
2042
|
-
return _this;
|
|
2043
|
-
}
|
|
2044
|
-
Object.defineProperty(RecipeType.prototype, "name", {
|
|
2045
|
-
get: function () {
|
|
2046
|
-
return this.attributes.name;
|
|
2064
|
+
return this.attributes.name;
|
|
2047
2065
|
},
|
|
2048
2066
|
enumerable: false,
|
|
2049
2067
|
configurable: true
|
|
@@ -2051,192 +2069,6 @@
|
|
|
2051
2069
|
return RecipeType;
|
|
2052
2070
|
}(i1.Resource));
|
|
2053
2071
|
|
|
2054
|
-
var RecipeTypeService = /** @class */ (function (_super) {
|
|
2055
|
-
__extends(RecipeTypeService, _super);
|
|
2056
|
-
function RecipeTypeService() {
|
|
2057
|
-
var _this = _super.call(this) || this;
|
|
2058
|
-
_this.resource = RecipeType;
|
|
2059
|
-
_this.type = 'recipe-types';
|
|
2060
|
-
_this.register();
|
|
2061
|
-
_this.types = new rxjs.BehaviorSubject(null);
|
|
2062
|
-
return _this;
|
|
2063
|
-
}
|
|
2064
|
-
RecipeTypeService.prototype.fetchTypes = function () {
|
|
2065
|
-
var _this = this;
|
|
2066
|
-
this.all().pipe(operators.tap(function (types) { return _this.types.next(types.data); })).toPromise();
|
|
2067
|
-
};
|
|
2068
|
-
RecipeTypeService.prototype.getTypes = function () {
|
|
2069
|
-
return this.types.asObservable();
|
|
2070
|
-
};
|
|
2071
|
-
RecipeTypeService.prototype.getTypeByName = function (name) {
|
|
2072
|
-
name = name.toLowerCase().trim();
|
|
2073
|
-
return this.types.value.filter(function (t) { return t.attributes.name.toLowerCase().trim() === name; })[0];
|
|
2074
|
-
};
|
|
2075
|
-
return RecipeTypeService;
|
|
2076
|
-
}(i1.Service));
|
|
2077
|
-
RecipeTypeService.ɵfac = function RecipeTypeService_Factory(t) { return new (t || RecipeTypeService)(); };
|
|
2078
|
-
RecipeTypeService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeTypeService, factory: RecipeTypeService.ɵfac, providedIn: 'root' });
|
|
2079
|
-
/*@__PURE__*/ (function () {
|
|
2080
|
-
i0.ɵsetClassMetadata(RecipeTypeService, [{
|
|
2081
|
-
type: i0.Injectable,
|
|
2082
|
-
args: [{
|
|
2083
|
-
providedIn: 'root'
|
|
2084
|
-
}]
|
|
2085
|
-
}], function () { return []; }, null);
|
|
2086
|
-
})();
|
|
2087
|
-
|
|
2088
|
-
var Ingredient = /** @class */ (function (_super) {
|
|
2089
|
-
__extends(Ingredient, _super);
|
|
2090
|
-
function Ingredient() {
|
|
2091
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2092
|
-
_this.attributes = {
|
|
2093
|
-
name: '',
|
|
2094
|
-
quantity: '',
|
|
2095
|
-
unit: '',
|
|
2096
|
-
importance: '',
|
|
2097
|
-
active: true,
|
|
2098
|
-
'forced-eans': [],
|
|
2099
|
-
'picture-url': '',
|
|
2100
|
-
position: -1
|
|
2101
|
-
};
|
|
2102
|
-
_this.relationships = {
|
|
2103
|
-
recipe: new i1.DocumentResource(),
|
|
2104
|
-
'quantity-unit': new i1.DocumentResource()
|
|
2105
|
-
};
|
|
2106
|
-
return _this;
|
|
2107
|
-
}
|
|
2108
|
-
Object.defineProperty(Ingredient.prototype, "quantity", {
|
|
2109
|
-
get: function () {
|
|
2110
|
-
if (this.attributes.quantity) {
|
|
2111
|
-
// /!\ toLocalString can transphorm an dot into a coma
|
|
2112
|
-
return parseFloat(this.attributes.quantity).toString();
|
|
2113
|
-
}
|
|
2114
|
-
else {
|
|
2115
|
-
return '1';
|
|
2116
|
-
}
|
|
2117
|
-
},
|
|
2118
|
-
enumerable: false,
|
|
2119
|
-
configurable: true
|
|
2120
|
-
});
|
|
2121
|
-
Object.defineProperty(Ingredient.prototype, "picture", {
|
|
2122
|
-
get: function () {
|
|
2123
|
-
return this.attributes['picture-url'];
|
|
2124
|
-
},
|
|
2125
|
-
enumerable: false,
|
|
2126
|
-
configurable: true
|
|
2127
|
-
});
|
|
2128
|
-
return Ingredient;
|
|
2129
|
-
}(i1.Resource));
|
|
2130
|
-
|
|
2131
|
-
var Package = /** @class */ (function (_super) {
|
|
2132
|
-
__extends(Package, _super);
|
|
2133
|
-
function Package() {
|
|
2134
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2135
|
-
_this.attributes = {
|
|
2136
|
-
title: '',
|
|
2137
|
-
'author-id': '',
|
|
2138
|
-
// system: '',
|
|
2139
|
-
editable: false,
|
|
2140
|
-
shared: false,
|
|
2141
|
-
'catalog-category': false,
|
|
2142
|
-
'catalog-position': '',
|
|
2143
|
-
'recipes-count': '',
|
|
2144
|
-
'media-url': '',
|
|
2145
|
-
settings: {}
|
|
2146
|
-
};
|
|
2147
|
-
_this.relationships = {
|
|
2148
|
-
provider: new i1.DocumentResource(),
|
|
2149
|
-
status: new i1.DocumentResource(),
|
|
2150
|
-
recipes: new i1.DocumentCollection(),
|
|
2151
|
-
'shared-suppliers': new i1.DocumentCollection()
|
|
2152
|
-
};
|
|
2153
|
-
return _this;
|
|
2154
|
-
}
|
|
2155
|
-
Object.defineProperty(Package.prototype, "title", {
|
|
2156
|
-
get: function () {
|
|
2157
|
-
return this.attributes.title;
|
|
2158
|
-
},
|
|
2159
|
-
enumerable: false,
|
|
2160
|
-
configurable: true
|
|
2161
|
-
});
|
|
2162
|
-
Object.defineProperty(Package.prototype, "status", {
|
|
2163
|
-
get: function () {
|
|
2164
|
-
return this.relationships && this.relationships.status && this.relationships.status.data;
|
|
2165
|
-
},
|
|
2166
|
-
enumerable: false,
|
|
2167
|
-
configurable: true
|
|
2168
|
-
});
|
|
2169
|
-
Object.defineProperty(Package.prototype, "subtitle", {
|
|
2170
|
-
get: function () {
|
|
2171
|
-
// tslint:disable-next-line: no-string-literal
|
|
2172
|
-
return this.attributes.settings.subtitle;
|
|
2173
|
-
},
|
|
2174
|
-
enumerable: false,
|
|
2175
|
-
configurable: true
|
|
2176
|
-
});
|
|
2177
|
-
return Package;
|
|
2178
|
-
}(i1.Resource));
|
|
2179
|
-
|
|
2180
|
-
var QuantityUnit = /** @class */ (function (_super) {
|
|
2181
|
-
__extends(QuantityUnit, _super);
|
|
2182
|
-
function QuantityUnit() {
|
|
2183
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2184
|
-
_this.attributes = {
|
|
2185
|
-
name: '',
|
|
2186
|
-
plural: ''
|
|
2187
|
-
};
|
|
2188
|
-
return _this;
|
|
2189
|
-
}
|
|
2190
|
-
return QuantityUnit;
|
|
2191
|
-
}(i1.Resource));
|
|
2192
|
-
|
|
2193
|
-
var RecipeStep = /** @class */ (function (_super) {
|
|
2194
|
-
__extends(RecipeStep, _super);
|
|
2195
|
-
function RecipeStep() {
|
|
2196
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2197
|
-
_this.attributes = {
|
|
2198
|
-
'step-number': 0,
|
|
2199
|
-
title: '',
|
|
2200
|
-
description: '',
|
|
2201
|
-
'media-url': null
|
|
2202
|
-
};
|
|
2203
|
-
_this.relationships = {
|
|
2204
|
-
recipe: new i1.DocumentResource()
|
|
2205
|
-
};
|
|
2206
|
-
return _this;
|
|
2207
|
-
}
|
|
2208
|
-
return RecipeStep;
|
|
2209
|
-
}(i1.Resource));
|
|
2210
|
-
|
|
2211
|
-
var Tag = /** @class */ (function (_super) {
|
|
2212
|
-
__extends(Tag, _super);
|
|
2213
|
-
function Tag() {
|
|
2214
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
2215
|
-
_this.attributes = {
|
|
2216
|
-
'tag-type-id': '',
|
|
2217
|
-
name: '',
|
|
2218
|
-
'icon-url': '',
|
|
2219
|
-
'picture-url': ''
|
|
2220
|
-
};
|
|
2221
|
-
return _this;
|
|
2222
|
-
}
|
|
2223
|
-
Object.defineProperty(Tag.prototype, "tagType", {
|
|
2224
|
-
get: function () {
|
|
2225
|
-
return this.attributes['tag-type-id'];
|
|
2226
|
-
},
|
|
2227
|
-
enumerable: false,
|
|
2228
|
-
configurable: true
|
|
2229
|
-
});
|
|
2230
|
-
Object.defineProperty(Tag.prototype, "name", {
|
|
2231
|
-
get: function () {
|
|
2232
|
-
return this.attributes.name;
|
|
2233
|
-
},
|
|
2234
|
-
enumerable: false,
|
|
2235
|
-
configurable: true
|
|
2236
|
-
});
|
|
2237
|
-
return Tag;
|
|
2238
|
-
}(i1.Resource));
|
|
2239
|
-
|
|
2240
2072
|
var BasketEntriesItem = /** @class */ (function () {
|
|
2241
2073
|
function BasketEntriesItem(attrs) {
|
|
2242
2074
|
if (attrs === void 0) { attrs = {}; }
|
|
@@ -2551,48 +2383,216 @@
|
|
|
2551
2383
|
}
|
|
2552
2384
|
Object.defineProperty(SponsorBlockType.prototype, "name", {
|
|
2553
2385
|
get: function () {
|
|
2554
|
-
return this.attributes.name;
|
|
2386
|
+
return this.attributes.name;
|
|
2387
|
+
},
|
|
2388
|
+
enumerable: false,
|
|
2389
|
+
configurable: true
|
|
2390
|
+
});
|
|
2391
|
+
Object.defineProperty(SponsorBlockType.prototype, "iconUrl", {
|
|
2392
|
+
get: function () {
|
|
2393
|
+
return this.attributes['icon-url'];
|
|
2394
|
+
},
|
|
2395
|
+
enumerable: false,
|
|
2396
|
+
configurable: true
|
|
2397
|
+
});
|
|
2398
|
+
Object.defineProperty(SponsorBlockType.prototype, "description", {
|
|
2399
|
+
get: function () {
|
|
2400
|
+
return this.attributes.description;
|
|
2401
|
+
},
|
|
2402
|
+
enumerable: false,
|
|
2403
|
+
configurable: true
|
|
2404
|
+
});
|
|
2405
|
+
Object.defineProperty(SponsorBlockType.prototype, "defaultHeight", {
|
|
2406
|
+
get: function () {
|
|
2407
|
+
return this.attributes['default-height'];
|
|
2408
|
+
},
|
|
2409
|
+
enumerable: false,
|
|
2410
|
+
configurable: true
|
|
2411
|
+
});
|
|
2412
|
+
Object.defineProperty(SponsorBlockType.prototype, "defaultWidth", {
|
|
2413
|
+
get: function () {
|
|
2414
|
+
return this.attributes['default-width'];
|
|
2415
|
+
},
|
|
2416
|
+
enumerable: false,
|
|
2417
|
+
configurable: true
|
|
2418
|
+
});
|
|
2419
|
+
Object.defineProperty(SponsorBlockType.prototype, "mandatoryFields", {
|
|
2420
|
+
get: function () {
|
|
2421
|
+
return this.attributes['mandatory-fields'];
|
|
2422
|
+
},
|
|
2423
|
+
enumerable: false,
|
|
2424
|
+
configurable: true
|
|
2425
|
+
});
|
|
2426
|
+
return SponsorBlockType;
|
|
2427
|
+
}(i1.Resource));
|
|
2428
|
+
|
|
2429
|
+
var RecipePricing = /** @class */ (function () {
|
|
2430
|
+
function RecipePricing(attrs) {
|
|
2431
|
+
if (attrs === void 0) { attrs = {}; }
|
|
2432
|
+
Object.assign(this, attrs);
|
|
2433
|
+
}
|
|
2434
|
+
return RecipePricing;
|
|
2435
|
+
}());
|
|
2436
|
+
|
|
2437
|
+
var RecipeProviderService = /** @class */ (function (_super) {
|
|
2438
|
+
__extends(RecipeProviderService, _super);
|
|
2439
|
+
function RecipeProviderService() {
|
|
2440
|
+
var _this = _super.call(this) || this;
|
|
2441
|
+
_this.resource = RecipeProvider;
|
|
2442
|
+
_this.type = 'recipe-providers';
|
|
2443
|
+
_this.register();
|
|
2444
|
+
return _this;
|
|
2445
|
+
}
|
|
2446
|
+
RecipeProviderService.prototype.init = function (id) {
|
|
2447
|
+
this.register();
|
|
2448
|
+
return this.loadCachedProvider(id).toPromise();
|
|
2449
|
+
};
|
|
2450
|
+
RecipeProviderService.prototype.getCached = function () {
|
|
2451
|
+
return this.provider;
|
|
2452
|
+
};
|
|
2453
|
+
RecipeProviderService.prototype.loadCachedProvider = function (id) {
|
|
2454
|
+
var _this = this;
|
|
2455
|
+
return rxjs.of(id).pipe(operators.switchMap(function () { return _this.get(id); }), operators.tap(function (status) { return _this.provider = status; }));
|
|
2456
|
+
};
|
|
2457
|
+
return RecipeProviderService;
|
|
2458
|
+
}(i1.Service));
|
|
2459
|
+
RecipeProviderService.ɵfac = function RecipeProviderService_Factory(t) { return new (t || RecipeProviderService)(); };
|
|
2460
|
+
RecipeProviderService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeProviderService, factory: RecipeProviderService.ɵfac, providedIn: 'root' });
|
|
2461
|
+
/*@__PURE__*/ (function () {
|
|
2462
|
+
i0.ɵsetClassMetadata(RecipeProviderService, [{
|
|
2463
|
+
type: i0.Injectable,
|
|
2464
|
+
args: [{
|
|
2465
|
+
providedIn: 'root'
|
|
2466
|
+
}]
|
|
2467
|
+
}], function () { return []; }, null);
|
|
2468
|
+
})();
|
|
2469
|
+
|
|
2470
|
+
var RecipeStatusService = /** @class */ (function (_super) {
|
|
2471
|
+
__extends(RecipeStatusService, _super);
|
|
2472
|
+
function RecipeStatusService() {
|
|
2473
|
+
var _this = _super.call(this) || this;
|
|
2474
|
+
_this.resource = RecipeStatus;
|
|
2475
|
+
_this.type = 'recipe-statuses';
|
|
2476
|
+
_this.validated$ = new rxjs.BehaviorSubject(null);
|
|
2477
|
+
_this.draft$ = new rxjs.BehaviorSubject(null);
|
|
2478
|
+
_this.deleted$ = new rxjs.BehaviorSubject(null);
|
|
2479
|
+
_this.inactive$ = new rxjs.BehaviorSubject(null);
|
|
2480
|
+
_this.register();
|
|
2481
|
+
return _this;
|
|
2482
|
+
}
|
|
2483
|
+
Object.defineProperty(RecipeStatusService.prototype, "validated", {
|
|
2484
|
+
get: function () {
|
|
2485
|
+
return this.validated$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
|
|
2486
|
+
},
|
|
2487
|
+
enumerable: false,
|
|
2488
|
+
configurable: true
|
|
2489
|
+
});
|
|
2490
|
+
Object.defineProperty(RecipeStatusService.prototype, "draft", {
|
|
2491
|
+
get: function () {
|
|
2492
|
+
return this.draft$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
|
|
2555
2493
|
},
|
|
2556
2494
|
enumerable: false,
|
|
2557
2495
|
configurable: true
|
|
2558
2496
|
});
|
|
2559
|
-
Object.defineProperty(
|
|
2497
|
+
Object.defineProperty(RecipeStatusService.prototype, "deleted", {
|
|
2560
2498
|
get: function () {
|
|
2561
|
-
return this.
|
|
2499
|
+
return this.deleted$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
|
|
2562
2500
|
},
|
|
2563
2501
|
enumerable: false,
|
|
2564
2502
|
configurable: true
|
|
2565
2503
|
});
|
|
2566
|
-
Object.defineProperty(
|
|
2504
|
+
Object.defineProperty(RecipeStatusService.prototype, "inactive", {
|
|
2567
2505
|
get: function () {
|
|
2568
|
-
return this.
|
|
2506
|
+
return this.inactive$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
|
|
2569
2507
|
},
|
|
2570
2508
|
enumerable: false,
|
|
2571
2509
|
configurable: true
|
|
2572
2510
|
});
|
|
2573
|
-
Object.defineProperty(
|
|
2511
|
+
Object.defineProperty(RecipeStatusService.prototype, "validatedValue", {
|
|
2512
|
+
/** Only if you are sure value has been loaded */
|
|
2574
2513
|
get: function () {
|
|
2575
|
-
return this.
|
|
2514
|
+
return this.validated$.getValue();
|
|
2576
2515
|
},
|
|
2577
2516
|
enumerable: false,
|
|
2578
2517
|
configurable: true
|
|
2579
2518
|
});
|
|
2580
|
-
Object.defineProperty(
|
|
2519
|
+
Object.defineProperty(RecipeStatusService.prototype, "draftValue", {
|
|
2520
|
+
/** Only if you are sure value has been loaded */
|
|
2581
2521
|
get: function () {
|
|
2582
|
-
return this.
|
|
2522
|
+
return this.draft$.getValue();
|
|
2583
2523
|
},
|
|
2584
2524
|
enumerable: false,
|
|
2585
2525
|
configurable: true
|
|
2586
2526
|
});
|
|
2587
|
-
Object.defineProperty(
|
|
2527
|
+
Object.defineProperty(RecipeStatusService.prototype, "deletedValue", {
|
|
2528
|
+
/** Only if you are sure value has been loaded */
|
|
2588
2529
|
get: function () {
|
|
2589
|
-
return this.
|
|
2530
|
+
return this.deleted$.getValue();
|
|
2590
2531
|
},
|
|
2591
2532
|
enumerable: false,
|
|
2592
2533
|
configurable: true
|
|
2593
2534
|
});
|
|
2594
|
-
|
|
2595
|
-
|
|
2535
|
+
Object.defineProperty(RecipeStatusService.prototype, "inactiveValue", {
|
|
2536
|
+
/** Only if you are sure value has been loaded */
|
|
2537
|
+
get: function () {
|
|
2538
|
+
return this.inactive$.getValue();
|
|
2539
|
+
},
|
|
2540
|
+
enumerable: false,
|
|
2541
|
+
configurable: true
|
|
2542
|
+
});
|
|
2543
|
+
RecipeStatusService.prototype.fetchStatuses = function () {
|
|
2544
|
+
var _this = this;
|
|
2545
|
+
this.get('validated').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (validated) { return _this.validated$.next(validated); });
|
|
2546
|
+
this.get('draft').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (draft) { return _this.draft$.next(draft); });
|
|
2547
|
+
this.get('deleted').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (deleted) { return _this.deleted$.next(deleted); });
|
|
2548
|
+
this.get('inactive').pipe(operators.skipWhile(function (result) { return result.is_loading; })).subscribe(function (inactive) { return _this.inactive$.next(inactive); });
|
|
2549
|
+
};
|
|
2550
|
+
return RecipeStatusService;
|
|
2551
|
+
}(i1.Service));
|
|
2552
|
+
RecipeStatusService.ɵfac = function RecipeStatusService_Factory(t) { return new (t || RecipeStatusService)(); };
|
|
2553
|
+
RecipeStatusService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeStatusService, factory: RecipeStatusService.ɵfac, providedIn: 'root' });
|
|
2554
|
+
/*@__PURE__*/ (function () {
|
|
2555
|
+
i0.ɵsetClassMetadata(RecipeStatusService, [{
|
|
2556
|
+
type: i0.Injectable,
|
|
2557
|
+
args: [{
|
|
2558
|
+
providedIn: 'root'
|
|
2559
|
+
}]
|
|
2560
|
+
}], function () { return []; }, null);
|
|
2561
|
+
})();
|
|
2562
|
+
|
|
2563
|
+
var RecipeTypeService = /** @class */ (function (_super) {
|
|
2564
|
+
__extends(RecipeTypeService, _super);
|
|
2565
|
+
function RecipeTypeService() {
|
|
2566
|
+
var _this = _super.call(this) || this;
|
|
2567
|
+
_this.resource = RecipeType;
|
|
2568
|
+
_this.type = 'recipe-types';
|
|
2569
|
+
_this.register();
|
|
2570
|
+
_this.types = new rxjs.BehaviorSubject(null);
|
|
2571
|
+
return _this;
|
|
2572
|
+
}
|
|
2573
|
+
RecipeTypeService.prototype.fetchTypes = function () {
|
|
2574
|
+
var _this = this;
|
|
2575
|
+
this.all().pipe(operators.tap(function (types) { return _this.types.next(types.data); })).toPromise();
|
|
2576
|
+
};
|
|
2577
|
+
RecipeTypeService.prototype.getTypes = function () {
|
|
2578
|
+
return this.types.asObservable();
|
|
2579
|
+
};
|
|
2580
|
+
RecipeTypeService.prototype.getTypeByName = function (name) {
|
|
2581
|
+
name = name.toLowerCase().trim();
|
|
2582
|
+
return this.types.value.filter(function (t) { return t.attributes.name.toLowerCase().trim() === name; })[0];
|
|
2583
|
+
};
|
|
2584
|
+
return RecipeTypeService;
|
|
2585
|
+
}(i1.Service));
|
|
2586
|
+
RecipeTypeService.ɵfac = function RecipeTypeService_Factory(t) { return new (t || RecipeTypeService)(); };
|
|
2587
|
+
RecipeTypeService.ɵprov = i0.ɵɵdefineInjectable({ token: RecipeTypeService, factory: RecipeTypeService.ɵfac, providedIn: 'root' });
|
|
2588
|
+
/*@__PURE__*/ (function () {
|
|
2589
|
+
i0.ɵsetClassMetadata(RecipeTypeService, [{
|
|
2590
|
+
type: i0.Injectable,
|
|
2591
|
+
args: [{
|
|
2592
|
+
providedIn: 'root'
|
|
2593
|
+
}]
|
|
2594
|
+
}], function () { return []; }, null);
|
|
2595
|
+
})();
|
|
2596
2596
|
|
|
2597
2597
|
var MessageType;
|
|
2598
2598
|
(function (MessageType) {
|
|
@@ -3360,6 +3360,19 @@
|
|
|
3360
3360
|
})); }));
|
|
3361
3361
|
}));
|
|
3362
3362
|
};
|
|
3363
|
+
/**
|
|
3364
|
+
* Adds mandatory data (guest, pos id) completion to the given filters.
|
|
3365
|
+
*/
|
|
3366
|
+
RecipesService.prototype.addMandatoryCompletionToFilter = function (filters) {
|
|
3367
|
+
return this.posService.pos$.pipe(operators.take(1), operators.map(function (pos) {
|
|
3368
|
+
var _a;
|
|
3369
|
+
if (pos === null || pos === void 0 ? void 0 : pos.id) {
|
|
3370
|
+
// number of guests and point of sale id are mandatory in order to use primary_completion_perc filter
|
|
3371
|
+
filters.additionalFilters = Object.assign(Object.assign({}, filters.additionalFilters), { filters: Object.assign(Object.assign({ guests: '4', point_of_sale_id: pos.id }, (_a = filters.additionalFilters) === null || _a === void 0 ? void 0 : _a.filters), { primary_completion_perc: '100,100' }) });
|
|
3372
|
+
}
|
|
3373
|
+
return filters;
|
|
3374
|
+
}));
|
|
3375
|
+
};
|
|
3363
3376
|
// Returns list of filtered recipes.
|
|
3364
3377
|
// Filters and page parameters are mandatory.
|
|
3365
3378
|
// Number of guests and randomization are optional parameters
|
|
@@ -4330,8 +4343,8 @@
|
|
|
4330
4343
|
var _this = this;
|
|
4331
4344
|
this.basketsService.basketEntries().pipe(operators.take(1)).subscribe(function (entries) {
|
|
4332
4345
|
_this.pushBasketEntriesToBasket(itemsToAdd.map(function (i) {
|
|
4333
|
-
var entry = entries.find(function (e) { return e.selectedItem.attributes['ext-id'] === i.id; }) ?
|
|
4334
|
-
entries.find(function (e) { return e.selectedItem.attributes['ext-id'] === i.id; }) :
|
|
4346
|
+
var entry = entries.find(function (e) { var _a; return ((_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id']) === i.id; }) ?
|
|
4347
|
+
entries.find(function (e) { var _a; return ((_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id']) === i.id; }) :
|
|
4335
4348
|
undefined;
|
|
4336
4349
|
if (entry) {
|
|
4337
4350
|
var bei = entry.attributes['basket-entries-items'].find(function (b) { return String(b.item_id) === entry.selectedItem.id; }) ||
|
|
@@ -12115,7 +12128,7 @@
|
|
|
12115
12128
|
request = request.clone({
|
|
12116
12129
|
setHeaders: {
|
|
12117
12130
|
'miam-origin': context.origin.value,
|
|
12118
|
-
'miam-front-version': '6.5.
|
|
12131
|
+
'miam-front-version': '6.5.1',
|
|
12119
12132
|
'miam-front-type': 'web',
|
|
12120
12133
|
'miam-api-version': '4.7.0'
|
|
12121
12134
|
}
|
|
@@ -16412,7 +16425,7 @@
|
|
|
16412
16425
|
i0.ɵɵadvance(4);
|
|
16413
16426
|
i0.ɵɵproperty("ngIf", ctx_r0.recipe && ctx_r0.displayPricing);
|
|
16414
16427
|
i0.ɵɵadvance(1);
|
|
16415
|
-
i0.ɵɵproperty("recipe", ctx_r0.recipe)("cardType", ctx_r0.cardType)("previewAllowed", ctx_r0.previewAllowed)("displayGuests", ctx_r0.displayGuests)("helpButtonAllowed", ctx_r0.helpButtonAllowed);
|
|
16428
|
+
i0.ɵɵproperty("recipe", ctx_r0.recipe)("cardType", ctx_r0.cardType)("previewAllowed", ctx_r0.previewAllowed)("displayGuests", ctx_r0.displayGuests)("helpButtonAllowed", ctx_r0.helpButtonAllowed)("originTrace", ctx_r0.eventTrace());
|
|
16416
16429
|
}
|
|
16417
16430
|
}
|
|
16418
16431
|
function RecipeCardComponent_ng_template_1_Template(rf, ctx) {
|
|
@@ -16555,10 +16568,10 @@
|
|
|
16555
16568
|
else {
|
|
16556
16569
|
i18n_6 = $localize(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject([":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"], [":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"])));
|
|
16557
16570
|
}
|
|
16558
|
-
return [["class", "miam-recipe-card", 4, "ngIf"], ["cors", ""], [1, "miam-recipe-card"], [1, "miam-recipe-card__bookmark"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-card/Bookmark.svg", "alt", "Id\u00E9es repas"], ["class", "miam-recipe-card__picture", 3, "click", 4, "ngIf", "ngIfElse"], ["pictSkeleton", ""], [1, "miam-recipe-card__attributes"], [4, "ngIf", "ngIfElse"], ["textSkeleton", ""], [1, "miam-recipe-card__attributes__infos"], ["class", "miam-recipe-card__attributes__info recipe__total__time", 4, "ngIf", "ngIfElse"], ["class", "miam-recipe-card__attributes__info recipe__difficulty", 3, "ngClass", 4, "ngIf", "ngIfElse"], ["skeletonInfo", ""], [1, "miam-recipe-card__attributes__control"], [1, "miam-recipe-card__control__left__col"], [1, "miam-recipe-card__left__col__custom"], [1, "miam-recipe-card__help", 3, "click"], ["primaryColor", "var(--m-color-grey02)", "secondaryColor", "var(--m-color-grey07)", 3, "width", "height", "iconName"], ["class", "miam-recipe-card__ingredients__pictures", 4, "ngIf"], ["class", "miam-recipe-card__left__col__counter", 4, "ngIf", "ngIfElse"], ["skeletoncounter", ""], [1, "miam-recipe-card__control__right__col"], ["class", "miam-recipe-card__right__col__price", 4, "ngIf"], [3, "recipe", "cardType", "previewAllowed", "displayGuests", "helpButtonAllowed", "displayed", "clicked"], [1, "miam-recipe-card__picture", 3, "click"], ["loading", "lazy", 3, "src"], ["class", "miam-recipe-card__picture__video", 4, "ngIf"], [1, "miam-recipe-card__picture__actions"], ["class", "miam-recipe-card__actions__icon", 3, "recipe", "originTrace", 4, "ngIf"], ["class", "miam-recipe-card__picture__sponsor", 4, "ngIf"], ["class", "miam-recipe-card__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-card__picture__video"], ["primaryColor", "black", 3, "iconName", "width", "height"], [1, "miam-recipe-card__actions__icon", 3, "recipe", "originTrace"], [1, "miam-recipe-card__picture__sponsor"], [3, "src"], [1, "miam-recipe-card__picture__filigrane"], [3, "type"], [1, "miam-recipe-card__attributes__title", 3, "click"], [1, "miam-recipe-card__attributes__info", "recipe__total__time"], [3, "width", "height", "iconName"], [1, "miam-recipe-card__info__label"], [1, "miam-recipe-card__attributes__info", "recipe__difficulty", 3, "ngClass"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["primaryColor", "var(--m-color-black)", 3, "width", "height", "iconName"], ["class", "miam-recipe-card__info__label easy", 4, "ngIf", "ngIfElse"], ["difficultyEasyDefault", ""], [1, "miam-recipe-card__info__label", "easy"], i18n_0, ["class", "miam-recipe-card__info__label medium", 4, "ngIf", "ngIfElse"], ["difficultyMediumDefault", ""], [1, "miam-recipe-card__info__label", "medium"], i18n_2, ["class", "miam-recipe-card__info__label hard", 4, "ngIf", "ngIfElse"], ["difficultyHardDefault", ""], [1, "miam-recipe-card__info__label", "hard"], i18n_4, ["difficultyDefault", ""], i18n_6, [1, "miam-recipe-card__ingredients__pictures"], [1, "miam-recipe-card__ingredients__picture"], ["class", "miam-recipe-card__ingredients__more", 4, "ngIf"], [1, "miam-recipe-card__ingredients__more"], [1, "miam-recipe-card__left__col__counter"], [3, "counter", "counterChange"], [1, "miam-recipe-card__right__col__price"], [3, "recipe", "serves"]];
|
|
16571
|
+
return [["class", "miam-recipe-card", 4, "ngIf"], ["cors", ""], [1, "miam-recipe-card"], [1, "miam-recipe-card__bookmark"], ["src", "https://storage.googleapis.com/assets.miam.tech/generic/recipe-card/Bookmark.svg", "alt", "Id\u00E9es repas"], ["class", "miam-recipe-card__picture", 3, "click", 4, "ngIf", "ngIfElse"], ["pictSkeleton", ""], [1, "miam-recipe-card__attributes"], [4, "ngIf", "ngIfElse"], ["textSkeleton", ""], [1, "miam-recipe-card__attributes__infos"], ["class", "miam-recipe-card__attributes__info recipe__total__time", 4, "ngIf", "ngIfElse"], ["class", "miam-recipe-card__attributes__info recipe__difficulty", 3, "ngClass", 4, "ngIf", "ngIfElse"], ["skeletonInfo", ""], [1, "miam-recipe-card__attributes__control"], [1, "miam-recipe-card__control__left__col"], [1, "miam-recipe-card__left__col__custom"], [1, "miam-recipe-card__help", 3, "click"], ["primaryColor", "var(--m-color-grey02)", "secondaryColor", "var(--m-color-grey07)", 3, "width", "height", "iconName"], ["class", "miam-recipe-card__ingredients__pictures", 4, "ngIf"], ["class", "miam-recipe-card__left__col__counter", 4, "ngIf", "ngIfElse"], ["skeletoncounter", ""], [1, "miam-recipe-card__control__right__col"], ["class", "miam-recipe-card__right__col__price", 4, "ngIf"], [3, "recipe", "cardType", "previewAllowed", "displayGuests", "helpButtonAllowed", "originTrace", "displayed", "clicked"], [1, "miam-recipe-card__picture", 3, "click"], ["loading", "lazy", 3, "src"], ["class", "miam-recipe-card__picture__video", 4, "ngIf"], [1, "miam-recipe-card__picture__actions"], ["class", "miam-recipe-card__actions__icon", 3, "recipe", "originTrace", 4, "ngIf"], ["class", "miam-recipe-card__picture__sponsor", 4, "ngIf"], ["class", "miam-recipe-card__picture__filigrane", 4, "ngIf"], [1, "miam-recipe-card__picture__video"], ["primaryColor", "black", 3, "iconName", "width", "height"], [1, "miam-recipe-card__actions__icon", 3, "recipe", "originTrace"], [1, "miam-recipe-card__picture__sponsor"], [3, "src"], [1, "miam-recipe-card__picture__filigrane"], [3, "type"], [1, "miam-recipe-card__attributes__title", 3, "click"], [1, "miam-recipe-card__attributes__info", "recipe__total__time"], [3, "width", "height", "iconName"], [1, "miam-recipe-card__info__label"], [1, "miam-recipe-card__attributes__info", "recipe__difficulty", 3, "ngClass"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["primaryColor", "var(--m-color-black)", 3, "width", "height", "iconName"], ["class", "miam-recipe-card__info__label easy", 4, "ngIf", "ngIfElse"], ["difficultyEasyDefault", ""], [1, "miam-recipe-card__info__label", "easy"], i18n_0, ["class", "miam-recipe-card__info__label medium", 4, "ngIf", "ngIfElse"], ["difficultyMediumDefault", ""], [1, "miam-recipe-card__info__label", "medium"], i18n_2, ["class", "miam-recipe-card__info__label hard", 4, "ngIf", "ngIfElse"], ["difficultyHardDefault", ""], [1, "miam-recipe-card__info__label", "hard"], i18n_4, ["difficultyDefault", ""], i18n_6, [1, "miam-recipe-card__ingredients__pictures"], [1, "miam-recipe-card__ingredients__picture"], ["class", "miam-recipe-card__ingredients__more", 4, "ngIf"], [1, "miam-recipe-card__ingredients__more"], [1, "miam-recipe-card__left__col__counter"], [3, "counter", "counterChange"], [1, "miam-recipe-card__right__col__price"], [3, "recipe", "serves"]];
|
|
16559
16572
|
}, template: function RecipeCardComponent_Template(rf, ctx) {
|
|
16560
16573
|
if (rf & 1) {
|
|
16561
|
-
i0.ɵɵtemplate(0, RecipeCardComponent_div_0_Template, 27,
|
|
16574
|
+
i0.ɵɵtemplate(0, RecipeCardComponent_div_0_Template, 27, 21, "div", 0);
|
|
16562
16575
|
i0.ɵɵtemplate(1, RecipeCardComponent_ng_template_1_Template, 1, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
16563
16576
|
}
|
|
16564
16577
|
if (rf & 2) {
|
|
@@ -16801,7 +16814,7 @@
|
|
|
16801
16814
|
}
|
|
16802
16815
|
if (rf & 2) {
|
|
16803
16816
|
var ctx_r4 = i0.ɵɵnextContext();
|
|
16804
|
-
i0.ɵɵproperty("recipe", ctx_r4.recipe)("cardType", ctx_r4.cardType)("previewAllowed", ctx_r4.previewAllowed)("helpButtonAllowed", ctx_r4.helpButtonAllowed)("displayGuests", ctx_r4.displayGuests);
|
|
16817
|
+
i0.ɵɵproperty("recipe", ctx_r4.recipe)("cardType", ctx_r4.cardType)("previewAllowed", ctx_r4.previewAllowed)("helpButtonAllowed", ctx_r4.helpButtonAllowed)("displayGuests", ctx_r4.displayGuests)("originTrace", ctx_r4.eventTrace());
|
|
16805
16818
|
}
|
|
16806
16819
|
}
|
|
16807
16820
|
function CatalogRecipeCardComponent_div_11_Template(rf, ctx) {
|
|
@@ -17254,7 +17267,7 @@
|
|
|
17254
17267
|
else {
|
|
17255
17268
|
i18n_14 = $localize(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject([":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"], [":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"])));
|
|
17256
17269
|
}
|
|
17257
|
-
return [[1, "miam-catalog-recipe-card"], [1, "miam-catalog-recipe-card__header"], ["class", "miam-catalog-card__picture", 3, "click", 4, "ngIf", "ngIfElse"], ["pictSkeleton", ""], [1, "miam-catalog-card__attributes"], [1, "miam-catalog-recipe-card__attributes__control"], ["class", "miam-catalog-recipe-card__ingredients__pictures", 4, "ngIf"], [3, "recipe", "cardType", "previewAllowed", "helpButtonAllowed", "displayGuests", "displayed", "clicked", 4, "ngIf"], ["class", "miam-catalog-recipe-card__actions", 4, "ngIf"], ["class", "m-button-primary reverse", 3, "click", 4, "ngIf"], [1, "miam-catalog-card__attributes__infos"], [1, "miam-catalog-card__attributes__infos", "recipe__time-and-difficulty"], ["class", "miam-catalog-card__attributes__info recipe__total__time", 4, "ngIf", "ngIfElse"], ["class", "miam-catalog-card__attributes__info recipe__difficulty", 3, "ngClass", 4, "ngIf"], ["class", "miam-catalog-card__attributes__info recipe__price", 4, "ngIf"], ["skeletonInfo", ""], [3, "close", "actionTriggered", 4, "ngIf"], ["cors", ""], [1, "miam-catalog-card__picture", 3, "click"], [1, "miam-catalog-card__picture__gradient"], ["loading", "lazy", 1, "miam-catalog-card__picture__img", 3, "src"], ["class", "miam-catalog-card__picture__sponsor", 4, "ngIf"], ["class", "miam-catalog-card__picture__filigrane", 4, "ngIf"], ["class", "miam-catalog-recipe-card__picture__video", 4, "ngIf"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], ["textSkeleton", ""], [1, "miam-catalog-recipe-card__picture__actions"], ["class", "miam-catalog-recipe-card__actions__icon m-button-primary reverse", 3, "click", 4, "ngIf", "ngIfElse"], ["like", ""], [1, "miam-catalog-card__picture__sponsor"], [3, "src"], [1, "miam-catalog-card__picture__filigrane"], [1, "miam-catalog-recipe-card__picture__video"], ["primaryColor", "black", 3, "iconName", "width", "height"], ["class", "miam-catalog-recipe-card__picture__tag", 4, "ngIf"], [1, "miam-catalog-recipe-card__picture__tag"], i18n_2, [1, "miam-catalog-recipe-card__attributes__title", 3, "click"], [3, "type"], [1, "miam-catalog-recipe-card__actions__icon", "m-button-primary", "reverse", 3, "click"], ["miamMoreActions", ""], ["primaryColor", "var(--m-color-primary)", 3, "iconName"], ["width", "17", "height", "17", "class", "miam-catalog-recipe-card__actions__icon", 3, "recipe", "originTrace", 4, "ngIf"], ["width", "17", "height", "17", 1, "miam-catalog-recipe-card__actions__icon", 3, "recipe", "originTrace"], [1, "miam-catalog-recipe-card__ingredients__pictures"], [1, "miam-catalog-recipe-card__ingredients__picture"], ["class", "miam-catalog-recipe-card__ingredients__more", 4, "ngIf"], [1, "miam-catalog-recipe-card__ingredients__more"], [3, "recipe", "cardType", "previewAllowed", "helpButtonAllowed", "displayGuests", "displayed", "clicked"], ["cardCta", ""], [1, "miam-catalog-recipe-card__actions"], [1, "miam-catalog-recipe-card__actions__link", "replace", 3, "click"], i18n_4, [1, "miam-catalog-recipe-card__actions__link", "delete", 3, "click"], [1, "m-button-primary", "reverse", 3, "click"], i18n_6, [1, "miam-catalog-card__attributes__info", "recipe__total__time"], ["width", "18", "height", "18", "primaryColor", "var(--m-catalog-card-details-color)", 3, "iconName"], [1, "miam-catalog-card__info__label"], [1, "miam-catalog-card__attributes__info", "recipe__difficulty", 3, "ngClass"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["primaryColor", "var(--m-catalog-card-details-color)", 3, "width", "height", "iconName"], ["class", "miam-catalog-card__info__label easy", 4, "ngIf", "ngIfElse"], ["difficultyEasyDefault", ""], [1, "miam-catalog-card__info__label", "easy"], i18n_8, ["class", "miam-catalog-card__info__label medium", 4, "ngIf", "ngIfElse"], ["difficultyMediumDefault", ""], [1, "miam-catalog-card__info__label", "medium"], i18n_10, ["class", "miam-catalog-card__info__label hard", 4, "ngIf", "ngIfElse"], ["difficultyHardDefault", ""], [1, "miam-catalog-card__info__label", "hard"], i18n_12, ["difficultyDefault", ""], i18n_14, [1, "miam-catalog-card__attributes__info", "recipe__price"], [3, "recipe", "serves", 4, "ngIf"], [3, "recipe", "serves"], [3, "close", "actionTriggered"]];
|
|
17270
|
+
return [[1, "miam-catalog-recipe-card"], [1, "miam-catalog-recipe-card__header"], ["class", "miam-catalog-card__picture", 3, "click", 4, "ngIf", "ngIfElse"], ["pictSkeleton", ""], [1, "miam-catalog-card__attributes"], [1, "miam-catalog-recipe-card__attributes__control"], ["class", "miam-catalog-recipe-card__ingredients__pictures", 4, "ngIf"], [3, "recipe", "cardType", "previewAllowed", "helpButtonAllowed", "displayGuests", "originTrace", "displayed", "clicked", 4, "ngIf"], ["class", "miam-catalog-recipe-card__actions", 4, "ngIf"], ["class", "m-button-primary reverse", 3, "click", 4, "ngIf"], [1, "miam-catalog-card__attributes__infos"], [1, "miam-catalog-card__attributes__infos", "recipe__time-and-difficulty"], ["class", "miam-catalog-card__attributes__info recipe__total__time", 4, "ngIf", "ngIfElse"], ["class", "miam-catalog-card__attributes__info recipe__difficulty", 3, "ngClass", 4, "ngIf"], ["class", "miam-catalog-card__attributes__info recipe__price", 4, "ngIf"], ["skeletonInfo", ""], [3, "close", "actionTriggered", 4, "ngIf"], ["cors", ""], [1, "miam-catalog-card__picture", 3, "click"], [1, "miam-catalog-card__picture__gradient"], ["loading", "lazy", 1, "miam-catalog-card__picture__img", 3, "src"], ["class", "miam-catalog-card__picture__sponsor", 4, "ngIf"], ["class", "miam-catalog-card__picture__filigrane", 4, "ngIf"], ["class", "miam-catalog-recipe-card__picture__video", 4, "ngIf"], [4, "ngIf"], [4, "ngIf", "ngIfElse"], ["textSkeleton", ""], [1, "miam-catalog-recipe-card__picture__actions"], ["class", "miam-catalog-recipe-card__actions__icon m-button-primary reverse", 3, "click", 4, "ngIf", "ngIfElse"], ["like", ""], [1, "miam-catalog-card__picture__sponsor"], [3, "src"], [1, "miam-catalog-card__picture__filigrane"], [1, "miam-catalog-recipe-card__picture__video"], ["primaryColor", "black", 3, "iconName", "width", "height"], ["class", "miam-catalog-recipe-card__picture__tag", 4, "ngIf"], [1, "miam-catalog-recipe-card__picture__tag"], i18n_2, [1, "miam-catalog-recipe-card__attributes__title", 3, "click"], [3, "type"], [1, "miam-catalog-recipe-card__actions__icon", "m-button-primary", "reverse", 3, "click"], ["miamMoreActions", ""], ["primaryColor", "var(--m-color-primary)", 3, "iconName"], ["width", "17", "height", "17", "class", "miam-catalog-recipe-card__actions__icon", 3, "recipe", "originTrace", 4, "ngIf"], ["width", "17", "height", "17", 1, "miam-catalog-recipe-card__actions__icon", 3, "recipe", "originTrace"], [1, "miam-catalog-recipe-card__ingredients__pictures"], [1, "miam-catalog-recipe-card__ingredients__picture"], ["class", "miam-catalog-recipe-card__ingredients__more", 4, "ngIf"], [1, "miam-catalog-recipe-card__ingredients__more"], [3, "recipe", "cardType", "previewAllowed", "helpButtonAllowed", "displayGuests", "originTrace", "displayed", "clicked"], ["cardCta", ""], [1, "miam-catalog-recipe-card__actions"], [1, "miam-catalog-recipe-card__actions__link", "replace", 3, "click"], i18n_4, [1, "miam-catalog-recipe-card__actions__link", "delete", 3, "click"], [1, "m-button-primary", "reverse", 3, "click"], i18n_6, [1, "miam-catalog-card__attributes__info", "recipe__total__time"], ["width", "18", "height", "18", "primaryColor", "var(--m-catalog-card-details-color)", 3, "iconName"], [1, "miam-catalog-card__info__label"], [1, "miam-catalog-card__attributes__info", "recipe__difficulty", 3, "ngClass"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["primaryColor", "var(--m-catalog-card-details-color)", 3, "width", "height", "iconName"], ["class", "miam-catalog-card__info__label easy", 4, "ngIf", "ngIfElse"], ["difficultyEasyDefault", ""], [1, "miam-catalog-card__info__label", "easy"], i18n_8, ["class", "miam-catalog-card__info__label medium", 4, "ngIf", "ngIfElse"], ["difficultyMediumDefault", ""], [1, "miam-catalog-card__info__label", "medium"], i18n_10, ["class", "miam-catalog-card__info__label hard", 4, "ngIf", "ngIfElse"], ["difficultyHardDefault", ""], [1, "miam-catalog-card__info__label", "hard"], i18n_12, ["difficultyDefault", ""], i18n_14, [1, "miam-catalog-card__attributes__info", "recipe__price"], [3, "recipe", "serves", 4, "ngIf"], [3, "recipe", "serves"], [3, "close", "actionTriggered"]];
|
|
17258
17271
|
}, template: function CatalogRecipeCardComponent_Template(rf, ctx) {
|
|
17259
17272
|
if (rf & 1) {
|
|
17260
17273
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -17268,7 +17281,7 @@
|
|
|
17268
17281
|
i0.ɵɵelementStart(7, "div", 4);
|
|
17269
17282
|
i0.ɵɵelementStart(8, "div", 5);
|
|
17270
17283
|
i0.ɵɵtemplate(9, CatalogRecipeCardComponent_div_9_Template, 6, 3, "div", 6);
|
|
17271
|
-
i0.ɵɵtemplate(10, CatalogRecipeCardComponent_ng_miam_recipe_card_cta_10_Template, 2,
|
|
17284
|
+
i0.ɵɵtemplate(10, CatalogRecipeCardComponent_ng_miam_recipe_card_cta_10_Template, 2, 6, "ng-miam-recipe-card-cta", 7);
|
|
17272
17285
|
i0.ɵɵtemplate(11, CatalogRecipeCardComponent_div_11_Template, 6, 1, "div", 8);
|
|
17273
17286
|
i0.ɵɵtemplate(12, CatalogRecipeCardComponent_button_12_Template, 3, 0, "button", 9);
|
|
17274
17287
|
i0.ɵɵelementEnd();
|
|
@@ -17901,12 +17914,231 @@
|
|
|
17901
17914
|
try {
|
|
17902
17915
|
if (filter_1_1 && !filter_1_1.done && (_d = filter_1.return)) _d.call(filter_1);
|
|
17903
17916
|
}
|
|
17904
|
-
finally { if (e_1) throw e_1.error; }
|
|
17905
|
-
}
|
|
17906
|
-
return true;
|
|
17907
|
-
};
|
|
17908
|
-
return RecipeFilters;
|
|
17917
|
+
finally { if (e_1) throw e_1.error; }
|
|
17918
|
+
}
|
|
17919
|
+
return true;
|
|
17920
|
+
};
|
|
17921
|
+
return RecipeFilters;
|
|
17922
|
+
}());
|
|
17923
|
+
|
|
17924
|
+
var _a;
|
|
17925
|
+
var _c0$o = ["recipeCard"];
|
|
17926
|
+
function SuggestionCardComponent_ng_miam_recipe_card_0_Template(rf, ctx) {
|
|
17927
|
+
if (rf & 1) {
|
|
17928
|
+
var _r3_1 = i0.ɵɵgetCurrentView();
|
|
17929
|
+
i0.ɵɵelementStart(0, "ng-miam-recipe-card", 1, 2);
|
|
17930
|
+
i0.ɵɵlistener("guestsChanged", function SuggestionCardComponent_ng_miam_recipe_card_0_Template_ng_miam_recipe_card_guestsChanged_0_listener() { i0.ɵɵrestoreView(_r3_1); var ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.guestsChanged(); });
|
|
17931
|
+
i0.ɵɵelementEnd();
|
|
17932
|
+
}
|
|
17933
|
+
if (rf & 2) {
|
|
17934
|
+
var ctx_r0 = i0.ɵɵnextContext();
|
|
17935
|
+
i0.ɵɵproperty("recipe", ctx_r0.recipe)("headerText", ctx_r0.headerText)("displayPricing", ctx_r0.displayPricing)("displayAddedOnPicture", ctx_r0.displayAddedOnPicture)("originTrace", ctx_r0.eventTrace());
|
|
17936
|
+
}
|
|
17937
|
+
}
|
|
17938
|
+
var recipeIncludes$1 = ['recipe-provider', 'sponsors'];
|
|
17939
|
+
var recipeSparseFields$1 = (_a = {
|
|
17940
|
+
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
17941
|
+
'resting-time'], recipeIncludes$1),
|
|
17942
|
+
sponsors: ['logo-url']
|
|
17943
|
+
},
|
|
17944
|
+
_a['recipe-provider'] = ['name'],
|
|
17945
|
+
_a);
|
|
17946
|
+
/**
|
|
17947
|
+
* This is an angular component design to be a web component
|
|
17948
|
+
* that's why we use onPushStrategie with the changeDetetectorRef
|
|
17949
|
+
* to avoid common issue
|
|
17950
|
+
* guide -> https://netbasal.com/a-comprehensive-guide-to-angular-onpush-change-detection-strategy-5bac493074a4
|
|
17951
|
+
* and alsow we use ShadowDom to protect style of our component
|
|
17952
|
+
* and alsow style of the parent aplication that will use it
|
|
17953
|
+
* doc -> https://angular.io/api/core/ViewEncapsulation
|
|
17954
|
+
*/
|
|
17955
|
+
var SuggestionCardComponent = /** @class */ (function (_super) {
|
|
17956
|
+
__extends(SuggestionCardComponent, _super);
|
|
17957
|
+
function SuggestionCardComponent(cdr, recipeService, groceriesListsService, contextService, analyticsService, recipeEventsService, element) {
|
|
17958
|
+
var _this = _super.call(this, cdr, recipeService, recipeEventsService, groceriesListsService, contextService, analyticsService, element) || this;
|
|
17959
|
+
_this.cdr = cdr;
|
|
17960
|
+
_this.recipeService = recipeService;
|
|
17961
|
+
_this.groceriesListsService = groceriesListsService;
|
|
17962
|
+
_this.contextService = contextService;
|
|
17963
|
+
_this.analyticsService = analyticsService;
|
|
17964
|
+
_this.recipeEventsService = recipeEventsService;
|
|
17965
|
+
_this.element = element;
|
|
17966
|
+
_this.isEmpty = false;
|
|
17967
|
+
_this.eventsGroupId = uuid.v4();
|
|
17968
|
+
// as the template creates a recipe card, the recipe card send the events
|
|
17969
|
+
_this.sendShowEventOnScroll = false;
|
|
17970
|
+
return _this;
|
|
17971
|
+
}
|
|
17972
|
+
SuggestionCardComponent.prototype.ngOnChanges = function (simpleChanges) {
|
|
17973
|
+
if ((simpleChanges.productIds && !this.randomModeEnable) || !this.recipe) {
|
|
17974
|
+
this.loadRecipe();
|
|
17975
|
+
}
|
|
17976
|
+
};
|
|
17977
|
+
// Only send show event if the recipe has changed while the card was in viewport
|
|
17978
|
+
SuggestionCardComponent.prototype.sendShowEvent = function () {
|
|
17979
|
+
return false;
|
|
17980
|
+
};
|
|
17981
|
+
// If recipe already in basket, update the number of guests so that the pricing gets updated as well
|
|
17982
|
+
// (display = false so that the recipe details don't show up)
|
|
17983
|
+
SuggestionCardComponent.prototype.guestsChanged = function () {
|
|
17984
|
+
var _this = this;
|
|
17985
|
+
this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).pipe(operators.switchMap(function (recipeIsInList) {
|
|
17986
|
+
if (recipeIsInList) {
|
|
17987
|
+
return _this.groceriesListsService.appendRecipeToList(_this.recipe.id, _this.recipe.modifiedGuests, _this.eventTrace())
|
|
17988
|
+
.pipe(operators.take(1));
|
|
17989
|
+
}
|
|
17990
|
+
})).subscribe(function () { return _this.cdr.detectChanges(); }));
|
|
17991
|
+
};
|
|
17992
|
+
SuggestionCardComponent.prototype.loadRecipe = function () {
|
|
17993
|
+
var _this = this;
|
|
17994
|
+
this.subscriptions.push(this.fetchRecipes().pipe(operators.skipWhile(function (results) { return !results; }), operators.catchError(function (err) {
|
|
17995
|
+
_this.hide.emit();
|
|
17996
|
+
return rxjs.of(err);
|
|
17997
|
+
})).subscribe(function (results) { return _this.processResults(results); }));
|
|
17998
|
+
};
|
|
17999
|
+
SuggestionCardComponent.prototype.fetchRecipes = function () {
|
|
18000
|
+
if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes$1.includes('ingredients')) {
|
|
18001
|
+
recipeIncludes$1.push('ingredients');
|
|
18002
|
+
recipeSparseFields$1.recipes.push('ingredients');
|
|
18003
|
+
recipeSparseFields$1['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
|
|
18004
|
+
}
|
|
18005
|
+
if (this.randomModeEnable) {
|
|
18006
|
+
return this.recipeService.getRandom(recipeIncludes$1, recipeSparseFields$1);
|
|
18007
|
+
}
|
|
18008
|
+
else {
|
|
18009
|
+
return this.recipeService.getSuggestion(this.productIds, this.eventsGroupId, recipeIncludes$1, recipeSparseFields$1);
|
|
18010
|
+
}
|
|
18011
|
+
};
|
|
18012
|
+
// If the recipe is in basket, will show number of guests as defined in the basket
|
|
18013
|
+
// Otherwise, will show default number of guests for the recipe
|
|
18014
|
+
SuggestionCardComponent.prototype.processResults = function (recipes) {
|
|
18015
|
+
var _this = this;
|
|
18016
|
+
this.isEmpty = (!recipes || recipes.length === 0);
|
|
18017
|
+
if (!this.isEmpty) {
|
|
18018
|
+
// get the first recipe and shallow copy it to permit to send event and do not disturb any other component
|
|
18019
|
+
// if ressource is cached without copy another load will get the attributes
|
|
18020
|
+
this.recipe = recipes[0].shallowCopyWithEvents(this.recipeEventsService.ORIGIN_SUGGESTION, this.eventsGroupId);
|
|
18021
|
+
// Update guests from list only if recipe is in list
|
|
18022
|
+
this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).subscribe(function (isInList) {
|
|
18023
|
+
if (isInList) {
|
|
18024
|
+
_this.recipe.modifiedGuests = _this.groceriesListsService.guestsForRecipe(_this.recipe) || +_this.recipe.guests;
|
|
18025
|
+
_this.recipeCard.cdr.markForCheck();
|
|
18026
|
+
}
|
|
18027
|
+
}));
|
|
18028
|
+
this.recipeCard.cdr.markForCheck();
|
|
18029
|
+
}
|
|
18030
|
+
else {
|
|
18031
|
+
this.hide.emit();
|
|
18032
|
+
}
|
|
18033
|
+
this.cdr.detectChanges();
|
|
18034
|
+
};
|
|
18035
|
+
return SuggestionCardComponent;
|
|
18036
|
+
}(AbstractRecipeCardComponent));
|
|
18037
|
+
SuggestionCardComponent.ɵfac = function SuggestionCardComponent_Factory(t) { return new (t || SuggestionCardComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(AnalyticsService), i0.ɵɵdirectiveInject(RecipeEventsService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
18038
|
+
SuggestionCardComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SuggestionCardComponent, selectors: [["ng-miam-suggestion-card"]], viewQuery: function SuggestionCardComponent_Query(rf, ctx) {
|
|
18039
|
+
if (rf & 1) {
|
|
18040
|
+
i0.ɵɵviewQuery(_c0$o, true);
|
|
18041
|
+
}
|
|
18042
|
+
if (rf & 2) {
|
|
18043
|
+
var _t;
|
|
18044
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCard = _t.first);
|
|
18045
|
+
}
|
|
18046
|
+
}, inputs: { randomModeEnable: "randomModeEnable", productIds: "productIds" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "recipe", "headerText", "displayPricing", "displayAddedOnPicture", "originTrace", "guestsChanged", 4, "ngIf"], [3, "recipe", "headerText", "displayPricing", "displayAddedOnPicture", "originTrace", "guestsChanged"], ["recipeCard", ""]], template: function SuggestionCardComponent_Template(rf, ctx) {
|
|
18047
|
+
if (rf & 1) {
|
|
18048
|
+
i0.ɵɵtemplate(0, SuggestionCardComponent_ng_miam_recipe_card_0_Template, 2, 5, "ng-miam-recipe-card", 0);
|
|
18049
|
+
}
|
|
18050
|
+
if (rf & 2) {
|
|
18051
|
+
i0.ɵɵproperty("ngIf", !ctx.isEmpty);
|
|
18052
|
+
}
|
|
18053
|
+
}, directives: [i2.NgIf, RecipeCardComponent], styles: [""], encapsulation: 2, changeDetection: 0 });
|
|
18054
|
+
/*@__PURE__*/ (function () {
|
|
18055
|
+
i0.ɵsetClassMetadata(SuggestionCardComponent, [{
|
|
18056
|
+
type: i0.Component,
|
|
18057
|
+
args: [{
|
|
18058
|
+
selector: 'ng-miam-suggestion-card',
|
|
18059
|
+
templateUrl: './suggestion-card.component.html',
|
|
18060
|
+
styleUrls: ['./suggestion-card.component.scss'],
|
|
18061
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
18062
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
18063
|
+
}]
|
|
18064
|
+
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: GroceriesListsService }, { type: ContextService }, { type: AnalyticsService }, { type: RecipeEventsService }, { type: i0.ElementRef }]; }, { randomModeEnable: [{
|
|
18065
|
+
type: i0.Input
|
|
18066
|
+
}], productIds: [{
|
|
18067
|
+
type: i0.Input
|
|
18068
|
+
}], recipeCard: [{
|
|
18069
|
+
type: i0.ViewChild,
|
|
18070
|
+
args: ['recipeCard']
|
|
18071
|
+
}] });
|
|
18072
|
+
})();
|
|
18073
|
+
|
|
18074
|
+
var RecipeCardsModule = /** @class */ (function () {
|
|
18075
|
+
// Create custom elements so the WebComponents can be interpreted by the browser regardless of the js framework used
|
|
18076
|
+
function RecipeCardsModule(injector) {
|
|
18077
|
+
var webComponents = {
|
|
18078
|
+
'add-recipe-card': AddRecipeCardComponent,
|
|
18079
|
+
'catalog-recipe-card': CatalogRecipeCardComponent,
|
|
18080
|
+
'recipe-card': RecipeCardComponent,
|
|
18081
|
+
'suggestion-card': SuggestionCardComponent,
|
|
18082
|
+
'recipe-card-cta': RecipeCardCtaComponent,
|
|
18083
|
+
};
|
|
18084
|
+
Object.keys(webComponents).map(function (compName) {
|
|
18085
|
+
var name = "webc-miam-" + compName;
|
|
18086
|
+
// Avoid duplicate error
|
|
18087
|
+
if (!customElements.get(name)) {
|
|
18088
|
+
var comp = webComponents[compName];
|
|
18089
|
+
var ngElement = elements.createCustomElement(comp, { injector: injector });
|
|
18090
|
+
customElements.define(name, ngElement);
|
|
18091
|
+
}
|
|
18092
|
+
});
|
|
18093
|
+
}
|
|
18094
|
+
return RecipeCardsModule;
|
|
17909
18095
|
}());
|
|
18096
|
+
RecipeCardsModule.ɵmod = i0.ɵɵdefineNgModule({ type: RecipeCardsModule });
|
|
18097
|
+
RecipeCardsModule.ɵinj = i0.ɵɵdefineInjector({ factory: function RecipeCardsModule_Factory(t) { return new (t || RecipeCardsModule)(i0.ɵɵinject(i0.Injector)); }, imports: [[
|
|
18098
|
+
i2.CommonModule,
|
|
18099
|
+
i3.FormsModule,
|
|
18100
|
+
UtilsModule,
|
|
18101
|
+
ComponentsModule
|
|
18102
|
+
]] });
|
|
18103
|
+
(function () {
|
|
18104
|
+
(typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(RecipeCardsModule, { declarations: [AddRecipeCardComponent,
|
|
18105
|
+
CatalogRecipeCardComponent,
|
|
18106
|
+
RecipeCardComponent,
|
|
18107
|
+
SuggestionCardComponent,
|
|
18108
|
+
RecipeCardCtaComponent], imports: [i2.CommonModule,
|
|
18109
|
+
i3.FormsModule,
|
|
18110
|
+
UtilsModule,
|
|
18111
|
+
ComponentsModule], exports: [AddRecipeCardComponent,
|
|
18112
|
+
CatalogRecipeCardComponent,
|
|
18113
|
+
RecipeCardComponent,
|
|
18114
|
+
SuggestionCardComponent] });
|
|
18115
|
+
})();
|
|
18116
|
+
/*@__PURE__*/ (function () {
|
|
18117
|
+
i0.ɵsetClassMetadata(RecipeCardsModule, [{
|
|
18118
|
+
type: i0.NgModule,
|
|
18119
|
+
args: [{
|
|
18120
|
+
imports: [
|
|
18121
|
+
i2.CommonModule,
|
|
18122
|
+
i3.FormsModule,
|
|
18123
|
+
UtilsModule,
|
|
18124
|
+
ComponentsModule
|
|
18125
|
+
],
|
|
18126
|
+
declarations: [
|
|
18127
|
+
AddRecipeCardComponent,
|
|
18128
|
+
CatalogRecipeCardComponent,
|
|
18129
|
+
RecipeCardComponent,
|
|
18130
|
+
SuggestionCardComponent,
|
|
18131
|
+
RecipeCardCtaComponent
|
|
18132
|
+
],
|
|
18133
|
+
exports: [
|
|
18134
|
+
AddRecipeCardComponent,
|
|
18135
|
+
CatalogRecipeCardComponent,
|
|
18136
|
+
RecipeCardComponent,
|
|
18137
|
+
SuggestionCardComponent
|
|
18138
|
+
]
|
|
18139
|
+
}]
|
|
18140
|
+
}], function () { return [{ type: i0.Injector }]; }, null);
|
|
18141
|
+
})();
|
|
17910
18142
|
|
|
17911
18143
|
function CatalogArticleCardComponent_img_4_Template(rf, ctx) {
|
|
17912
18144
|
if (rf & 1) {
|
|
@@ -18126,10 +18358,10 @@
|
|
|
18126
18358
|
i0.ɵɵelementEnd();
|
|
18127
18359
|
}
|
|
18128
18360
|
}
|
|
18129
|
-
var recipeIncludes$
|
|
18130
|
-
var recipeSparseFields$
|
|
18361
|
+
var recipeIncludes$2 = ['recipe-provider', 'sponsors'];
|
|
18362
|
+
var recipeSparseFields$2 = (_c = {
|
|
18131
18363
|
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
18132
|
-
'resting-time'], recipeIncludes$
|
|
18364
|
+
'resting-time'], recipeIncludes$2),
|
|
18133
18365
|
sponsors: ['logo-url']
|
|
18134
18366
|
},
|
|
18135
18367
|
_c['recipe-provider'] = ['name'],
|
|
@@ -18187,8 +18419,10 @@
|
|
|
18187
18419
|
this.initLoadOnScroll();
|
|
18188
18420
|
};
|
|
18189
18421
|
CatalogListComponent.prototype.ngOnChanges = function (changes) {
|
|
18190
|
-
|
|
18191
|
-
|
|
18422
|
+
var changesKeys = Object.keys(changes);
|
|
18423
|
+
// Prevents reload loop in angular, because originTrace and excludedRecipesIds are passed as methods so they keep refreshing the DOM
|
|
18424
|
+
if (!(changesKeys.includes('originTrace') &&
|
|
18425
|
+
(changesKeys.length === 1 || (changesKeys.length === 2 && changesKeys.includes('excludedRecipesIds'))))) {
|
|
18192
18426
|
this.filtersToDisplay = this.buildFiltersArray();
|
|
18193
18427
|
this.reloadPage();
|
|
18194
18428
|
if (this.filters.search) {
|
|
@@ -18240,15 +18474,17 @@
|
|
|
18240
18474
|
if (this.noMoreRecipes) {
|
|
18241
18475
|
return rxjs.of([]);
|
|
18242
18476
|
}
|
|
18243
|
-
|
|
18244
|
-
|
|
18245
|
-
|
|
18246
|
-
|
|
18247
|
-
recipeIncludes$
|
|
18248
|
-
|
|
18249
|
-
|
|
18250
|
-
|
|
18251
|
-
|
|
18477
|
+
return this.recipesService.addMandatoryCompletionToFilter(this.filters).pipe(operators.switchMap(function () {
|
|
18478
|
+
// keep a copy of the filters when request is sent, so we can check they are still the same when it is received
|
|
18479
|
+
// Because if it's not the case we have to ignore the results
|
|
18480
|
+
var requestFilters = _this.filters.copy();
|
|
18481
|
+
if (_this.context.displayIngredientPicturesOnRecipeCards && !recipeIncludes$2.includes('ingredients')) {
|
|
18482
|
+
recipeIncludes$2.push('ingredients');
|
|
18483
|
+
recipeSparseFields$2.recipes.push('ingredients');
|
|
18484
|
+
Object.assign(recipeSparseFields$2, { ingredients: ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'] });
|
|
18485
|
+
}
|
|
18486
|
+
return _this.recipesService.filter(requestFilters, { size: 20, number: page }, recipeIncludes$2, recipeSparseFields$2, _this.modifiedGuests, _this.randomMode, _this.sort).pipe(operators.switchMap(function (result) { return _this.processResults(result, requestFilters, page); }));
|
|
18487
|
+
}));
|
|
18252
18488
|
};
|
|
18253
18489
|
CatalogListComponent.prototype.processResults = function (results, requestFilters, page) {
|
|
18254
18490
|
var _this = this;
|
|
@@ -18807,7 +19043,7 @@
|
|
|
18807
19043
|
var templateObject_1$t, templateObject_2$n, templateObject_3$g, templateObject_4$c;
|
|
18808
19044
|
|
|
18809
19045
|
var _b$1;
|
|
18810
|
-
var _c0$
|
|
19046
|
+
var _c0$p = ["miamMealsPlannerTopAnchor"];
|
|
18811
19047
|
function MealsPlannerComponent_div_2_ng_miam_icon_13_Template(rf, ctx) {
|
|
18812
19048
|
if (rf & 1) {
|
|
18813
19049
|
i0.ɵɵelement(0, "ng-miam-icon", 8);
|
|
@@ -18956,10 +19192,10 @@
|
|
|
18956
19192
|
i0.ɵɵproperty("ngIf", ctx_r1.form);
|
|
18957
19193
|
}
|
|
18958
19194
|
}
|
|
18959
|
-
var recipeIncludes$
|
|
18960
|
-
var recipeSparseFields$
|
|
19195
|
+
var recipeIncludes$3 = ['recipe-provider', 'sponsors'];
|
|
19196
|
+
var recipeSparseFields$3 = (_b$1 = {
|
|
18961
19197
|
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
18962
|
-
'resting-time'], recipeIncludes$
|
|
19198
|
+
'resting-time'], recipeIncludes$3),
|
|
18963
19199
|
sponsors: ['logo-url']
|
|
18964
19200
|
},
|
|
18965
19201
|
_b$1['recipe-provider'] = ['name'],
|
|
@@ -19019,12 +19255,12 @@
|
|
|
19019
19255
|
var _this = this;
|
|
19020
19256
|
this.loading = true;
|
|
19021
19257
|
this.cdr.detectChanges();
|
|
19022
|
-
if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes$
|
|
19023
|
-
recipeIncludes$
|
|
19024
|
-
recipeSparseFields$
|
|
19025
|
-
recipeSparseFields$
|
|
19258
|
+
if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes$3.includes('ingredients')) {
|
|
19259
|
+
recipeIncludes$3.push('ingredients');
|
|
19260
|
+
recipeSparseFields$3.recipes.push('ingredients');
|
|
19261
|
+
recipeSparseFields$3['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
|
|
19026
19262
|
}
|
|
19027
|
-
this.recipesService.plan(inputs.budget, inputs.guestsCount, inputs.recipesCount, recipeIncludes$
|
|
19263
|
+
this.recipesService.plan(inputs.budget, inputs.guestsCount, inputs.recipesCount, recipeIncludes$3, recipeSparseFields$3, false).pipe(operators.switchMap(function (recipes) {
|
|
19028
19264
|
_this.budgettedRecipes = []; // Refresh the result view
|
|
19029
19265
|
_this.cdr.detectChanges();
|
|
19030
19266
|
_this.budgettedRecipes = recipes.map(function (r) {
|
|
@@ -19173,326 +19409,107 @@
|
|
|
19173
19409
|
return newCount;
|
|
19174
19410
|
};
|
|
19175
19411
|
MealsPlannerComponent.prototype.scrollToTop = function () {
|
|
19176
|
-
if (this.topAnchor) {
|
|
19177
|
-
this.topAnchor.nativeElement.scrollIntoView();
|
|
19178
|
-
}
|
|
19179
|
-
};
|
|
19180
|
-
Object.defineProperty(MealsPlannerComponent.prototype, "remainingBudget", {
|
|
19181
|
-
get: function () {
|
|
19182
|
-
var _a;
|
|
19183
|
-
var recipeToChangeId = (_a = this.budgettedRecipes[this.recipeToChangeIndex]) === null || _a === void 0 ? void 0 : _a.id;
|
|
19184
|
-
var remainingBudget = this.maxBudget - this.usedBudget;
|
|
19185
|
-
if (recipeToChangeId) {
|
|
19186
|
-
remainingBudget += this.budgettedRecipesPrices[recipeToChangeId];
|
|
19187
|
-
}
|
|
19188
|
-
if (remainingBudget > 0) {
|
|
19189
|
-
return remainingBudget;
|
|
19190
|
-
}
|
|
19191
|
-
return 0;
|
|
19192
|
-
},
|
|
19193
|
-
enumerable: false,
|
|
19194
|
-
configurable: true
|
|
19195
|
-
});
|
|
19196
|
-
Object.defineProperty(MealsPlannerComponent.prototype, "remainingRecipesNumber", {
|
|
19197
|
-
get: function () {
|
|
19198
|
-
var _this = this;
|
|
19199
|
-
return this.budgettedRecipes.reduce(function (acc, recipe, i) {
|
|
19200
|
-
// Don't count null recipes and currently replacing recipe
|
|
19201
|
-
return recipe && i !== _this.recipeToChangeIndex ? acc : acc + 1;
|
|
19202
|
-
}, 0);
|
|
19203
|
-
},
|
|
19204
|
-
enumerable: false,
|
|
19205
|
-
configurable: true
|
|
19206
|
-
});
|
|
19207
|
-
Object.defineProperty(MealsPlannerComponent.prototype, "excludedRecipesIds", {
|
|
19208
|
-
get: function () {
|
|
19209
|
-
return this.budgettedRecipes.filter(function (recipe) { return recipe; }).map(function (recipe) { return recipe.id; });
|
|
19210
|
-
},
|
|
19211
|
-
enumerable: false,
|
|
19212
|
-
configurable: true
|
|
19213
|
-
});
|
|
19214
|
-
return MealsPlannerComponent;
|
|
19215
|
-
}(EventTracerComponent));
|
|
19216
|
-
MealsPlannerComponent.ɵfac = function MealsPlannerComponent_Factory(t) { return new (t || MealsPlannerComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(AnalyticsService), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(BasketsService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
|
|
19217
|
-
MealsPlannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerComponent, selectors: [["ng-miam-meals-planner"]], viewQuery: function MealsPlannerComponent_Query(rf, ctx) {
|
|
19218
|
-
if (rf & 1) {
|
|
19219
|
-
i0.ɵɵviewQuery(_c0$o, true);
|
|
19220
|
-
}
|
|
19221
|
-
if (rf & 2) {
|
|
19222
|
-
var _t;
|
|
19223
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topAnchor = _t.first);
|
|
19224
|
-
}
|
|
19225
|
-
}, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: function () {
|
|
19226
|
-
var i18n_1;
|
|
19227
|
-
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
19228
|
-
var MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2 = goog.getMsg("Id\u00E9es repas");
|
|
19229
|
-
i18n_1 = MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2;
|
|
19230
|
-
}
|
|
19231
|
-
else {
|
|
19232
|
-
i18n_1 = $localize(templateObject_1$u || (templateObject_1$u = __makeTemplateObject([":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"], [":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"])));
|
|
19233
|
-
}
|
|
19234
|
-
var i18n_3;
|
|
19235
|
-
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
19236
|
-
var MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4 = goog.getMsg("Planifier mes repas");
|
|
19237
|
-
i18n_3 = MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4;
|
|
19238
|
-
}
|
|
19239
|
-
else {
|
|
19240
|
-
i18n_3 = $localize(templateObject_2$o || (templateObject_2$o = __makeTemplateObject([":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"], [":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"])));
|
|
19241
|
-
}
|
|
19242
|
-
var i18n_5;
|
|
19243
|
-
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
19244
|
-
var MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6 = goog.getMsg("Ajouter une id\u00E9e repas");
|
|
19245
|
-
i18n_5 = MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6;
|
|
19246
|
-
}
|
|
19247
|
-
else {
|
|
19248
|
-
i18n_5 = $localize(templateObject_3$h || (templateObject_3$h = __makeTemplateObject([":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"], [":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"])));
|
|
19249
|
-
}
|
|
19250
|
-
return [[1, "miam-meals-planner-anchor"], ["miamMealsPlannerTopAnchor", ""], ["class", "miam-meals-planner", 4, "ngIf"], [1, "miam-meals-planner"], [1, "miam-meals-planner__header"], [1, "miam-meals-planner__header__breadcrumb", 3, "ngClass"], ["href", "/"], ["width", "18", "height", "18", "primaryColor", "#1F3543", 3, "iconName"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], [1, "inactive", 3, "href"], i18n_1, ["href", "javascript:void(0)", 1, "active"], i18n_3, ["class", "chevron-right", "width", "24", "height", "24", 3, "iconName", 4, "ngIf"], ["href", "javascript:void(0)", "class", "subCategory", 4, "ngIf"], ["class", "miam-meals-planner__content", 4, "ngIf"], ["href", "javascript:void(0)", 1, "subCategory"], i18n_5, [1, "miam-meals-planner__content"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted", 4, "ngIf"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog", 4, "ngIf"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed", 4, "ngIf"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled", 4, "ngIf"], [3, "recipesIds", "originTrace", "budget", 4, "ngIf"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled"], [3, "recipesIds", "originTrace", "budget"]];
|
|
19251
|
-
}, template: function MealsPlannerComponent_Template(rf, ctx) {
|
|
19252
|
-
if (rf & 1) {
|
|
19253
|
-
i0.ɵɵelement(0, "div", 0, 1);
|
|
19254
|
-
i0.ɵɵtemplate(2, MealsPlannerComponent_div_2_Template, 16, 10, "div", 2);
|
|
19255
|
-
}
|
|
19256
|
-
if (rf & 2) {
|
|
19257
|
-
i0.ɵɵadvance(2);
|
|
19258
|
-
i0.ɵɵproperty("ngIf", ctx.featureIsAuthorized);
|
|
19259
|
-
}
|
|
19260
|
-
}, directives: [i2.NgIf, i2.NgClass, IconComponent, MealsPlannerFormComponent, MealsPlannerResultComponent, MealsPlannerBasketPreviewComponent, MealsPlannerCatalogComponent, MealsPlannerBasketConfirmationComponent], styles: [".miam-meals-planner{border-bottom:1px solid #d9dde1;display:flex;flex-direction:column;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb{align-items:center;background:#fff;border-bottom:1px solid #d9dde1;display:flex;padding:24px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb.hidden{display:none}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a{font-size:14px;font-weight:500;line-height:150%;margin:0 4px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.inactive{color:#1f3543}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.active{color:var(--m-color-primary);font-weight:900}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right{transform:rotate(-90deg)}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right .icon-container svg path:last-child{fill:#1f3543}.miam-meals-planner .miam-meals-planner__content{display:flex;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:1px solid #d9dde1;max-width:300px}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview,.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-result{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview.reduced{width:0}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-catalog{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 80px;width:100%}@media (max-width:1023px){.miam-meals-planner .miam-meals-planner__header{display:none}.miam-meals-planner .miam-meals-planner__content{flex-direction:column}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:unset;max-width:unset}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 15px}}.miam-meals-planner .miam-meals-planner__catalog{padding:16px}"], encapsulation: 2, changeDetection: 0 });
|
|
19261
|
-
/*@__PURE__*/ (function () {
|
|
19262
|
-
i0.ɵsetClassMetadata(MealsPlannerComponent, [{
|
|
19263
|
-
type: i0.Component,
|
|
19264
|
-
args: [{
|
|
19265
|
-
selector: 'ng-miam-meals-planner',
|
|
19266
|
-
templateUrl: './meals-planner.component.html',
|
|
19267
|
-
styleUrls: ['./meals-planner.component.scss'],
|
|
19268
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
19269
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
19270
|
-
}]
|
|
19271
|
-
}], function () { return [{ type: i3.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: AnalyticsService }, { type: ContextService }, { type: GroceriesListsService }, { type: RecipesService }, { type: BasketsService }, { type: PointOfSalesService }]; }, { topAnchor: [{
|
|
19272
|
-
type: i0.ViewChild,
|
|
19273
|
-
args: ['miamMealsPlannerTopAnchor']
|
|
19274
|
-
}] });
|
|
19275
|
-
})();
|
|
19276
|
-
var templateObject_1$u, templateObject_2$o, templateObject_3$h;
|
|
19277
|
-
|
|
19278
|
-
var _a;
|
|
19279
|
-
var _c0$p = ["recipeCard"];
|
|
19280
|
-
function SuggestionCardComponent_ng_miam_recipe_card_0_Template(rf, ctx) {
|
|
19281
|
-
if (rf & 1) {
|
|
19282
|
-
var _r3_1 = i0.ɵɵgetCurrentView();
|
|
19283
|
-
i0.ɵɵelementStart(0, "ng-miam-recipe-card", 1, 2);
|
|
19284
|
-
i0.ɵɵlistener("guestsChanged", function SuggestionCardComponent_ng_miam_recipe_card_0_Template_ng_miam_recipe_card_guestsChanged_0_listener() { i0.ɵɵrestoreView(_r3_1); var ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.guestsChanged(); });
|
|
19285
|
-
i0.ɵɵelementEnd();
|
|
19286
|
-
}
|
|
19287
|
-
if (rf & 2) {
|
|
19288
|
-
var ctx_r0 = i0.ɵɵnextContext();
|
|
19289
|
-
i0.ɵɵproperty("recipe", ctx_r0.recipe)("headerText", ctx_r0.headerText)("displayPricing", ctx_r0.displayPricing)("displayAddedOnPicture", ctx_r0.displayAddedOnPicture)("originTrace", ctx_r0.eventTrace());
|
|
19290
|
-
}
|
|
19291
|
-
}
|
|
19292
|
-
var recipeIncludes$3 = ['recipe-provider', 'sponsors'];
|
|
19293
|
-
var recipeSparseFields$3 = (_a = {
|
|
19294
|
-
recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
|
|
19295
|
-
'resting-time'], recipeIncludes$3),
|
|
19296
|
-
sponsors: ['logo-url']
|
|
19297
|
-
},
|
|
19298
|
-
_a['recipe-provider'] = ['name'],
|
|
19299
|
-
_a);
|
|
19300
|
-
/**
|
|
19301
|
-
* This is an angular component design to be a web component
|
|
19302
|
-
* that's why we use onPushStrategie with the changeDetetectorRef
|
|
19303
|
-
* to avoid common issue
|
|
19304
|
-
* guide -> https://netbasal.com/a-comprehensive-guide-to-angular-onpush-change-detection-strategy-5bac493074a4
|
|
19305
|
-
* and alsow we use ShadowDom to protect style of our component
|
|
19306
|
-
* and alsow style of the parent aplication that will use it
|
|
19307
|
-
* doc -> https://angular.io/api/core/ViewEncapsulation
|
|
19308
|
-
*/
|
|
19309
|
-
var SuggestionCardComponent = /** @class */ (function (_super) {
|
|
19310
|
-
__extends(SuggestionCardComponent, _super);
|
|
19311
|
-
function SuggestionCardComponent(cdr, recipeService, groceriesListsService, contextService, analyticsService, recipeEventsService, element) {
|
|
19312
|
-
var _this = _super.call(this, cdr, recipeService, recipeEventsService, groceriesListsService, contextService, analyticsService, element) || this;
|
|
19313
|
-
_this.cdr = cdr;
|
|
19314
|
-
_this.recipeService = recipeService;
|
|
19315
|
-
_this.groceriesListsService = groceriesListsService;
|
|
19316
|
-
_this.contextService = contextService;
|
|
19317
|
-
_this.analyticsService = analyticsService;
|
|
19318
|
-
_this.recipeEventsService = recipeEventsService;
|
|
19319
|
-
_this.element = element;
|
|
19320
|
-
_this.isEmpty = false;
|
|
19321
|
-
_this.eventsGroupId = uuid.v4();
|
|
19322
|
-
// as the template creates a recipe card, the recipe card send the events
|
|
19323
|
-
_this.sendShowEventOnScroll = false;
|
|
19324
|
-
return _this;
|
|
19325
|
-
}
|
|
19326
|
-
SuggestionCardComponent.prototype.ngOnChanges = function (simpleChanges) {
|
|
19327
|
-
if ((simpleChanges.productIds && !this.randomModeEnable) || !this.recipe) {
|
|
19328
|
-
this.loadRecipe();
|
|
19329
|
-
}
|
|
19330
|
-
};
|
|
19331
|
-
// Only send show event if the recipe has changed while the card was in viewport
|
|
19332
|
-
SuggestionCardComponent.prototype.sendShowEvent = function () {
|
|
19333
|
-
return false;
|
|
19334
|
-
};
|
|
19335
|
-
// If recipe already in basket, update the number of guests so that the pricing gets updated as well
|
|
19336
|
-
// (display = false so that the recipe details don't show up)
|
|
19337
|
-
SuggestionCardComponent.prototype.guestsChanged = function () {
|
|
19338
|
-
var _this = this;
|
|
19339
|
-
this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).pipe(operators.switchMap(function (recipeIsInList) {
|
|
19340
|
-
if (recipeIsInList) {
|
|
19341
|
-
return _this.groceriesListsService.appendRecipeToList(_this.recipe.id, _this.recipe.modifiedGuests, _this.eventTrace())
|
|
19342
|
-
.pipe(operators.take(1));
|
|
19343
|
-
}
|
|
19344
|
-
})).subscribe(function () { return _this.cdr.detectChanges(); }));
|
|
19345
|
-
};
|
|
19346
|
-
SuggestionCardComponent.prototype.loadRecipe = function () {
|
|
19347
|
-
var _this = this;
|
|
19348
|
-
this.subscriptions.push(this.fetchRecipes().pipe(operators.skipWhile(function (results) { return !results; }), operators.catchError(function (err) {
|
|
19349
|
-
_this.hide.emit();
|
|
19350
|
-
return rxjs.of(err);
|
|
19351
|
-
})).subscribe(function (results) { return _this.processResults(results); }));
|
|
19412
|
+
if (this.topAnchor) {
|
|
19413
|
+
this.topAnchor.nativeElement.scrollIntoView();
|
|
19414
|
+
}
|
|
19352
19415
|
};
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19356
|
-
|
|
19357
|
-
|
|
19416
|
+
Object.defineProperty(MealsPlannerComponent.prototype, "remainingBudget", {
|
|
19417
|
+
get: function () {
|
|
19418
|
+
var _a;
|
|
19419
|
+
var recipeToChangeId = (_a = this.budgettedRecipes[this.recipeToChangeIndex]) === null || _a === void 0 ? void 0 : _a.id;
|
|
19420
|
+
var remainingBudget = this.maxBudget - this.usedBudget;
|
|
19421
|
+
if (recipeToChangeId) {
|
|
19422
|
+
remainingBudget += this.budgettedRecipesPrices[recipeToChangeId];
|
|
19423
|
+
}
|
|
19424
|
+
if (remainingBudget > 0) {
|
|
19425
|
+
return remainingBudget;
|
|
19426
|
+
}
|
|
19427
|
+
return 0;
|
|
19428
|
+
},
|
|
19429
|
+
enumerable: false,
|
|
19430
|
+
configurable: true
|
|
19431
|
+
});
|
|
19432
|
+
Object.defineProperty(MealsPlannerComponent.prototype, "remainingRecipesNumber", {
|
|
19433
|
+
get: function () {
|
|
19434
|
+
var _this = this;
|
|
19435
|
+
return this.budgettedRecipes.reduce(function (acc, recipe, i) {
|
|
19436
|
+
// Don't count null recipes and currently replacing recipe
|
|
19437
|
+
return recipe && i !== _this.recipeToChangeIndex ? acc : acc + 1;
|
|
19438
|
+
}, 0);
|
|
19439
|
+
},
|
|
19440
|
+
enumerable: false,
|
|
19441
|
+
configurable: true
|
|
19442
|
+
});
|
|
19443
|
+
Object.defineProperty(MealsPlannerComponent.prototype, "excludedRecipesIds", {
|
|
19444
|
+
get: function () {
|
|
19445
|
+
return this.budgettedRecipes.filter(function (recipe) { return recipe; }).map(function (recipe) { return recipe.id; });
|
|
19446
|
+
},
|
|
19447
|
+
enumerable: false,
|
|
19448
|
+
configurable: true
|
|
19449
|
+
});
|
|
19450
|
+
return MealsPlannerComponent;
|
|
19451
|
+
}(EventTracerComponent));
|
|
19452
|
+
MealsPlannerComponent.ɵfac = function MealsPlannerComponent_Factory(t) { return new (t || MealsPlannerComponent)(i0.ɵɵdirectiveInject(i3.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(AnalyticsService), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(BasketsService), i0.ɵɵdirectiveInject(PointOfSalesService)); };
|
|
19453
|
+
MealsPlannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerComponent, selectors: [["ng-miam-meals-planner"]], viewQuery: function MealsPlannerComponent_Query(rf, ctx) {
|
|
19454
|
+
if (rf & 1) {
|
|
19455
|
+
i0.ɵɵviewQuery(_c0$p, true);
|
|
19358
19456
|
}
|
|
19359
|
-
if (
|
|
19360
|
-
|
|
19457
|
+
if (rf & 2) {
|
|
19458
|
+
var _t;
|
|
19459
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topAnchor = _t.first);
|
|
19460
|
+
}
|
|
19461
|
+
}, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: function () {
|
|
19462
|
+
var i18n_1;
|
|
19463
|
+
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
19464
|
+
var MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2 = goog.getMsg("Id\u00E9es repas");
|
|
19465
|
+
i18n_1 = MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2;
|
|
19361
19466
|
}
|
|
19362
19467
|
else {
|
|
19363
|
-
|
|
19468
|
+
i18n_1 = $localize(templateObject_1$u || (templateObject_1$u = __makeTemplateObject([":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"], [":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"])));
|
|
19364
19469
|
}
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
|
|
19369
|
-
var _this = this;
|
|
19370
|
-
this.isEmpty = (!recipes || recipes.length === 0);
|
|
19371
|
-
if (!this.isEmpty) {
|
|
19372
|
-
// get the first recipe and shallow copy it to permit to send event and do not disturb any other component
|
|
19373
|
-
// if ressource is cached without copy another load will get the attributes
|
|
19374
|
-
this.recipe = recipes[0].shallowCopyWithEvents(this.recipeEventsService.ORIGIN_SUGGESTION, this.eventsGroupId);
|
|
19375
|
-
// Update guests from list only if recipe is in list
|
|
19376
|
-
this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).subscribe(function (isInList) {
|
|
19377
|
-
if (isInList) {
|
|
19378
|
-
_this.recipe.modifiedGuests = _this.groceriesListsService.guestsForRecipe(_this.recipe) || +_this.recipe.guests;
|
|
19379
|
-
_this.recipeCard.cdr.markForCheck();
|
|
19380
|
-
}
|
|
19381
|
-
}));
|
|
19382
|
-
this.recipeCard.cdr.markForCheck();
|
|
19470
|
+
var i18n_3;
|
|
19471
|
+
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
19472
|
+
var MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4 = goog.getMsg("Planifier mes repas");
|
|
19473
|
+
i18n_3 = MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4;
|
|
19383
19474
|
}
|
|
19384
19475
|
else {
|
|
19385
|
-
|
|
19476
|
+
i18n_3 = $localize(templateObject_2$o || (templateObject_2$o = __makeTemplateObject([":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"], [":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"])));
|
|
19386
19477
|
}
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
SuggestionCardComponent.ɵfac = function SuggestionCardComponent_Factory(t) { return new (t || SuggestionCardComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RecipesService), i0.ɵɵdirectiveInject(GroceriesListsService), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(AnalyticsService), i0.ɵɵdirectiveInject(RecipeEventsService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
19392
|
-
SuggestionCardComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SuggestionCardComponent, selectors: [["ng-miam-suggestion-card"]], viewQuery: function SuggestionCardComponent_Query(rf, ctx) {
|
|
19393
|
-
if (rf & 1) {
|
|
19394
|
-
i0.ɵɵviewQuery(_c0$p, true);
|
|
19478
|
+
var i18n_5;
|
|
19479
|
+
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
|
19480
|
+
var MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6 = goog.getMsg("Ajouter une id\u00E9e repas");
|
|
19481
|
+
i18n_5 = MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6;
|
|
19395
19482
|
}
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCard = _t.first);
|
|
19483
|
+
else {
|
|
19484
|
+
i18n_5 = $localize(templateObject_3$h || (templateObject_3$h = __makeTemplateObject([":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"], [":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"])));
|
|
19399
19485
|
}
|
|
19400
|
-
|
|
19486
|
+
return [[1, "miam-meals-planner-anchor"], ["miamMealsPlannerTopAnchor", ""], ["class", "miam-meals-planner", 4, "ngIf"], [1, "miam-meals-planner"], [1, "miam-meals-planner__header"], [1, "miam-meals-planner__header__breadcrumb", 3, "ngClass"], ["href", "/"], ["width", "18", "height", "18", "primaryColor", "#1F3543", 3, "iconName"], ["width", "24", "height", "24", 1, "chevron-right", 3, "iconName"], [1, "inactive", 3, "href"], i18n_1, ["href", "javascript:void(0)", 1, "active"], i18n_3, ["class", "chevron-right", "width", "24", "height", "24", 3, "iconName", 4, "ngIf"], ["href", "javascript:void(0)", "class", "subCategory", 4, "ngIf"], ["class", "miam-meals-planner__content", 4, "ngIf"], ["href", "javascript:void(0)", 1, "subCategory"], i18n_5, [1, "miam-meals-planner__content"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted", 4, "ngIf"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog", 4, "ngIf"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed", 4, "ngIf"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled", 4, "ngIf"], [3, "recipesIds", "originTrace", "budget", 4, "ngIf"], [3, "originTrace", "reduced", "form", "loading", "ngClass", "submitted"], [3, "originTrace", "recipes", "usedBudget", "maxBudget", "loading", "recipeRemoval", "confirmed", "openCatalog"], [3, "recipesIds", "usedBudget", "maxBudget", "ingredientsRegrouped", "originTrace", "ngClass", "closed"], [3, "modifiedGuests", "originTrace", "remainingBudget", "remainingRecipesNumber", "excludedRecipesIds", "editRecipe", "canceled"], [3, "recipesIds", "originTrace", "budget"]];
|
|
19487
|
+
}, template: function MealsPlannerComponent_Template(rf, ctx) {
|
|
19401
19488
|
if (rf & 1) {
|
|
19402
|
-
i0.ɵɵ
|
|
19489
|
+
i0.ɵɵelement(0, "div", 0, 1);
|
|
19490
|
+
i0.ɵɵtemplate(2, MealsPlannerComponent_div_2_Template, 16, 10, "div", 2);
|
|
19403
19491
|
}
|
|
19404
19492
|
if (rf & 2) {
|
|
19405
|
-
i0.ɵɵ
|
|
19493
|
+
i0.ɵɵadvance(2);
|
|
19494
|
+
i0.ɵɵproperty("ngIf", ctx.featureIsAuthorized);
|
|
19406
19495
|
}
|
|
19407
|
-
}, directives: [i2.NgIf,
|
|
19496
|
+
}, directives: [i2.NgIf, i2.NgClass, IconComponent, MealsPlannerFormComponent, MealsPlannerResultComponent, MealsPlannerBasketPreviewComponent, MealsPlannerCatalogComponent, MealsPlannerBasketConfirmationComponent], styles: [".miam-meals-planner{border-bottom:1px solid #d9dde1;display:flex;flex-direction:column;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb{align-items:center;background:#fff;border-bottom:1px solid #d9dde1;display:flex;padding:24px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb.hidden{display:none}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a{font-size:14px;font-weight:500;line-height:150%;margin:0 4px}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.inactive{color:#1f3543}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb a.active{color:var(--m-color-primary);font-weight:900}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right{transform:rotate(-90deg)}.miam-meals-planner .miam-meals-planner__header .miam-meals-planner__header__breadcrumb .chevron-right .icon-container svg path:last-child{fill:#1f3543}.miam-meals-planner .miam-meals-planner__content{display:flex;height:100%;width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:1px solid #d9dde1;max-width:300px}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview,.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-result{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-preview.reduced{width:0}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-catalog{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 80px;width:100%}@media (max-width:1023px){.miam-meals-planner .miam-meals-planner__header{display:none}.miam-meals-planner .miam-meals-planner__content{flex-direction:column}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form{width:100%}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-form.reduced{border-right:unset;max-width:unset}.miam-meals-planner .miam-meals-planner__content ng-miam-meals-planner-basket-confirmation{padding:0 15px}}.miam-meals-planner .miam-meals-planner__catalog{padding:16px}"], encapsulation: 2, changeDetection: 0 });
|
|
19408
19497
|
/*@__PURE__*/ (function () {
|
|
19409
|
-
i0.ɵsetClassMetadata(
|
|
19498
|
+
i0.ɵsetClassMetadata(MealsPlannerComponent, [{
|
|
19410
19499
|
type: i0.Component,
|
|
19411
19500
|
args: [{
|
|
19412
|
-
selector: 'ng-miam-
|
|
19413
|
-
templateUrl: './
|
|
19414
|
-
styleUrls: ['./
|
|
19501
|
+
selector: 'ng-miam-meals-planner',
|
|
19502
|
+
templateUrl: './meals-planner.component.html',
|
|
19503
|
+
styleUrls: ['./meals-planner.component.scss'],
|
|
19415
19504
|
encapsulation: i0.ViewEncapsulation.None,
|
|
19416
19505
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
19417
19506
|
}]
|
|
19418
|
-
}], function () { return [{ type: i0.ChangeDetectorRef }, { type:
|
|
19419
|
-
type: i0.Input
|
|
19420
|
-
}], productIds: [{
|
|
19421
|
-
type: i0.Input
|
|
19422
|
-
}], recipeCard: [{
|
|
19507
|
+
}], function () { return [{ type: i3.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: AnalyticsService }, { type: ContextService }, { type: GroceriesListsService }, { type: RecipesService }, { type: BasketsService }, { type: PointOfSalesService }]; }, { topAnchor: [{
|
|
19423
19508
|
type: i0.ViewChild,
|
|
19424
|
-
args: ['
|
|
19509
|
+
args: ['miamMealsPlannerTopAnchor']
|
|
19425
19510
|
}] });
|
|
19426
19511
|
})();
|
|
19427
|
-
|
|
19428
|
-
var RecipeCardsModule = /** @class */ (function () {
|
|
19429
|
-
// Create custom elements so the WebComponents can be interpreted by the browser regardless of the js framework used
|
|
19430
|
-
function RecipeCardsModule(injector) {
|
|
19431
|
-
var webComponents = {
|
|
19432
|
-
'add-recipe-card': AddRecipeCardComponent,
|
|
19433
|
-
'catalog-recipe-card': CatalogRecipeCardComponent,
|
|
19434
|
-
'recipe-card': RecipeCardComponent,
|
|
19435
|
-
'suggestion-card': SuggestionCardComponent,
|
|
19436
|
-
'recipe-card-cta': RecipeCardCtaComponent,
|
|
19437
|
-
};
|
|
19438
|
-
Object.keys(webComponents).map(function (compName) {
|
|
19439
|
-
var name = "webc-miam-" + compName;
|
|
19440
|
-
// Avoid duplicate error
|
|
19441
|
-
if (!customElements.get(name)) {
|
|
19442
|
-
var comp = webComponents[compName];
|
|
19443
|
-
var ngElement = elements.createCustomElement(comp, { injector: injector });
|
|
19444
|
-
customElements.define(name, ngElement);
|
|
19445
|
-
}
|
|
19446
|
-
});
|
|
19447
|
-
}
|
|
19448
|
-
return RecipeCardsModule;
|
|
19449
|
-
}());
|
|
19450
|
-
RecipeCardsModule.ɵmod = i0.ɵɵdefineNgModule({ type: RecipeCardsModule });
|
|
19451
|
-
RecipeCardsModule.ɵinj = i0.ɵɵdefineInjector({ factory: function RecipeCardsModule_Factory(t) { return new (t || RecipeCardsModule)(i0.ɵɵinject(i0.Injector)); }, imports: [[
|
|
19452
|
-
i2.CommonModule,
|
|
19453
|
-
i3.FormsModule,
|
|
19454
|
-
UtilsModule,
|
|
19455
|
-
ComponentsModule
|
|
19456
|
-
]] });
|
|
19457
|
-
(function () {
|
|
19458
|
-
(typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(RecipeCardsModule, { declarations: [AddRecipeCardComponent,
|
|
19459
|
-
CatalogRecipeCardComponent,
|
|
19460
|
-
RecipeCardComponent,
|
|
19461
|
-
SuggestionCardComponent,
|
|
19462
|
-
RecipeCardCtaComponent], imports: [i2.CommonModule,
|
|
19463
|
-
i3.FormsModule,
|
|
19464
|
-
UtilsModule,
|
|
19465
|
-
ComponentsModule], exports: [AddRecipeCardComponent,
|
|
19466
|
-
CatalogRecipeCardComponent,
|
|
19467
|
-
RecipeCardComponent,
|
|
19468
|
-
SuggestionCardComponent] });
|
|
19469
|
-
})();
|
|
19470
|
-
/*@__PURE__*/ (function () {
|
|
19471
|
-
i0.ɵsetClassMetadata(RecipeCardsModule, [{
|
|
19472
|
-
type: i0.NgModule,
|
|
19473
|
-
args: [{
|
|
19474
|
-
imports: [
|
|
19475
|
-
i2.CommonModule,
|
|
19476
|
-
i3.FormsModule,
|
|
19477
|
-
UtilsModule,
|
|
19478
|
-
ComponentsModule
|
|
19479
|
-
],
|
|
19480
|
-
declarations: [
|
|
19481
|
-
AddRecipeCardComponent,
|
|
19482
|
-
CatalogRecipeCardComponent,
|
|
19483
|
-
RecipeCardComponent,
|
|
19484
|
-
SuggestionCardComponent,
|
|
19485
|
-
RecipeCardCtaComponent
|
|
19486
|
-
],
|
|
19487
|
-
exports: [
|
|
19488
|
-
AddRecipeCardComponent,
|
|
19489
|
-
CatalogRecipeCardComponent,
|
|
19490
|
-
RecipeCardComponent,
|
|
19491
|
-
SuggestionCardComponent
|
|
19492
|
-
]
|
|
19493
|
-
}]
|
|
19494
|
-
}], function () { return [{ type: i0.Injector }]; }, null);
|
|
19495
|
-
})();
|
|
19512
|
+
var templateObject_1$u, templateObject_2$o, templateObject_3$h;
|
|
19496
19513
|
|
|
19497
19514
|
var _c$1;
|
|
19498
19515
|
var _c0$q = ["categoryContent"];
|
|
@@ -19611,17 +19628,14 @@
|
|
|
19611
19628
|
CatalogCategoryComponent.prototype.ngOnChanges = function () {
|
|
19612
19629
|
var _this = this;
|
|
19613
19630
|
this.subscriptions.push(rxjs.forkJoin([this.loadRecipes(), this.loadArticles()]).pipe(operators.finalize(function () {
|
|
19614
|
-
|
|
19615
|
-
_this.hide = true;
|
|
19616
|
-
}
|
|
19617
|
-
else {
|
|
19618
|
-
_this.hide = false;
|
|
19619
|
-
}
|
|
19631
|
+
_this.hide = _this.recipes.length === 0 && _this.articles.length === 0;
|
|
19620
19632
|
_this.loading.emit(false);
|
|
19621
19633
|
_this.cdr.detectChanges();
|
|
19622
19634
|
})).subscribe());
|
|
19623
19635
|
};
|
|
19624
|
-
CatalogCategoryComponent.prototype.currentPath = function () {
|
|
19636
|
+
CatalogCategoryComponent.prototype.currentPath = function () {
|
|
19637
|
+
return '';
|
|
19638
|
+
};
|
|
19625
19639
|
CatalogCategoryComponent.prototype.props = function () {
|
|
19626
19640
|
var _a, _b;
|
|
19627
19641
|
return { category_id: (_b = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.additionalFilters) === null || _b === void 0 ? void 0 : _b.filters.packages };
|
|
@@ -19637,7 +19651,9 @@
|
|
|
19637
19651
|
recipeSparseFields$4.recipes.push('ingredients');
|
|
19638
19652
|
recipeSparseFields$4['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
|
|
19639
19653
|
}
|
|
19640
|
-
return this.recipesService.
|
|
19654
|
+
return this.recipesService.addMandatoryCompletionToFilter(this.filters).pipe(operators.switchMap(function () {
|
|
19655
|
+
return _this.recipesService.filter(_this.filters, { number: 1, size: _this.maxRecipeNumber }, recipeIncludes$4, recipeSparseFields$4, _this.modifiedGuests, false, 'position');
|
|
19656
|
+
}), operators.tap(function (result) { return _this.recipes = result; }));
|
|
19641
19657
|
};
|
|
19642
19658
|
CatalogCategoryComponent.prototype.loadArticles = function () {
|
|
19643
19659
|
var _this = this;
|
|
@@ -22052,94 +22068,91 @@
|
|
|
22052
22068
|
i0.ɵɵproperty("iconName", ctx_r4.icon.ChevronDown);
|
|
22053
22069
|
}
|
|
22054
22070
|
}
|
|
22055
|
-
function
|
|
22071
|
+
function RecipeCatalogComponent_div_2_div_5_div_3_Template(rf, ctx) {
|
|
22056
22072
|
if (rf & 1) {
|
|
22057
|
-
i0.ɵɵelementStart(0, "
|
|
22058
|
-
i0.ɵɵ
|
|
22073
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
22074
|
+
i0.ɵɵelementStart(1, "span");
|
|
22075
|
+
i0.ɵɵi18n(2, 24);
|
|
22076
|
+
i0.ɵɵelementEnd();
|
|
22077
|
+
i0.ɵɵelementStart(3, "span");
|
|
22078
|
+
i0.ɵɵtext(4);
|
|
22059
22079
|
i0.ɵɵelementEnd();
|
|
22060
|
-
}
|
|
22061
|
-
}
|
|
22062
|
-
function RecipeCatalogComponent_div_2_div_5_span_4_Template(rf, ctx) {
|
|
22063
|
-
if (rf & 1) {
|
|
22064
|
-
i0.ɵɵelementStart(0, "span");
|
|
22065
|
-
i0.ɵɵtext(1);
|
|
22066
22080
|
i0.ɵɵelementEnd();
|
|
22067
22081
|
}
|
|
22068
22082
|
if (rf & 2) {
|
|
22069
|
-
var
|
|
22070
|
-
i0.ɵɵadvance(
|
|
22071
|
-
i0.ɵɵtextInterpolate(
|
|
22083
|
+
var ctx_r10 = i0.ɵɵnextContext(3);
|
|
22084
|
+
i0.ɵɵadvance(4);
|
|
22085
|
+
i0.ɵɵtextInterpolate(ctx_r10.filters.search);
|
|
22072
22086
|
}
|
|
22073
22087
|
}
|
|
22074
|
-
function
|
|
22088
|
+
function RecipeCatalogComponent_div_2_div_5_span_4_Template(rf, ctx) {
|
|
22075
22089
|
if (rf & 1) {
|
|
22076
22090
|
i0.ɵɵelementStart(0, "span");
|
|
22077
|
-
i0.ɵɵi18n(1,
|
|
22091
|
+
i0.ɵɵi18n(1, 25);
|
|
22078
22092
|
i0.ɵɵelementEnd();
|
|
22079
22093
|
}
|
|
22080
22094
|
}
|
|
22081
|
-
function
|
|
22095
|
+
function RecipeCatalogComponent_div_2_div_5_span_5_Template(rf, ctx) {
|
|
22082
22096
|
if (rf & 1) {
|
|
22083
22097
|
i0.ɵɵelementStart(0, "span");
|
|
22084
|
-
i0.ɵɵi18n(1,
|
|
22098
|
+
i0.ɵɵi18n(1, 26);
|
|
22085
22099
|
i0.ɵɵelementEnd();
|
|
22086
22100
|
}
|
|
22087
22101
|
}
|
|
22088
|
-
function
|
|
22102
|
+
function RecipeCatalogComponent_div_2_div_5_span_6_Template(rf, ctx) {
|
|
22089
22103
|
if (rf & 1) {
|
|
22090
22104
|
i0.ɵɵelementStart(0, "span");
|
|
22091
22105
|
i0.ɵɵtext(1);
|
|
22092
22106
|
i0.ɵɵelementEnd();
|
|
22093
22107
|
}
|
|
22094
22108
|
if (rf & 2) {
|
|
22095
|
-
var
|
|
22109
|
+
var ctx_r13 = i0.ɵɵnextContext(3);
|
|
22096
22110
|
i0.ɵɵadvance(1);
|
|
22097
|
-
i0.ɵɵtextInterpolate(
|
|
22111
|
+
i0.ɵɵtextInterpolate(ctx_r13.filters.additionalFilters.title);
|
|
22098
22112
|
}
|
|
22099
22113
|
}
|
|
22100
|
-
function
|
|
22114
|
+
function RecipeCatalogComponent_div_2_div_5_span_7_Template(rf, ctx) {
|
|
22101
22115
|
if (rf & 1) {
|
|
22102
22116
|
i0.ɵɵelementStart(0, "span");
|
|
22103
|
-
i0.ɵɵi18n(1,
|
|
22117
|
+
i0.ɵɵi18n(1, 27);
|
|
22104
22118
|
i0.ɵɵelementEnd();
|
|
22105
22119
|
}
|
|
22106
22120
|
}
|
|
22107
|
-
function
|
|
22121
|
+
function RecipeCatalogComponent_div_2_div_5_div_8_Template(rf, ctx) {
|
|
22108
22122
|
if (rf & 1) {
|
|
22109
|
-
var
|
|
22110
|
-
i0.ɵɵelementStart(0, "div",
|
|
22111
|
-
i0.ɵɵlistener("click", function
|
|
22112
|
-
i0.ɵɵelement(1, "ng-miam-icon",
|
|
22123
|
+
var _r17_1 = i0.ɵɵgetCurrentView();
|
|
22124
|
+
i0.ɵɵelementStart(0, "div", 28);
|
|
22125
|
+
i0.ɵɵlistener("click", function RecipeCatalogComponent_div_2_div_5_div_8_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r17_1); var ctx_r16 = i0.ɵɵnextContext(3); return ctx_r16.manageRecipeAction({ action: "CREATE", recipe: null }); });
|
|
22126
|
+
i0.ɵɵelement(1, "ng-miam-icon", 29);
|
|
22113
22127
|
i0.ɵɵelementStart(2, "span");
|
|
22114
|
-
i0.ɵɵi18n(3,
|
|
22128
|
+
i0.ɵɵi18n(3, 30);
|
|
22115
22129
|
i0.ɵɵelementEnd();
|
|
22116
22130
|
i0.ɵɵelementEnd();
|
|
22117
22131
|
}
|
|
22118
22132
|
if (rf & 2) {
|
|
22119
|
-
var
|
|
22133
|
+
var ctx_r15 = i0.ɵɵnextContext(3);
|
|
22120
22134
|
i0.ɵɵadvance(1);
|
|
22121
|
-
i0.ɵɵproperty("iconName",
|
|
22135
|
+
i0.ɵɵproperty("iconName", ctx_r15.icon.Plus);
|
|
22122
22136
|
}
|
|
22123
22137
|
}
|
|
22124
22138
|
function RecipeCatalogComponent_div_2_div_5_Template(rf, ctx) {
|
|
22125
22139
|
if (rf & 1) {
|
|
22126
|
-
var
|
|
22140
|
+
var _r19_1 = i0.ɵɵgetCurrentView();
|
|
22127
22141
|
i0.ɵɵelementStart(0, "div", 16);
|
|
22128
22142
|
i0.ɵɵelementStart(1, "div", 17);
|
|
22129
22143
|
i0.ɵɵelementStart(2, "ng-miam-icon", 18);
|
|
22130
|
-
i0.ɵɵlistener("click", function RecipeCatalogComponent_div_2_div_5_Template_ng_miam_icon_click_2_listener() { i0.ɵɵrestoreView(
|
|
22144
|
+
i0.ɵɵlistener("click", function RecipeCatalogComponent_div_2_div_5_Template_ng_miam_icon_click_2_listener() { i0.ɵɵrestoreView(_r19_1); var ctx_r18 = i0.ɵɵnextContext(2); return ctx_r18.returnToHomePage(); });
|
|
22131
22145
|
i0.ɵɵelementEnd();
|
|
22132
|
-
i0.ɵɵtemplate(3,
|
|
22133
|
-
i0.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_5_span_4_Template, 2,
|
|
22134
|
-
i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_span_5_Template, 2, 0, "span",
|
|
22135
|
-
i0.ɵɵtemplate(6, RecipeCatalogComponent_div_2_div_5_span_6_Template, 2,
|
|
22136
|
-
i0.ɵɵtemplate(7, RecipeCatalogComponent_div_2_div_5_span_7_Template, 2,
|
|
22137
|
-
i0.ɵɵtemplate(8, RecipeCatalogComponent_div_2_div_5_span_8_Template, 2, 0, "span", 19);
|
|
22146
|
+
i0.ɵɵtemplate(3, RecipeCatalogComponent_div_2_div_5_div_3_Template, 5, 1, "div", 19);
|
|
22147
|
+
i0.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_5_span_4_Template, 2, 0, "span", 20);
|
|
22148
|
+
i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_span_5_Template, 2, 0, "span", 20);
|
|
22149
|
+
i0.ɵɵtemplate(6, RecipeCatalogComponent_div_2_div_5_span_6_Template, 2, 1, "span", 20);
|
|
22150
|
+
i0.ɵɵtemplate(7, RecipeCatalogComponent_div_2_div_5_span_7_Template, 2, 0, "span", 20);
|
|
22138
22151
|
i0.ɵɵelementEnd();
|
|
22139
|
-
i0.ɵɵtemplate(
|
|
22140
|
-
i0.ɵɵpipe(
|
|
22141
|
-
i0.ɵɵelementStart(
|
|
22142
|
-
i0.ɵɵlistener("filterRemoved", function
|
|
22152
|
+
i0.ɵɵtemplate(8, RecipeCatalogComponent_div_2_div_5_div_8_Template, 4, 1, "div", 21);
|
|
22153
|
+
i0.ɵɵpipe(9, "async");
|
|
22154
|
+
i0.ɵɵelementStart(10, "ng-miam-catalog-list", 22);
|
|
22155
|
+
i0.ɵɵlistener("filterRemoved", function RecipeCatalogComponent_div_2_div_5_Template_ng_miam_catalog_list_filterRemoved_10_listener($event) { i0.ɵɵrestoreView(_r19_1); var ctx_r20 = i0.ɵɵnextContext(2); return ctx_r20.removeFilter($event); })("recipeActionTriggered", function RecipeCatalogComponent_div_2_div_5_Template_ng_miam_catalog_list_recipeActionTriggered_10_listener($event) { i0.ɵɵrestoreView(_r19_1); var ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.manageRecipeAction($event); });
|
|
22143
22156
|
i0.ɵɵelementEnd();
|
|
22144
22157
|
i0.ɵɵelementEnd();
|
|
22145
22158
|
}
|
|
@@ -22150,8 +22163,6 @@
|
|
|
22150
22163
|
i0.ɵɵadvance(1);
|
|
22151
22164
|
i0.ɵɵproperty("ngIf", ctx_r5.isSearchPage());
|
|
22152
22165
|
i0.ɵɵadvance(1);
|
|
22153
|
-
i0.ɵɵproperty("ngIf", ctx_r5.isSearchPage());
|
|
22154
|
-
i0.ɵɵadvance(1);
|
|
22155
22166
|
i0.ɵɵproperty("ngIf", ctx_r5.isFavoritesPage());
|
|
22156
22167
|
i0.ɵɵadvance(1);
|
|
22157
22168
|
i0.ɵɵproperty("ngIf", ctx_r5.isPersonalPage());
|
|
@@ -22160,25 +22171,25 @@
|
|
|
22160
22171
|
i0.ɵɵadvance(1);
|
|
22161
22172
|
i0.ɵɵproperty("ngIf", ctx_r5.isDefaultPage());
|
|
22162
22173
|
i0.ɵɵadvance(1);
|
|
22163
|
-
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(
|
|
22174
|
+
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(9, 10, ctx_r5.canDisplayCreationButton()));
|
|
22164
22175
|
i0.ɵɵadvance(2);
|
|
22165
22176
|
i0.ɵɵproperty("filters", ctx_r5.filters)("originTrace", ctx_r5.eventTrace())("displayPricing", ctx_r5.displayPricing);
|
|
22166
22177
|
}
|
|
22167
22178
|
}
|
|
22168
22179
|
function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template(rf, ctx) {
|
|
22169
22180
|
if (rf & 1) {
|
|
22170
|
-
var
|
|
22181
|
+
var _r30_1 = i0.ɵɵgetCurrentView();
|
|
22171
22182
|
i0.ɵɵelementContainerStart(0);
|
|
22172
|
-
i0.ɵɵelementStart(1, "ng-miam-catalog-category",
|
|
22173
|
-
i0.ɵɵlistener("displayList", function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template_ng_miam_catalog_category_displayList_1_listener($event) { i0.ɵɵrestoreView(
|
|
22183
|
+
i0.ɵɵelementStart(1, "ng-miam-catalog-category", 36);
|
|
22184
|
+
i0.ɵɵlistener("displayList", function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template_ng_miam_catalog_category_displayList_1_listener($event) { i0.ɵɵrestoreView(_r30_1); var ctx_r29 = i0.ɵɵnextContext(5); return ctx_r29.categoryTitleClicked($event); });
|
|
22174
22185
|
i0.ɵɵelementEnd();
|
|
22175
22186
|
i0.ɵɵelementContainerEnd();
|
|
22176
22187
|
}
|
|
22177
22188
|
if (rf & 2) {
|
|
22178
|
-
var
|
|
22179
|
-
var
|
|
22189
|
+
var category_r24 = i0.ɵɵnextContext().$implicit;
|
|
22190
|
+
var ctx_r26 = i0.ɵɵnextContext(4);
|
|
22180
22191
|
i0.ɵɵadvance(1);
|
|
22181
|
-
i0.ɵɵproperty("title",
|
|
22192
|
+
i0.ɵɵproperty("title", category_r24.title)("subtitle", category_r24.subtitle)("filters", category_r24.filters)("displayPricing", ctx_r26.displayPricing)("originTrace", ctx_r26.eventTrace());
|
|
22182
22193
|
}
|
|
22183
22194
|
}
|
|
22184
22195
|
function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_ng_miam_meals_planner_link_1_Template(rf, ctx) {
|
|
@@ -22188,58 +22199,58 @@
|
|
|
22188
22199
|
}
|
|
22189
22200
|
function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_Template(rf, ctx) {
|
|
22190
22201
|
if (rf & 1) {
|
|
22191
|
-
var
|
|
22192
|
-
i0.ɵɵelementStart(0, "div",
|
|
22193
|
-
i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_ng_miam_meals_planner_link_1_Template, 1, 0, "ng-miam-meals-planner-link",
|
|
22202
|
+
var _r34_1 = i0.ɵɵgetCurrentView();
|
|
22203
|
+
i0.ɵɵelementStart(0, "div", 37);
|
|
22204
|
+
i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_ng_miam_meals_planner_link_1_Template, 1, 0, "ng-miam-meals-planner-link", 20);
|
|
22194
22205
|
i0.ɵɵpipe(2, "async");
|
|
22195
|
-
i0.ɵɵelementStart(3, "ng-miam-catalog-category",
|
|
22196
|
-
i0.ɵɵlistener("displayList", function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_Template_ng_miam_catalog_category_displayList_3_listener($event) { i0.ɵɵrestoreView(
|
|
22206
|
+
i0.ɵɵelementStart(3, "ng-miam-catalog-category", 36);
|
|
22207
|
+
i0.ɵɵlistener("displayList", function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_Template_ng_miam_catalog_category_displayList_3_listener($event) { i0.ɵɵrestoreView(_r34_1); var ctx_r33 = i0.ɵɵnextContext(5); return ctx_r33.categoryTitleClicked($event); });
|
|
22197
22208
|
i0.ɵɵelementEnd();
|
|
22198
22209
|
i0.ɵɵelementEnd();
|
|
22199
|
-
i0.ɵɵelementStart(4, "div",
|
|
22200
|
-
i0.ɵɵelement(5, "ng-miam-explain-banner",
|
|
22210
|
+
i0.ɵɵelementStart(4, "div", 38);
|
|
22211
|
+
i0.ɵɵelement(5, "ng-miam-explain-banner", 39);
|
|
22201
22212
|
i0.ɵɵelementEnd();
|
|
22202
22213
|
}
|
|
22203
22214
|
if (rf & 2) {
|
|
22204
|
-
var
|
|
22205
|
-
var
|
|
22215
|
+
var category_r24 = i0.ɵɵnextContext().$implicit;
|
|
22216
|
+
var ctx_r28 = i0.ɵɵnextContext(4);
|
|
22206
22217
|
i0.ɵɵadvance(1);
|
|
22207
|
-
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 7,
|
|
22218
|
+
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 7, ctx_r28.contextService.enableMealsPlanner$));
|
|
22208
22219
|
i0.ɵɵadvance(2);
|
|
22209
|
-
i0.ɵɵproperty("title",
|
|
22220
|
+
i0.ɵɵproperty("title", category_r24.title)("subtitle", category_r24.subtitle)("filters", category_r24.filters)("displayPricing", ctx_r28.displayPricing)("originTrace", ctx_r28.eventTrace());
|
|
22210
22221
|
i0.ɵɵadvance(2);
|
|
22211
|
-
i0.ɵɵproperty("catalogSetting",
|
|
22222
|
+
i0.ɵɵproperty("catalogSetting", ctx_r28.catalogSetting);
|
|
22212
22223
|
}
|
|
22213
22224
|
}
|
|
22214
22225
|
function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template(rf, ctx) {
|
|
22215
22226
|
if (rf & 1) {
|
|
22216
22227
|
i0.ɵɵelementContainerStart(0);
|
|
22217
|
-
i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template, 2, 5, "ng-container",
|
|
22218
|
-
i0.ɵɵtemplate(2, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_Template, 6, 9, "ng-template", null,
|
|
22228
|
+
i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template, 2, 5, "ng-container", 34);
|
|
22229
|
+
i0.ɵɵtemplate(2, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_Template, 6, 9, "ng-template", null, 35, i0.ɵɵtemplateRefExtractor);
|
|
22219
22230
|
i0.ɵɵelementContainerEnd();
|
|
22220
22231
|
}
|
|
22221
22232
|
if (rf & 2) {
|
|
22222
|
-
var
|
|
22223
|
-
var
|
|
22233
|
+
var i_r25 = ctx.index;
|
|
22234
|
+
var _r27 = i0.ɵɵreference(3);
|
|
22224
22235
|
i0.ɵɵadvance(1);
|
|
22225
|
-
i0.ɵɵproperty("ngIf",
|
|
22236
|
+
i0.ɵɵproperty("ngIf", i_r25 !== 0)("ngIfElse", _r27);
|
|
22226
22237
|
}
|
|
22227
22238
|
}
|
|
22228
22239
|
function RecipeCatalogComponent_div_2_ng_template_7_div_0_Template(rf, ctx) {
|
|
22229
22240
|
if (rf & 1) {
|
|
22230
|
-
i0.ɵɵelementStart(0, "div",
|
|
22231
|
-
i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template, 4, 2, "ng-container",
|
|
22241
|
+
i0.ɵɵelementStart(0, "div", 32);
|
|
22242
|
+
i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template, 4, 2, "ng-container", 33);
|
|
22232
22243
|
i0.ɵɵelementEnd();
|
|
22233
22244
|
}
|
|
22234
22245
|
if (rf & 2) {
|
|
22235
|
-
var
|
|
22246
|
+
var ctx_r22 = i0.ɵɵnextContext(3);
|
|
22236
22247
|
i0.ɵɵadvance(1);
|
|
22237
|
-
i0.ɵɵproperty("ngForOf",
|
|
22248
|
+
i0.ɵɵproperty("ngForOf", ctx_r22.categories);
|
|
22238
22249
|
}
|
|
22239
22250
|
}
|
|
22240
22251
|
function RecipeCatalogComponent_div_2_ng_template_7_Template(rf, ctx) {
|
|
22241
22252
|
if (rf & 1) {
|
|
22242
|
-
i0.ɵɵtemplate(0, RecipeCatalogComponent_div_2_ng_template_7_div_0_Template, 2, 1, "div",
|
|
22253
|
+
i0.ɵɵtemplate(0, RecipeCatalogComponent_div_2_ng_template_7_div_0_Template, 2, 1, "div", 31);
|
|
22243
22254
|
}
|
|
22244
22255
|
if (rf & 2) {
|
|
22245
22256
|
var ctx_r7 = i0.ɵɵnextContext(2);
|
|
@@ -22248,18 +22259,18 @@
|
|
|
22248
22259
|
}
|
|
22249
22260
|
function RecipeCatalogComponent_div_2_Template(rf, ctx) {
|
|
22250
22261
|
if (rf & 1) {
|
|
22251
|
-
var
|
|
22262
|
+
var _r37_1 = i0.ɵɵgetCurrentView();
|
|
22252
22263
|
i0.ɵɵelementStart(0, "div", 4);
|
|
22253
22264
|
i0.ɵɵelementStart(1, "div", 5);
|
|
22254
22265
|
i0.ɵɵelementStart(2, "ng-miam-catalog-header", 6);
|
|
22255
|
-
i0.ɵɵlistener("returnButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_returnButtonPressed_2_listener() { i0.ɵɵrestoreView(
|
|
22266
|
+
i0.ɵɵlistener("returnButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_returnButtonPressed_2_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r36 = i0.ɵɵnextContext(); return ctx_r36.returnToHomePage(); })("filterButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_filterButtonPressed_2_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r38 = i0.ɵɵnextContext(); return ctx_r38.onFilterCollapsed(); })("searchStringChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_searchStringChanged_2_listener($event) { i0.ɵɵrestoreView(_r37_1); var ctx_r39 = i0.ɵɵnextContext(); return ctx_r39.updateSearch($event); })("personalButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_personalButtonPressed_2_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r40 = i0.ɵɵnextContext(); return ctx_r40.setPersonalFilter(); })("favoritesButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_favoritesButtonPressed_2_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r41 = i0.ɵɵnextContext(); return ctx_r41.setFavoritesFilter(); });
|
|
22256
22267
|
i0.ɵɵpipe(3, "async");
|
|
22257
22268
|
i0.ɵɵelementEnd();
|
|
22258
22269
|
i0.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_4_Template, 8, 3, "div", 7);
|
|
22259
|
-
i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_Template,
|
|
22270
|
+
i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_Template, 11, 12, "div", 8);
|
|
22260
22271
|
i0.ɵɵelementEnd();
|
|
22261
22272
|
i0.ɵɵelementStart(6, "ng-miam-recipe-filters", 9);
|
|
22262
|
-
i0.ɵɵlistener("filterChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterChanged_6_listener($event) { i0.ɵɵrestoreView(
|
|
22273
|
+
i0.ɵɵlistener("filterChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterChanged_6_listener($event) { i0.ɵɵrestoreView(_r37_1); var ctx_r42 = i0.ɵɵnextContext(); return ctx_r42.updateFilters($event); })("filterCollapsed", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterCollapsed_6_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r43 = i0.ɵɵnextContext(); return ctx_r43.onFilterCollapsed(); })("preferencesChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_preferencesChanged_6_listener() { i0.ɵɵrestoreView(_r37_1); var ctx_r44 = i0.ɵɵnextContext(); return ctx_r44.reloadPackages(); });
|
|
22263
22274
|
i0.ɵɵelementEnd();
|
|
22264
22275
|
i0.ɵɵtemplate(7, RecipeCatalogComponent_div_2_ng_template_7_Template, 1, 1, "ng-template", null, 10, i0.ɵɵtemplateRefExtractor);
|
|
22265
22276
|
i0.ɵɵelementEnd();
|
|
@@ -22279,19 +22290,19 @@
|
|
|
22279
22290
|
}
|
|
22280
22291
|
function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template(rf, ctx) {
|
|
22281
22292
|
if (rf & 1) {
|
|
22282
|
-
var
|
|
22283
|
-
i0.ɵɵelementStart(0, "ng-miam-recipe-stepper",
|
|
22284
|
-
i0.ɵɵlistener("recipeChange", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_recipeChange_0_listener() { i0.ɵɵrestoreView(
|
|
22293
|
+
var _r47_1 = i0.ɵɵgetCurrentView();
|
|
22294
|
+
i0.ɵɵelementStart(0, "ng-miam-recipe-stepper", 41);
|
|
22295
|
+
i0.ɵɵlistener("recipeChange", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_recipeChange_0_listener() { i0.ɵɵrestoreView(_r47_1); var ctx_r46 = i0.ɵɵnextContext(2); return ctx_r46.leaveCreatePage(); })("canceled", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_canceled_0_listener() { i0.ɵɵrestoreView(_r47_1); var ctx_r48 = i0.ɵɵnextContext(2); return ctx_r48.leaveCreatePage(); });
|
|
22285
22296
|
i0.ɵɵelementEnd();
|
|
22286
22297
|
}
|
|
22287
22298
|
if (rf & 2) {
|
|
22288
|
-
var
|
|
22289
|
-
i0.ɵɵproperty("recipeToUpdate",
|
|
22299
|
+
var ctx_r45 = i0.ɵɵnextContext(2);
|
|
22300
|
+
i0.ɵɵproperty("recipeToUpdate", ctx_r45.recipeToUpdate)("originTrace", ctx_r45.eventTrace());
|
|
22290
22301
|
}
|
|
22291
22302
|
}
|
|
22292
22303
|
function RecipeCatalogComponent_ng_template_3_Template(rf, ctx) {
|
|
22293
22304
|
if (rf & 1) {
|
|
22294
|
-
i0.ɵɵtemplate(0, RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template, 1, 2, "ng-miam-recipe-stepper",
|
|
22305
|
+
i0.ɵɵtemplate(0, RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template, 1, 2, "ng-miam-recipe-stepper", 40);
|
|
22295
22306
|
}
|
|
22296
22307
|
if (rf & 2) {
|
|
22297
22308
|
var ctx_r3 = i0.ɵɵnextContext();
|
|
@@ -22666,7 +22677,7 @@
|
|
|
22666
22677
|
else {
|
|
22667
22678
|
i18n_11 = $localize(templateObject_6$c || (templateObject_6$c = __makeTemplateObject([":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"], [":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"])));
|
|
22668
22679
|
}
|
|
22669
|
-
return [[1, "miam-catalog-anchor"], ["miamCatalogTopAnchor", ""], ["class", "miam-recipe-catalog", 4, "ngIf", "ngIfElse"], ["creationPage", ""], [1, "miam-recipe-catalog"], [1, "miam-recipe-catalog__content"], [3, "home", "searchTerm", "additionalFiltersTitle", "homeLabel", "pictureUrl", "catalogSetting", "favoritesButtonHidden", "personalButtonHidden", "filterBadgeCount", "returnButtonPressed", "filterButtonPressed", "searchStringChanged", "personalButtonPressed", "favoritesButtonPressed"], ["class", "miam-recipe-catalog__content__myMeal__button", 3, "click", 4, "ngIf"], ["class", "miam-recipe-catalog__list", 4, "ngIf", "ngIfElse"], [3, "filters", "isFilterCollapsed", "filterToRemove", "position", "originTrace", "filterChanged", "filterCollapsed", "preferencesChanged"], ["categoriesComponents", ""], [1, "miam-recipe-catalog__content__myMeal__button", 3, "click"], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__first__icon", 3, "iconName"], [1, "miam-recipe-catalog__myMeal__button__text"], i18n_1, ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__second__icon", 3, "iconName"], [1, "miam-recipe-catalog__list"], [1, "miam-recipe-catalog__content__title"], ["width", "24", "height", "24", 3, "iconName", "click"], [4, "ngIf"], ["class", "miam-recipe-catalog__list__create___button", 3, "click", 4, "ngIf"], [3, "filters", "originTrace", "displayPricing", "filterRemoved", "recipeActionTriggered"], i18n_3, i18n_5, i18n_7, i18n_9, [1, "miam-recipe-catalog__list__create___button", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-primary)", 3, "iconName"], i18n_11, ["class", "miam-recipe-catalog__categories", 4, "ngIf"], [1, "miam-recipe-catalog__categories"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"], ["firstCategory", ""], [3, "title", "subtitle", "filters", "displayPricing", "originTrace", "displayList"], [1, "miam-recipe-catalog__first-category"], [1, "miam-recipe-catalog__explain_banner"], [3, "catalogSetting"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled", 4, "ngIf"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled"]];
|
|
22680
|
+
return [[1, "miam-catalog-anchor"], ["miamCatalogTopAnchor", ""], ["class", "miam-recipe-catalog", 4, "ngIf", "ngIfElse"], ["creationPage", ""], [1, "miam-recipe-catalog"], [1, "miam-recipe-catalog__content"], [3, "home", "searchTerm", "additionalFiltersTitle", "homeLabel", "pictureUrl", "catalogSetting", "favoritesButtonHidden", "personalButtonHidden", "filterBadgeCount", "returnButtonPressed", "filterButtonPressed", "searchStringChanged", "personalButtonPressed", "favoritesButtonPressed"], ["class", "miam-recipe-catalog__content__myMeal__button", 3, "click", 4, "ngIf"], ["class", "miam-recipe-catalog__list", 4, "ngIf", "ngIfElse"], [3, "filters", "isFilterCollapsed", "filterToRemove", "position", "originTrace", "filterChanged", "filterCollapsed", "preferencesChanged"], ["categoriesComponents", ""], [1, "miam-recipe-catalog__content__myMeal__button", 3, "click"], ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__first__icon", 3, "iconName"], [1, "miam-recipe-catalog__myMeal__button__text"], i18n_1, ["primaryColor", "var(--m-color-white)", 1, "miam-recipe-catalog__myMeal__second__icon", 3, "iconName"], [1, "miam-recipe-catalog__list"], [1, "miam-recipe-catalog__content__title"], ["width", "24", "height", "24", 3, "iconName", "click"], ["class", "miam-recipe-catalog__content__title__search__text", 4, "ngIf"], [4, "ngIf"], ["class", "miam-recipe-catalog__list__create___button", 3, "click", 4, "ngIf"], [3, "filters", "originTrace", "displayPricing", "filterRemoved", "recipeActionTriggered"], [1, "miam-recipe-catalog__content__title__search__text"], i18n_3, i18n_5, i18n_7, i18n_9, [1, "miam-recipe-catalog__list__create___button", 3, "click"], ["width", "24", "height", "24", "primaryColor", "var(--m-color-primary)", 3, "iconName"], i18n_11, ["class", "miam-recipe-catalog__categories", 4, "ngIf"], [1, "miam-recipe-catalog__categories"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"], ["firstCategory", ""], [3, "title", "subtitle", "filters", "displayPricing", "originTrace", "displayList"], [1, "miam-recipe-catalog__first-category"], [1, "miam-recipe-catalog__explain_banner"], [3, "catalogSetting"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled", 4, "ngIf"], [3, "recipeToUpdate", "originTrace", "recipeChange", "canceled"]];
|
|
22670
22681
|
}, template: function RecipeCatalogComponent_Template(rf, ctx) {
|
|
22671
22682
|
if (rf & 1) {
|
|
22672
22683
|
i0.ɵɵelement(0, "div", 0, 1);
|
|
@@ -22678,7 +22689,7 @@
|
|
|
22678
22689
|
i0.ɵɵadvance(2);
|
|
22679
22690
|
i0.ɵɵproperty("ngIf", !ctx.creatingRecipe && ctx.catalogSettingHasLoaded)("ngIfElse", _r2);
|
|
22680
22691
|
}
|
|
22681
|
-
}, directives: [i2.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, MealsPlannerLinkComponent, RecipeStepperComponent], pipes: [i2.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title
|
|
22692
|
+
}, directives: [i2.NgIf, CatalogHeaderComponent, RecipeFiltersComponent, IconComponent, CatalogListComponent, i2.NgForOf, CatalogCategoryComponent, ExplainBannerComponent, MealsPlannerLinkComponent, RecipeStepperComponent], pipes: [i2.AsyncPipe], styles: [".miam-recipe-catalog{display:flex;justify-content:space-between}.miam-recipe-catalog,.miam-recipe-catalog .miam-recipe-catalog__content{position:relative;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title{align-items:center;display:flex;font-size:24px;font-weight:700;gap:6px;line-height:34px;margin-bottom:24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title .miam-recipe-catalog__content__title__search__text{display:flex;flex-wrap:wrap;gap:6px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon{cursor:pointer;margin-right:14px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{display:flex;flex-direction:column;padding:48px 24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-end;display:flex;flex-direction:row;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 22px 40px 0}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__explain_banner{margin-bottom:40px}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories{padding:48px 0 48px 24px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category{align-items:flex-start;flex-direction:column}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-catalog-category{width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__categories .miam-recipe-catalog__first-category ng-miam-meals-planner-link{margin:0 24px 24px 0;width:calc(100% - 24px)}}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list{padding:24px;width:100%}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__list .miam-recipe-catalog__list__create___button{align-items:center;border:1px solid var(--miam-color-primary);border-radius:20px;color:var(--miam-color-primary);cursor:pointer;display:flex;margin-bottom:24px;padding:4px 8px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{align-items:center;background:var(--m-color-primary);border-radius:0 0 20px 20px;cursor:pointer;display:flex;height:50px;justify-content:space-around;left:unset;position:absolute;right:50px;width:200px}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__button__text{color:var(--m-color-white);font-weight:700}.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button .miam-recipe-catalog__myMeal__second__icon{transform:rotate(-90deg)}@media (max-width:1023px){.miam-recipe-catalog .miam-recipe-catalog__content__myMeal__button{border-radius:20px 20px 0 0;bottom:0;left:8px;position:fixed;right:8px;width:auto;z-index:2}}"], encapsulation: 2, changeDetection: 0 });
|
|
22682
22693
|
/*@__PURE__*/ (function () {
|
|
22683
22694
|
i0.ɵsetClassMetadata(RecipeCatalogComponent, [{
|
|
22684
22695
|
type: i0.Component,
|