ng-miam 6.4.9 → 6.4.11

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.
@@ -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 RecipeStatusService = /** @class */ (function (_super) {
1943
- __extends(RecipeStatusService, _super);
1944
- function RecipeStatusService() {
1945
- var _this = _super.call(this) || this;
1946
- _this.resource = RecipeStatus;
1947
- _this.type = 'recipe-statuses';
1948
- _this.validated$ = new rxjs.BehaviorSubject(null);
1949
- _this.draft$ = new rxjs.BehaviorSubject(null);
1950
- _this.deleted$ = new rxjs.BehaviorSubject(null);
1951
- _this.inactive$ = new rxjs.BehaviorSubject(null);
1952
- _this.register();
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
- Object.defineProperty(RecipeStatusService.prototype, "validated", {
1956
- get: function () {
1957
- return this.validated$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
1958
- },
1959
- enumerable: false,
1960
- configurable: true
1961
- });
1962
- Object.defineProperty(RecipeStatusService.prototype, "draft", {
1963
- get: function () {
1964
- return this.draft$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
1965
- },
1966
- enumerable: false,
1967
- configurable: true
1968
- });
1969
- Object.defineProperty(RecipeStatusService.prototype, "deleted", {
1970
- get: function () {
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.draft$.getValue();
2038
+ return this.attributes['tag-type-id'];
1995
2039
  },
1996
2040
  enumerable: false,
1997
2041
  configurable: true
1998
2042
  });
1999
- Object.defineProperty(RecipeStatusService.prototype, "deletedValue", {
2000
- /** Only if you are sure value has been loaded */
2043
+ Object.defineProperty(Tag.prototype, "name", {
2001
2044
  get: function () {
2002
- return this.deleted$.getValue();
2045
+ return this.attributes.name;
2003
2046
  },
2004
2047
  enumerable: false,
2005
2048
  configurable: true
2006
2049
  });
2007
- Object.defineProperty(RecipeStatusService.prototype, "inactiveValue", {
2008
- /** Only if you are sure value has been loaded */
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.inactive$.getValue();
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; }));
2555
2486
  },
2556
2487
  enumerable: false,
2557
2488
  configurable: true
2558
2489
  });
2559
- Object.defineProperty(SponsorBlockType.prototype, "iconUrl", {
2490
+ Object.defineProperty(RecipeStatusService.prototype, "draft", {
2560
2491
  get: function () {
2561
- return this.attributes['icon-url'];
2492
+ return this.draft$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
2562
2493
  },
2563
2494
  enumerable: false,
2564
2495
  configurable: true
2565
2496
  });
2566
- Object.defineProperty(SponsorBlockType.prototype, "description", {
2497
+ Object.defineProperty(RecipeStatusService.prototype, "deleted", {
2567
2498
  get: function () {
2568
- return this.attributes.description;
2499
+ return this.deleted$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
2569
2500
  },
2570
2501
  enumerable: false,
2571
2502
  configurable: true
2572
2503
  });
2573
- Object.defineProperty(SponsorBlockType.prototype, "defaultHeight", {
2504
+ Object.defineProperty(RecipeStatusService.prototype, "inactive", {
2574
2505
  get: function () {
2575
- return this.attributes['default-height'];
2506
+ return this.inactive$.asObservable().pipe(operators.skipWhile(function (res) { return res == null; }));
2576
2507
  },
2577
2508
  enumerable: false,
2578
2509
  configurable: true
2579
2510
  });
2580
- Object.defineProperty(SponsorBlockType.prototype, "defaultWidth", {
2511
+ Object.defineProperty(RecipeStatusService.prototype, "validatedValue", {
2512
+ /** Only if you are sure value has been loaded */
2581
2513
  get: function () {
2582
- return this.attributes['default-width'];
2514
+ return this.validated$.getValue();
2583
2515
  },
2584
2516
  enumerable: false,
2585
2517
  configurable: true
2586
2518
  });
2587
- Object.defineProperty(SponsorBlockType.prototype, "mandatoryFields", {
2519
+ Object.defineProperty(RecipeStatusService.prototype, "draftValue", {
2520
+ /** Only if you are sure value has been loaded */
2588
2521
  get: function () {
2589
- return this.attributes['mandatory-fields'];
2522
+ return this.draft$.getValue();
2590
2523
  },
2591
2524
  enumerable: false,
2592
2525
  configurable: true
2593
2526
  });
2594
- return SponsorBlockType;
2595
- }(i1.Resource));
2527
+ Object.defineProperty(RecipeStatusService.prototype, "deletedValue", {
2528
+ /** Only if you are sure value has been loaded */
2529
+ get: function () {
2530
+ return this.deleted$.getValue();
2531
+ },
2532
+ enumerable: false,
2533
+ configurable: true
2534
+ });
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,17 @@
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
+ // number of guests and point of sale id are mandatory in order to use primary_completion_perc filter
3370
+ 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' }) });
3371
+ return filters;
3372
+ }));
3373
+ };
3363
3374
  // Returns list of filtered recipes.
3364
3375
  // Filters and page parameters are mandatory.
3365
3376
  // Number of guests and randomization are optional parameters
@@ -4330,8 +4341,8 @@
4330
4341
  var _this = this;
4331
4342
  this.basketsService.basketEntries().pipe(operators.take(1)).subscribe(function (entries) {
4332
4343
  _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; }) :
4344
+ var entry = entries.find(function (e) { var _a; return ((_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id']) === i.id; }) ?
4345
+ entries.find(function (e) { var _a; return ((_a = e.selectedItem) === null || _a === void 0 ? void 0 : _a.attributes['ext-id']) === i.id; }) :
4335
4346
  undefined;
4336
4347
  if (entry) {
4337
4348
  var bei = entry.attributes['basket-entries-items'].find(function (b) { return String(b.item_id) === entry.selectedItem.id; }) ||
@@ -12194,7 +12205,7 @@
12194
12205
  request = request.clone({
12195
12206
  setHeaders: {
12196
12207
  'miam-origin': context.origin.value,
12197
- 'miam-front-version': '6.4.9',
12208
+ 'miam-front-version': '6.4.11',
12198
12209
  'miam-front-type': 'web',
12199
12210
  'miam-api-version': '4.7.0'
12200
12211
  }
@@ -17342,7 +17353,7 @@
17342
17353
  i0.ɵɵadvance(4);
17343
17354
  i0.ɵɵproperty("ngIf", ctx_r0.recipe && ctx_r0.displayPricing);
17344
17355
  i0.ɵɵadvance(1);
17345
- i0.ɵɵproperty("recipe", ctx_r0.recipe)("cardType", ctx_r0.cardType)("previewAllowed", ctx_r0.previewAllowed)("displayGuests", ctx_r0.displayGuests)("helpButtonAllowed", ctx_r0.helpButtonAllowed);
17356
+ 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());
17346
17357
  }
17347
17358
  }
17348
17359
  function RecipeCardComponent_ng_template_1_Template(rf, ctx) {
@@ -17485,10 +17496,10 @@
17485
17496
  else {
17486
17497
  i18n_6 = $localize(templateObject_4$b || (templateObject_4$b = __makeTemplateObject([":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"], [":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"])));
17487
17498
  }
17488
- 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"]];
17499
+ 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"]];
17489
17500
  }, template: function RecipeCardComponent_Template(rf, ctx) {
17490
17501
  if (rf & 1) {
17491
- i0.ɵɵtemplate(0, RecipeCardComponent_div_0_Template, 27, 20, "div", 0);
17502
+ i0.ɵɵtemplate(0, RecipeCardComponent_div_0_Template, 27, 21, "div", 0);
17492
17503
  i0.ɵɵtemplate(1, RecipeCardComponent_ng_template_1_Template, 1, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
17493
17504
  }
17494
17505
  if (rf & 2) {
@@ -17731,7 +17742,7 @@
17731
17742
  }
17732
17743
  if (rf & 2) {
17733
17744
  var ctx_r4 = i0.ɵɵnextContext();
17734
- i0.ɵɵproperty("recipe", ctx_r4.recipe)("cardType", ctx_r4.cardType)("previewAllowed", ctx_r4.previewAllowed)("helpButtonAllowed", ctx_r4.helpButtonAllowed)("displayGuests", ctx_r4.displayGuests);
17745
+ 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());
17735
17746
  }
17736
17747
  }
17737
17748
  function CatalogRecipeCardComponent_div_11_Template(rf, ctx) {
@@ -18184,7 +18195,7 @@
18184
18195
  else {
18185
18196
  i18n_14 = $localize(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject([":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"], [":\u241F96cca7cb17582a9b01053a242ca907b721fad7fe\u241F3684169623116339825:Chef d\u00E9butant"])));
18186
18197
  }
18187
- 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"]];
18198
+ 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"]];
18188
18199
  }, template: function CatalogRecipeCardComponent_Template(rf, ctx) {
18189
18200
  if (rf & 1) {
18190
18201
  i0.ɵɵelementStart(0, "div", 0);
@@ -18198,7 +18209,7 @@
18198
18209
  i0.ɵɵelementStart(7, "div", 4);
18199
18210
  i0.ɵɵelementStart(8, "div", 5);
18200
18211
  i0.ɵɵtemplate(9, CatalogRecipeCardComponent_div_9_Template, 6, 3, "div", 6);
18201
- i0.ɵɵtemplate(10, CatalogRecipeCardComponent_ng_miam_recipe_card_cta_10_Template, 2, 5, "ng-miam-recipe-card-cta", 7);
18212
+ i0.ɵɵtemplate(10, CatalogRecipeCardComponent_ng_miam_recipe_card_cta_10_Template, 2, 6, "ng-miam-recipe-card-cta", 7);
18202
18213
  i0.ɵɵtemplate(11, CatalogRecipeCardComponent_div_11_Template, 6, 1, "div", 8);
18203
18214
  i0.ɵɵtemplate(12, CatalogRecipeCardComponent_button_12_Template, 3, 0, "button", 9);
18204
18215
  i0.ɵɵelementEnd();
@@ -18831,12 +18842,231 @@
18831
18842
  try {
18832
18843
  if (filter_1_1 && !filter_1_1.done && (_d = filter_1.return)) _d.call(filter_1);
18833
18844
  }
18834
- finally { if (e_1) throw e_1.error; }
18835
- }
18836
- return true;
18837
- };
18838
- return RecipeFilters;
18845
+ finally { if (e_1) throw e_1.error; }
18846
+ }
18847
+ return true;
18848
+ };
18849
+ return RecipeFilters;
18850
+ }());
18851
+
18852
+ var _a;
18853
+ var _c0$p = ["recipeCard"];
18854
+ function SuggestionCardComponent_ng_miam_recipe_card_0_Template(rf, ctx) {
18855
+ if (rf & 1) {
18856
+ var _r3_1 = i0.ɵɵgetCurrentView();
18857
+ i0.ɵɵelementStart(0, "ng-miam-recipe-card", 1, 2);
18858
+ 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(); });
18859
+ i0.ɵɵelementEnd();
18860
+ }
18861
+ if (rf & 2) {
18862
+ var ctx_r0 = i0.ɵɵnextContext();
18863
+ i0.ɵɵproperty("recipe", ctx_r0.recipe)("headerText", ctx_r0.headerText)("displayPricing", ctx_r0.displayPricing)("displayAddedOnPicture", ctx_r0.displayAddedOnPicture)("originTrace", ctx_r0.eventTrace());
18864
+ }
18865
+ }
18866
+ var recipeIncludes$1 = ['recipe-provider', 'sponsors'];
18867
+ var recipeSparseFields$1 = (_a = {
18868
+ recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
18869
+ 'resting-time'], recipeIncludes$1),
18870
+ sponsors: ['logo-url']
18871
+ },
18872
+ _a['recipe-provider'] = ['name'],
18873
+ _a);
18874
+ /**
18875
+ * This is an angular component design to be a web component
18876
+ * that's why we use onPushStrategie with the changeDetetectorRef
18877
+ * to avoid common issue
18878
+ * guide -> https://netbasal.com/a-comprehensive-guide-to-angular-onpush-change-detection-strategy-5bac493074a4
18879
+ * and alsow we use ShadowDom to protect style of our component
18880
+ * and alsow style of the parent aplication that will use it
18881
+ * doc -> https://angular.io/api/core/ViewEncapsulation
18882
+ */
18883
+ var SuggestionCardComponent = /** @class */ (function (_super) {
18884
+ __extends(SuggestionCardComponent, _super);
18885
+ function SuggestionCardComponent(cdr, recipeService, groceriesListsService, contextService, analyticsService, recipeEventsService, element) {
18886
+ var _this = _super.call(this, cdr, recipeService, recipeEventsService, groceriesListsService, contextService, analyticsService, element) || this;
18887
+ _this.cdr = cdr;
18888
+ _this.recipeService = recipeService;
18889
+ _this.groceriesListsService = groceriesListsService;
18890
+ _this.contextService = contextService;
18891
+ _this.analyticsService = analyticsService;
18892
+ _this.recipeEventsService = recipeEventsService;
18893
+ _this.element = element;
18894
+ _this.isEmpty = false;
18895
+ _this.eventsGroupId = uuid.v4();
18896
+ // as the template creates a recipe card, the recipe card send the events
18897
+ _this.sendShowEventOnScroll = false;
18898
+ return _this;
18899
+ }
18900
+ SuggestionCardComponent.prototype.ngOnChanges = function (simpleChanges) {
18901
+ if ((simpleChanges.productIds && !this.randomModeEnable) || !this.recipe) {
18902
+ this.loadRecipe();
18903
+ }
18904
+ };
18905
+ // Only send show event if the recipe has changed while the card was in viewport
18906
+ SuggestionCardComponent.prototype.sendShowEvent = function () {
18907
+ return false;
18908
+ };
18909
+ // If recipe already in basket, update the number of guests so that the pricing gets updated as well
18910
+ // (display = false so that the recipe details don't show up)
18911
+ SuggestionCardComponent.prototype.guestsChanged = function () {
18912
+ var _this = this;
18913
+ this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).pipe(operators.switchMap(function (recipeIsInList) {
18914
+ if (recipeIsInList) {
18915
+ return _this.groceriesListsService.appendRecipeToList(_this.recipe.id, _this.recipe.modifiedGuests, _this.eventTrace())
18916
+ .pipe(operators.take(1));
18917
+ }
18918
+ })).subscribe(function () { return _this.cdr.detectChanges(); }));
18919
+ };
18920
+ SuggestionCardComponent.prototype.loadRecipe = function () {
18921
+ var _this = this;
18922
+ this.subscriptions.push(this.fetchRecipes().pipe(operators.skipWhile(function (results) { return !results; }), operators.catchError(function (err) {
18923
+ _this.hide.emit();
18924
+ return rxjs.of(err);
18925
+ })).subscribe(function (results) { return _this.processResults(results); }));
18926
+ };
18927
+ SuggestionCardComponent.prototype.fetchRecipes = function () {
18928
+ if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes$1.includes('ingredients')) {
18929
+ recipeIncludes$1.push('ingredients');
18930
+ recipeSparseFields$1.recipes.push('ingredients');
18931
+ recipeSparseFields$1['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
18932
+ }
18933
+ if (this.randomModeEnable) {
18934
+ return this.recipeService.getRandom(recipeIncludes$1, recipeSparseFields$1);
18935
+ }
18936
+ else {
18937
+ return this.recipeService.getSuggestion(this.productIds, this.eventsGroupId, recipeIncludes$1, recipeSparseFields$1);
18938
+ }
18939
+ };
18940
+ // If the recipe is in basket, will show number of guests as defined in the basket
18941
+ // Otherwise, will show default number of guests for the recipe
18942
+ SuggestionCardComponent.prototype.processResults = function (recipes) {
18943
+ var _this = this;
18944
+ this.isEmpty = (!recipes || recipes.length === 0);
18945
+ if (!this.isEmpty) {
18946
+ // get the first recipe and shallow copy it to permit to send event and do not disturb any other component
18947
+ // if ressource is cached without copy another load will get the attributes
18948
+ this.recipe = recipes[0].shallowCopyWithEvents(this.recipeEventsService.ORIGIN_SUGGESTION, this.eventsGroupId);
18949
+ // Update guests from list only if recipe is in list
18950
+ this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).subscribe(function (isInList) {
18951
+ if (isInList) {
18952
+ _this.recipe.modifiedGuests = _this.groceriesListsService.guestsForRecipe(_this.recipe) || +_this.recipe.guests;
18953
+ _this.recipeCard.cdr.markForCheck();
18954
+ }
18955
+ }));
18956
+ this.recipeCard.cdr.markForCheck();
18957
+ }
18958
+ else {
18959
+ this.hide.emit();
18960
+ }
18961
+ this.cdr.detectChanges();
18962
+ };
18963
+ return SuggestionCardComponent;
18964
+ }(AbstractRecipeCardComponent));
18965
+ 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)); };
18966
+ SuggestionCardComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SuggestionCardComponent, selectors: [["ng-miam-suggestion-card"]], viewQuery: function SuggestionCardComponent_Query(rf, ctx) {
18967
+ if (rf & 1) {
18968
+ i0.ɵɵviewQuery(_c0$p, true);
18969
+ }
18970
+ if (rf & 2) {
18971
+ var _t;
18972
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCard = _t.first);
18973
+ }
18974
+ }, 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) {
18975
+ if (rf & 1) {
18976
+ i0.ɵɵtemplate(0, SuggestionCardComponent_ng_miam_recipe_card_0_Template, 2, 5, "ng-miam-recipe-card", 0);
18977
+ }
18978
+ if (rf & 2) {
18979
+ i0.ɵɵproperty("ngIf", !ctx.isEmpty);
18980
+ }
18981
+ }, directives: [i2.NgIf, RecipeCardComponent], styles: [""], encapsulation: 2, changeDetection: 0 });
18982
+ /*@__PURE__*/ (function () {
18983
+ i0.ɵsetClassMetadata(SuggestionCardComponent, [{
18984
+ type: i0.Component,
18985
+ args: [{
18986
+ selector: 'ng-miam-suggestion-card',
18987
+ templateUrl: './suggestion-card.component.html',
18988
+ styleUrls: ['./suggestion-card.component.scss'],
18989
+ encapsulation: i0.ViewEncapsulation.None,
18990
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
18991
+ }]
18992
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: GroceriesListsService }, { type: ContextService }, { type: AnalyticsService }, { type: RecipeEventsService }, { type: i0.ElementRef }]; }, { randomModeEnable: [{
18993
+ type: i0.Input
18994
+ }], productIds: [{
18995
+ type: i0.Input
18996
+ }], recipeCard: [{
18997
+ type: i0.ViewChild,
18998
+ args: ['recipeCard']
18999
+ }] });
19000
+ })();
19001
+
19002
+ var RecipeCardsModule = /** @class */ (function () {
19003
+ // Create custom elements so the WebComponents can be interpreted by the browser regardless of the js framework used
19004
+ function RecipeCardsModule(injector) {
19005
+ var webComponents = {
19006
+ 'add-recipe-card': AddRecipeCardComponent,
19007
+ 'catalog-recipe-card': CatalogRecipeCardComponent,
19008
+ 'recipe-card': RecipeCardComponent,
19009
+ 'suggestion-card': SuggestionCardComponent,
19010
+ 'recipe-card-cta': RecipeCardCtaComponent,
19011
+ };
19012
+ Object.keys(webComponents).map(function (compName) {
19013
+ var name = "webc-miam-" + compName;
19014
+ // Avoid duplicate error
19015
+ if (!customElements.get(name)) {
19016
+ var comp = webComponents[compName];
19017
+ var ngElement = elements.createCustomElement(comp, { injector: injector });
19018
+ customElements.define(name, ngElement);
19019
+ }
19020
+ });
19021
+ }
19022
+ return RecipeCardsModule;
18839
19023
  }());
