angular-user-idle
Advanced tools
Comparing version 2.0.0 to 2.1.1
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"UserIdleService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":29,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":70,"character":15}}]],"parameters":[{"__symbolic":"reference","name":"UserIdleConfig"}]}],"startWatching":[{"__symbolic":"method"}],"stopWatching":[{"__symbolic":"method"}],"stopTimer":[{"__symbolic":"method"}],"resetTimer":[{"__symbolic":"method"}],"onTimerStart":[{"__symbolic":"method"}],"onTimeout":[{"__symbolic":"method"}],"getConfigValue":[{"__symbolic":"method"}],"setConfigValues":[{"__symbolic":"method"}],"setupTimer":[{"__symbolic":"method"}],"setupPing":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"UserIdleConfig":{"__symbolic":"class","members":{}},"UserIdleModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"imports":[]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"UserIdleModule"},"providers":[{"provide":{"__symbolic":"reference","name":"UserIdleConfig"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}}},"origins":{"UserIdleService":"./lib/angular-user-idle.service","UserIdleConfig":"./lib/angular-user-idle.config","UserIdleModule":"./lib/angular-user-idle.module"},"importAs":"angular-user-idle"} | ||
{"__symbolic":"module","version":4,"metadata":{"UserIdleService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":29,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":71,"character":15}}],null],"parameters":[{"__symbolic":"reference","name":"UserIdleConfig"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":71,"character":67}]}],"startWatching":[{"__symbolic":"method"}],"stopWatching":[{"__symbolic":"method"}],"stopTimer":[{"__symbolic":"method"}],"resetTimer":[{"__symbolic":"method"}],"onTimerStart":[{"__symbolic":"method"}],"onTimeout":[{"__symbolic":"method"}],"getConfigValue":[{"__symbolic":"method"}],"setConfigValues":[{"__symbolic":"method"}],"setCustomActivityEvents":[{"__symbolic":"method"}],"setupTimer":[{"__symbolic":"method"}],"setupPing":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"UserIdleConfig":{"__symbolic":"class","members":{}},"UserIdleModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"imports":[]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"UserIdleModule"},"providers":[{"provide":{"__symbolic":"reference","name":"UserIdleConfig"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}}},"origins":{"UserIdleService":"./lib/angular-user-idle.service","UserIdleConfig":"./lib/angular-user-idle.config","UserIdleModule":"./lib/angular-user-idle.module"},"importAs":"angular-user-idle"} |
@@ -9,5 +9,5 @@ (function (global, factory) { | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var UserIdleConfig = (function () { | ||
var UserIdleConfig = /** @class */ (function () { | ||
function UserIdleConfig() { | ||
@@ -20,3 +20,3 @@ } | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -26,4 +26,5 @@ /** | ||
*/ | ||
var UserIdleService = (function () { | ||
function UserIdleService(config) { | ||
var UserIdleService = /** @class */ (function () { | ||
function UserIdleService(config, _ngZone) { | ||
this._ngZone = _ngZone; | ||
this.timerStart$ = new rxjs.Subject(); | ||
@@ -72,6 +73,10 @@ this.timeout$ = new rxjs.Subject(); | ||
this.idleSubscription = this.idle$ | ||
.pipe(operators.bufferTime(5000), // Starting point of detecting of user's inactivity | ||
// Starting point of detecting of user's inactivity | ||
operators.filter(function (arr) { return !arr.length && !_this.isInactivityTimer; }), operators.tap(function () { return _this.isInactivityTimer = true; }), operators.switchMap(function () { | ||
return rxjs.interval(1000).pipe(operators.takeUntil(rxjs.merge(_this.activityEvents$, rxjs.timer(_this.idle * 1000).pipe(operators.tap(function () { return _this.timerStart$.next(true); })))), operators.finalize(function () { return (_this.isInactivityTimer = false); })); | ||
.pipe(operators.bufferTime(500), // Starting point of detecting of user's inactivity | ||
operators.filter(function (arr) { return !arr.length && !_this.isIdleDetected && !_this.isInactivityTimer; }), operators.tap(function () { return (_this.isIdleDetected = true); }), operators.switchMap(function () { | ||
return _this._ngZone.runOutsideAngular(function () { | ||
return rxjs.interval(1000).pipe(operators.takeUntil(rxjs.merge(_this.activityEvents$, rxjs.timer(_this.idle * 1000).pipe(operators.tap(function () { | ||
_this.isInactivityTimer = true; | ||
_this.timerStart$.next(true); | ||
})))), operators.finalize(function () { return (_this.isIdleDetected = false); })); | ||
}); | ||
})) | ||
@@ -101,2 +106,3 @@ .subscribe(); | ||
function () { | ||
this.isInactivityTimer = false; | ||
this.timerStart$.next(false); | ||
@@ -142,3 +148,3 @@ }; | ||
var _this = this; | ||
return this.timeout$.pipe(operators.filter(function (timeout) { return !!timeout; }), operators.tap(function () { return _this.isTimeout = true; }), operators.map(function () { return true; })); | ||
return this.timeout$.pipe(operators.filter(function (timeout) { return !!timeout; }), operators.tap(function () { return (_this.isTimeout = true); }), operators.map(function () { return true; })); | ||
}; | ||
@@ -188,2 +194,44 @@ /** | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
*/ | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
UserIdleService.prototype.setCustomActivityEvents = /** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
function (customEvents) { | ||
if (this.idleSubscription && !this.idleSubscription.closed) { | ||
console.error('Call stopWatching() before set custom activity events'); | ||
return; | ||
} | ||
this.activityEvents$ = customEvents; | ||
}; | ||
/** | ||
* Setup timer. | ||
@@ -198,2 +246,3 @@ * | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -206,2 +255,3 @@ * @return {?} | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -212,7 +262,9 @@ * @return {?} | ||
var _this = this; | ||
this.timer$ = rxjs.interval(1000).pipe(operators.take(timeout), operators.map(function () { return 1; }), operators.scan(function (acc, n) { return acc + n; }), operators.tap(function (count) { | ||
if (count === timeout) { | ||
_this.timeout$.next(true); | ||
} | ||
})); | ||
this._ngZone.runOutsideAngular(function () { | ||
_this.timer$ = rxjs.interval(1000).pipe(operators.take(timeout), operators.map(function () { return 1; }), operators.scan(function (acc, n) { return acc + n; }), operators.tap(function (count) { | ||
if (count === timeout) { | ||
_this.timeout$.next(true); | ||
} | ||
})); | ||
}); | ||
}; | ||
@@ -229,2 +281,3 @@ /** | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -237,2 +290,3 @@ * @return {?} | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -253,6 +307,7 @@ * @return {?} | ||
return [ | ||
{ type: UserIdleConfig, decorators: [{ type: i0.Optional },] }, | ||
{ type: UserIdleConfig, decorators: [{ type: i0.Optional }] }, | ||
{ type: i0.NgZone } | ||
]; | ||
}; | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = i0.defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(i0.inject(UserIdleConfig, 8)); }, token: UserIdleService, providedIn: "root" }); | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = i0.defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(i0.inject(UserIdleConfig, 8), i0.inject(i0.NgZone)); }, token: UserIdleService, providedIn: "root" }); | ||
return UserIdleService; | ||
@@ -263,5 +318,5 @@ }()); | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var UserIdleModule = (function () { | ||
var UserIdleModule = /** @class */ (function () { | ||
function UserIdleModule() { | ||
@@ -295,3 +350,3 @@ } | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -301,3 +356,3 @@ | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -313,2 +368,2 @@ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUudW1kLmpzLm1hcCIsInNvdXJjZXMiOlsibmc6Ly9hbmd1bGFyLXVzZXItaWRsZS9saWIvYW5ndWxhci11c2VyLWlkbGUuY29uZmlnLnRzIiwibmc6Ly9hbmd1bGFyLXVzZXItaWRsZS9saWIvYW5ndWxhci11c2VyLWlkbGUuc2VydmljZS50cyIsIm5nOi8vYW5ndWxhci11c2VyLWlkbGUvbGliL2FuZ3VsYXItdXNlci1pZGxlLm1vZHVsZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgVXNlcklkbGVDb25maWcge1xuICAvKipcbiAgICogSWRsZSB2YWx1ZSBpbiBzZWNvbmRzLlxuICAgKi9cbiAgaWRsZTogbnVtYmVyO1xuICAvKipcbiAgICogVGltZW91dCB2YWx1ZSBpbiBzZWNvbmRzLlxuICAgKi9cbiAgdGltZW91dDogbnVtYmVyO1xuICAvKipcbiAgICogUGluZyB2YWx1ZSBpbiBzZWNvbmRzLlxuICAgKi9cbiAgcGluZzogbnVtYmVyO1xufVxuIiwiaW1wb3J0IHsgSW5qZWN0YWJsZSwgT3B0aW9uYWwgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7XG4gIE9ic2VydmFibGUsXG4gIFN1YmplY3QsXG4gIFN1YnNjcmlwdGlvbixcbiAgbWVyZ2UsXG4gIGZyb21FdmVudCxcbiAgZnJvbSxcbiAgaW50ZXJ2YWwsXG4gIHRpbWVyLFxuICBvZlxufSBmcm9tICdyeGpzJztcbmltcG9ydCB7XG4gIGJ1ZmZlclRpbWUsXG4gIGRpc3RpbmN0VW50aWxDaGFuZ2VkLFxuICBmaWx0ZXIsXG4gIGZpbmFsaXplLFxuICBtYXAsXG4gIHNjYW4sXG4gIHN3aXRjaE1hcCxcbiAgdGFrZSxcbi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AgICk7XG4gIH1cblxuICAvKipcbiAgICogUmV0dXJuIG9ic2VydmFibGUgZm9yIHRpbWVvdXQgaXMgZmlyZWQuXG4gICAqL1xuICBvblRpbWVvdXQoKTogT2JzZXJ2YWJsZTxib29sZWFuPiB7XG4gICAgcmV0dXJuIHRoaXMudGltZW91dCQucGlwZShcbiAgICAgIGZpbHRlcih0aW1lb3V0ID0+ICEhdGltZW91dCksXG4gICAgICB0YXAoKCkgPT4gKHRoaXMuaXNUaW1lb3V0ID0gdHJ1ZSkpLFxuICAgICAgbWFwKCgpID0+IHRydWUpXG4gICAgKTtcbiAgfVxuXG4gIGdldENvbmZpZ1ZhbHVlKCk6IFVzZXJJZGxlQ29uZmlnIHtcbiAgICByZXR1cm4ge1xuICAgICAgaWRsZTogdGhpcy5pZGxlLFxuICAgICAgdGltZW91dDogdGhpcy50aW1lb3V0LFxuICAgICAgcGluZzogdGhpcy5waW5nXG4gICAgfTtcbiAgfVxuXG4gIC8qKlxuICAgKiBTZXQgY29uZmlnIHZhbHVlcy5cbiAgICogQHBhcmFtIGNvbmZpZ1xuICAgKi9cbiAgc2V0Q29uZmlnVmFsdWVzKGNvbmZpZzogVXNlcklkbGVDb25maWcpIHtcbiAgICBpZiAodGhpcy5pZGxlU3Vic2NyaXB0aW9uICYmICF0aGlzLmlkbGVTdWJzY3JpcHRpb24uY2xvc2VkKSB7XG4gICAgICBjb25zb2xlLmVycm9yKCdDYWxsIHN0b3BXYXRjaGluZygpIGJlZm9yZSBzZXQgY29uZmlnIHZhbHVlcycpO1xuICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIGlmIChjb25maWcuaWRsZSkge1xuICAgICAgdGhpcy5pZGxlID0gY29uZmlnLmlkbGU7XG4gICAgfVxuICAgIGlmIChjb25maWcucGluZykge1xuICAgICAgdGhpcy5waW5nID0gY29uZmlnLnBpbmc7XG4gICAgfVxuICAgIGlmIChjb25maWcudGltZW91dCkge1xuICAgICAgdGhpcy50aW1lb3V0ID0gY29uZ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ined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("angular-user-idle",["exports","@angular/core","rxjs","rxjs/operators"],e):e(t["angular-user-idle"]={},t.ng.core,null,t.Rx.Observable.prototype)}(this,function(t,i,n,r){"use strict";var o=function(){},e=function(){function t(t){this.timerStart$=new n.Subject,this.timeout$=new n.Subject,this.idle=600,this.timeout=300,this.ping=120,t&&(this.idle=t.idle,this.timeout=t.timeout,this.ping=t.ping),this.activityEvents$=n.merge(n.fromEvent(window,"mousemove"),n.fromEvent(window,"resize"),n.fromEvent(document,"keydown")),this.idle$=n.from(this.activityEvents$)}return t.prototype.startWatching=function(){var e=this;this.idleSubscription&&this.idleSubscription.unsubscribe(),this.idleSubscription=this.idle$.pipe(r.bufferTime(5e3),r.filter(function(t){return!t.length&&!e.isInactivityTimer}),r.tap(function(){return e.isInactivityTimer=!0}),r.switchMap(function(){return n.interval(1e3).pipe(r.takeUntil(n.merge(e.activityEvents$,n.timer(1e3*e.idle).pipe(r.tap(function(){return e.timerStart$.next(!0)})))),r.finalize(function(){return e.isInactivityTimer=!1}))})).subscribe(),this.setupTimer(this.timeout),this.setupPing(this.ping)},t.prototype.stopWatching=function(){this.stopTimer(),this.idleSubscription&&this.idleSubscription.unsubscribe()},t.prototype.stopTimer=function(){this.timerStart$.next(!1)},t.prototype.resetTimer=function(){this.stopTimer(),this.isTimeout=!1},t.prototype.onTimerStart=function(){var e=this;return this.timerStart$.pipe(r.distinctUntilChanged(),r.switchMap(function(t){return t?e.timer$:n.of(null)}))},t.prototype.onTimeout=function(){var t=this;return this.timeout$.pipe(r.filter(function(t){return!!t}),r.tap(function(){return t.isTimeout=!0}),r.map(function(){return!0}))},t.prototype.getConfigValue=function(){return{idle:this.idle,timeout:this.timeout,ping:this.ping}},t.prototype.setConfigValues=function(t){!this.idleSubscription||this.idleSubscription.closed?(t.idle&&(this.idle=t.idle),t.ping&&(this.ping=t.ping),t.timeout&&(this.timeout=t.timeout)):console.error("Call stopWatching() before set config values")},t.prototype.setupTimer=function(e){var i=this;this.timer$=n.interval(1e3).pipe(r.take(e),r.map(function(){return 1}),r.scan(function(t,e){return t+e}),r.tap(function(t){t===e&&i.timeout$.next(!0)}))},t.prototype.setupPing=function(t){var e=this;this.ping$=n.interval(1e3*t).pipe(r.filter(function(){return!e.isTimeout}))},t.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:o,decorators:[{type:i.Optional}]}]},t.ngInjectableDef=i.defineInjectable({factory:function(){return new t(i.inject(o,8))},token:t,providedIn:"root"}),t}(),s=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:o,useValue:t}]}},e.decorators=[{type:i.NgModule,args:[{imports:[]}]}],e}();t.UserIdleService=e,t.UserIdleConfig=o,t.UserIdleModule=s,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("angular-user-idle",["exports","@angular/core","rxjs","rxjs/operators"],e):e(t["angular-user-idle"]={},t.ng.core,null,t.Rx.Observable.prototype)}(this,function(t,i,n,r){"use strict";var o=function(){},e=function(){function t(t,e){this._ngZone=e,this.timerStart$=new n.Subject,this.timeout$=new n.Subject,this.idle=600,this.timeout=300,this.ping=120,t&&(this.idle=t.idle,this.timeout=t.timeout,this.ping=t.ping),this.activityEvents$=n.merge(n.fromEvent(window,"mousemove"),n.fromEvent(window,"resize"),n.fromEvent(document,"keydown")),this.idle$=n.from(this.activityEvents$)}return t.prototype.startWatching=function(){var e=this;this.idleSubscription&&this.idleSubscription.unsubscribe(),this.idleSubscription=this.idle$.pipe(r.bufferTime(500),r.filter(function(t){return!t.length&&!e.isIdleDetected&&!e.isInactivityTimer}),r.tap(function(){return e.isIdleDetected=!0}),r.switchMap(function(){return e._ngZone.runOutsideAngular(function(){return n.interval(1e3).pipe(r.takeUntil(n.merge(e.activityEvents$,n.timer(1e3*e.idle).pipe(r.tap(function(){e.isInactivityTimer=!0,e.timerStart$.next(!0)})))),r.finalize(function(){return e.isIdleDetected=!1}))})})).subscribe(),this.setupTimer(this.timeout),this.setupPing(this.ping)},t.prototype.stopWatching=function(){this.stopTimer(),this.idleSubscription&&this.idleSubscription.unsubscribe()},t.prototype.stopTimer=function(){this.isInactivityTimer=!1,this.timerStart$.next(!1)},t.prototype.resetTimer=function(){this.stopTimer(),this.isTimeout=!1},t.prototype.onTimerStart=function(){var e=this;return this.timerStart$.pipe(r.distinctUntilChanged(),r.switchMap(function(t){return t?e.timer$:n.of(null)}))},t.prototype.onTimeout=function(){var t=this;return this.timeout$.pipe(r.filter(function(t){return!!t}),r.tap(function(){return t.isTimeout=!0}),r.map(function(){return!0}))},t.prototype.getConfigValue=function(){return{idle:this.idle,timeout:this.timeout,ping:this.ping}},t.prototype.setConfigValues=function(t){!this.idleSubscription||this.idleSubscription.closed?(t.idle&&(this.idle=t.idle),t.ping&&(this.ping=t.ping),t.timeout&&(this.timeout=t.timeout)):console.error("Call stopWatching() before set config values")},t.prototype.setCustomActivityEvents=function(t){!this.idleSubscription||this.idleSubscription.closed?this.activityEvents$=t:console.error("Call stopWatching() before set custom activity events")},t.prototype.setupTimer=function(e){var i=this;this._ngZone.runOutsideAngular(function(){i.timer$=n.interval(1e3).pipe(r.take(e),r.map(function(){return 1}),r.scan(function(t,e){return t+e}),r.tap(function(t){t===e&&i.timeout$.next(!0)}))})},t.prototype.setupPing=function(t){var e=this;this.ping$=n.interval(1e3*t).pipe(r.filter(function(){return!e.isTimeout}))},t.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:o,decorators:[{type:i.Optional}]},{type:i.NgZone}]},t.ngInjectableDef=i.defineInjectable({factory:function(){return new t(i.inject(o,8),i.inject(i.NgZone))},token:t,providedIn:"root"}),t}(),s=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:o,useValue:t}]}},e.decorators=[{type:i.NgModule,args:[{imports:[]}]}],e}();t.UserIdleService=e,t.UserIdleConfig=o,t.UserIdleModule=s,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=angular-user-idle.umd.min.js.map |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -9,3 +9,2 @@ /** | ||
export { UserIdleService, UserIdleConfig, UserIdleModule } from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXVzZXItaWRsZS8iLCJzb3VyY2VzIjpbImFuZ3VsYXItdXNlci1pZGxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxnRUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
export class UserIdleConfig { | ||
} | ||
function UserIdleConfig_tsickle_Closure_declarations() { | ||
if (false) { | ||
/** | ||
@@ -24,3 +24,2 @@ * Idle value in seconds. | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuY29uZmlnLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci11c2VyLWlkbGUvIiwic291cmNlcyI6WyJsaWIvYW5ndWxhci11c2VyLWlkbGUuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxNQUFNO0NBYUwiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgVXNlcklkbGVDb25maWcge1xuICAvKipcbiAgICogSWRsZSB2YWx1ZSBpbiBzZWNvbmRzLlxuICAgKi9cbiAgaWRsZTogbnVtYmVyO1xuICAvKipcbiAgICogVGltZW91dCB2YWx1ZSBpbiBzZWNvbmRzLlxuICAgKi9cbiAgdGltZW91dDogbnVtYmVyO1xuICAvKipcbiAgICogUGluZyB2YWx1ZSBpbiBzZWNvbmRzLlxuICAgKi9cbiAgcGluZzogbnVtYmVyO1xufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuY29uZmlnLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci11c2VyLWlkbGUvIiwic291cmNlcyI6WyJsaWIvYW5ndWxhci11c2VyLWlkbGUuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxNQUFNLE9BQU8sY0FBYztDQWExQjs7Ozs7O0lBVEMsOEJBQWE7Ozs7O0lBSWIsaUNBQWdCOzs7OztJQUloQiw4QkFBYSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBVc2VySWRsZUNvbmZpZyB7XG4gIC8qKlxuICAgKiBJZGxlIHZhbHVlIGluIHNlY29uZHMuXG4gICAqL1xuICBpZGxlOiBudW1iZXI7XG4gIC8qKlxuICAgKiBUaW1lb3V0IHZhbHVlIGluIHNlY29uZHMuXG4gICAqL1xuICB0aW1lb3V0OiBudW1iZXI7XG4gIC8qKlxuICAgKiBQaW5nIHZhbHVlIGluIHNlY29uZHMuXG4gICAqL1xuICBwaW5nOiBudW1iZXI7XG59XG4iXX0= |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -26,12 +26,2 @@ import { NgModule } from '@angular/core'; | ||
]; | ||
function UserIdleModule_tsickle_Closure_declarations() { | ||
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */ | ||
UserIdleModule.decorators; | ||
/** | ||
* @nocollapse | ||
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>} | ||
*/ | ||
UserIdleModule.ctorParameters; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci11c2VyLWlkbGUvIiwic291cmNlcyI6WyJsaWIvYW5ndWxhci11c2VyLWlkbGUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQXVCLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM5RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFLNUQsTUFBTTs7Ozs7SUFDSixNQUFNLENBQUMsT0FBTyxDQUFDLE1BQXNCO1FBQ25DLE1BQU0sQ0FBQztZQUNMLFFBQVEsRUFBRSxjQUFjO1lBQ3hCLFNBQVMsRUFBRTtnQkFDVCxFQUFDLE9BQU8sRUFBRSxjQUFjLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBQzthQUM1QztTQUNGLENBQUM7S0FDSDs7O1lBWEYsUUFBUSxTQUFDO2dCQUNSLE9BQU8sRUFBRSxFQUFFO2FBQ1oiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBNb2R1bGVXaXRoUHJvdmlkZXJzLCBOZ01vZHVsZSB9IG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FDSixDQUFDOzs7WUFYRixRQUFRLFNBQUM7Z0JBQ1IsT0FBTyxFQUFFLEVBQUU7YUFDWiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE1vZHVsZVdpdGhQcm92aWRlcnMsIE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBVc2VySWRsZUNvbmZpZyB9IGZyb20gJy4vYW5ndWxhci11c2VyLWlkbGUuY29uZmlnJztcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW11cbn0pXG5leHBvcnQgY2xhc3MgVXNlcklkbGVNb2R1bGUge1xuICBzdGF0aWMgZm9yUm9vdChjb25maWc6IFVzZXJJZGxlQ29uZmlnKTogTW9kdWxlV2l0aFByb3ZpZGVycyB7XG4gICAgcmV0dXJuIHtcbiAgICAgIG5nTW9kdWxlOiBVc2VySWRsZU1vZHVsZSxcbiAgICAgIHByb3ZpZGVyczogW1xuICAgICAgICB7cHJvdmlkZTogVXNlcklkbGVDb25maWcsIHVzZVZhbHVlOiBjb25maWd9XG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
import { Injectable, Optional } from '@angular/core'; | ||
import { Injectable, Optional, NgZone } from '@angular/core'; | ||
import { Subject, merge, fromEvent, from, interval, timer, of } from 'rxjs'; | ||
@@ -17,4 +17,6 @@ import { bufferTime, distinctUntilChanged, filter, finalize, map, scan, switchMap, take, takeUntil, tap } from 'rxjs/operators'; | ||
* @param {?} config | ||
* @param {?} _ngZone | ||
*/ | ||
constructor(config) { | ||
constructor(config, _ngZone) { | ||
this._ngZone = _ngZone; | ||
this.timerStart$ = new Subject(); | ||
@@ -55,5 +57,7 @@ this.timeout$ = new Subject(); | ||
this.idleSubscription = this.idle$ | ||
.pipe(bufferTime(5000), // Starting point of detecting of user's inactivity | ||
// Starting point of detecting of user's inactivity | ||
filter(arr => !arr.length && !this.isInactivityTimer), tap(() => this.isInactivityTimer = true), switchMap(() => interval(1000).pipe(takeUntil(merge(this.activityEvents$, timer(this.idle * 1000).pipe(tap(() => this.timerStart$.next(true))))), finalize(() => (this.isInactivityTimer = false))))) | ||
.pipe(bufferTime(500), // Starting point of detecting of user's inactivity | ||
filter(arr => !arr.length && !this.isIdleDetected && !this.isInactivityTimer), tap(() => (this.isIdleDetected = true)), switchMap(() => this._ngZone.runOutsideAngular(() => interval(1000).pipe(takeUntil(merge(this.activityEvents$, timer(this.idle * 1000).pipe(tap(() => { | ||
this.isInactivityTimer = true; | ||
this.timerStart$.next(true); | ||
})))), finalize(() => (this.isIdleDetected = false)))))) | ||
.subscribe(); | ||
@@ -76,2 +80,3 @@ this.setupTimer(this.timeout); | ||
stopTimer() { | ||
this.isInactivityTimer = false; | ||
this.timerStart$.next(false); | ||
@@ -98,3 +103,3 @@ } | ||
onTimeout() { | ||
return this.timeout$.pipe(filter(timeout => !!timeout), tap(() => this.isTimeout = true), map(() => true)); | ||
return this.timeout$.pipe(filter(timeout => !!timeout), tap(() => (this.isTimeout = true)), map(() => true)); | ||
} | ||
@@ -132,5 +137,25 @@ /** | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
setCustomActivityEvents(customEvents) { | ||
if (this.idleSubscription && !this.idleSubscription.closed) { | ||
console.error('Call stopWatching() before set custom activity events'); | ||
return; | ||
} | ||
this.activityEvents$ = customEvents; | ||
} | ||
/** | ||
* Setup timer. | ||
* | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -140,7 +165,9 @@ * @return {?} | ||
setupTimer(timeout) { | ||
this.timer$ = interval(1000).pipe(take(timeout), map(() => 1), scan((acc, n) => acc + n), tap(count => { | ||
if (count === timeout) { | ||
this.timeout$.next(true); | ||
} | ||
})); | ||
this._ngZone.runOutsideAngular(() => { | ||
this.timer$ = interval(1000).pipe(take(timeout), map(() => 1), scan((acc, n) => acc + n), tap(count => { | ||
if (count === timeout) { | ||
this.timeout$.next(true); | ||
} | ||
})); | ||
}); | ||
} | ||
@@ -151,2 +178,3 @@ /** | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -166,13 +194,7 @@ * @return {?} | ||
UserIdleService.ctorParameters = () => [ | ||
{ type: UserIdleConfig, decorators: [{ type: Optional },] }, | ||
{ type: UserIdleConfig, decorators: [{ type: Optional }] }, | ||
{ type: NgZone } | ||
]; | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = i0.defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(i0.inject(i1.UserIdleConfig, 8)); }, token: UserIdleService, providedIn: "root" }); | ||
function UserIdleService_tsickle_Closure_declarations() { | ||
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */ | ||
UserIdleService.decorators; | ||
/** | ||
* @nocollapse | ||
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>} | ||
*/ | ||
UserIdleService.ctorParameters; | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = i0.defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(i0.inject(i1.UserIdleConfig, 8), i0.inject(i0.NgZone)); }, token: UserIdleService, providedIn: "root" }); | ||
if (false) { | ||
/** @type {?} */ | ||
@@ -183,11 +205,24 @@ UserIdleService.prototype.ping$; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.activityEvents$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.timerStart$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.timeout$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.idle$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.timer$; | ||
@@ -198,2 +233,3 @@ /** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -205,2 +241,3 @@ UserIdleService.prototype.idle; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -212,2 +249,3 @@ UserIdleService.prototype.timeout; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -218,2 +256,3 @@ UserIdleService.prototype.ping; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -224,8 +263,21 @@ UserIdleService.prototype.isTimeout; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.isInactivityTimer; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.isIdleDetected; | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.idleSubscription; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
UserIdleService.prototype._ngZone; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdXNlci1pZGxlLyIsInNvdXJjZXMiOlsibGliL2FuZ3VsYXItdXNlci1pZGxlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFFTCxPQUFPLEVBRVAsS0FB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1YnNjcmliZSgpO1xuICAgIH1cblxuICAgIC8vIElmIGFueSBvZiB1c2VyIGV2ZW50cyBpcyBub3QgYWN0aXZlIGZvciBpZGxlLXNlY29uZHMgd2hlbiBzdGFydCB0aW1lci5cbiAgICB0aGlzLmlkbGVTdWJzY3JpcHRpb24gPSB0aGlzLmlkbGUkXG4gICAgICAucGlwZShcbiAgICAgICAgYnVmZmVyVGltZSg1MDAwKSwgLy8gU3RhcnRpbmcgcG9pbnQgb2YgZGV0ZWN0aW5nIG9mIHVzZXIncyBpbmFjdGl2aXR5XG4gICAgICAgIGZpbHRlcihhcnIgPT4gIWFyci5sZW5ndGggJiYgIXRoaXMuaXNJbmFjdGl2aXR5VGltZXIpLFxuICAgICAgICB0YXAoKCkgPT4gdGhpcy5pc0luYWN0aXZpdHlUaW1lciA9IHRydWUpLFxuICAgICAgICBzd2l0Y2hNYXAoKCkgPT4gaW50ZXJ2YWwoMTAwMCkucGlwZShcbiAgICAgICAgICB0YWtlVW50aWwoXG4gICAgICAgICAgICBtZXJnZShcbiAgICAgICAgICAgICAgdGhpcy5hY3Rpdml0eUV2ZW50cyQsXG4gICAgICAgICAgICAgIHRpbWVyKHRoaXMuaWRsZSAqIDEwMDApLnBpcGUoXG4gICAgICAgICAgICAgICAgdGFwKCgpID0+IHRoaXMudGltZXJTdGFydCQubmV4dCh0cnVlKSlcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICksXG4gICAgICAgICAgZmluYWxpemUoKCkgPT4gKHRoaXMuaXNJbmFjdGl2aXR5VGltZXIgPSBmYWxzZSkpXG4gICAgICAgICAgKVxuICAgICAgICApXG4gICAgICApXG4gICAgICAuc3Vic2NyaWJlKCk7XG5cbiAgICB0aGlzLnNldHVwVGltZXIodGhpcy50aW1lb3V0KTtcbiAgICB0aGlzLnNldHVwUGluZyh0aGlzLnBpbmcpO1xuICB9XG5cbiAgc3RvcFdhdGNoaW5nKCkge1xuICAgIHRoaXMuc3RvcFRp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AgICAgIHNjYW4oKGFjYywgbikgPT4gYWNjICsgbiksXG4gICAgICB0YXAoY291bnQgPT4ge1xuICAgICAgICBpZiAoY291bnQgPT09IHRpbWVvdXQpIHtcbiAgICAgICAgICB0aGlzLnRpbWVvdXQkLm5leHQodHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH0pXG4gICAgKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBTZXR1cCBwaW5nLlxuICAgKlxuICAgKiBQaW5ncyBldmVyeSBwaW5nLXNlY29uZHMgb25seSBpZiBpcyBub3QgdGltZW91dC5cbiAgICogQHBhcmFtIHBpbmdcbiAgICovXG4gIHByb3RlY3RlZCBzZXR1cFBpbmcocGluZzogbnVtYmVyKSB7XG4gICAgdGhpcy5waW5nJCA9IGludGVydmFsKHBpbmcgKiAxMDAwKS5waXBlKFxuICAgICAgZmlsdGVyKCgpID0+ICF0aGlzLmlzVGltZW91dClcbiAgICApO1xuICB9XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdXNlci1pZGxlLyIsInNvdXJjZXMiOlsibGliL2FuZ3VsYXItdXNlci1pZGxlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBRUwsT0FBTyxFQUVQLEtBQUssRUFDTCxTQUFTLEVBQ1QsSUFBSSxFQUNKLFFBQVEsRUFDUixLQUFLLEVBQ0wsRUFBRSxFQUNILE1BQU0sTUFBTSxDQUFDO0FBQ2QsT0FBTyxFQUNMLFVBQVUsRUFDVixvQkFBb0IsRUFDcEIsTUFBTSxFQUNOLFFBQVEsRUFDUixHQUFHL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zLmlkbGVTdWJzY3JpcHRpb24gPSB0aGlzLmlkbGUkXG4gICAgICAucGlwZShcbiAgICAgICAgYnVmZmVyVGltZSg1MDApLCAvLyBTdGFydGluZyBwb2ludCBvZiBkZXRlY3Rpbmcgb2YgdXNlcidzIGluYWN0aXZpdHlcbiAgICAgICAgZmlsdGVyKFxuICAgICAgICAgIGFyciA9PiAhYXJyLmxlbmd0aCAmJiAhdGhpcy5pc0lkbGVEZXRlY3RlZCAmJiAhdGhpcy5pc0luYWN0aXZpdHlUaW1lclxuICAgICAgICApLFxuICAgICAgICB0YXAoKCkgPT4gKHRoaXMuaXNJZGxlRGV0ZWN0ZWQgPSB0cnVlKSksXG4gICAgICAgIHN3aXRjaE1hcCgoKSA9PlxuICAgICAgICAgIHRoaXMuX25nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoKSA9PlxuICAgICAgICAgICAgaW50ZXJ2YWwoMTAwMCkucGlwZShcbiAgICAgICAgICAgICAgdGFrZVVudGlsKFxuICAgICAgICAgICAgICAgIG1lcmdlKFxuICAgICAgICAgICAgICAgICAgdGhpcy5hY3Rpdml0eUV2ZW50cyQsXG4gICAgICAgICAgICAgICAgICB0aW1lcih0aGlzLmlkbGUgKiAxMDAwKS5waXBlKFxuICAgICAgICAgICAgICAgICAgICB0YXAoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaXNJbmFjdGl2aXR5VGltZXIgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMudGltZXJTdGFydCQubmV4dCh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIGZpbmFsaXplKCgpID0+ICh0aGlzLmlzSWRsZURldGVjdGVkID0gZmFsc2UpKVxuICAgICAgICAgICAgKVxuICAgICAgICAgIClcbiAgICAgICAgKVxuICAgICAgKVxuICAgICAgLnN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gICAgdGFwKGNvdW50ID0+IHtcbiAgICAgICAgICBpZiAoY291bnQgPT09IHRpbWVvdXQpIHtcbiAgICAgICAgICAgIHRoaXMudGltZW91dCQubmV4dCh0cnVlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICApO1xuICAgIH0pO1xuICB9XG5cbiAgLyoqXG4gICAqIFNldHVwIHBpbmcuXG4gICAqXG4gICAqIFBpbmdzIGV2ZXJ5IHBpbmctc2Vjb25kcyBvbmx5IGlmIGlzIG5vdCB0aW1lb3V0LlxuICAgKiBAcGFyYW0gcGluZ1xuICAgKi9cbiAgcHJvdGVjdGVkIHNldHVwUGluZyhwaW5nOiBudW1iZXIpIHtcbiAgICB0aGlzLnBpbmckID0gaW50ZXJ2YWwocGluZyAqIDEwMDApLnBpcGUoZmlsdGVyKCgpID0+ICF0aGlzLmlzVGltZW91dCkpO1xuICB9XG59XG4iXX0= |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -11,3 +11,2 @@ /* | ||
export { UserIdleModule } from './lib/angular-user-idle.module'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdXNlci1pZGxlLyIsInNvdXJjZXMiOlsicHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsZ0NBQWMsaUNBQWlDLENBQUM7QUFDaEQsK0JBQWMsZ0NBQWdDLENBQUM7QUFDL0MsK0JBQWMsZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGFuZ3VsYXItdXNlci1pZGxlXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci11c2VyLWlkbGUuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9hbmd1bGFyLXVzZXItaWRsZS5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci11c2VyLWlkbGUubW9kdWxlJztcbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -9,3 +9,2 @@ /** | ||
export { UserIdleService, UserIdleConfig, UserIdleModule } from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXVzZXItaWRsZS8iLCJzb3VyY2VzIjpbImFuZ3VsYXItdXNlci1pZGxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxnRUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -11,3 +11,3 @@ var UserIdleConfig = /** @class */ (function () { | ||
export { UserIdleConfig }; | ||
function UserIdleConfig_tsickle_Closure_declarations() { | ||
if (false) { | ||
/** | ||
@@ -29,3 +29,2 @@ * Idle value in seconds. | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuY29uZmlnLmpzIiwic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gc2Vjb25kcy5cbiAgICovXG4gIHRpbWVvdXQ6IG51bWJlcjtcbiAgLyoqXG4gICAqIFBpbmcgdmFsdWUgaW4gc2Vjb25kcy5cbiAgICovXG4gIHBpbmc6IG51bWJlcjtcbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -34,12 +34,2 @@ import { NgModule } from '@angular/core'; | ||
export { UserIdleModule }; | ||
function UserIdleModule_tsickle_Closure_declarations() { | ||
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */ | ||
UserIdleModule.decorators; | ||
/** | ||
* @nocollapse | ||
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>} | ||
*/ | ||
UserIdleModule.ctorParameters; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci11c2VyLWlkbGUvIiwic291cmNlcyI6WyJsaWIvYW5ndWxhci11c2VyLWlkbGUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQXVCLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM5RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sNEJBQTRCLENBQUM7Ozs7Ozs7O0lBTW5ELHNCQUFPOzs7O0lBQWQsVUFBZSxNQUFzQjtRQUNuQyxNQUFNLENBQUM7WUFDTCxRQUFRLEVBQUUsY0FBYztZQUN4QixTQUFTLEVBQUU7Z0JBQ1QsRUFBQyxPQUFPLEVBQUUsY0FBYyxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUM7YUFDNUM7U0FDRixDQ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NCO1FBQ25DLE9BQU87WUFDTCxRQUFRLEVBQUUsY0FBYztZQUN4QixTQUFTLEVBQUU7Z0JBQ1QsRUFBQyxPQUFPLEVBQUUsY0FBYyxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUM7YUFDNUM7U0FDRixDQUFDO0lBQ0osQ0FBQzs7Z0JBWEYsUUFBUSxTQUFDO29CQUNSLE9BQU8sRUFBRSxFQUFFO2lCQUNaOztJQVVELHFCQUFDO0NBQUEsQUFaRCxJQVlDO1NBVFksY0FBYyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE1vZHVsZVdpdGhQcm92aWRlcnMsIE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBVc2VySWRsZUNvbmZpZyB9IGZyb20gJy4vYW5ndWxhci11c2VyLWlkbGUuY29uZmlnJztcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW11cbn0pXG5leHBvcnQgY2xhc3MgVXNlcklkbGVNb2R1bGUge1xuICBzdGF0aWMgZm9yUm9vdChjb25maWc6IFVzZXJJZGxlQ29uZmlnKTogTW9kdWxlV2l0aFByb3ZpZGVycyB7XG4gICAgcmV0dXJuIHtcbiAgICAgIG5nTW9kdWxlOiBVc2VySWRsZU1vZHVsZSxcbiAgICAgIHByb3ZpZGVyczogW1xuICAgICAgICB7cHJvdmlkZTogVXNlcklkbGVDb25maWcsIHVzZVZhbHVlOiBjb25maWd9XG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
import { Injectable, Optional } from '@angular/core'; | ||
import { Injectable, Optional, NgZone } from '@angular/core'; | ||
import { Subject, merge, fromEvent, from, interval, timer, of } from 'rxjs'; | ||
@@ -15,3 +15,4 @@ import { bufferTime, distinctUntilChanged, filter, finalize, map, scan, switchMap, take, takeUntil, tap } from 'rxjs/operators'; | ||
var UserIdleService = /** @class */ (function () { | ||
function UserIdleService(config) { | ||
function UserIdleService(config, _ngZone) { | ||
this._ngZone = _ngZone; | ||
this.timerStart$ = new Subject(); | ||
@@ -60,6 +61,10 @@ this.timeout$ = new Subject(); | ||
this.idleSubscription = this.idle$ | ||
.pipe(bufferTime(5000), // Starting point of detecting of user's inactivity | ||
// Starting point of detecting of user's inactivity | ||
filter(function (arr) { return !arr.length && !_this.isInactivityTimer; }), tap(function () { return _this.isInactivityTimer = true; }), switchMap(function () { | ||
return interval(1000).pipe(takeUntil(merge(_this.activityEvents$, timer(_this.idle * 1000).pipe(tap(function () { return _this.timerStart$.next(true); })))), finalize(function () { return (_this.isInactivityTimer = false); })); | ||
.pipe(bufferTime(500), // Starting point of detecting of user's inactivity | ||
filter(function (arr) { return !arr.length && !_this.isIdleDetected && !_this.isInactivityTimer; }), tap(function () { return (_this.isIdleDetected = true); }), switchMap(function () { | ||
return _this._ngZone.runOutsideAngular(function () { | ||
return interval(1000).pipe(takeUntil(merge(_this.activityEvents$, timer(_this.idle * 1000).pipe(tap(function () { | ||
_this.isInactivityTimer = true; | ||
_this.timerStart$.next(true); | ||
})))), finalize(function () { return (_this.isIdleDetected = false); })); | ||
}); | ||
})) | ||
@@ -89,2 +94,3 @@ .subscribe(); | ||
function () { | ||
this.isInactivityTimer = false; | ||
this.timerStart$.next(false); | ||
@@ -130,3 +136,3 @@ }; | ||
var _this = this; | ||
return this.timeout$.pipe(filter(function (timeout) { return !!timeout; }), tap(function () { return _this.isTimeout = true; }), map(function () { return true; })); | ||
return this.timeout$.pipe(filter(function (timeout) { return !!timeout; }), tap(function () { return (_this.isTimeout = true); }), map(function () { return true; })); | ||
}; | ||
@@ -176,2 +182,44 @@ /** | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
*/ | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
UserIdleService.prototype.setCustomActivityEvents = /** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
function (customEvents) { | ||
if (this.idleSubscription && !this.idleSubscription.closed) { | ||
console.error('Call stopWatching() before set custom activity events'); | ||
return; | ||
} | ||
this.activityEvents$ = customEvents; | ||
}; | ||
/** | ||
* Setup timer. | ||
@@ -186,2 +234,3 @@ * | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -194,2 +243,3 @@ * @return {?} | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -200,7 +250,9 @@ * @return {?} | ||
var _this = this; | ||
this.timer$ = interval(1000).pipe(take(timeout), map(function () { return 1; }), scan(function (acc, n) { return acc + n; }), tap(function (count) { | ||
if (count === timeout) { | ||
_this.timeout$.next(true); | ||
} | ||
})); | ||
this._ngZone.runOutsideAngular(function () { | ||
_this.timer$ = interval(1000).pipe(take(timeout), map(function () { return 1; }), scan(function (acc, n) { return acc + n; }), tap(function (count) { | ||
if (count === timeout) { | ||
_this.timeout$.next(true); | ||
} | ||
})); | ||
}); | ||
}; | ||
@@ -217,2 +269,3 @@ /** | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -225,2 +278,3 @@ * @return {?} | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -240,16 +294,10 @@ * @return {?} | ||
UserIdleService.ctorParameters = function () { return [ | ||
{ type: UserIdleConfig, decorators: [{ type: Optional },] }, | ||
{ type: UserIdleConfig, decorators: [{ type: Optional }] }, | ||
{ type: NgZone } | ||
]; }; | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = i0.defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(i0.inject(i1.UserIdleConfig, 8)); }, token: UserIdleService, providedIn: "root" }); | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = i0.defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(i0.inject(i1.UserIdleConfig, 8), i0.inject(i0.NgZone)); }, token: UserIdleService, providedIn: "root" }); | ||
return UserIdleService; | ||
}()); | ||
export { UserIdleService }; | ||
function UserIdleService_tsickle_Closure_declarations() { | ||
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */ | ||
UserIdleService.decorators; | ||
/** | ||
* @nocollapse | ||
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>} | ||
*/ | ||
UserIdleService.ctorParameters; | ||
if (false) { | ||
/** @type {?} */ | ||
@@ -260,11 +308,24 @@ UserIdleService.prototype.ping$; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.activityEvents$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.timerStart$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.timeout$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.idle$; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.timer$; | ||
@@ -275,2 +336,3 @@ /** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -282,2 +344,3 @@ UserIdleService.prototype.idle; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -289,2 +352,3 @@ UserIdleService.prototype.timeout; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -295,2 +359,3 @@ UserIdleService.prototype.ping; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -301,8 +366,21 @@ UserIdleService.prototype.isTimeout; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.isInactivityTimer; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.isIdleDetected; | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
UserIdleService.prototype.idleSubscription; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
UserIdleService.prototype._ngZone; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdXNlci1pZGxlLyIsInNvdXJjZXMiOlsibGliL2FuZ3VsYXItdXNlci1pZGxlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3JELE9BQU8sRUFFTCxPQUFPLEVBRVAsS0FBSyxFQUNMLFNBQVMsRUFDVCxJQUFJLEVBQ0osUUFBUSxFQUNSLEtBQUssRUFDTCxFQUFFLEVBQ0gsTUFBTSxNQUFNLENBQUM7QUFDZCxPQUFPLEVBQ0wsVUFBVSxFQUNWLG9CQUFvQixFQUNwQixNQUFNLEVBQ04sUUFBUSxFQUNSLEdBQUcsRUFDSCx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W50LlxuICAgKiBAcGFyYW0gdGltZW91dCBUaW1lb3V0IGluIHNlY29uZHMuXG4gICAqL1xuICBwcm90ZWN0ZWQgc2V0dXBUaW1lcih0aW1lb3V0OiBudW1iZXIpIHtcbiAgICB0aGlzLnRpbWVyJCA9IGludGVydmFsKDEwMDApLnBpcGUoXG4gICAgICB0YWtlKHRpbWVvdXQpLFxuICAgICAgbWFwKCgpID0+IDEpLFxuICAgICAgc2NhbigoYWNjLCBuKSA9PiBhY2MgKyBuKSxcbiAgICAgIHRhcChjb3VudCA9PiB7XG4gICAgICAgIGlmIChjb3VudCA9PT0gdGltZW91dCkge1xuICAgICAgICAgIHRoaXMudGltZW91dCQubmV4dCh0cnVlKTtcbiAgICAgICAgfVxuICAgICAgfSlcbiAgICApO1xuICB9XG5cbiAgLyoqXG4gICAqIFNldHVwIHBpbmcuXG4gICAqXG4gICAqIFBpbmdzIGV2ZXJ5IHBpbmctc2Vjb25kcyBvbmx5IGlmIGlzIG5vdCB0aW1lb3V0LlxuICAgKiBAcGFyYW0gcGluZ1xuICAgKi9cbiAgcHJvdGVjdGVkIHNldHVwUGluZyhwaW5nOiBudW1iZXIpIHtcbiAgICB0aGlzLnBpbmckID0gaW50ZXJ2YWwocGluZyAqIDEwMDApLnBpcGUoXG4gICAgICBmaWx0ZXIoKCkgPT4gIXRoaXMuaXNUaW1lb3V0KVxuICAgICk7XG4gIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdXNlci1pZGxlLyIsInNvdXJjZXMiOlsibGliL2FuZ3VsYXItdXNlci1pZGxlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxN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lZCA9IHRydWUpKSxcbiAgICAgICAgc3dpdGNoTWFwKCgpID0+XG4gICAgICAgICAgdGhpcy5fbmdab25lLnJ1bk91dHNpZGVBbmd1bGFyKCgpID0+XG4gICAgICAgICAgICBpbnRlcnZhbCgxMDAwKS5waXBlKFxuICAgICAgICAgICAgICB0YWtlVW50aWwoXG4gICAgICAgICAgICAgICAgbWVyZ2UoXG4gICAgICAgICAgICAgICAgICB0aGlzLmFjdGl2aXR5RXZlbnRzJCxcbiAgICAgICAgICAgICAgICAgIHRpbWVyKHRoaXMuaWRsZSAqIDEwMDApLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgIHRhcCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5pc0luYWN0aXZpdHlUaW1lciA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy50aW1lclN0YXJ0JC5uZXh0KHRydWUpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgZmluYWxpemUoKCkgPT4gKHRoaXMuaXNJZGxlRGV0ZWN0ZWQgPSBmYWxzZSkpXG4gICAgICAgICAgICApXG4gICAgICAgICAgKVxuICAgICAgICApXG4gICAgICApXG4gICAgICAuc3Vic2NyaWJlKCk7XG5cbiAgICB0aGlzLnNldHVwVGltZXIodGhpcy50aW1lb3V0KTtcbiAgICB0aGlzLnNldHVwUGluZyh0aGlzLnBpbmcpO1xuICB9XG5cbiAgc3RvcFdhdGNoaW5nKCkge1xuICAgIHRoaXMuc3RvcFRpbWVyKCk7XG4gICAgaWYgKHRoaXMuaWRsZVN1YnNjcmlwdGlvbikge1xuICAgICAgdGhpcy5pZGxlU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7XG4gICAgfVxuICB9XG5cbiAgc3RvcFRpbWVyKCkge1xuICAgIHRoaXMuaXNJbmFjdGl2aXR5V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WQgc2V0dXBQaW5nKHBpbmc6IG51bWJlcikge1xuICAgIHRoaXMucGluZyQgPSBpbnRlcnZhbChwaW5nICogMTAwMCkucGlwZShmaWx0ZXIoKCkgPT4gIXRoaXMuaXNUaW1lb3V0KSk7XG4gIH1cbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -11,3 +11,2 @@ /* | ||
export { UserIdleModule } from './lib/angular-user-idle.module'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdXNlci1pZGxlLyIsInNvdXJjZXMiOlsicHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsZ0NBQWMsaUNBQWlDLENBQUM7QUFDaEQsK0JBQWMsZ0NBQWdDLENBQUM7QUFDL0MsK0JBQWMsZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGFuZ3VsYXItdXNlci1pZGxlXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci11c2VyLWlkbGUuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9hbmd1bGFyLXVzZXItaWRsZS5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci11c2VyLWlkbGUubW9kdWxlJztcbiJdfQ== |
@@ -1,2 +0,2 @@ | ||
import { Injectable, Optional, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { Injectable, Optional, NgZone, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { Subject, merge, fromEvent, from, interval, timer, of } from 'rxjs'; | ||
@@ -7,3 +7,3 @@ import { bufferTime, distinctUntilChanged, filter, finalize, map, scan, switchMap, take, takeUntil, tap } from 'rxjs/operators'; | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -15,3 +15,3 @@ class UserIdleConfig { | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -24,4 +24,6 @@ /** | ||
* @param {?} config | ||
* @param {?} _ngZone | ||
*/ | ||
constructor(config) { | ||
constructor(config, _ngZone) { | ||
this._ngZone = _ngZone; | ||
this.timerStart$ = new Subject(); | ||
@@ -62,5 +64,7 @@ this.timeout$ = new Subject(); | ||
this.idleSubscription = this.idle$ | ||
.pipe(bufferTime(5000), // Starting point of detecting of user's inactivity | ||
// Starting point of detecting of user's inactivity | ||
filter(arr => !arr.length && !this.isInactivityTimer), tap(() => this.isInactivityTimer = true), switchMap(() => interval(1000).pipe(takeUntil(merge(this.activityEvents$, timer(this.idle * 1000).pipe(tap(() => this.timerStart$.next(true))))), finalize(() => (this.isInactivityTimer = false))))) | ||
.pipe(bufferTime(500), // Starting point of detecting of user's inactivity | ||
filter(arr => !arr.length && !this.isIdleDetected && !this.isInactivityTimer), tap(() => (this.isIdleDetected = true)), switchMap(() => this._ngZone.runOutsideAngular(() => interval(1000).pipe(takeUntil(merge(this.activityEvents$, timer(this.idle * 1000).pipe(tap(() => { | ||
this.isInactivityTimer = true; | ||
this.timerStart$.next(true); | ||
})))), finalize(() => (this.isIdleDetected = false)))))) | ||
.subscribe(); | ||
@@ -83,2 +87,3 @@ this.setupTimer(this.timeout); | ||
stopTimer() { | ||
this.isInactivityTimer = false; | ||
this.timerStart$.next(false); | ||
@@ -105,3 +110,3 @@ } | ||
onTimeout() { | ||
return this.timeout$.pipe(filter(timeout => !!timeout), tap(() => this.isTimeout = true), map(() => true)); | ||
return this.timeout$.pipe(filter(timeout => !!timeout), tap(() => (this.isTimeout = true)), map(() => true)); | ||
} | ||
@@ -139,5 +144,25 @@ /** | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
setCustomActivityEvents(customEvents) { | ||
if (this.idleSubscription && !this.idleSubscription.closed) { | ||
console.error('Call stopWatching() before set custom activity events'); | ||
return; | ||
} | ||
this.activityEvents$ = customEvents; | ||
} | ||
/** | ||
* Setup timer. | ||
* | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -147,7 +172,9 @@ * @return {?} | ||
setupTimer(timeout) { | ||
this.timer$ = interval(1000).pipe(take(timeout), map(() => 1), scan((acc, n) => acc + n), tap(count => { | ||
if (count === timeout) { | ||
this.timeout$.next(true); | ||
} | ||
})); | ||
this._ngZone.runOutsideAngular(() => { | ||
this.timer$ = interval(1000).pipe(take(timeout), map(() => 1), scan((acc, n) => acc + n), tap(count => { | ||
if (count === timeout) { | ||
this.timeout$.next(true); | ||
} | ||
})); | ||
}); | ||
} | ||
@@ -158,2 +185,3 @@ /** | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -173,9 +201,10 @@ * @return {?} | ||
UserIdleService.ctorParameters = () => [ | ||
{ type: UserIdleConfig, decorators: [{ type: Optional },] }, | ||
{ type: UserIdleConfig, decorators: [{ type: Optional }] }, | ||
{ type: NgZone } | ||
]; | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(inject(UserIdleConfig, 8)); }, token: UserIdleService, providedIn: "root" }); | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(inject(UserIdleConfig, 8), inject(NgZone)); }, token: UserIdleService, providedIn: "root" }); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -204,3 +233,3 @@ class UserIdleModule { | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -210,3 +239,3 @@ | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -216,2 +245,2 @@ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuanMubWFwIiwic291cmNlcyI6WyJuZzovL2FuZ3VsYXItdXNlci1pZGxlL2xpYi9hbmd1bGFyLXVzZXItaWRsZS5jb25maWcudHMiLCJuZzovL2FuZ3VsYXItdXNlci1pZGxlL2xpYi9hbmd1bGFyLXVzZXItaWRsZS5zZXJ2aWNlLnRzIiwibmc6Ly9hbmd1bGFyLXVzZXItaWRsZS9saWIvYW5ndWxhci11c2VyLWlkbGUubW9kdWxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBVc2VySWRsZUNvbmZpZyB7XG4gIC8qKlxuICAgKiBJZGxlIHZhbHVlIGluIHNlY29uZHMuXG4gICAqL1xuICBpZGxlOiBudW1iZXI7XG4gIC8qKlxuICAgKiBUaW1lb3V0IHZhbHVlIGluIHNlY29uZHMuXG4gICAqL1xuICB0aW1lb3V0OiBudW1iZXI7XG4gIC8qKlxuICAgKiB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ICAgaWYgKGNvbmZpZy50aW1lb3V0KSB7XG4gICAgICB0aGlzLnRpbWVvdXQgPSBjb25maWcudGltZW91dDtcbiAgICB9XG4gIH1cblxuICAvKipcbiAgICogU2V0dXAgdGltZXIuXG4gICAqXG4gICAqIENvdW50cyBldmVyeSBzZWNvbmRzIGFuZCByZXR1cm4gbisxIGFuZCBmaXJlIHRpbWVvdXQgZm9yIGxhc3QgY291bnQuXG4gICAqIEBwYXJhbSB0aW1lb3V0IFRpbWVvdXQgaW4gc2Vjb25kcy5cbiAgICovXG4gIHByb3RlY3RlZCBzZXR1cFRpbWVyKHRpbWVvdXQ6IG51bWJlcikge1xuICAgIHRoaXMudGltZXIkID0gaW50ZXJ2YWwoMTAwMCkucGlwZShcbiAgICAgIHRha2UodGltZW91dCksXG4gICAgICBtYXAoKCkgPT4gMSksXG4gICAgICBzY2FuKChhY2MsIG4pID0+IGFjYyArIG4pLFxuICAgICAgdGFwKGNvdW50ID0+IHtcbiAgICAgICAgaWYgKGNvdW50ID09PSB0aW1lb3V0KSB7XG4gICAgICAgICAgdGhpcy50aW1lb3V0JC5uZXh0KHRydWUpO1xuICAgICAgICB9XG4gICAgICB9KVxuICAgICk7XG4gIH1cblxuICAvKipcbiAgICogU2V0dXAgcGluZy5cbiAgICpcbiAgICogUGluZ3MgZXZlcnkgcGluZy1zZWNvbmRzIG9ubHkgaWYgaXMgbm90IHRpbWVvdXQuXG4gICAqIEBwYXJhbSBwaW5nXG4gICAqL1xuICBwcm90ZWN0ZWQgc2V0dXBQaW5nKHBpbmc6IG51bWJlcikge1xuICAgIHRoaXMucGluZyQgPSBpbnRlcnZhbChwaW5nICogMTAwMCkucGlwZShcbiAgICAgIGZpbHRlcigoKSA9PiAhdGhpcy5pc1RpbWVvdXQpXG4gICAgKTtcbiAgfVxufVxuIiwiaW1wb3J0IHsgTW9kdWxlV2l0aFByb3ZpZGVycywgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB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EZXRlY3RlZCAmJiAhdGhpcy5pc0luYWN0aXZpdHlUaW1lclxuICAgICAgICApLFxuICAgICAgICB0YXAoKCkgPT4gKHRoaXMuaXNJZGxlRGV0ZWN0ZWQgPSB0cnVlKSksXG4gICAgICAgIHN3aXRjaE1hcCgoKSA9PlxuICAgICAgICAgIHRoaXMuX25nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoKSA9PlxuICAgICAgICAgICAgaW50ZXJ2YWwoMTAwMCkucGlwZShcbiAgICAgICAgICAgICAgdGFrZVVudGlsKFxuICAgICAgICAgICAgICAgIG1lcmdlKFxuICAgICAgICAgICAgICAgICAgdGhpcy5hY3Rpdml0eUV2ZW50cyQsXG4gICAgICAgICAgICAgICAgICB0aW1lcih0aGlzLmlkbGUgKiAxMDAwKS5waXBlKFxuICAgICAgICAgICAgICAgICAgICB0YXAoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaXNJbmFjdGl2aXR5VGltZXIgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMudGltZXJTdGFydCQubmV4dCh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIGZpbmFsaXplKCgpID0+ICh0aGlzLmlzSWRsZURldGVjdGVkID0gZmFsc2UpKVxuICAgICAgICAgICAgKVxuICAgICAgICAgIClcbiAgICAgICAgKVxuICAgICAgKVxuICAgICAgLnN1YnNjcmliZSgpO1xuXG4gICAgdGhpcy5zZXR1cFRpbWVyKHRoaXMudGltZW91dCk7XG4gICAgdGhpcy5zZXR1cFBpbmcodGhpcy5waW5nKTtcbiAgfVxuXG4gIHN0b3BXYXRjaGluZygpIHtcbiAgICB0aGlzLnN0b3BUaW1lcigpO1xuICAgIGlmICh0aGlzLmlkbGVTdWJzY3JpcHRpb24pIHtcbiAgICAgIHRoaXMuaWRsZVN1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UFDO0tBQ0o7Ozs7Ozs7OztJQVFTLFNBQVMsQ0FBQyxJQUFZO1FBQzlCLElBQUksQ0FBQyxLQUFLLEdBQUcsUUFBUSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztLQUN4RTs7O1lBdk5GLFVBQVUsU0FBQztnQkFDVixVQUFVLEVBQUUsTUFBTTthQUNuQjs7OztZQVBRLGNBQWMsdUJBK0NSLFFBQVE7WUF2RVEsTUFBTTs7Ozs7Ozs7QUNBckMsTUFNYSxjQUFjOzs7OztJQUN6QixPQUFPLE9BQU8sQ0FBQyxNQUFzQjtRQUNuQyxPQUFPO1lBQ0wsUUFBUSxFQUFFLGNBQWM7WUFDeEIsU0FBUyxFQUFFO2dCQUNULEVBQUMsT0FBTyxFQUFFLGNBQWMsRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFDO2FBQzVDO1NBQ0YsQ0FBQztLQUNIOzs7WUFYRixRQUFRLFNBQUM7Z0JBQ1IsT0FBTyxFQUFFLEVBQUU7YUFDWjs7Ozs7Ozs7Ozs7Ozs7OyJ9 |
@@ -1,2 +0,2 @@ | ||
import { Injectable, Optional, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { Injectable, Optional, NgZone, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { Subject, merge, fromEvent, from, interval, timer, of } from 'rxjs'; | ||
@@ -7,3 +7,3 @@ import { bufferTime, distinctUntilChanged, filter, finalize, map, scan, switchMap, take, takeUntil, tap } from 'rxjs/operators'; | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -18,3 +18,3 @@ var UserIdleConfig = /** @class */ (function () { | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -25,3 +25,4 @@ /** | ||
var UserIdleService = /** @class */ (function () { | ||
function UserIdleService(config) { | ||
function UserIdleService(config, _ngZone) { | ||
this._ngZone = _ngZone; | ||
this.timerStart$ = new Subject(); | ||
@@ -70,6 +71,10 @@ this.timeout$ = new Subject(); | ||
this.idleSubscription = this.idle$ | ||
.pipe(bufferTime(5000), // Starting point of detecting of user's inactivity | ||
// Starting point of detecting of user's inactivity | ||
filter(function (arr) { return !arr.length && !_this.isInactivityTimer; }), tap(function () { return _this.isInactivityTimer = true; }), switchMap(function () { | ||
return interval(1000).pipe(takeUntil(merge(_this.activityEvents$, timer(_this.idle * 1000).pipe(tap(function () { return _this.timerStart$.next(true); })))), finalize(function () { return (_this.isInactivityTimer = false); })); | ||
.pipe(bufferTime(500), // Starting point of detecting of user's inactivity | ||
filter(function (arr) { return !arr.length && !_this.isIdleDetected && !_this.isInactivityTimer; }), tap(function () { return (_this.isIdleDetected = true); }), switchMap(function () { | ||
return _this._ngZone.runOutsideAngular(function () { | ||
return interval(1000).pipe(takeUntil(merge(_this.activityEvents$, timer(_this.idle * 1000).pipe(tap(function () { | ||
_this.isInactivityTimer = true; | ||
_this.timerStart$.next(true); | ||
})))), finalize(function () { return (_this.isIdleDetected = false); })); | ||
}); | ||
})) | ||
@@ -99,2 +104,3 @@ .subscribe(); | ||
function () { | ||
this.isInactivityTimer = false; | ||
this.timerStart$.next(false); | ||
@@ -140,3 +146,3 @@ }; | ||
var _this = this; | ||
return this.timeout$.pipe(filter(function (timeout) { return !!timeout; }), tap(function () { return _this.isTimeout = true; }), map(function () { return true; })); | ||
return this.timeout$.pipe(filter(function (timeout) { return !!timeout; }), tap(function () { return (_this.isTimeout = true); }), map(function () { return true; })); | ||
}; | ||
@@ -186,2 +192,44 @@ /** | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
*/ | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
UserIdleService.prototype.setCustomActivityEvents = /** | ||
* Set custom activity events | ||
* | ||
* @param {?} customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
* @return {?} | ||
*/ | ||
function (customEvents) { | ||
if (this.idleSubscription && !this.idleSubscription.closed) { | ||
console.error('Call stopWatching() before set custom activity events'); | ||
return; | ||
} | ||
this.activityEvents$ = customEvents; | ||
}; | ||
/** | ||
* Setup timer. | ||
@@ -196,2 +244,3 @@ * | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -204,2 +253,3 @@ * @return {?} | ||
* Counts every seconds and return n+1 and fire timeout for last count. | ||
* @protected | ||
* @param {?} timeout Timeout in seconds. | ||
@@ -210,7 +260,9 @@ * @return {?} | ||
var _this = this; | ||
this.timer$ = interval(1000).pipe(take(timeout), map(function () { return 1; }), scan(function (acc, n) { return acc + n; }), tap(function (count) { | ||
if (count === timeout) { | ||
_this.timeout$.next(true); | ||
} | ||
})); | ||
this._ngZone.runOutsideAngular(function () { | ||
_this.timer$ = interval(1000).pipe(take(timeout), map(function () { return 1; }), scan(function (acc, n) { return acc + n; }), tap(function (count) { | ||
if (count === timeout) { | ||
_this.timeout$.next(true); | ||
} | ||
})); | ||
}); | ||
}; | ||
@@ -227,2 +279,3 @@ /** | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -235,2 +288,3 @@ * @return {?} | ||
* Pings every ping-seconds only if is not timeout. | ||
* @protected | ||
* @param {?} ping | ||
@@ -250,5 +304,6 @@ * @return {?} | ||
UserIdleService.ctorParameters = function () { return [ | ||
{ type: UserIdleConfig, decorators: [{ type: Optional },] }, | ||
{ type: UserIdleConfig, decorators: [{ type: Optional }] }, | ||
{ type: NgZone } | ||
]; }; | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(inject(UserIdleConfig, 8)); }, token: UserIdleService, providedIn: "root" }); | ||
/** @nocollapse */ UserIdleService.ngInjectableDef = defineInjectable({ factory: function UserIdleService_Factory() { return new UserIdleService(inject(UserIdleConfig, 8), inject(NgZone)); }, token: UserIdleService, providedIn: "root" }); | ||
return UserIdleService; | ||
@@ -259,3 +314,3 @@ }()); | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -291,3 +346,3 @@ var UserIdleModule = /** @class */ (function () { | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -297,3 +352,3 @@ | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -303,2 +358,2 @@ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci11c2VyLWlkbGUuanMubWFwIiwic291cmNlcyI6WyJuZzovL2FuZ3VsYXItdXNlci1pZGxlL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1hcCgoKSA9PlxuICAgICAgICAgIHRoaXMuX25nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoKSA9PlxuICAgICAgICAgICAgaW50ZXJ2YWwoMTAwMCkucGlwZShcbiAgICAgICAgICAgICAgdGFrZVVudGlsKFxuICAgICAgICAgICAgICAgIG1lcmdlKFxuICAgICAgICAgICAgICAgICAgdGhpcy5hY3Rpdml0eUV2ZW50cyQsXG4gICAgICAgICAgICAgICAgICB0aW1lcih0aGlzLmlkbGUgKiAxMDAwKS5waXBlKFxuICAgICAgICAgICAgICAgICAgICB0YXAoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaXNJbmFjdGl2aXR5VGltZXIgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgIHRoaXMudGltZXJTdGFydCQubmV4dCh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIGZpbmFsaXplKCgpID0+ICh0aGlzLmlzSWRsZURldGVjdGVkID0gZmFsc2UpKVxuICAgICAgICAgICAgKVxuICAgICAgICAgIClcbiAgICAgICAgKVxuICAgICAgKVxuICAgICAgLnN1YnNjcmliZSgpO1xuXG4gICAgdGhpcy5zZXR1cFRpbWVyKHRoaXMudGltZW91dCk7XG4gICAgdGhpcy5zZXR1cFBpbmcodGhpcy5waW5nKTtcbiAgfVxuXG4gIHN0b3BXYXRjaGluZygpIHtcbiAgICB0aGlzLnN0b3BUaW1lcigpO1xuICAgIGlmICh0aGlzLmlkbGVTdWJzY3JpcHRpb24pIHtcbiAgICAgIHRoaXMuaWRsZVN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICAgIH1cbiAgfVxuXG4gIHN0b3BUaW1lcigpIHtcbiAgICB0aGlzLmlzSW5hY3Rpdml0eVRpbWVyID0gZmFsc2U7XG4gICAgdGhpcy50aW1lclN0YX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'@angular/core'; | ||
import { Observable, Subject, Subscription } from 'rxjs'; | ||
@@ -7,2 +8,3 @@ import { UserIdleConfig } from './angular-user-idle.config'; | ||
export declare class UserIdleService { | ||
private _ngZone; | ||
ping$: Observable<any>; | ||
@@ -40,4 +42,5 @@ /** | ||
protected isInactivityTimer: boolean; | ||
protected isIdleDetected: boolean; | ||
protected idleSubscription: Subscription; | ||
constructor(config: UserIdleConfig); | ||
constructor(config: UserIdleConfig, _ngZone: NgZone); | ||
/** | ||
@@ -65,2 +68,14 @@ * Start watching for user idle and setup timer and ping. | ||
/** | ||
* Set custom activity events | ||
* | ||
* @param customEvents Example: merge( | ||
* fromEvent(window, 'mousemove'), | ||
* fromEvent(window, 'resize'), | ||
* fromEvent(document, 'keydown'), | ||
* fromEvent(document, 'touchstart'), | ||
* fromEvent(document, 'touchend') | ||
* ) | ||
*/ | ||
setCustomActivityEvents(customEvents: Observable<any>): void; | ||
/** | ||
* Setup timer. | ||
@@ -67,0 +82,0 @@ * |
{ | ||
"name": "angular-user-idle", | ||
"version": "2.0.0", | ||
"description": "User's idle service for Angular 6", | ||
"version": "2.1.1", | ||
"description": "User's idle service for Angular 6+", | ||
"repository": { | ||
@@ -12,4 +12,4 @@ "type": "git", | ||
"peerDependencies": { | ||
"@angular/common": "^6.0.0-rc.0 || ^6.0.0", | ||
"@angular/core": "^6.0.0-rc.0 || ^6.0.0", | ||
"@angular/common": "^6.0.0 || ^7.0.0", | ||
"@angular/core": "^6.0.0 || ^7.0.0", | ||
"rxjs": "^6.0.0" | ||
@@ -16,0 +16,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
187083
1812
0