ng-miam 10.7.0 → 10.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3646,7 +3646,7 @@
3646
3646
  EventJourney["EMPTY"] = "";
3647
3647
  })(EventJourney || (EventJourney = {}));
3648
3648
 
3649
- var VERSION = "10.7.0"; // TODO: replace by ##VERSION## and update it in the CI/CD
3649
+ var VERSION = "10.7.1"; // TODO: replace by ##VERSION## and update it in the CI/CD
3650
3650
 
3651
3651
  var ContextRegistryService = /** @class */ (function () {
3652
3652
  function ContextRegistryService() {
@@ -4078,10 +4078,11 @@
4078
4078
 
4079
4079
  var IgnoredIngredientsService = /** @class */ (function () {
4080
4080
  function IgnoredIngredientsService() {
4081
+ this.storageKey = '_miam/ignoredBasketEntries';
4081
4082
  }
4082
4083
  Object.defineProperty(IgnoredIngredientsService.prototype, "ignoredIngredients", {
4083
4084
  get: function () {
4084
- return JSON.parse(sessionStorage.getItem('_miam/ignoredBasketEntries') || '[]');
4085
+ return JSON.parse(localStorage.getItem(this.storageKey) || '[]');
4085
4086
  },
4086
4087
  enumerable: false,
4087
4088
  configurable: true
@@ -4092,16 +4093,16 @@
4092
4093
  newIgnoredIngredients = [newIgnoredIngredients];
4093
4094
  }
4094
4095
  newIgnoredIngredients = newIgnoredIngredients.filter(function (e) { return !_this.isIngredientIgnored(e); });
4095
- sessionStorage.setItem('_miam/ignoredBasketEntries', JSON.stringify(__spread(this.ignoredIngredients, newIgnoredIngredients)));
4096
+ localStorage.setItem(this.storageKey, JSON.stringify(__spread(this.ignoredIngredients, newIgnoredIngredients)));
4096
4097
  };
4097
4098
  IgnoredIngredientsService.prototype.isIngredientIgnored = function (ingredientId) {
4098
4099
  return this.ignoredIngredients.includes(ingredientId);
4099
4100
  };
4100
4101
  IgnoredIngredientsService.prototype.removeIngredientFromIgnored = function (ingredientId) {
4101
- sessionStorage.setItem('_miam/ignoredBasketEntries', JSON.stringify(this.ignoredIngredients.filter(function (e) { return e !== ingredientId; })));
4102
+ localStorage.setItem(this.storageKey, JSON.stringify(this.ignoredIngredients.filter(function (e) { return e !== ingredientId; })));
4102
4103
  };
4103
4104
  IgnoredIngredientsService.prototype.resetIgnoredIngredients = function () {
4104
- sessionStorage.removeItem('_miam/ignoredBasketEntries');
4105
+ localStorage.removeItem(this.storageKey);
4105
4106
  };
4106
4107
  return IgnoredIngredientsService;
4107
4108
  }());