19024
+ RecipeCardsModule.ɵmod = i0.ɵɵdefineNgModule({ type: RecipeCardsModule });
19025
+ RecipeCardsModule.ɵinj = i0.ɵɵdefineInjector({ factory: function RecipeCardsModule_Factory(t) { return new (t || RecipeCardsModule)(i0.ɵɵinject(i0.Injector)); }, imports: [[
19026
+ i2.CommonModule,
19027
+ i3.FormsModule,
19028
+ UtilsModule,
19029
+ ComponentsModule
19030
+ ]] });
19031
+ (function () {
19032
+ (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(RecipeCardsModule, { declarations: [AddRecipeCardComponent,
19033
+ CatalogRecipeCardComponent,
19034
+ RecipeCardComponent,
19035
+ SuggestionCardComponent,
19036
+ RecipeCardCtaComponent], imports: [i2.CommonModule,
19037
+ i3.FormsModule,
19038
+ UtilsModule,
19039
+ ComponentsModule], exports: [AddRecipeCardComponent,
19040
+ CatalogRecipeCardComponent,
19041
+ RecipeCardComponent,
19042
+ SuggestionCardComponent] });
19043
+ })();
19044
+ /*@__PURE__*/ (function () {
19045
+ i0.ɵsetClassMetadata(RecipeCardsModule, [{
19046
+ type: i0.NgModule,
19047
+ args: [{
19048
+ imports: [
19049
+ i2.CommonModule,
19050
+ i3.FormsModule,
19051
+ UtilsModule,
19052
+ ComponentsModule
19053
+ ],
19054
+ declarations: [
19055
+ AddRecipeCardComponent,
19056
+ CatalogRecipeCardComponent,
19057
+ RecipeCardComponent,
19058
+ SuggestionCardComponent,
19059
+ RecipeCardCtaComponent
19060
+ ],
19061
+ exports: [
19062
+ AddRecipeCardComponent,
19063
+ CatalogRecipeCardComponent,
19064
+ RecipeCardComponent,
19065
+ SuggestionCardComponent
19066
+ ]
19067
+ }]
19068
+ }], function () { return [{ type: i0.Injector }]; }, null);
19069
+ })();
18840
19070
 
18841
19071
  function CatalogArticleCardComponent_img_4_Template(rf, ctx) {
18842
19072
  if (rf & 1) {
@@ -19056,10 +19286,10 @@
19056
19286
  i0.ɵɵelementEnd();
19057
19287
  }
19058
19288
  }
19059
- var recipeIncludes$1 = ['recipe-provider', 'sponsors'];
19060
- var recipeSparseFields$1 = (_c = {
19289
+ var recipeIncludes$2 = ['recipe-provider', 'sponsors'];
19290
+ var recipeSparseFields$2 = (_c = {
19061
19291
  recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
19062
- 'resting-time'], recipeIncludes$1),
19292
+ 'resting-time'], recipeIncludes$2),
19063
19293
  sponsors: ['logo-url']
19064
19294
  },
