ng-miam 10.3.1 → 10.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3440,7 +3440,7 @@
3440
3440
  EventJourney["EMPTY"] = "";
3441
3441
  })(EventJourney || (EventJourney = {}));
3442
3442
 
3443
- var VERSION = "10.3.1"; // TODO: replace by ##VERSION## and update it in the CI/CD
3443
+ var VERSION = "10.3.2"; // TODO: replace by ##VERSION## and update it in the CI/CD
3444
3444
 
3445
3445
  var ContextRegistryService = /** @class */ (function () {
3446
3446
  function ContextRegistryService() {
@@ -11402,6 +11402,7 @@
11402
11402
  },
11403
11403
  pos: {
11404
11404
  currentPos: function () { return _this.posService.pos$; },
11405
+ posWasInitialized: function () { return _this.posService.posWasInitialized(); },
11405
11406
  loadPos: function (posId) { return _this.posService.loadPos(posId); },
11406
11407
  basketLoadedForNewPos: function () { return _this.posService.basketLoadedForNewPos(); }
11407
11408
  },
@@ -11468,9 +11469,23 @@
11468
11469
  autocomplete: function (query) { return _this.tagsService.autocomplete(query); }
11469
11470
  },
11470
11471
  hook: {
11471
- hookCallback: function () { return rxjs.combineLatest([
11472
- _this.userService.isLogged$,
11473
- _this.posService.posWasInitialized()
11472
+ hookCallback: function (needLogin, needPos) { return rxjs.combineLatest([
11473
+ // needLogin === true => ask for login (false)
11474
+ // needLogin === false => don't ask (true)
11475
+ // needLogin === undefined => check userService.isLogged$
11476
+ needLogin === true
11477
+ ? rxjs.of(false)
11478
+ : needLogin === false
11479
+ ? rxjs.of(true)
11480
+ : _this.userService.isLogged$,
11481
+ // needPos === true => ask for pos (false)
11482
+ // needPos === false => don't ask (true)
11483
+ // needPos === undefined => check posService.posWasInitialized()
11484
+ needPos === true
11485
+ ? rxjs.of(false)
11486
+ : needPos === false
11487
+ ? rxjs.of(true)
11488
+ : _this.posService.posWasInitialized()
11474
11489
  ]).pipe(operators.take(1), operators.switchMap(function (_a) {
11475
11490
  var _b = __read(_a, 2), isLogged = _b[0], posId = _b[1];
11476
11491
  return rxjs.of(_this.contextRegistryService.hookCallback(isLogged, posId));