@hmcts/rpx-xui-common-lib 2.1.7-angular-upgrade-11 → 2.1.10-angular-upgrade-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.
@@ -4821,7 +4821,7 @@
4821
4821
  */
4822
4822
  TimeoutNotificationsService.prototype.initialise = function (config) {
4823
4823
  var _this = this;
4824
- var INTERRUPTS = 'mousedown keydown DOMMouseScroll mousewheel touchstart touchmove scroll';
4824
+ var DOCUMENT_INTERRUPTS = 'mousedown keydown DOMMouseScroll mousewheel touchstart touchmove scroll';
4825
4825
  var MINUTES = ' minutes';
4826
4826
  var SECONDS = ' seconds';
4827
4827
  var SIGNOUT_EVENT = 'sign-out';
@@ -4832,18 +4832,20 @@
4832
4832
  var idleModalDisplayTimeInSeconds = this.millisecondsToSeconds(idleModalDisplayTime);
4833
4833
  var totalIdleTimeInSeconds = this.millisecondsToSeconds(totalIdleTime);
4834
4834
  this.idle.setTimeout(idleModalDisplayTimeInSeconds);
4835
- var docInterrupts = new i1$2.DocumentInterruptSource(INTERRUPTS);
4836
- var windowInterrupts = new i1$2.WindowInterruptSource(INTERRUPTS);
4835
+ var docInterrupts = new i1$2.DocumentInterruptSource(DOCUMENT_INTERRUPTS);
4836
+ var windowInterrupts = new i1$2.WindowInterruptSource(DOCUMENT_INTERRUPTS);
4837
4837
  this.idle.setInterrupts([docInterrupts, windowInterrupts]);
4838
- this.idle.onTimeout.subscribe(function () {
4839
- _this.eventEmitter.next({ eventType: SIGNOUT_EVENT });
4838
+ this.idle.onTimeout.subscribe({
4839
+ next: function () { return _this.eventEmitter.next({ eventType: SIGNOUT_EVENT }); }
4840
4840
  });
4841
- this.idle.onTimeoutWarning.pipe(operators.map(function (sec) { return (sec > 60) ? Math.ceil(sec / 60) + MINUTES : sec + SECONDS; }), operators.distinctUntilChanged()).subscribe(function (countdown) {
4842
- _this.eventEmitter.next({ eventType: COUNTDOWN_EVENT, readableCountdown: countdown });
4841
+ this.idle.onTimeoutWarning.pipe(operators.map(function (sec) { return (sec > 60) ? Math.ceil(sec / 60) + MINUTES : sec + SECONDS; }), operators.distinctUntilChanged()).subscribe({
4842
+ next: function (countdown) { return _this.eventEmitter.next({ eventType: COUNTDOWN_EVENT, readableCountdown: countdown }); }
4843
4843
  });
4844
+ this.idle.onIdleStart.subscribe({ next: function () { return console.log('You\'ve gone idle!'); } });
4845
+ this.idle.onIdleEnd.subscribe({ next: function () { return console.log('You\'re not idle!'); } });
4844
4846
  this.keepalive.interval(15);
4845
- this.keepalive.onPing.subscribe(function () {
4846
- _this.eventEmitter.next({ eventType: KEEP_ALIVE_EVENT });
4847
+ this.keepalive.onPing.subscribe({
4848
+ next: function () { return _this.eventEmitter.next({ eventType: KEEP_ALIVE_EVENT }); }
4847
4849
  });
4848
4850
  var idleInSeconds = Math.floor(totalIdleTimeInSeconds) - idleModalDisplayTimeInSeconds;
4849
4851
  this.idle.setIdle(idleInSeconds);