19065
19295
  _c['recipe-provider'] = ['name'],
@@ -19117,8 +19347,10 @@
19117
19347
  this.initLoadOnScroll();
19118
19348
  };
19119
19349
  CatalogListComponent.prototype.ngOnChanges = function (changes) {
19120
- // Prevents reload loop in angular
19121
- if (!(Object.keys(changes).length === 1 && Object.keys(changes)[0] === 'originTrace')) {
19350
+ var changesKeys = Object.keys(changes);
19351
+ // Prevents reload loop in angular, because originTrace and excludedRecipesIds are passed as methods so they keep refreshing the DOM
19352
+ if (!(changesKeys.includes('originTrace') &&
19353
+ (changesKeys.length === 1 || (changesKeys.length === 2 && changesKeys.includes('excludedRecipesIds'))))) {
19122
19354
  this.filtersToDisplay = this.buildFiltersArray();
19123
19355
  this.reloadPage();
19124
19356
  if (this.filters.search) {
@@ -19173,12 +19405,14 @@
19173
19405
  // keep a copy of the filters when request is sent, so we can check they are still the same when it is received
19174
19406
  // Because if it's not the case we have to ignore the results
19175
19407
  var requestFilters = this.filters.copy();
19176
- if (this.context.displayIngredientPicturesOnRecipeCards && !recipeIncludes$1.includes('ingredients')) {
19177
- recipeIncludes$1.push('ingredients');
19178
- recipeSparseFields$1.recipes.push('ingredients');
19179
- Object.assign(recipeSparseFields$1, { ingredients: ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'] });
19408
+ if (this.context.displayIngredientPicturesOnRecipeCards && !recipeIncludes$2.includes('ingredients')) {
19409
+ recipeIncludes$2.push('ingredients');
19410
+ recipeSparseFields$2.recipes.push('ingredients');
19411
+ Object.assign(recipeSparseFields$2, { ingredients: ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'] });
19180
19412
  }
19181
- return this.recipesService.filter(requestFilters, { size: 20, number: page }, recipeIncludes$1, recipeSparseFields$1, this.modifiedGuests, this.randomMode, this.sort).pipe(operators.switchMap(function (result) { return _this.processResults(result, requestFilters, page); }));
19413
+ return this.recipesService.addMandatoryCompletionToFilter(requestFilters).pipe(operators.switchMap(function () {
19414
+ return _this.recipesService.filter(requestFilters, { size: 20, number: page }, recipeIncludes$2, recipeSparseFields$2, _this.modifiedGuests, _this.randomMode, _this.sort);
19415
+ }), operators.switchMap(function (result) { return _this.processResults(result, requestFilters, page); }));
19182
19416
  };
19183
19417
  CatalogListComponent.prototype.processResults = function (results, requestFilters, page) {
19184
19418
  var _this = this;
@@ -19737,7 +19971,7 @@
19737
19971
  var templateObject_1$w, templateObject_2$q, templateObject_3$j, templateObject_4$f;
19738
19972
 
19739
19973
  var _b$1;
19740
- var _c0$p = ["miamMealsPlannerTopAnchor"];
19974
+ var _c0$q = ["miamMealsPlannerTopAnchor"];
19741
19975
  function MealsPlannerComponent_div_2_ng_miam_icon_13_Template(rf, ctx) {
19742
19976
  if (rf & 1) {
19743
19977
  i0.ɵɵelement(0, "ng-miam-icon", 8);
@@ -19886,10 +20120,10 @@
19886
20120
  i0.ɵɵproperty("ngIf", ctx_r1.form);
19887
20121
  }
19888
20122
  }
19889
- var recipeIncludes$2 = ['recipe-provider', 'sponsors'];
19890
- var recipeSparseFields$2 = (_b$1 = {
20123
+ var recipeIncludes$3 = ['recipe-provider', 'sponsors'];
20124
+ var recipeSparseFields$3 = (_b$1 = {
19891
20125
  recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
19892
- 'resting-time'], recipeIncludes$2),
20126
+ 'resting-time'], recipeIncludes$3),
19893
20127
  sponsors: ['logo-url']
19894
20128
  },
19895
20129
  _b$1['recipe-provider'] = ['name'],
@@ -19949,12 +20183,12 @@
19949
20183
  var _this = this;
19950
20184
  this.loading = true;
19951
20185
  this.cdr.detectChanges();
19952
- if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes$2.includes('ingredients')) {
19953
- recipeIncludes$2.push('ingredients');
19954
- recipeSparseFields$2.recipes.push('ingredients');
19955
- recipeSparseFields$2['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
20186
+ if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes$3.includes('ingredients')) {
20187
+ recipeIncludes$3.push('ingredients');
20188
+ recipeSparseFields$3.recipes.push('ingredients');
20189
+ recipeSparseFields$3['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
19956
20190
  }
19957
- this.recipesService.plan(inputs.budget, inputs.guestsCount, inputs.recipesCount, recipeIncludes$2, recipeSparseFields$2, false).pipe(operators.switchMap(function (recipes) {
20191
+ this.recipesService.plan(inputs.budget, inputs.guestsCount, inputs.recipesCount, recipeIncludes$3, recipeSparseFields$3, false).pipe(operators.switchMap(function (recipes) {
19958
20192
  _this.budgettedRecipes = []; // Refresh the result view
19959
20193
  _this.cdr.detectChanges();
19960
20194
  _this.budgettedRecipes = recipes.map(function (r) {
@@ -20107,322 +20341,103 @@
20107
20341
  this.topAnchor.nativeElement.scrollIntoView();
20108
20342
  }
20109
20343
  };
20110
- Object.defineProperty(MealsPlannerComponent.prototype, "remainingBudget", {
20111
- get: function () {
20112
- var _a;
20113
- var recipeToChangeId = (_a = this.budgettedRecipes[this.recipeToChangeIndex]) === null || _a === void 0 ? void 0 : _a.id;
20114
- var remainingBudget = this.maxBudget - this.usedBudget;
20115
- if (recipeToChangeId) {
20116
- remainingBudget += this.budgettedRecipesPrices[recipeToChangeId];
20117
- }
20118
- if (remainingBudget > 0) {
20119
- return remainingBudget;
20120
- }
20121
- return 0;
20122
- },
20123
- enumerable: false,
20124
- configurable: true
20125
- });
20126
- Object.defineProperty(MealsPlannerComponent.prototype, "remainingRecipesNumber", {
20127
- get: function () {
20128
- var _this = this;
20129
- return this.budgettedRecipes.reduce(function (acc, recipe, i) {
20130
- // Don't count null recipes and currently replacing recipe
20131
- return recipe && i !== _this.recipeToChangeIndex ? acc : acc + 1;
20132
- }, 0);
20133
- },
20134
- enumerable: false,
20135
- configurable: true
20136
- });
20137
- Object.defineProperty(MealsPlannerComponent.prototype, "excludedRecipesIds", {
20138
- get: function () {
20139
- return this.budgettedRecipes.filter(function (recipe) { return recipe; }).map(function (recipe) { return recipe.id; });
20140
- },
20141
- enumerable: false,
20142
- configurable: true
20143
- });
20144
- return MealsPlannerComponent;
20145
- }(EventTracerComponent));
20146
- 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)); };
20147
- MealsPlannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerComponent, selectors: [["ng-miam-meals-planner"]], viewQuery: function MealsPlannerComponent_Query(rf, ctx) {
20148
- if (rf & 1) {
20149
- i0.ɵɵviewQuery(_c0$p, true);
20150
- }
20151
- if (rf & 2) {
20152
- var _t;
20153
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topAnchor = _t.first);
20154
- }
20155
- }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: function () {
20156
- var i18n_1;
20157
- if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
20158
- var MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2 = goog.getMsg("Id\u00E9es repas");
20159
- i18n_1 = MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2;
20160
- }
20161
- else {
20162
- i18n_1 = $localize(templateObject_1$x || (templateObject_1$x = __makeTemplateObject([":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"], [":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"])));
20163
- }
20164
- var i18n_3;
20165
- if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
20166
- var MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4 = goog.getMsg("Planifier mes repas");
20167
- i18n_3 = MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4;
20168
- }
20169
- else {
20170
- i18n_3 = $localize(templateObject_2$r || (templateObject_2$r = __makeTemplateObject([":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"], [":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"])));
20171
- }
20172
- var i18n_5;
20173
- if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
20174
- var MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6 = goog.getMsg("Ajouter une id\u00E9e repas");
20175
- i18n_5 = MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6;
20176
- }
20177
- else {
20178
- i18n_5 = $localize(templateObject_3$k || (templateObject_3$k = __makeTemplateObject([":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"], [":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"])));
20179
- }
20180
- 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"]];
20181
- }, template: function MealsPlannerComponent_Template(rf, ctx) {
20182
- if (rf & 1) {
20183
- i0.ɵɵelement(0, "div", 0, 1);
20184
- i0.ɵɵtemplate(2, MealsPlannerComponent_div_2_Template, 16, 10, "div", 2);
20185
- }
20186
- if (rf & 2) {
20187
- i0.ɵɵadvance(2);
20188
- i0.ɵɵproperty("ngIf", ctx.featureIsAuthorized);
20189
- }
20190
- }, 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 });
20191
- /*@__PURE__*/ (function () {
20192
- i0.ɵsetClassMetadata(MealsPlannerComponent, [{
20193
- type: i0.Component,
20194
- args: [{
20195
- selector: 'ng-miam-meals-planner',
20196
- templateUrl: './meals-planner.component.html',
20197
- styleUrls: ['./meals-planner.component.scss'],
20198
- encapsulation: i0.ViewEncapsulation.None,
20199
- changeDetection: i0.ChangeDetectionStrategy.OnPush
20200
- }]
20201
- }], function () { return [{ type: i3.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: AnalyticsService }, { type: ContextService }, { type: GroceriesListsService }, { type: RecipesService }, { type: BasketsService }, { type: PointOfSalesService }]; }, { topAnchor: [{
20202
- type: i0.ViewChild,
20203
- args: ['miamMealsPlannerTopAnchor']
20204
- }] });
20205
- })();
20206
- var templateObject_1$x, templateObject_2$r, templateObject_3$k;
20207
-
20208
- var _a;
20209
- var _c0$q = ["recipeCard"];
20210
- function SuggestionCardComponent_ng_miam_recipe_card_0_Template(rf, ctx) {
20211
- if (rf & 1) {
20212
- var _r3_1 = i0.ɵɵgetCurrentView();
20213
- i0.ɵɵelementStart(0, "ng-miam-recipe-card", 1, 2);
20214
- 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(); });
20215
- i0.ɵɵelementEnd();
20216
- }
20217
- if (rf & 2) {
20218
- var ctx_r0 = i0.ɵɵnextContext();
20219
- i0.ɵɵproperty("recipe", ctx_r0.recipe)("headerText", ctx_r0.headerText)("displayPricing", ctx_r0.displayPricing)("displayAddedOnPicture", ctx_r0.displayAddedOnPicture)("originTrace", ctx_r0.eventTrace());
20220
- }
20221
- }
20222
- var recipeIncludes$3 = ['recipe-provider', 'sponsors'];
20223
- var recipeSparseFields$3 = (_a = {
20224
- recipes: __spread(['title', 'number-of-guests', 'media-url', 'video-id', 'filigrane-logo-url', 'difficulty', 'preparation-time', 'cooking-time',
20225
- 'resting-time'], recipeIncludes$3),
20226
- sponsors: ['logo-url']
20227
- },
20228
- _a['recipe-provider'] = ['name'],
20229
- _a);
20230
- /**
20231
- * This is an angular component design to be a web component
20232
- * that's why we use onPushStrategie with the changeDetetectorRef
20233
- * to avoid common issue
20234
- * guide -> https://netbasal.com/a-comprehensive-guide-to-angular-onpush-change-detection-strategy-5bac493074a4
20235
- * and alsow we use ShadowDom to protect style of our component
20236
- * and alsow style of the parent aplication that will use it
20237
- * doc -> https://angular.io/api/core/ViewEncapsulation
20238
- */
20239
- var SuggestionCardComponent = /** @class */ (function (_super) {
20240
- __extends(SuggestionCardComponent, _super);
20241
- function SuggestionCardComponent(cdr, recipeService, groceriesListsService, contextService, analyticsService, recipeEventsService, element) {
20242
- var _this = _super.call(this, cdr, recipeService, recipeEventsService, groceriesListsService, contextService, analyticsService, element) || this;
20243
- _this.cdr = cdr;
20244
- _this.recipeService = recipeService;
20245
- _this.groceriesListsService = groceriesListsService;
20246
- _this.contextService = contextService;
20247
- _this.analyticsService = analyticsService;
20248
- _this.recipeEventsService = recipeEventsService;
20249
- _this.element = element;
20250
- _this.isEmpty = false;
20251
- _this.eventsGroupId = uuid.v4();
20252
- // as the template creates a recipe card, the recipe card send the events
20253
- _this.sendShowEventOnScroll = false;
20254
- return _this;
20255
- }
20256
- SuggestionCardComponent.prototype.ngOnChanges = function (simpleChanges) {
20257
- if ((simpleChanges.productIds && !this.randomModeEnable) || !this.recipe) {
20258
- this.loadRecipe();
20259
- }
20260
- };
20261
- // Only send show event if the recipe has changed while the card was in viewport
20262
- SuggestionCardComponent.prototype.sendShowEvent = function () {
20263
- return false;
20264
- };
20265
- // If recipe already in basket, update the number of guests so that the pricing gets updated as well
20266
- // (display = false so that the recipe details don't show up)
20267
- SuggestionCardComponent.prototype.guestsChanged = function () {
20268
- var _this = this;
20269
- this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).pipe(operators.switchMap(function (recipeIsInList) {
20270
- if (recipeIsInList) {
20271
- return _this.groceriesListsService.appendRecipeToList(_this.recipe.id, _this.recipe.modifiedGuests, _this.eventTrace())
20272
- .pipe(operators.take(1));
20273
- }
20274
- })).subscribe(function () { return _this.cdr.detectChanges(); }));
20275
- };
20276
- SuggestionCardComponent.prototype.loadRecipe = function () {
20277
- var _this = this;
20278
- this.subscriptions.push(this.fetchRecipes().pipe(operators.skipWhile(function (results) { return !results; }), operators.catchError(function (err) {
20279
- _this.hide.emit();
20280
- return rxjs.of(err);
20281
- })).subscribe(function (results) { return _this.processResults(results); }));
20282
- };
20283
- SuggestionCardComponent.prototype.fetchRecipes = function () {
20284
- if (this.contextService.displayIngredientPicturesOnRecipeCards && !recipeIncludes$3.includes('ingredients')) {
20285
- recipeIncludes$3.push('ingredients');
20286
- recipeSparseFields$3.recipes.push('ingredients');
20287
- recipeSparseFields$3['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
20344
+ Object.defineProperty(MealsPlannerComponent.prototype, "remainingBudget", {
20345
+ get: function () {
20346
+ var _a;
20347
+ var recipeToChangeId = (_a = this.budgettedRecipes[this.recipeToChangeIndex]) === null || _a === void 0 ? void 0 : _a.id;
20348
+ var remainingBudget = this.maxBudget - this.usedBudget;
20349
+ if (recipeToChangeId) {
20350
+ remainingBudget += this.budgettedRecipesPrices[recipeToChangeId];
20351
+ }
20352
+ if (remainingBudget > 0) {
20353
+ return remainingBudget;
20354
+ }
20355
+ return 0;
20356
+ },
20357
+ enumerable: false,
20358
+ configurable: true
20359
+ });
20360
+ Object.defineProperty(MealsPlannerComponent.prototype, "remainingRecipesNumber", {
20361
+ get: function () {
20362
+ var _this = this;
20363
+ return this.budgettedRecipes.reduce(function (acc, recipe, i) {
20364
+ // Don't count null recipes and currently replacing recipe
20365
+ return recipe && i !== _this.recipeToChangeIndex ? acc : acc + 1;
20366
+ }, 0);
20367
+ },
20368
+ enumerable: false,
20369
+ configurable: true
20370
+ });
20371
+ Object.defineProperty(MealsPlannerComponent.prototype, "excludedRecipesIds", {
20372
+ get: function () {
20373
+ return this.budgettedRecipes.filter(function (recipe) { return recipe; }).map(function (recipe) { return recipe.id; });
20374
+ },
20375
+ enumerable: false,
20376
+ configurable: true
20377
+ });
20378
+ return MealsPlannerComponent;
20379
+ }(EventTracerComponent));
20380
+ 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)); };
20381
+ MealsPlannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MealsPlannerComponent, selectors: [["ng-miam-meals-planner"]], viewQuery: function MealsPlannerComponent_Query(rf, ctx) {
20382
+ if (rf & 1) {
20383
+ i0.ɵɵviewQuery(_c0$q, true);
20288
20384
  }
20289
- if (this.randomModeEnable) {
20290
- return this.recipeService.getRandom(recipeIncludes$3, recipeSparseFields$3);
20385
+ if (rf & 2) {
20386
+ var _t;
20387
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topAnchor = _t.first);
20388
+ }
20389
+ }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: function () {
20390
+ var i18n_1;
20391
+ if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
20392
+ var MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2 = goog.getMsg("Id\u00E9es repas");
20393
+ i18n_1 = MSG_EXTERNAL_8408582562313036652$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__2;
20291
20394
  }
