@ngrx/effects
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -51,3 +51,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var /** @type {?} */ dispatch = true; | ||
if (entry.args.length) { | ||
if (entry.args && entry.args.length) { | ||
dispatch = !!entry.args[0].dispatch; | ||
@@ -169,2 +169,3 @@ } | ||
/** | ||
* @template V2 | ||
* @param {...?} allowedTypes | ||
@@ -171,0 +172,0 @@ * @return {?} |
@@ -42,3 +42,3 @@ import { ScannedActionsSubject, Store, compose } from '@ngrx/store'; | ||
let /** @type {?} */ dispatch = true; | ||
if (entry.args.length) { | ||
if (entry.args && entry.args.length) { | ||
dispatch = !!entry.args[0].dispatch; | ||
@@ -159,2 +159,3 @@ } | ||
/** | ||
* @template V2 | ||
* @param {...?} allowedTypes | ||
@@ -161,0 +162,0 @@ * @return {?} |
@@ -8,5 +8,5 @@ import { Actions } from '@ngrx/effects'; | ||
if (typeof factoryOrSource === 'function') { | ||
return defer(factoryOrSource); | ||
return new Actions(defer(factoryOrSource)); | ||
} | ||
return factoryOrSource; | ||
return new Actions(factoryOrSource); | ||
}, | ||
@@ -13,0 +13,0 @@ }; |
@@ -9,5 +9,5 @@ import { Actions } from '@ngrx/effects'; | ||
if (typeof factoryOrSource === 'function') { | ||
return defer(factoryOrSource); | ||
return new Actions(defer(factoryOrSource)); | ||
} | ||
return factoryOrSource; | ||
return new Actions(factoryOrSource); | ||
}, | ||
@@ -14,0 +14,0 @@ }; |
@@ -12,5 +12,5 @@ (function (global, factory) { | ||
if (typeof factoryOrSource === 'function') { | ||
return rxjs_observable_defer.defer(factoryOrSource); | ||
return new _ngrx_effects.Actions(rxjs_observable_defer.defer(factoryOrSource)); | ||
} | ||
return factoryOrSource; | ||
return new _ngrx_effects.Actions(factoryOrSource); | ||
}, | ||
@@ -17,0 +17,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@ngrx/effects"),require("rxjs/observable/defer")):"function"==typeof define&&define.amd?define(["exports","@ngrx/effects","rxjs/observable/defer"],r):r((e.ngrx=e.ngrx||{},e.ngrx.effects=e.ngrx.effects||{},e.ngrx.effects.testing=e.ngrx.effects.testing||{}),e.ngrx.effects,e.Rx.Observable.defer)}(this,function(e,r,t){"use strict";function f(e){return{provide:r.Actions,useFactory:function(){return"function"==typeof e?t.defer(e):e}}}e.provideMockActions=f,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@ngrx/effects"),require("rxjs/observable/defer")):"function"==typeof define&&define.amd?define(["exports","@ngrx/effects","rxjs/observable/defer"],n):n((e.ngrx=e.ngrx||{},e.ngrx.effects=e.ngrx.effects||{},e.ngrx.effects.testing=e.ngrx.effects.testing||{}),e.ngrx.effects,e.Rx.Observable.defer)}(this,function(e,n,t){"use strict";function r(e){return{provide:n.Actions,useFactory:function(){return"function"==typeof e?new n.Actions(t.defer(e)):new n.Actions(e)}}}e.provideMockActions=r,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=./dist/effects/bundles/effects-testing.umd.min.js.map |
@@ -44,3 +44,3 @@ (function (global, factory) { | ||
var /** @type {?} */ dispatch = true; | ||
if (entry.args.length) { | ||
if (entry.args && entry.args.length) { | ||
dispatch = !!entry.args[0].dispatch; | ||
@@ -162,2 +162,3 @@ } | ||
/** | ||
* @template V2 | ||
* @param {...?} allowedTypes | ||
@@ -164,0 +165,0 @@ * @return {?} |
@@ -1,2 +0,2 @@ | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@ngrx/store"),require("rxjs/observable/merge"),require("rxjs/operator/ignoreElements"),require("rxjs/operator/materialize"),require("rxjs/operator/map"),require("@angular/core"),require("rxjs/Observable"),require("rxjs/operator/filter"),require("rxjs/operator/groupBy"),require("rxjs/operator/mergeMap"),require("rxjs/operator/exhaustMap"),require("rxjs/operator/dematerialize"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","rxjs/observable/merge","rxjs/operator/ignoreElements","rxjs/operator/materialize","rxjs/operator/map","@angular/core","rxjs/Observable","rxjs/operator/filter","rxjs/operator/groupBy","rxjs/operator/mergeMap","rxjs/operator/exhaustMap","rxjs/operator/dematerialize","rxjs/Subject"],e):e((r.ngrx=r.ngrx||{},r.ngrx.effects=r.ngrx.effects||{}),r.ngrx.store,r.Rx.Observable,r.Rx.Observable.prototype,r.rxjs_operator_materialize,r.rxjs_operator_map,r.ng.core,r.Rx,r.Rx.Observable.prototype,r.rxjs_operator_groupBy,r.rxjs_operator_mergeMap,r.rxjs_operator_exhaustMap,r.rxjs_operator_dematerialize,r.rxjs_Subject)}(this,function(r,e,t,o,n,c,a,i,s,u,f,p,l,d){"use strict";function y(r){return!!r.propDecorators}function g(r){var e=r.propDecorators;return Object.keys(e).reduce(function(r,t){return r.concat(x(e[t],t))},[])}function x(r,e){return r.filter(function(r){return r.type===v}).map(function(r){var t=!0;return r.args.length&&(t=!!r.args[0].dispatch),{propertyName:e,dispatch:t}})}function j(r){return y(r.constructor)?g(r.constructor):z.hasOwnMetadata(R,r)?z.getOwnMetadata(R,r):[]}function h(r,e){z.defineMetadata(R,e,r)}function v(r){var e=(void 0===r?{dispatch:!0}:r).dispatch;return function(r,t){var o=j(r),n={propertyName:t,dispatch:e};h(r,o.concat([n]))}}function m(r){return Object.getPrototypeOf(r)}function b(r){var e=m(r);return A in e&&"function"==typeof e[A]}function E(r){var e=m(r).constructor.name,a=k(r).map(function(t){var a=t.propertyName,i=t.dispatch,s="function"==typeof r[a]?r[a]():r[a];if(!1===i)return o.ignoreElements.call(s);var u=n.materialize.call(s);return c.map.call(u,function(t){return{effect:r[a],notification:t,propertyName:a,sourceName:e,sourceInstance:r}})});return t.merge.apply(void 0,a)}function _(r){var e=E(r);return b(r)?r.ngrxOnRunEffects(e):e}function O(r,e){M(r,e),S(r,e)}function M(r,e){if("E"===r.notification.kind){var t="Effect "+q(r)+" threw an error";e.report(t,{Source:r.sourceInstance,Effect:r.effect,Error:r.notification.error,Notification:r.notification})}}function S(r,e){if("N"===r.notification.kind){var t=r.notification.value;if(!I(t)){var o="Effect "+q(r)+" dispatched an invalid action";e.report(o,{Source:r.sourceInstance,Effect:r.effect,Dispatched:t,Notification:r.notification})}}}function I(r){return r&&r.type&&"string"==typeof r.type}function q(r){var e=r.propertyName,t=r.sourceInstance;return'"'+r.sourceName+"."+e+("function"==typeof t[e]?"()":"")+'"'}function N(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r}function P(r){return r.payload}var w=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t])};return function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),R="@ngrx/effects",z=Reflect,k=e.compose(j,m),A="ngrxOnRunEffects",B=function(r){function e(e){var t=r.call(this)||this;return e&&(t.source=e),t}return w(e,r),e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.ofType=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return s.filter.call(this,function(e){return r.some(function(r){return r===e.type})})},e}(i.Observable);B.decorators=[{type:a.Injectable}],B.ctorParameters=function(){return[{type:i.Observable,decorators:[{type:a.Inject,args:[e.ScannedActionsSubject]}]}]};var T=(new a.InjectionToken("ngrx/effects: Immediate Effects"),new a.InjectionToken("ngrx/effects: Root Effects")),D=new a.InjectionToken("ngrx/effects: Feature Effects"),F=new a.InjectionToken("Browser Console"),C=function(){function r(r){this.console=r}return r.prototype.report=function(r,e){this.console.group(r);for(var t in e)this.console.error(t+":",e[t]);this.console.groupEnd()},r}();C.decorators=[{type:a.Injectable}],C.ctorParameters=function(){return[{type:void 0,decorators:[{type:a.Inject,args:[F]}]}]};var V=function(r){function e(e){var t=r.call(this)||this;return t.errorReporter=e,t}return w(e,r),e.prototype.addEffects=function(r){this.next(r)},e.prototype.toActions=function(){var r=this;return f.mergeMap.call(u.groupBy.call(this,m),function(e){return l.dematerialize.call(c.map.call(p.exhaustMap.call(e,_),function(e){return O(e,r.errorReporter),e.notification}))})},e}(d.Subject);V.decorators=[{type:a.Injectable}],V.ctorParameters=function(){return[{type:C}]};var G=function(){function r(r,e){this.effectSources=r,this.store=e,this.effectsSubscription=null}return r.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},r.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},r}();G.decorators=[{type:a.Injectable}],G.ctorParameters=function(){return[{type:V},{type:e.Store}]};var H=function(){function r(r,e,t){this.sources=r,e.start(),t.forEach(function(e){return r.addEffects(e)})}return r.prototype.addEffects=function(r){this.sources.addEffects(r)},r}();H.decorators=[{type:a.NgModule,args:[{}]}],H.ctorParameters=function(){return[{type:V},{type:G},{type:Array,decorators:[{type:a.Inject,args:[T]}]}]};var J=function(){function r(r,e){this.root=r,e.forEach(function(e){return e.forEach(function(e){return r.addEffects(e)})})}return r}();J.decorators=[{type:a.NgModule,args:[{}]}],J.ctorParameters=function(){return[{type:H},{type:Array,decorators:[{type:a.Inject,args:[D]}]}]};var K=function(){function r(){}return r.forFeature=function(r){return{ngModule:J,providers:[r,{provide:D,multi:!0,deps:r,useFactory:N}]}},r.forRoot=function(r){return{ngModule:H,providers:[G,V,C,B,r,{provide:T,deps:r,useFactory:N},{provide:F,useValue:console}]}},r}();K.decorators=[{type:a.NgModule,args:[{}]}],K.ctorParameters=function(){return[]},r.Effect=v,r.mergeEffects=E,r.Actions=B,r.EffectsModule=K,r.EffectSources=V,r.toPayload=P,r.ɵb=J,r.ɵa=N,r.ɵf=H,r.ɵh=G,r.ɵg=C,r.ɵe=F,r.ɵd=D,r.ɵc=T,Object.defineProperty(r,"__esModule",{value:!0})}); | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@ngrx/store"),require("rxjs/observable/merge"),require("rxjs/operator/ignoreElements"),require("rxjs/operator/materialize"),require("rxjs/operator/map"),require("@angular/core"),require("rxjs/Observable"),require("rxjs/operator/filter"),require("rxjs/operator/groupBy"),require("rxjs/operator/mergeMap"),require("rxjs/operator/exhaustMap"),require("rxjs/operator/dematerialize"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","rxjs/observable/merge","rxjs/operator/ignoreElements","rxjs/operator/materialize","rxjs/operator/map","@angular/core","rxjs/Observable","rxjs/operator/filter","rxjs/operator/groupBy","rxjs/operator/mergeMap","rxjs/operator/exhaustMap","rxjs/operator/dematerialize","rxjs/Subject"],e):e((r.ngrx=r.ngrx||{},r.ngrx.effects=r.ngrx.effects||{}),r.ngrx.store,r.Rx.Observable,r.Rx.Observable.prototype,r.rxjs_operator_materialize,r.rxjs_operator_map,r.ng.core,r.Rx,r.Rx.Observable.prototype,r.rxjs_operator_groupBy,r.rxjs_operator_mergeMap,r.rxjs_operator_exhaustMap,r.rxjs_operator_dematerialize,r.rxjs_Subject)}(this,function(r,e,t,o,n,c,a,i,s,u,f,p,l,d){"use strict";function y(r){return!!r.propDecorators}function g(r){var e=r.propDecorators;return Object.keys(e).reduce(function(r,t){return r.concat(x(e[t],t))},[])}function x(r,e){return r.filter(function(r){return r.type===v}).map(function(r){var t=!0;return r.args&&r.args.length&&(t=!!r.args[0].dispatch),{propertyName:e,dispatch:t}})}function j(r){return y(r.constructor)?g(r.constructor):z.hasOwnMetadata(R,r)?z.getOwnMetadata(R,r):[]}function h(r,e){z.defineMetadata(R,e,r)}function v(r){var e=(void 0===r?{dispatch:!0}:r).dispatch;return function(r,t){var o=j(r),n={propertyName:t,dispatch:e};h(r,o.concat([n]))}}function m(r){return Object.getPrototypeOf(r)}function b(r){var e=m(r);return A in e&&"function"==typeof e[A]}function E(r){var e=m(r).constructor.name,a=k(r).map(function(t){var a=t.propertyName,i=t.dispatch,s="function"==typeof r[a]?r[a]():r[a];if(!1===i)return o.ignoreElements.call(s);var u=n.materialize.call(s);return c.map.call(u,function(t){return{effect:r[a],notification:t,propertyName:a,sourceName:e,sourceInstance:r}})});return t.merge.apply(void 0,a)}function _(r){var e=E(r);return b(r)?r.ngrxOnRunEffects(e):e}function O(r,e){M(r,e),S(r,e)}function M(r,e){if("E"===r.notification.kind){var t="Effect "+q(r)+" threw an error";e.report(t,{Source:r.sourceInstance,Effect:r.effect,Error:r.notification.error,Notification:r.notification})}}function S(r,e){if("N"===r.notification.kind){var t=r.notification.value;if(!I(t)){var o="Effect "+q(r)+" dispatched an invalid action";e.report(o,{Source:r.sourceInstance,Effect:r.effect,Dispatched:t,Notification:r.notification})}}}function I(r){return r&&r.type&&"string"==typeof r.type}function q(r){var e=r.propertyName,t=r.sourceInstance;return'"'+r.sourceName+"."+e+("function"==typeof t[e]?"()":"")+'"'}function N(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r}function P(r){return r.payload}var w=function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t])};return function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),R="@ngrx/effects",z=Reflect,k=e.compose(j,m),A="ngrxOnRunEffects",B=function(r){function e(e){var t=r.call(this)||this;return e&&(t.source=e),t}return w(e,r),e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.ofType=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return s.filter.call(this,function(e){return r.some(function(r){return r===e.type})})},e}(i.Observable);B.decorators=[{type:a.Injectable}],B.ctorParameters=function(){return[{type:i.Observable,decorators:[{type:a.Inject,args:[e.ScannedActionsSubject]}]}]};var T=(new a.InjectionToken("ngrx/effects: Immediate Effects"),new a.InjectionToken("ngrx/effects: Root Effects")),D=new a.InjectionToken("ngrx/effects: Feature Effects"),F=new a.InjectionToken("Browser Console"),C=function(){function r(r){this.console=r}return r.prototype.report=function(r,e){this.console.group(r);for(var t in e)this.console.error(t+":",e[t]);this.console.groupEnd()},r}();C.decorators=[{type:a.Injectable}],C.ctorParameters=function(){return[{type:void 0,decorators:[{type:a.Inject,args:[F]}]}]};var V=function(r){function e(e){var t=r.call(this)||this;return t.errorReporter=e,t}return w(e,r),e.prototype.addEffects=function(r){this.next(r)},e.prototype.toActions=function(){var r=this;return f.mergeMap.call(u.groupBy.call(this,m),function(e){return l.dematerialize.call(c.map.call(p.exhaustMap.call(e,_),function(e){return O(e,r.errorReporter),e.notification}))})},e}(d.Subject);V.decorators=[{type:a.Injectable}],V.ctorParameters=function(){return[{type:C}]};var G=function(){function r(r,e){this.effectSources=r,this.store=e,this.effectsSubscription=null}return r.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},r.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},r}();G.decorators=[{type:a.Injectable}],G.ctorParameters=function(){return[{type:V},{type:e.Store}]};var H=function(){function r(r,e,t){this.sources=r,e.start(),t.forEach(function(e){return r.addEffects(e)})}return r.prototype.addEffects=function(r){this.sources.addEffects(r)},r}();H.decorators=[{type:a.NgModule,args:[{}]}],H.ctorParameters=function(){return[{type:V},{type:G},{type:Array,decorators:[{type:a.Inject,args:[T]}]}]};var J=function(){function r(r,e){this.root=r,e.forEach(function(e){return e.forEach(function(e){return r.addEffects(e)})})}return r}();J.decorators=[{type:a.NgModule,args:[{}]}],J.ctorParameters=function(){return[{type:H},{type:Array,decorators:[{type:a.Inject,args:[D]}]}]};var K=function(){function r(){}return r.forFeature=function(r){return{ngModule:J,providers:[r,{provide:D,multi:!0,deps:r,useFactory:N}]}},r.forRoot=function(r){return{ngModule:H,providers:[G,V,C,B,r,{provide:T,deps:r,useFactory:N},{provide:F,useValue:console}]}},r}();K.decorators=[{type:a.NgModule,args:[{}]}],K.ctorParameters=function(){return[]},r.Effect=v,r.mergeEffects=E,r.Actions=B,r.EffectsModule=K,r.EffectSources=V,r.toPayload=P,r.ɵb=J,r.ɵa=N,r.ɵf=H,r.ɵh=G,r.ɵg=C,r.ɵe=F,r.ɵd=D,r.ɵc=T,Object.defineProperty(r,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=./dist/effects/bundles/effects.umd.min.js.map |
{ | ||
"name": "@ngrx/effects", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Side effect model for @ngrx/store", | ||
@@ -5,0 +5,0 @@ "module": "@ngrx/effects.es5.js", |
@@ -7,3 +7,3 @@ import { Action } from '@ngrx/store'; | ||
lift<R>(operator: Operator<V, R>): Observable<R>; | ||
ofType(...allowedTypes: string[]): Actions<V>; | ||
ofType<V2 extends V = V>(...allowedTypes: string[]): Actions<V2>; | ||
} |
@@ -27,2 +27,3 @@ import { Injectable, Inject } from '@angular/core'; | ||
/** | ||
* @template V2 | ||
* @param {...?} allowedTypes | ||
@@ -29,0 +30,0 @@ * @return {?} |
@@ -29,3 +29,3 @@ import { compose } from '@ngrx/store'; | ||
let /** @type {?} */ dispatch = true; | ||
if (entry.args.length) { | ||
if (entry.args && entry.args.length) { | ||
dispatch = !!entry.args[0].dispatch; | ||
@@ -32,0 +32,0 @@ } |
@@ -8,5 +8,5 @@ import { Actions } from '@ngrx/effects'; | ||
if (typeof factoryOrSource === 'function') { | ||
return defer(factoryOrSource); | ||
return new Actions(defer(factoryOrSource)); | ||
} | ||
return factoryOrSource; | ||
return new Actions(factoryOrSource); | ||
}, | ||
@@ -13,0 +13,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
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
209760
2243