@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.
- package/bundles/hmcts-rpx-xui-common-lib.umd.js +11 -9
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/services/timeout-notifications/timeout-notifications.service.js +12 -10
- package/fesm2015/hmcts-rpx-xui-common-lib.js +11 -9
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/package.json +1 -1
|
@@ -4821,7 +4821,7 @@
|
|
|
4821
4821
|
*/
|
|
4822
4822
|
TimeoutNotificationsService.prototype.initialise = function (config) {
|
|
4823
4823
|
var _this = this;
|
|
4824
|
-
var
|
|
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(
|
|
4836
|
-
var windowInterrupts = new i1$2.WindowInterruptSource(
|
|
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(
|
|
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(
|
|
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(
|
|
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);
|