20292
20395
  else {
20293
- return this.recipeService.getSuggestion(this.productIds, this.eventsGroupId, recipeIncludes$3, recipeSparseFields$3);
20396
+ i18n_1 = $localize(templateObject_1$x || (templateObject_1$x = __makeTemplateObject([":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"], [":\u241F3f30012e0912f74e7f63e47637dea7a01f9521fa\u241F8408582562313036652:Id\u00E9es repas"])));
20294
20397
  }
20295
- };
20296
- // If the recipe is in basket, will show number of guests as defined in the basket
20297
- // Otherwise, will show default number of guests for the recipe
20298
- SuggestionCardComponent.prototype.processResults = function (recipes) {
20299
- var _this = this;
20300
- this.isEmpty = (!recipes || recipes.length === 0);
20301
- if (!this.isEmpty) {
20302
- // get the first recipe and shallow copy it to permit to send event and do not disturb any other component
20303
- // if ressource is cached without copy another load will get the attributes
20304
- this.recipe = recipes[0].shallowCopyWithEvents(this.recipeEventsService.ORIGIN_SUGGESTION, this.eventsGroupId);
20305
- // Update guests from list only if recipe is in list
20306
- this.subscriptions.push(this.groceriesListsService.recipeIsInList(this.recipe.id).subscribe(function (isInList) {
20307
- if (isInList) {
20308
- _this.recipe.modifiedGuests = _this.groceriesListsService.guestsForRecipe(_this.recipe) || +_this.recipe.guests;
20309
- _this.recipeCard.cdr.markForCheck();
20310
- }
20311
- }));
20312
- this.recipeCard.cdr.markForCheck();
20398
+ var i18n_3;
20399
+ if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
20400
+ var MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4 = goog.getMsg("Planifier mes repas");
20401
+ i18n_3 = MSG_EXTERNAL_406825433402702343$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS__4;
20313
20402
  }
20314
20403
  else {
20315
- this.hide.emit();
20404
+ i18n_3 = $localize(templateObject_2$r || (templateObject_2$r = __makeTemplateObject([":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"], [":\u241F1699ac3b921e6d286c72605705ac342f122b2652\u241F406825433402702343:Planifier mes repas"])));
20316
20405
  }
20317
- this.cdr.detectChanges();
20318
- };
20319
- return SuggestionCardComponent;
20320
- }(AbstractRecipeCardComponent));
20321
- 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)); };
20322
- SuggestionCardComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SuggestionCardComponent, selectors: [["ng-miam-suggestion-card"]], viewQuery: function SuggestionCardComponent_Query(rf, ctx) {
20323
- if (rf & 1) {
20324
- i0.ɵɵviewQuery(_c0$q, true);
20406
+ var i18n_5;
20407
+ if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
20408
+ var MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6 = goog.getMsg("Ajouter une id\u00E9e repas");
20409
+ i18n_5 = MSG_EXTERNAL_1931799427977453728$$LIB__WEB_COMPONENTS_MEALS_PLANNER_MEALS_PLANNER_COMPONENT_TS___6;
20325
20410
  }
20326
- if (rf & 2) {
20327
- var _t;
20328
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.recipeCard = _t.first);
20411
+ else {
20412
+ i18n_5 = $localize(templateObject_3$k || (templateObject_3$k = __makeTemplateObject([":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"], [":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"])));
20329
20413
  }
20330
- }, 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) {
20414
+ 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"]];
20415
+ }, template: function MealsPlannerComponent_Template(rf, ctx) {
20331
20416
  if (rf & 1) {
20332
- i0.ɵɵtemplate(0, SuggestionCardComponent_ng_miam_recipe_card_0_Template, 2, 5, "ng-miam-recipe-card", 0);
20417
+ i0.ɵɵelement(0, "div", 0, 1);
20418
+ i0.ɵɵtemplate(2, MealsPlannerComponent_div_2_Template, 16, 10, "div", 2);
20333
20419
  }
20334
20420
  if (rf & 2) {
20335
- i0.ɵɵproperty("ngIf", !ctx.isEmpty);
20421
+ i0.ɵɵadvance(2);
20422
+ i0.ɵɵproperty("ngIf", ctx.featureIsAuthorized);
20336
20423
  }
20337
- }, directives: [i2.NgIf, RecipeCardComponent], styles: [""], encapsulation: 2, changeDetection: 0 });
20424
+ }, 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 });
20338
20425
  /*@__PURE__*/ (function () {
20339
- i0.ɵsetClassMetadata(SuggestionCardComponent, [{
20426
+ i0.ɵsetClassMetadata(MealsPlannerComponent, [{
20340
20427
  type: i0.Component,
20341
20428
  args: [{
20342
- selector: 'ng-miam-suggestion-card',
20343
- templateUrl: './suggestion-card.component.html',
20344
- styleUrls: ['./suggestion-card.component.scss'],
20429
+ selector: 'ng-miam-meals-planner',
20430
+ templateUrl: './meals-planner.component.html',
20431
+ styleUrls: ['./meals-planner.component.scss'],
20345
20432
  encapsulation: i0.ViewEncapsulation.None,
20346
20433
  changeDetection: i0.ChangeDetectionStrategy.OnPush
20347
20434
  }]
20348
- }], function () { return [{ type: i0.ChangeDetectorRef }, { type: RecipesService }, { type: GroceriesListsService }, { type: ContextService }, { type: AnalyticsService }, { type: RecipeEventsService }, { type: i0.ElementRef }]; }, { randomModeEnable: [{
20349
- type: i0.Input
20350
- }], productIds: [{
20351
- type: i0.Input
20352
- }], recipeCard: [{
20435
+ }], function () { return [{ type: i3.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: AnalyticsService }, { type: ContextService }, { type: GroceriesListsService }, { type: RecipesService }, { type: BasketsService }, { type: PointOfSalesService }]; }, { topAnchor: [{
20353
20436
  type: i0.ViewChild,
20354
- args: ['recipeCard']
20437
+ args: ['miamMealsPlannerTopAnchor']
20355
20438
  }] });
20356
20439
  })();
20357
-
20358
- var RecipeCardsModule = /** @class */ (function () {
20359
- // Create custom elements so the WebComponents can be interpreted by the browser regardless of the js framework used
20360
- function RecipeCardsModule(injector) {
20361
- var webComponents = {
20362
- 'add-recipe-card': AddRecipeCardComponent,
20363
- 'catalog-recipe-card': CatalogRecipeCardComponent,
20364
- 'recipe-card': RecipeCardComponent,
20365
- 'suggestion-card': SuggestionCardComponent,
20366
- 'recipe-card-cta': RecipeCardCtaComponent,
20367
- };
20368
- Object.keys(webComponents).map(function (compName) {
20369
- var name = "webc-miam-" + compName;
20370
- // Avoid duplicate error
20371
- if (!customElements.get(name)) {
20372
- var comp = webComponents[compName];
20373
- var ngElement = elements.createCustomElement(comp, { injector: injector });
20374
- customElements.define(name, ngElement);
20375
- }
20376
- });
20377
- }
20378
- return RecipeCardsModule;
20379
- }());
20380
- RecipeCardsModule.ɵmod = i0.ɵɵdefineNgModule({ type: RecipeCardsModule });
20381
- RecipeCardsModule.ɵinj = i0.ɵɵdefineInjector({ factory: function RecipeCardsModule_Factory(t) { return new (t || RecipeCardsModule)(i0.ɵɵinject(i0.Injector)); }, imports: [[
20382
- i2.CommonModule,
20383
- i3.FormsModule,
20384
- UtilsModule,
20385
- ComponentsModule
20386
- ]] });
20387
- (function () {
20388
- (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(RecipeCardsModule, { declarations: [AddRecipeCardComponent,
20389
- CatalogRecipeCardComponent,
20390
- RecipeCardComponent,
20391
- SuggestionCardComponent,
20392
- RecipeCardCtaComponent], imports: [i2.CommonModule,
20393
- i3.FormsModule,
20394
- UtilsModule,
20395
- ComponentsModule], exports: [AddRecipeCardComponent,
20396
- CatalogRecipeCardComponent,
20397
- RecipeCardComponent,
20398
- SuggestionCardComponent] });
20399
- })();
20400
- /*@__PURE__*/ (function () {
20401
- i0.ɵsetClassMetadata(RecipeCardsModule, [{
20402
- type: i0.NgModule,
20403
- args: [{
20404
- imports: [
20405
- i2.CommonModule,
20406
- i3.FormsModule,
20407
- UtilsModule,
20408
- ComponentsModule
20409
- ],
20410
- declarations: [
20411
- AddRecipeCardComponent,
20412
- CatalogRecipeCardComponent,
20413
- RecipeCardComponent,
20414
- SuggestionCardComponent,
20415
- RecipeCardCtaComponent
20416
- ],
20417
- exports: [
20418
- AddRecipeCardComponent,
20419
- CatalogRecipeCardComponent,
20420
- RecipeCardComponent,
20421
- SuggestionCardComponent
20422
- ]
20423
- }]
20424
- }], function () { return [{ type: i0.Injector }]; }, null);
20425
- })();
20440
+ var templateObject_1$x, templateObject_2$r, templateObject_3$k;
20426
20441
 
20427
20442
  var _c$1;
20428
20443
  var _c0$r = ["categoryContent"];
@@ -20541,17 +20556,14 @@
20541
20556
  CatalogCategoryComponent.prototype.ngOnChanges = function () {
20542
20557
  var _this = this;
20543
20558
  this.subscriptions.push(rxjs.forkJoin([this.loadRecipes(), this.loadArticles()]).pipe(operators.finalize(function () {
20544
- if (_this.recipes.length === 0 && _this.articles.length === 0) {
20545
- _this.hide = true;
20546
- }
20547
- else {
20548
- _this.hide = false;
20549
- }
20559
+ _this.hide = _this.recipes.length === 0 && _this.articles.length === 0;
20550
20560
  _this.loading.emit(false);
20551
20561
  _this.cdr.detectChanges();
20552
20562
  })).subscribe());
20553
20563
  };
20554
- CatalogCategoryComponent.prototype.currentPath = function () { return ''; };
20564
+ CatalogCategoryComponent.prototype.currentPath = function () {
20565
+ return '';
20566
+ };
20555
20567
  CatalogCategoryComponent.prototype.props = function () {
20556
20568
  var _a, _b;
20557
20569
  return { category_id: (_b = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.additionalFilters) === null || _b === void 0 ? void 0 : _b.filters.packages };
@@ -20567,7 +20579,9 @@
20567
20579
  recipeSparseFields$4.recipes.push('ingredients');
20568
20580
  recipeSparseFields$4['ingredients'] = ['name', 'quantity', 'unit', 'active', 'forced-eans', 'picture-url', 'position'];
20569
20581
  }
20570
- return this.recipesService.filter(this.filters, { number: 1, size: this.maxRecipeNumber }, recipeIncludes$4, recipeSparseFields$4, this.modifiedGuests, false, 'position').pipe(operators.tap(function (result) { return _this.recipes = result; }));
20582
+ return this.recipesService.addMandatoryCompletionToFilter(this.filters).pipe(operators.switchMap(function () {
20583
+ return _this.recipesService.filter(_this.filters, { number: 1, size: _this.maxRecipeNumber }, recipeIncludes$4, recipeSparseFields$4, _this.modifiedGuests, false, 'position');
20584
+ }), operators.tap(function (result) { return _this.recipes = result; }));
20571
20585
  };
20572
20586
  CatalogCategoryComponent.prototype.loadArticles = function () {
20573
20587
  var _this = this;
@@ -22982,94 +22996,91 @@
22982
22996
  i0.ɵɵproperty("iconName", ctx_r4.icon.ChevronDown);
22983
22997
  }
22984
22998
  }
22985
- function RecipeCatalogComponent_div_2_div_5_span_3_Template(rf, ctx) {
22999
+ function RecipeCatalogComponent_div_2_div_5_div_3_Template(rf, ctx) {
22986
23000
  if (rf & 1) {
22987
- i0.ɵɵelementStart(0, "span");
22988
- i0.ɵɵi18n(1, 22);
23001
+ i0.ɵɵelementStart(0, "div", 23);
23002
+ i0.ɵɵelementStart(1, "span");
23003
+ i0.ɵɵi18n(2, 24);
23004
+ i0.ɵɵelementEnd();
23005
+ i0.ɵɵelementStart(3, "span");
23006
+ i0.ɵɵtext(4);
22989
23007
  i0.ɵɵelementEnd();
22990
- }
22991
- }
22992
- function RecipeCatalogComponent_div_2_div_5_span_4_Template(rf, ctx) {
22993
- if (rf & 1) {
22994
- i0.ɵɵelementStart(0, "span");
22995
- i0.ɵɵtext(1);
22996
23008
  i0.ɵɵelementEnd();
22997
23009
  }
22998
23010
  if (rf & 2) {
22999
- var ctx_r11 = i0.ɵɵnextContext(3);
23000
- i0.ɵɵadvance(1);
23001
- i0.ɵɵtextInterpolate(ctx_r11.filters.search);
23011
+ var ctx_r10 = i0.ɵɵnextContext(3);
23012
+ i0.ɵɵadvance(4);
23013
+ i0.ɵɵtextInterpolate(ctx_r10.filters.search);
23002
23014
  }
23003
23015
  }
23004
- function RecipeCatalogComponent_div_2_div_5_span_5_Template(rf, ctx) {
23016
+ function RecipeCatalogComponent_div_2_div_5_span_4_Template(rf, ctx) {
23005
23017
  if (rf & 1) {
23006
23018
  i0.ɵɵelementStart(0, "span");
23007
- i0.ɵɵi18n(1, 23);
23019
+ i0.ɵɵi18n(1, 25);
23008
23020
  i0.ɵɵelementEnd();
23009
23021
  }
23010
23022
  }
23011
- function RecipeCatalogComponent_div_2_div_5_span_6_Template(rf, ctx) {
23023
+ function RecipeCatalogComponent_div_2_div_5_span_5_Template(rf, ctx) {
23012
23024
  if (rf & 1) {
23013
23025
  i0.ɵɵelementStart(0, "span");
23014
- i0.ɵɵi18n(1, 24);
23026
+ i0.ɵɵi18n(1, 26);
23015
23027
  i0.ɵɵelementEnd();
23016
23028
  }
23017
23029
  }
23018
- function RecipeCatalogComponent_div_2_div_5_span_7_Template(rf, ctx) {
23030
+ function RecipeCatalogComponent_div_2_div_5_span_6_Template(rf, ctx) {
23019
23031
  if (rf & 1) {
23020
23032
  i0.ɵɵelementStart(0, "span");
23021
23033
  i0.ɵɵtext(1);
23022
23034
  i0.ɵɵelementEnd();
23023
23035
  }
23024
23036
  if (rf & 2) {
23025
- var ctx_r14 = i0.ɵɵnextContext(3);
23037
+ var ctx_r13 = i0.ɵɵnextContext(3);
23026
23038
  i0.ɵɵadvance(1);
23027
- i0.ɵɵtextInterpolate(ctx_r14.filters.additionalFilters.title);
23039
+ i0.ɵɵtextInterpolate(ctx_r13.filters.additionalFilters.title);
23028
23040
  }
23029
23041
  }
23030
- function RecipeCatalogComponent_div_2_div_5_span_8_Template(rf, ctx) {
23042
+ function RecipeCatalogComponent_div_2_div_5_span_7_Template(rf, ctx) {
23031
23043
  if (rf & 1) {
23032
23044
  i0.ɵɵelementStart(0, "span");
23033
- i0.ɵɵi18n(1, 25);
23045
+ i0.ɵɵi18n(1, 27);
23034
23046
  i0.ɵɵelementEnd();
23035
23047
  }
23036
23048
  }
23037
- function RecipeCatalogComponent_div_2_div_5_div_9_Template(rf, ctx) {
23049
+ function RecipeCatalogComponent_div_2_div_5_div_8_Template(rf, ctx) {
23038
23050
  if (rf & 1) {
23039
- var _r18_1 = i0.ɵɵgetCurrentView();
23040
- i0.ɵɵelementStart(0, "div", 26);
23041
- i0.ɵɵlistener("click", function RecipeCatalogComponent_div_2_div_5_div_9_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r18_1); var ctx_r17 = i0.ɵɵnextContext(3); return ctx_r17.manageRecipeAction({ action: "CREATE", recipe: null }); });
23042
- i0.ɵɵelement(1, "ng-miam-icon", 27);
23051
+ var _r17_1 = i0.ɵɵgetCurrentView();
23052
+ i0.ɵɵelementStart(0, "div", 28);
23053
+ 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 }); });
23054
+ i0.ɵɵelement(1, "ng-miam-icon", 29);
23043
23055
  i0.ɵɵelementStart(2, "span");
23044
- i0.ɵɵi18n(3, 28);
23056
+ i0.ɵɵi18n(3, 30);
23045
23057
  i0.ɵɵelementEnd();
23046
23058
  i0.ɵɵelementEnd();
23047
23059
  }
23048
23060
  if (rf & 2) {
23049
- var ctx_r16 = i0.ɵɵnextContext(3);
23061
+ var ctx_r15 = i0.ɵɵnextContext(3);
23050
23062
  i0.ɵɵadvance(1);
23051
- i0.ɵɵproperty("iconName", ctx_r16.icon.Plus);
23063
+ i0.ɵɵproperty("iconName", ctx_r15.icon.Plus);
23052
23064
  }
23053
23065
  }
23054
23066
  function RecipeCatalogComponent_div_2_div_5_Template(rf, ctx) {
23055
23067
  if (rf & 1) {
23056
- var _r20_1 = i0.ɵɵgetCurrentView();
23068
+ var _r19_1 = i0.ɵɵgetCurrentView();
23057
23069
  i0.ɵɵelementStart(0, "div", 16);
23058
23070
  i0.ɵɵelementStart(1, "div", 17);
23059
23071
  i0.ɵɵelementStart(2, "ng-miam-icon", 18);
23060
- i0.ɵɵlistener("click", function RecipeCatalogComponent_div_2_div_5_Template_ng_miam_icon_click_2_listener() { i0.ɵɵrestoreView(_r20_1); var ctx_r19 = i0.ɵɵnextContext(2); return ctx_r19.returnToHomePage(); });
23072
+ 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(); });
23061
23073
  i0.ɵɵelementEnd();
23062
- i0.ɵɵtemplate(3, RecipeCatalogComponent_div_2_div_5_span_3_Template, 2, 0, "span", 19);
23063
- i0.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_5_span_4_Template, 2, 1, "span", 19);
23064
- i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_span_5_Template, 2, 0, "span", 19);
23065
- i0.ɵɵtemplate(6, RecipeCatalogComponent_div_2_div_5_span_6_Template, 2, 0, "span", 19);
23066
- i0.ɵɵtemplate(7, RecipeCatalogComponent_div_2_div_5_span_7_Template, 2, 1, "span", 19);
23067
- i0.ɵɵtemplate(8, RecipeCatalogComponent_div_2_div_5_span_8_Template, 2, 0, "span", 19);
23074
+ i0.ɵɵtemplate(3, RecipeCatalogComponent_div_2_div_5_div_3_Template, 5, 1, "div", 19);
23075
+ i0.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_5_span_4_Template, 2, 0, "span", 20);
23076
+ i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_span_5_Template, 2, 0, "span", 20);
23077
+ i0.ɵɵtemplate(6, RecipeCatalogComponent_div_2_div_5_span_6_Template, 2, 1, "span", 20);
23078
+ i0.ɵɵtemplate(7, RecipeCatalogComponent_div_2_div_5_span_7_Template, 2, 0, "span", 20);
23068
23079
  i0.ɵɵelementEnd();
23069
- i0.ɵɵtemplate(9, RecipeCatalogComponent_div_2_div_5_div_9_Template, 4, 1, "div", 20);
23070
- i0.ɵɵpipe(10, "async");
23071
- i0.ɵɵelementStart(11, "ng-miam-catalog-list", 21);
23072
- i0.ɵɵlistener("filterRemoved", function RecipeCatalogComponent_div_2_div_5_Template_ng_miam_catalog_list_filterRemoved_11_listener($event) { i0.ɵɵrestoreView(_r20_1); var ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.removeFilter($event); })("recipeActionTriggered", function RecipeCatalogComponent_div_2_div_5_Template_ng_miam_catalog_list_recipeActionTriggered_11_listener($event) { i0.ɵɵrestoreView(_r20_1); var ctx_r22 = i0.ɵɵnextContext(2); return ctx_r22.manageRecipeAction($event); });
23080
+ i0.ɵɵtemplate(8, RecipeCatalogComponent_div_2_div_5_div_8_Template, 4, 1, "div", 21);
23081
+ i0.ɵɵpipe(9, "async");
23082
+ i0.ɵɵelementStart(10, "ng-miam-catalog-list", 22);
23083
+ 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); });
23073
23084
  i0.ɵɵelementEnd();
23074
23085
  i0.ɵɵelementEnd();
23075
23086
  }
@@ -23080,8 +23091,6 @@
23080
23091
  i0.ɵɵadvance(1);
23081
23092
  i0.ɵɵproperty("ngIf", ctx_r5.isSearchPage());
23082
23093
  i0.ɵɵadvance(1);
23083
- i0.ɵɵproperty("ngIf", ctx_r5.isSearchPage());
23084
- i0.ɵɵadvance(1);
23085
23094
  i0.ɵɵproperty("ngIf", ctx_r5.isFavoritesPage());
23086
23095
  i0.ɵɵadvance(1);
23087
23096
  i0.ɵɵproperty("ngIf", ctx_r5.isPersonalPage());
@@ -23090,25 +23099,25 @@
23090
23099
  i0.ɵɵadvance(1);
23091
23100
  i0.ɵɵproperty("ngIf", ctx_r5.isDefaultPage());
23092
23101
  i0.ɵɵadvance(1);
23093
- i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(10, 11, ctx_r5.canDisplayCreationButton()));
23102
+ i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(9, 10, ctx_r5.canDisplayCreationButton()));
23094
23103
  i0.ɵɵadvance(2);
23095
23104
  i0.ɵɵproperty("filters", ctx_r5.filters)("originTrace", ctx_r5.eventTrace())("displayPricing", ctx_r5.displayPricing);
23096
23105
  }
23097
23106
  }
23098
23107
  function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template(rf, ctx) {
23099
23108
  if (rf & 1) {
23100
- var _r31_1 = i0.ɵɵgetCurrentView();
23109
+ var _r30_1 = i0.ɵɵgetCurrentView();
23101
23110
  i0.ɵɵelementContainerStart(0);
23102
- i0.ɵɵelementStart(1, "ng-miam-catalog-category", 34);
23103
- 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(_r31_1); var ctx_r30 = i0.ɵɵnextContext(5); return ctx_r30.categoryTitleClicked($event); });
23111
+ i0.ɵɵelementStart(1, "ng-miam-catalog-category", 36);
23112
+ 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); });
23104
23113
  i0.ɵɵelementEnd();
23105
23114
  i0.ɵɵelementContainerEnd();
23106
23115
  }
23107
23116
  if (rf & 2) {
23108
- var category_r25 = i0.ɵɵnextContext().$implicit;
23109
- var ctx_r27 = i0.ɵɵnextContext(4);
23117
+ var category_r24 = i0.ɵɵnextContext().$implicit;
23118
+ var ctx_r26 = i0.ɵɵnextContext(4);
23110
23119
  i0.ɵɵadvance(1);
23111
- i0.ɵɵproperty("title", category_r25.title)("subtitle", category_r25.subtitle)("filters", category_r25.filters)("displayPricing", ctx_r27.displayPricing)("originTrace", ctx_r27.eventTrace());
23120
+ i0.ɵɵproperty("title", category_r24.title)("subtitle", category_r24.subtitle)("filters", category_r24.filters)("displayPricing", ctx_r26.displayPricing)("originTrace", ctx_r26.eventTrace());
23112
23121
  }
23113
23122
  }
23114
23123
  function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_ng_miam_meals_planner_link_1_Template(rf, ctx) {
@@ -23118,58 +23127,58 @@
23118
23127
  }
23119
23128
  function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_Template(rf, ctx) {
23120
23129
  if (rf & 1) {
23121
- var _r35_1 = i0.ɵɵgetCurrentView();
23122
- i0.ɵɵelementStart(0, "div", 35);
23123
- 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", 19);
23130
+ var _r34_1 = i0.ɵɵgetCurrentView();
23131
+ i0.ɵɵelementStart(0, "div", 37);
23132
+ 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);
23124
23133
  i0.ɵɵpipe(2, "async");
23125
- i0.ɵɵelementStart(3, "ng-miam-catalog-category", 34);
23126
- 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(_r35_1); var ctx_r34 = i0.ɵɵnextContext(5); return ctx_r34.categoryTitleClicked($event); });
23134
+ i0.ɵɵelementStart(3, "ng-miam-catalog-category", 36);
23135
+ 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); });
23127
23136
  i0.ɵɵelementEnd();
23128
23137
  i0.ɵɵelementEnd();
23129
- i0.ɵɵelementStart(4, "div", 36);
23130
- i0.ɵɵelement(5, "ng-miam-explain-banner", 37);
23138
+ i0.ɵɵelementStart(4, "div", 38);
23139
+ i0.ɵɵelement(5, "ng-miam-explain-banner", 39);
23131
23140
  i0.ɵɵelementEnd();
23132
23141
  }
23133
23142
  if (rf & 2) {
23134
- var category_r25 = i0.ɵɵnextContext().$implicit;
23135
- var ctx_r29 = i0.ɵɵnextContext(4);
23143
+ var category_r24 = i0.ɵɵnextContext().$implicit;
23144
+ var ctx_r28 = i0.ɵɵnextContext(4);
23136
23145
  i0.ɵɵadvance(1);
23137
- i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 7, ctx_r29.contextService.enableMealsPlanner$));
23146
+ i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(2, 7, ctx_r28.contextService.enableMealsPlanner$));
23138
23147
  i0.ɵɵadvance(2);
23139
- i0.ɵɵproperty("title", category_r25.title)("subtitle", category_r25.subtitle)("filters", category_r25.filters)("displayPricing", ctx_r29.displayPricing)("originTrace", ctx_r29.eventTrace());
23148
+ i0.ɵɵproperty("title", category_r24.title)("subtitle", category_r24.subtitle)("filters", category_r24.filters)("displayPricing", ctx_r28.displayPricing)("originTrace", ctx_r28.eventTrace());
23140
23149
  i0.ɵɵadvance(2);
23141
- i0.ɵɵproperty("catalogSetting", ctx_r29.catalogSetting);
23150
+ i0.ɵɵproperty("catalogSetting", ctx_r28.catalogSetting);
23142
23151
  }
23143
23152
  }
23144
23153
  function RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template(rf, ctx) {
23145
23154
  if (rf & 1) {
23146
23155
  i0.ɵɵelementContainerStart(0);
23147
- i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template, 2, 5, "ng-container", 32);
23148
- i0.ɵɵtemplate(2, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_template_2_Template, 6, 9, "ng-template", null, 33, i0.ɵɵtemplateRefExtractor);
23156
+ i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_ng_container_1_Template, 2, 5, "ng-container", 34);
23157
+ 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);
23149
23158
  i0.ɵɵelementContainerEnd();
23150
23159
  }
23151
23160
  if (rf & 2) {
23152
- var i_r26 = ctx.index;
23153
- var _r28 = i0.ɵɵreference(3);
23161
+ var i_r25 = ctx.index;
23162
+ var _r27 = i0.ɵɵreference(3);
23154
23163
  i0.ɵɵadvance(1);
23155
- i0.ɵɵproperty("ngIf", i_r26 !== 0)("ngIfElse", _r28);
23164
+ i0.ɵɵproperty("ngIf", i_r25 !== 0)("ngIfElse", _r27);
23156
23165
  }
23157
23166
  }
23158
23167
  function RecipeCatalogComponent_div_2_ng_template_7_div_0_Template(rf, ctx) {
23159
23168
  if (rf & 1) {
23160
- i0.ɵɵelementStart(0, "div", 30);
23161
- i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template, 4, 2, "ng-container", 31);
23169
+ i0.ɵɵelementStart(0, "div", 32);
23170
+ i0.ɵɵtemplate(1, RecipeCatalogComponent_div_2_ng_template_7_div_0_ng_container_1_Template, 4, 2, "ng-container", 33);
23162
23171
  i0.ɵɵelementEnd();
23163
23172
  }
23164
23173
  if (rf & 2) {
23165
- var ctx_r23 = i0.ɵɵnextContext(3);
23174
+ var ctx_r22 = i0.ɵɵnextContext(3);
23166
23175
  i0.ɵɵadvance(1);
23167
- i0.ɵɵproperty("ngForOf", ctx_r23.categories);
23176
+ i0.ɵɵproperty("ngForOf", ctx_r22.categories);
23168
23177
  }
23169
23178
  }
23170
23179
  function RecipeCatalogComponent_div_2_ng_template_7_Template(rf, ctx) {
23171
23180
  if (rf & 1) {
23172
- i0.ɵɵtemplate(0, RecipeCatalogComponent_div_2_ng_template_7_div_0_Template, 2, 1, "div", 29);
23181
+ i0.ɵɵtemplate(0, RecipeCatalogComponent_div_2_ng_template_7_div_0_Template, 2, 1, "div", 31);
23173
23182
  }
23174
23183
  if (rf & 2) {
23175
23184
  var ctx_r7 = i0.ɵɵnextContext(2);
@@ -23178,18 +23187,18 @@
23178
23187
  }
23179
23188
  function RecipeCatalogComponent_div_2_Template(rf, ctx) {
23180
23189
  if (rf & 1) {
23181
- var _r38_1 = i0.ɵɵgetCurrentView();
23190
+ var _r37_1 = i0.ɵɵgetCurrentView();
23182
23191
  i0.ɵɵelementStart(0, "div", 4);
23183
23192
  i0.ɵɵelementStart(1, "div", 5);
23184
23193
  i0.ɵɵelementStart(2, "ng-miam-catalog-header", 6);
23185
- i0.ɵɵlistener("returnButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_returnButtonPressed_2_listener() { i0.ɵɵrestoreView(_r38_1); var ctx_r37 = i0.ɵɵnextContext(); return ctx_r37.returnToHomePage(); })("filterButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_filterButtonPressed_2_listener() { i0.ɵɵrestoreView(_r38_1); var ctx_r39 = i0.ɵɵnextContext(); return ctx_r39.onFilterCollapsed(); })("searchStringChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_searchStringChanged_2_listener($event) { i0.ɵɵrestoreView(_r38_1); var ctx_r40 = i0.ɵɵnextContext(); return ctx_r40.updateSearch($event); })("personalButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_personalButtonPressed_2_listener() { i0.ɵɵrestoreView(_r38_1); var ctx_r41 = i0.ɵɵnextContext(); return ctx_r41.setPersonalFilter(); })("favoritesButtonPressed", function RecipeCatalogComponent_div_2_Template_ng_miam_catalog_header_favoritesButtonPressed_2_listener() { i0.ɵɵrestoreView(_r38_1); var ctx_r42 = i0.ɵɵnextContext(); return ctx_r42.setFavoritesFilter(); });
23194
+ 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(); });
23186
23195
  i0.ɵɵpipe(3, "async");
23187
23196
  i0.ɵɵelementEnd();
23188
23197
  i0.ɵɵtemplate(4, RecipeCatalogComponent_div_2_div_4_Template, 8, 3, "div", 7);
23189
- i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_Template, 12, 13, "div", 8);
23198
+ i0.ɵɵtemplate(5, RecipeCatalogComponent_div_2_div_5_Template, 11, 12, "div", 8);
23190
23199
  i0.ɵɵelementEnd();
23191
23200
  i0.ɵɵelementStart(6, "ng-miam-recipe-filters", 9);
23192
- i0.ɵɵlistener("filterChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterChanged_6_listener($event) { i0.ɵɵrestoreView(_r38_1); var ctx_r43 = i0.ɵɵnextContext(); return ctx_r43.updateFilters($event); })("filterCollapsed", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_filterCollapsed_6_listener() { i0.ɵɵrestoreView(_r38_1); var ctx_r44 = i0.ɵɵnextContext(); return ctx_r44.onFilterCollapsed(); })("preferencesChanged", function RecipeCatalogComponent_div_2_Template_ng_miam_recipe_filters_preferencesChanged_6_listener() { i0.ɵɵrestoreView(_r38_1); var ctx_r45 = i0.ɵɵnextContext(); return ctx_r45.reloadPackages(); });
23201
+ 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(); });
23193
23202
  i0.ɵɵelementEnd();
23194
23203
  i0.ɵɵtemplate(7, RecipeCatalogComponent_div_2_ng_template_7_Template, 1, 1, "ng-template", null, 10, i0.ɵɵtemplateRefExtractor);
23195
23204
  i0.ɵɵelementEnd();
@@ -23209,19 +23218,19 @@
23209
23218
  }
23210
23219
  function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template(rf, ctx) {
23211
23220
  if (rf & 1) {
23212
- var _r48_1 = i0.ɵɵgetCurrentView();
23213
- i0.ɵɵelementStart(0, "ng-miam-recipe-stepper", 39);
23214
- i0.ɵɵlistener("recipeChange", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_recipeChange_0_listener() { i0.ɵɵrestoreView(_r48_1); var ctx_r47 = i0.ɵɵnextContext(2); return ctx_r47.leaveCreatePage(); })("canceled", function RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template_ng_miam_recipe_stepper_canceled_0_listener() { i0.ɵɵrestoreView(_r48_1); var ctx_r49 = i0.ɵɵnextContext(2); return ctx_r49.leaveCreatePage(); });
23221
+ var _r47_1 = i0.ɵɵgetCurrentView();
23222
+ i0.ɵɵelementStart(0, "ng-miam-recipe-stepper", 41);
23223
+ 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(); });
23215
23224
  i0.ɵɵelementEnd();
23216
23225
  }
23217
23226
  if (rf & 2) {
23218
- var ctx_r46 = i0.ɵɵnextContext(2);
23219
- i0.ɵɵproperty("recipeToUpdate", ctx_r46.recipeToUpdate)("originTrace", ctx_r46.eventTrace());
23227
+ var ctx_r45 = i0.ɵɵnextContext(2);
23228
+ i0.ɵɵproperty("recipeToUpdate", ctx_r45.recipeToUpdate)("originTrace", ctx_r45.eventTrace());
23220
23229
  }
23221
23230
  }
23222
23231
  function RecipeCatalogComponent_ng_template_3_Template(rf, ctx) {
23223
23232
  if (rf & 1) {
23224
- i0.ɵɵtemplate(0, RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template, 1, 2, "ng-miam-recipe-stepper", 38);
23233
+ i0.ɵɵtemplate(0, RecipeCatalogComponent_ng_template_3_ng_miam_recipe_stepper_0_Template, 1, 2, "ng-miam-recipe-stepper", 40);
23225
23234
  }
23226
23235
  if (rf & 2) {
23227
23236
  var ctx_r3 = i0.ɵɵnextContext();
@@ -23596,7 +23605,7 @@
23596
23605
  else {
23597
23606
  i18n_11 = $localize(templateObject_6$c || (templateObject_6$c = __makeTemplateObject([":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"], [":\u241F3b0b12b85604af610c07cfbd5d4f74662b9a881a\u241F1931799427977453728:Ajouter une id\u00E9e repas"])));
23598
23607
  }
23599
- 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"]];
23608
+ 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"]];
23600
23609
  }, template: function RecipeCatalogComponent_Template(rf, ctx) {
23601
23610
  if (rf & 1) {
23602
23611
  i0.ɵɵelement(0, "div", 0, 1);
@@ -23608,7 +23617,7 @@
23608
23617
  i0.ɵɵadvance(2);
23609
23618
  i0.ɵɵproperty("ngIf", !ctx.creatingRecipe && ctx.catalogSettingHasLoaded)("ngIfElse", _r2);
23610
23619
  }
23611
- }, 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 ng-miam-icon{cursor:pointer;margin-right:20px}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title ng-miam-icon .icon-container{transform:rotate(90deg)}.miam-recipe-catalog .miam-recipe-catalog__content .miam-recipe-catalog__content__title span:last-child{margin-left:6px}.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 });
23620
+ }, 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 });
23612
23621
  /*@__PURE__*/ (function () {
23613
23622
  i0.ɵsetClassMetadata(RecipeCatalogComponent, [{
23614
23623
  type: i0.Component,