@ngrx/effects
Advanced tools
Comparing version 7.0.0-beta.0 to 7.0.0-beta.1
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -67,8 +67,2 @@ * License: MIT | ||
var onRunEffectsKey = 'ngrxOnRunEffects'; | ||
function isOnRunEffects(sourceInstance) { | ||
var source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
var __read = (undefined && undefined.__read) || function (o, n) { | ||
@@ -115,9 +109,2 @@ var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
} | ||
function resolveEffectSource(sourceInstance) { | ||
var mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
@@ -218,2 +205,5 @@ var __extends = (undefined && undefined.__extends) || (function () { | ||
var onIdentifyEffectsKey = 'ngrxOnIdentifyEffects'; | ||
var onRunEffectsKey = 'ngrxOnRunEffects'; | ||
var __extends$1 = (undefined && undefined.__extends) || (function () { | ||
@@ -256,3 +246,3 @@ var extendStatics = function (d, b) { | ||
var _this = this; | ||
return this.pipe(operators.groupBy(function (source) { return source; }), operators.mergeMap(function (source$) { | ||
return this.pipe(operators.groupBy(getSourceForInstance), operators.mergeMap(function (source$) { return source$.pipe(operators.groupBy(effectsInstance)); }), operators.mergeMap(function (source$) { | ||
return source$.pipe(operators.exhaustMap(resolveEffectSource), operators.map(function (output) { | ||
@@ -272,2 +262,20 @@ verifyOutput(output, _this.errorHandler); | ||
}(rxjs.Subject)); | ||
function effectsInstance(sourceInstance) { | ||
if (onIdentifyEffectsKey in sourceInstance && | ||
typeof sourceInstance[onIdentifyEffectsKey] === 'function') { | ||
return sourceInstance[onIdentifyEffectsKey](); | ||
} | ||
return ''; | ||
} | ||
function resolveEffectSource(sourceInstance) { | ||
var mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
function isOnRunEffects(sourceInstance) { | ||
var source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
@@ -274,0 +282,0 @@ var IMMEDIATE_EFFECTS = new core.InjectionToken('ngrx/effects: Immediate Effects'); |
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
* License: MIT | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@ngrx/store"),require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ngrx/effects",["exports","@ngrx/store","rxjs","rxjs/operators","@angular/core"],t):t((e.ngrx=e.ngrx||{},e.ngrx.effects={}),e["@ngrx/store"],e.rxjs,e.rxjs.operators,e.ng.core)}(this,function(e,t,r,n,o){"use strict";var c="__@ngrx/effects__";function f(e){return e.constructor.hasOwnProperty(c)?e.constructor[c]:[]}function i(e){return Object.getPrototypeOf(e)}function u(e){return t.compose(f,i)(e)}var a="ngrxOnRunEffects",s=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,c=r.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(n=c.next()).done;)f.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=c.return)&&r.call(c)}finally{if(o)throw o.error}}return f},p=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e};function l(e){var t=i(e).constructor.name,o=u(e).map(function(r){var o=r.propertyName,c=r.dispatch,f="function"==typeof e[o]?e[o]():e[o];return!1===c?f.pipe(n.ignoreElements()):f.pipe(n.materialize()).pipe(n.map(function(r){return{effect:e[o],notification:r,propertyName:o,sourceName:t,sourceInstance:e}}))});return r.merge.apply(void 0,p(o))}function d(e){var t=l(e);return function r(e){var t=i(e);return a in t&&"function"==typeof t[a]}(e)?e.ngrxOnRunEffects(t):t}var y,g=(y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),h=function(e){function n(t){var r=e.call(this)||this;return t&&(r.source=t),r}var c,f;return g(n,e),c=n,n.prototype.lift=function(e){var t=new c;return t.source=this,t.operator=e,t},c=function(e,t,r,n){var o,c=arguments.length,f=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(f=(c<3?o(f):c>3?o(t,r,f):o(t,r))||f);return c>3&&f&&Object.defineProperty(t,r,f),f}([o.Injectable(),(0,f=o.Inject(t.ScannedActionsSubject),function(e,t){f(e,t,0)}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[r.Observable])}()],n)}(r.Observable),v=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),b=function(e){function t(t){var r=e.call(this)||this;return r.errorHandler=t,r}return v(t,e),t.prototype.addEffects=function(e){this.next(e)},t.prototype.toActions=function(){var e=this;return this.pipe(n.groupBy(function(e){return e}),n.mergeMap(function(t){return t.pipe(n.exhaustMap(d),n.map(function(t){return function r(e,t){!function r(e,t){"E"===e.notification.kind&&t.handleError(e.notification.error)}(e,t),function n(e,t){if("N"===e.notification.kind){var r=e.notification.value;!function n(e){return e&&e.type&&"string"==typeof e.type}(r)&&t.handleError(new Error("Effect "+function o(e){var t=e.propertyName;return'"'+e.sourceName+"."+t+("function"==typeof e.sourceInstance[t]?"()":"")+'"'}(e)+" dispatched an invalid action: "+function c(e){try{return JSON.stringify(e)}catch(t){return e}}(r)))}}(e,t)}(t,e.errorHandler),t.notification}),n.filter(function(e){return"N"===e.kind}),n.dematerialize())}))},function(e,t,r,n){var o,c=arguments.length,f=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(f=(c<3?o(f):c>3?o(t,r,f):o(t,r))||f);return c>3&&f&&Object.defineProperty(t,r,f),f}([o.Injectable(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[o.ErrorHandler])}()],t)}(r.Subject),m=(new o.InjectionToken("ngrx/effects: Immediate Effects"),new o.InjectionToken("ngrx/effects: Root Effects")),_=new o.InjectionToken("ngrx/effects: Feature Effects"),j=function(){function e(e,t){this.effectSources=e,this.store=t,this.effectsSubscription=null}return e.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},e.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},function(e,t,r,n){var o,c=arguments.length,f=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(f=(c<3?o(f):c>3?o(t,r,f):o(t,r))||f);return c>3&&f&&Object.defineProperty(t,r,f),f}([o.Injectable(),function(e,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[b,t.Store])}()],e)}(),O=function(e,t){return function(r,n){t(r,n,e)}},R="@ngrx/effects/init",x=function(){function e(e,t,r,n,o,c){this.sources=e,t.start(),n.forEach(function(t){return e.addEffects(t)}),r.dispatch({type:R})}return e.prototype.addEffects=function(e){this.sources.addEffects(e)},function(e,t,r,n){var o,c=arguments.length,f=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(f=(c<3?o(f):c>3?o(t,r,f):o(t,r))||f);return c>3&&f&&Object.defineProperty(t,r,f),f}([o.NgModule({}),O(3,o.Inject(m)),O(4,o.Optional()),O(5,o.Optional()),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",t)}(0,[b,j,t.Store,Array,t.StoreRootModule,t.StoreFeatureModule])],e)}(),E=function(e,t){return function(r,n){t(r,n,e)}},S="@ngrx/effects/update-effects",P=function(){return function(e,t,r,n){var o,c=arguments.length,f=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(f=(c<3?o(f):c>3?o(t,r,f):o(t,r))||f);return c>3&&f&&Object.defineProperty(t,r,f),f}([o.NgModule({}),E(2,o.Inject(_)),E(3,o.Optional()),E(4,o.Optional()),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",t)}(0,[x,t.Store,Array,t.StoreRootModule,t.StoreFeatureModule])],function e(t,r,n,o,c){n.forEach(function(e){var n=[];e.forEach(function(e){t.addEffects(e);var r=i(e).constructor;n.push(r.name)}),r.dispatch({type:S,effects:n})})})}(),w=function(){function e(){}return e.forFeature=function(e){return{ngModule:P,providers:[e,{provide:_,multi:!0,deps:e,useFactory:I}]}},e.forRoot=function(e){return{ngModule:x,providers:[j,b,h,e,{provide:m,deps:e,useFactory:I}]}},function(e,t,r,n){var o,c=arguments.length,f=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(f=(c<3?o(f):c>3?o(t,r,f):o(t,r))||f);return c>3&&f&&Object.defineProperty(t,r,f),f}([o.NgModule({})],e)}();function I(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}e.ɵngrx_modules_effects_effects_c=P,e.ɵngrx_modules_effects_effects_a=I,e.ɵngrx_modules_effects_effects_b=x,e.ɵngrx_modules_effects_effects_f=j,e.ɵngrx_modules_effects_effects_e=_,e.ɵngrx_modules_effects_effects_d=m,e.Effect=function M(e){var t=(void 0===e?{}:e).dispatch,r=void 0===t||t;return function(e,t){!function n(e,t){var r=e.constructor,n=r.hasOwnProperty(c)?r[c]:Object.defineProperty(r,c,{value:[]})[c];Array.prototype.push.apply(n,t)}(e,[{propertyName:t,dispatch:r}])}},e.getEffectsMetadata=function N(e){var t,r,n={};try{for(var o=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(u(e)),c=o.next();!c.done;c=o.next()){var f=c.value;n[f.propertyName]={dispatch:f.dispatch}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},e.mergeEffects=l,e.Actions=h,e.ofType=function A(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.filter(function(t){return e.some(function(e){return e===t.type})})},e.EffectsModule=w,e.EffectSources=b,e.ROOT_EFFECTS_INIT=R,e.UPDATE_EFFECTS=S,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@ngrx/store"),require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ngrx/effects",["exports","@ngrx/store","rxjs","rxjs/operators","@angular/core"],t):t((e.ngrx=e.ngrx||{},e.ngrx.effects={}),e["@ngrx/store"],e.rxjs,e.rxjs.operators,e.ng.core)}(this,function(e,t,r,n,o){"use strict";var f="__@ngrx/effects__";function c(e){return e.constructor.hasOwnProperty(f)?e.constructor[f]:[]}function i(e){return Object.getPrototypeOf(e)}function u(e){return t.compose(c,i)(e)}var a=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,f=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=f.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=f.return)&&r.call(f)}finally{if(o)throw o.error}}return c},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e};function p(e){var t=i(e).constructor.name,o=u(e).map(function(r){var o=r.propertyName,f=r.dispatch,c="function"==typeof e[o]?e[o]():e[o];return!1===f?c.pipe(n.ignoreElements()):c.pipe(n.materialize()).pipe(n.map(function(r){return{effect:e[o],notification:r,propertyName:o,sourceName:t,sourceInstance:e}}))});return r.merge.apply(void 0,s(o))}var l,d=(l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),y=function(e){function n(t){var r=e.call(this)||this;return t&&(r.source=t),r}var f,c;return d(n,e),f=n,n.prototype.lift=function(e){var t=new f;return t.source=this,t.operator=e,t},f=function(e,t,r,n){var o,f=arguments.length,c=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(c=(f<3?o(c):f>3?o(t,r,c):o(t,r))||c);return f>3&&c&&Object.defineProperty(t,r,c),c}([o.Injectable(),(0,c=o.Inject(t.ScannedActionsSubject),function(e,t){c(e,t,0)}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[r.Observable])}()],n)}(r.Observable),g="ngrxOnIdentifyEffects",h="ngrxOnRunEffects",v=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),b=function(e){function t(t){var r=e.call(this)||this;return r.errorHandler=t,r}return v(t,e),t.prototype.addEffects=function(e){this.next(e)},t.prototype.toActions=function(){var e=this;return this.pipe(n.groupBy(i),n.mergeMap(function(e){return e.pipe(n.groupBy(m))}),n.mergeMap(function(t){return t.pipe(n.exhaustMap(_),n.map(function(t){return function r(e,t){!function r(e,t){"E"===e.notification.kind&&t.handleError(e.notification.error)}(e,t),function n(e,t){if("N"===e.notification.kind){var r=e.notification.value;!function n(e){return e&&e.type&&"string"==typeof e.type}(r)&&t.handleError(new Error("Effect "+function o(e){var t=e.propertyName;return'"'+e.sourceName+"."+t+("function"==typeof e.sourceInstance[t]?"()":"")+'"'}(e)+" dispatched an invalid action: "+function f(e){try{return JSON.stringify(e)}catch(t){return e}}(r)))}}(e,t)}(t,e.errorHandler),t.notification}),n.filter(function(e){return"N"===e.kind}),n.dematerialize())}))},function(e,t,r,n){var o,f=arguments.length,c=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(c=(f<3?o(c):f>3?o(t,r,c):o(t,r))||c);return f>3&&c&&Object.defineProperty(t,r,c),c}([o.Injectable(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[o.ErrorHandler])}()],t)}(r.Subject);function m(e){return g in e&&"function"==typeof e[g]?e[g]():""}function _(e){var t=p(e);return function r(e){var t=i(e);return h in t&&"function"==typeof t[h]}(e)?e.ngrxOnRunEffects(t):t}new o.InjectionToken("ngrx/effects: Immediate Effects");var j=new o.InjectionToken("ngrx/effects: Root Effects"),O=new o.InjectionToken("ngrx/effects: Feature Effects"),R=function(){function e(e,t){this.effectSources=e,this.store=t,this.effectsSubscription=null}return e.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},e.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},function(e,t,r,n){var o,f=arguments.length,c=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(c=(f<3?o(c):f>3?o(t,r,c):o(t,r))||c);return f>3&&c&&Object.defineProperty(t,r,c),c}([o.Injectable(),function(e,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",[b,t.Store])}()],e)}(),x=function(e,t){return function(r,n){t(r,n,e)}},E="@ngrx/effects/init",S=function(){function e(e,t,r,n,o,f){this.sources=e,t.start(),n.forEach(function(t){return e.addEffects(t)}),r.dispatch({type:E})}return e.prototype.addEffects=function(e){this.sources.addEffects(e)},function(e,t,r,n){var o,f=arguments.length,c=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(c=(f<3?o(c):f>3?o(t,r,c):o(t,r))||c);return f>3&&c&&Object.defineProperty(t,r,c),c}([o.NgModule({}),x(3,o.Inject(j)),x(4,o.Optional()),x(5,o.Optional()),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",t)}(0,[b,R,t.Store,Array,t.StoreRootModule,t.StoreFeatureModule])],e)}(),P=function(e,t){return function(r,n){t(r,n,e)}},w="@ngrx/effects/update-effects",I=function(){return function(e,t,r,n){var o,f=arguments.length,c=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(c=(f<3?o(c):f>3?o(t,r,c):o(t,r))||c);return f>3&&c&&Object.defineProperty(t,r,c),c}([o.NgModule({}),P(2,o.Inject(O)),P(3,o.Optional()),P(4,o.Optional()),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:paramtypes",t)}(0,[S,t.Store,Array,t.StoreRootModule,t.StoreFeatureModule])],function e(t,r,n,o,f){n.forEach(function(e){var n=[];e.forEach(function(e){t.addEffects(e);var r=i(e).constructor;n.push(r.name)}),r.dispatch({type:w,effects:n})})})}(),M=function(){function e(){}return e.forFeature=function(e){return{ngModule:I,providers:[e,{provide:O,multi:!0,deps:e,useFactory:N}]}},e.forRoot=function(e){return{ngModule:S,providers:[R,b,y,e,{provide:j,deps:e,useFactory:N}]}},function(e,t,r,n){var o,f=arguments.length,c=f<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(c=(f<3?o(c):f>3?o(t,r,c):o(t,r))||c);return f>3&&c&&Object.defineProperty(t,r,c),c}([o.NgModule({})],e)}();function N(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}e.ɵngrx_modules_effects_effects_c=I,e.ɵngrx_modules_effects_effects_a=N,e.ɵngrx_modules_effects_effects_b=S,e.ɵngrx_modules_effects_effects_f=R,e.ɵngrx_modules_effects_effects_e=O,e.ɵngrx_modules_effects_effects_d=j,e.Effect=function A(e){var t=(void 0===e?{}:e).dispatch,r=void 0===t||t;return function(e,t){!function n(e,t){var r=e.constructor,n=r.hasOwnProperty(f)?r[f]:Object.defineProperty(r,f,{value:[]})[f];Array.prototype.push.apply(n,t)}(e,[{propertyName:t,dispatch:r}])}},e.getEffectsMetadata=function F(e){var t,r,n={};try{for(var o=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(u(e)),f=o.next();!f.done;f=o.next()){var c=f.value;n[c.propertyName]={dispatch:c.dispatch}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},e.mergeEffects=p,e.Actions=y,e.ofType=function T(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.filter(function(t){return e.some(function(e){return e===t.type})})},e.EffectsModule=M,e.EffectSources=b,e.ROOT_EFFECTS_INIT=E,e.UPDATE_EFFECTS=w,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"ɵngrx_modules_effects_effects_a":{"__symbolic":"function","parameters":["instances"],"value":{"__symbolic":"reference","name":"instances"}},"ɵngrx_modules_effects_effects_b":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_d"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":20,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":21,"character":5}}]],"parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_f"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreRootModule","line":20,"character":33},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreFeatureModule","line":21,"character":36}]}],"addEffects":[{"__symbolic":"method"}]}},"ɵngrx_modules_effects_effects_c":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_e"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":19,"character":5}}]],"parameters":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_b"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreRootModule","line":18,"character":33},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreFeatureModule","line":19,"character":36}]}]}},"Effect":{"__symbolic":"function","parameters":["dispatch"],"defaults":[{}],"value":{"__symbolic":"error","message":"Lambda not supported","line":31,"character":9,"module":"./src/effects_metadata"}},"EffectsMetadata":{"__symbolic":"interface"},"getEffectsMetadata":{"__symbolic":"function"},"mergeEffects":{"__symbolic":"function"},"Actions":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","module":"rxjs","name":"Observable","line":6,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":7,"character":15},"arguments":[{"__symbolic":"reference","module":"@ngrx/store","name":"ScannedActionsSubject","line":7,"character":22}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":7,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]}]}],"lift":[{"__symbolic":"method"}]}},"ofType":{"__symbolic":"function","parameters":["allowedTypes"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"rxjs/operators","name":"filter","line":93,"character":9},"arguments":[{"__symbolic":"error","message":"Lambda not supported","line":93,"character":16,"module":"./src/actions"}]}},"EffectsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["featureEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_c"},"providers":[{"__symbolic":"reference","name":"featureEffects"},{"provide":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_e"},"multi":true,"deps":{"__symbolic":"reference","name":"featureEffects"},"useFactory":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_a"}}]}},"forRoot":{"__symbolic":"function","parameters":["rootEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_b"},"providers":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_f"},{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Actions"},{"__symbolic":"reference","name":"rootEffects"},{"provide":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_d"},"deps":{"__symbolic":"reference","name":"rootEffects"},"useFactory":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_a"}}]}}}},"EffectSources":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs","name":"Subject","line":16,"character":35},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":15,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ErrorHandler","line":17,"character":36}]}],"addEffects":[{"__symbolic":"method"}],"toActions":[{"__symbolic":"method"}]}},"OnRunEffects":{"__symbolic":"interface"},"EffectNotification":{"__symbolic":"interface"},"ROOT_EFFECTS_INIT":"@ngrx/effects/init","UPDATE_EFFECTS":"@ngrx/effects/update-effects","UpdateEffects":{"__symbolic":"interface"},"ɵngrx_modules_effects_effects_d":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":32},"arguments":["ngrx/effects: Root Effects"]},"ɵngrx_modules_effects_effects_e":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":8,"character":35},"arguments":["ngrx/effects: Feature Effects"]},"ɵngrx_modules_effects_effects_f":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"start":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵngrx_modules_effects_effects_a":"./src/effects_module","ɵngrx_modules_effects_effects_b":"./src/effects_root_module","ɵngrx_modules_effects_effects_c":"./src/effects_feature_module","Effect":"./src/effects_metadata","EffectsMetadata":"./src/effects_metadata","getEffectsMetadata":"./src/effects_metadata","mergeEffects":"./src/effects_resolver","Actions":"./src/actions","ofType":"./src/actions","EffectsModule":"./src/effects_module","EffectSources":"./src/effect_sources","OnRunEffects":"./src/on_run_effects","EffectNotification":"./src/effect_notification","ROOT_EFFECTS_INIT":"./src/effects_root_module","UPDATE_EFFECTS":"./src/effects_feature_module","UpdateEffects":"./src/effects_feature_module","ɵngrx_modules_effects_effects_d":"./src/tokens","ɵngrx_modules_effects_effects_e":"./src/tokens","ɵngrx_modules_effects_effects_f":"./src/effects_runner"},"importAs":"@ngrx/effects"} | ||
{"__symbolic":"module","version":4,"metadata":{"ɵngrx_modules_effects_effects_a":{"__symbolic":"function","parameters":["instances"],"value":{"__symbolic":"reference","name":"instances"}},"ɵngrx_modules_effects_effects_b":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_d"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":20,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":21,"character":5}}]],"parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_f"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreRootModule","line":20,"character":33},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreFeatureModule","line":21,"character":36}]}],"addEffects":[{"__symbolic":"method"}]}},"ɵngrx_modules_effects_effects_c":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_e"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":19,"character":5}}]],"parameters":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_b"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreRootModule","line":18,"character":33},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreFeatureModule","line":19,"character":36}]}]}},"Effect":{"__symbolic":"function","parameters":["dispatch"],"defaults":[{}],"value":{"__symbolic":"error","message":"Lambda not supported","line":31,"character":9,"module":"./src/effects_metadata"}},"EffectsMetadata":{"__symbolic":"interface"},"getEffectsMetadata":{"__symbolic":"function"},"mergeEffects":{"__symbolic":"function"},"Actions":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","module":"rxjs","name":"Observable","line":6,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":7,"character":15},"arguments":[{"__symbolic":"reference","module":"@ngrx/store","name":"ScannedActionsSubject","line":7,"character":22}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":7,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]}]}],"lift":[{"__symbolic":"method"}]}},"ofType":{"__symbolic":"function","parameters":["allowedTypes"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"rxjs/operators","name":"filter","line":93,"character":9},"arguments":[{"__symbolic":"error","message":"Lambda not supported","line":93,"character":16,"module":"./src/actions"}]}},"EffectsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["featureEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_c"},"providers":[{"__symbolic":"reference","name":"featureEffects"},{"provide":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_e"},"multi":true,"deps":{"__symbolic":"reference","name":"featureEffects"},"useFactory":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_a"}}]}},"forRoot":{"__symbolic":"function","parameters":["rootEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_b"},"providers":[{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_f"},{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Actions"},{"__symbolic":"reference","name":"rootEffects"},{"provide":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_d"},"deps":{"__symbolic":"reference","name":"rootEffects"},"useFactory":{"__symbolic":"reference","name":"ɵngrx_modules_effects_effects_a"}}]}}}},"EffectSources":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs","name":"Subject","line":23,"character":35},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ErrorHandler","line":24,"character":36}]}],"addEffects":[{"__symbolic":"method"}],"toActions":[{"__symbolic":"method"}]}},"EffectNotification":{"__symbolic":"interface"},"ROOT_EFFECTS_INIT":"@ngrx/effects/init","UPDATE_EFFECTS":"@ngrx/effects/update-effects","UpdateEffects":{"__symbolic":"interface"},"OnIdentifyEffects":{"__symbolic":"interface"},"OnRunEffects":{"__symbolic":"interface"},"ɵngrx_modules_effects_effects_d":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":32},"arguments":["ngrx/effects: Root Effects"]},"ɵngrx_modules_effects_effects_e":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":8,"character":35},"arguments":["ngrx/effects: Feature Effects"]},"ɵngrx_modules_effects_effects_f":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"start":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵngrx_modules_effects_effects_a":"./src/effects_module","ɵngrx_modules_effects_effects_b":"./src/effects_root_module","ɵngrx_modules_effects_effects_c":"./src/effects_feature_module","Effect":"./src/effects_metadata","EffectsMetadata":"./src/effects_metadata","getEffectsMetadata":"./src/effects_metadata","mergeEffects":"./src/effects_resolver","Actions":"./src/actions","ofType":"./src/actions","EffectsModule":"./src/effects_module","EffectSources":"./src/effect_sources","EffectNotification":"./src/effect_notification","ROOT_EFFECTS_INIT":"./src/effects_root_module","UPDATE_EFFECTS":"./src/effects_feature_module","UpdateEffects":"./src/effects_feature_module","OnIdentifyEffects":"./src/lifecycle_hooks","OnRunEffects":"./src/lifecycle_hooks","ɵngrx_modules_effects_effects_d":"./src/tokens","ɵngrx_modules_effects_effects_e":"./src/tokens","ɵngrx_modules_effects_effects_f":"./src/effects_runner"},"importAs":"@ngrx/effects"} |
@@ -9,3 +9,5 @@ /** | ||
import { verifyOutput } from './effect_notification'; | ||
import { resolveEffectSource } from './effects_resolver'; | ||
import { mergeEffects } from './effects_resolver'; | ||
import { getSourceForInstance } from './effects_metadata'; | ||
import { onIdentifyEffectsKey, onRunEffectsKey, } from './lifecycle_hooks'; | ||
export class EffectSources extends Subject { | ||
@@ -31,3 +33,3 @@ /** | ||
toActions() { | ||
return this.pipe(groupBy(source => source), mergeMap(source$ => source$.pipe(exhaustMap(resolveEffectSource), map(output => { | ||
return this.pipe(groupBy(getSourceForInstance), mergeMap(source$ => source$.pipe(groupBy(effectsInstance))), mergeMap(source$ => source$.pipe(exhaustMap(resolveEffectSource), map(output => { | ||
verifyOutput(output, this.errorHandler); | ||
@@ -49,3 +51,35 @@ return output.notification; | ||
} | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function effectsInstance(sourceInstance) { | ||
if (onIdentifyEffectsKey in sourceInstance && | ||
typeof sourceInstance[onIdentifyEffectsKey] === 'function') { | ||
return sourceInstance[onIdentifyEffectsKey](); | ||
} | ||
return ''; | ||
} | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function resolveEffectSource(sourceInstance) { | ||
/** @type {?} */ | ||
const mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function isOnRunEffects(sourceInstance) { | ||
/** @type {?} */ | ||
const source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWZmZWN0X3NvdXJjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2VmZmVjdHMvc3JjL2VmZmVjdF9zb3VyY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6RCxPQUFPLEVBQTRCLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN6RCxPQUFPLEVBQ0wsYUFBYSxFQUNiLFVBQVUsRUFDVixNQUFNLEVBQ04sT0FBTyxFQUNQLEdBQUcsRUFDSCxRQUFRLEdBQ1QsTUFBTSxnQkFBZ0IsQ0FBQztBQUV4QixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDckQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFHekQsTUFBTSxPQUFPLGFBQWMsU0FBUSxPQUFZOzs7O0lBQzdDLFlBQW9CLFlBQTBCO1FBQzVDLEtBQUssRUFBRSxDQUFDO1FBRFUsaUJBQVksR0FBWixZQUFZLENBQWM7S0FFN0M7Ozs7O0lBRUQsVUFBVSxDQUFDLG9CQUF5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ZmVjdHNLZXldID09PSAnZnVuY3Rpb24nXG4gICk7XG59XG4iXX0= |
@@ -8,3 +8,2 @@ /** | ||
import { getSourceForInstance, getSourceMetadata } from './effects_metadata'; | ||
import { isOnRunEffects } from './on_run_effects'; | ||
/** | ||
@@ -38,15 +37,3 @@ * @param {?} sourceInstance | ||
} | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
export function resolveEffectSource(sourceInstance) { | ||
/** @type {?} */ | ||
const mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWZmZWN0c19yZXNvbHZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvZWZmZWN0cy9zcmMvZWZmZWN0c19yZXNvbHZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQ0EsT0FBTyxFQUFFLEtBQUssRUFBNEIsTUFBTSxNQUFNLENBQUM7QUFDdkQsT0FBTyxFQUFFLGNBQWMsRUFBRSxHQUFHLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFHbEUsT0FBTyxFQUFFLG9CQUFvQixFQUFFLGlCQUFpQixFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDN0UsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGtCQUFrQixDQUFDOzs7OztBQUVsRCxNQUFNLFVBQVUsWUFBWSxDQUMxQixjQUFtQjs7SUFFbkIsTUFBTSxVQUFVLEdBQUcsb0JBQW9CLENBQUMsY0FBYyxDQUFDLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQzs7SUFFekUsTUFBTSxXQUFXLEdBQXNCLGlCQUFpQixDQUFD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QUFDO0FBQzFELE9BQU8sRUFBRSxjQUFjLEVBQWlCLE1BQU0sMEJBQTBCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge1xuICBFZmZlY3QsXG4gIEVmZmVjdHNNZXRhZGF0YSxcbiAgZ2V0RWZmZWN0c01ldGFkYXRhLFxufSBmcm9tICcuL2VmZmVjdHNfbWV0YWRhdGEnO1xuZXhwb3J0IHsgbWVyZ2VFZmZlY3RzIH0gZnJvbSAnLi9lZmZlY3RzX3Jlc29sdmVyJztcbmV4cG9ydCB7IEFjdGlvbnMsIG9mVHlwZSB9IGZyb20gJy4vYWN0aW9ucyc7XG5leHBvcnQgeyBFZmZlY3RzTW9kdWxlIH0gZnJvbSAnLi9lZmZlY3RzX21vZHVsZSc7XG5leHBvcnQgeyBFZmZlY3RTb3VyY2VzIH0gZnJvbSAnLi9lZmZlY3Rfc291cmNlcyc7XG5leHBvcnQgeyBFZmZlY3ROb3RpZmljYXRpb24gfSBmcm9tICcuL2VmZmVjdF9ub3RpZmljYXRpb24nO1xuZXhwb3J0IHsgUk9PVF9FRkZFQ1RTX0lOSVQgfSBmcm9tICcuL2VmZmVjdHNfcm9vdF9tb2R1bGUnO1xuZXhwb3J0IHsgVVBEQVRFX0VGRkVDVFMsIFVwZGF0ZUVmZmVjdHMgfSBmcm9tICcuL2VmZmVjdHNfZmVhdHVyZV9tb2R1bGUnO1xuZXhwb3J0IHsgT25JZGVudGlmeUVmZmVjdHMsIE9uUnVuRWZmZWN0cyB9IGZyb20gJy4vbGlmZWN5Y2xlX2hvb2tzJztcbiJdfQ== |
@@ -27,3 +27,5 @@ var __extends = (this && this.__extends) || (function () { | ||
import { verifyOutput } from './effect_notification'; | ||
import { resolveEffectSource } from './effects_resolver'; | ||
import { mergeEffects } from './effects_resolver'; | ||
import { getSourceForInstance } from './effects_metadata'; | ||
import { onIdentifyEffectsKey, onRunEffectsKey, } from './lifecycle_hooks'; | ||
var EffectSources = /** @class */ (function (_super) { | ||
@@ -44,3 +46,3 @@ __extends(EffectSources, _super); | ||
var _this = this; | ||
return this.pipe(groupBy(function (source) { return source; }), mergeMap(function (source$) { | ||
return this.pipe(groupBy(getSourceForInstance), mergeMap(function (source$) { return source$.pipe(groupBy(effectsInstance)); }), mergeMap(function (source$) { | ||
return source$.pipe(exhaustMap(resolveEffectSource), map(function (output) { | ||
@@ -61,3 +63,21 @@ verifyOutput(output, _this.errorHandler); | ||
export { EffectSources }; | ||
function effectsInstance(sourceInstance) { | ||
if (onIdentifyEffectsKey in sourceInstance && | ||
typeof sourceInstance[onIdentifyEffectsKey] === 'function') { | ||
return sourceInstance[onIdentifyEffectsKey](); | ||
} | ||
return ''; | ||
} | ||
function resolveEffectSource(sourceInstance) { | ||
var mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
function isOnRunEffects(sourceInstance) { | ||
var source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWZmZWN0X3NvdXJjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2VmZmVjdHMvc3JjL2VmZmVjdF9zb3VyY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6RCxPQUFPLEVBQTRCLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN6RCxPQUFPLEVBQ0wsYUFBYSxFQUNiLFVBQVUsRUFDVixNQUFNLEVBQ04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jdGlvbj4ge1xuICAgIHJldHVybiB0aGlzLnBpcGUoXG4gICAgICBncm91cEJ5KHNvdXJjZSA9PiBzb3VyY2UpLFxuICAgICAgbWVyZ2VNYXAoc291cmNlJCA9PlxuICAgICAgICBzb3VyY2UkLnBpcGUoXG4gICAgICAgICAgZXhoYXVzdE1hcChyZXNvbHZlRWZmZWN0U291cmNlKSxcbiAgICAgICAgICBtYXAob3V0cHV0ID0+IHtcbiAgICAgICAgICAgIHZlcmlmeU91dHB1dChvdXRwdXQsIHRoaXMuZXJyb3JIYW5kbGVyKTtcblxuICAgICAgICAgICAgcmV0dXJuIG91dHB1dC5ub3RpZmljYXRpb247XG4gICAgICAgICAgfSksXG4gICAgICAgICAgZmlsdGVyKFxuICAgICAgICAgICAgKG5vdGlmaWNhdGlvbik6IG5vdGlmaWNhdGlvbiBpcyBOb3RpZmljYXRpb248QWN0aW9uPiA9PlxuICAgICAgICAgICAgICBub3RpZmljYXRpb24ua2luZCA9PT0gJ04nXG4gICAgICAgICAgKSxcbiAgICAgICAgICBkZW1hdGVyaWFsaXplKClcbiAgICAgICAgKVxuICAgICAgKVxuICAgICk7XG4gIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWZmZWN0X3NvdXJjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2VmZmVjdHMvc3JjL2VmZmVjdF9zb3VyY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6RCxPQUFPLEVBQTRCLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN6RCxPQUFPLEVBQ0wsYUFBYSx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ZWN0c0tleV0gPT09ICdmdW5jdGlvbidcbiAgKSB7XG4gICAgcmV0dXJuIHNvdXJjZUluc3RhbmNlW29uSWRlbnRpZnlFZmZlY3RzS2V5XSgpO1xuICB9XG5cbiAgcmV0dXJuICcnO1xufVxuXG5mdW5jdGlvbiByZXNvbHZlRWZmZWN0U291cmNlKHNvdXJjZUluc3RhbmNlOiBhbnkpIHtcbiAgY29uc3QgbWVyZ2VkRWZmZWN0cyQgPSBtZXJnZUVmZmVjdHMoc291cmNlSW5zdGFuY2UpO1xuXG4gIGlmIChpc09uUnVuRWZmZWN0cyhzb3VyY2VJbnN0YW5jZSkpIHtcbiAgICByZXR1cm4gc291cmNlSW5zdGFuY2UubmdyeE9uUnVuRWZmZWN0cyhtZXJnZWRFZmZlY3RzJCk7XG4gIH1cblxuICByZXR1cm4gbWVyZ2VkRWZmZWN0cyQ7XG59XG5cbmZ1bmN0aW9uIGlzT25SdW5FZmZlY3RzKHNvdXJjZUluc3RhbmNlOiB7XG4gIFtvblJ1bkVmZmVjdHNLZXldPzogb25SdW5FZmZlY3RzRm47XG59KTogc291cmNlSW5zdGFuY2UgaXMgT25SdW5FZmZlY3RzIHtcbiAgY29uc3Qgc291cmNlID0gZ2V0U291cmNlRm9ySW5zdGFuY2Uoc291cmNlSW5zdGFuY2UpO1xuXG4gIHJldHVybiAoXG4gICAgb25SdW5FZmZlY3RzS2V5IGluIHNvdXJjZSAmJiB0eXBlb2Ygc291cmNlW29uUnVuRWZmZWN0c0tleV0gPT09ICdmdW5jdGlvbidcbiAgKTtcbn1cbiJdfQ== |
@@ -24,3 +24,2 @@ var __read = (this && this.__read) || function (o, n) { | ||
import { getSourceForInstance, getSourceMetadata } from './effects_metadata'; | ||
import { isOnRunEffects } from './on_run_effects'; | ||
export function mergeEffects(sourceInstance) { | ||
@@ -47,10 +46,3 @@ var sourceName = getSourceForInstance(sourceInstance).constructor.name; | ||
} | ||
export function resolveEffectSource(sourceInstance) { | ||
var mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWZmZWN0c19yZXNvbHZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvZWZmZWN0cy9zcmMvZWZmZWN0c19yZXNvbHZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBLE9BQU8sRUFBRSxLQUFLLEVBQTRCLE1BQU0sTUFBTSxDQUFDO0FBQ3ZELE9BQU8sRUFBRSxjQUFjLEVBQUUsR0FBRyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBR2xFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQzdFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVsRCxNQUFNLFVBQVUsWUFBWSxDQUMxQixjQUFtQjtJQUVuQixJQUFNLFVBQVUsR0FBRyxvQkFBb0IsQ0FBQyxjQUFjLENBQUMsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDO0lBRXpFLElBQU0sV0FBVyxHQUFzQixpQkFBaUIsQ0FBQyxjQUFjLENBQUMsQ0FBQyxHQUFHLENBQzFFLFVBQUMsRUFBMEI7WUFBeEIsOEJBQVksRUFBRSxzQkFBUTtRQUN2QixJQUFNLFVBQVUsR0FDZCxPQUFPLGNBQWMsQ0FBQyxZQUFZLENBQUMsS0FBSyxVQUFVO1lBQ2hELENBQUMsQ0FBQyxjQUFjLENBQUMsWUFBWSxDQUFDLEVBQUU7WUFDaEMsQ0FBQyxDQU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mFibGUucGlwZShpZ25vcmVFbGVtZW50cygpKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgbWF0ZXJpYWxpemVkJCA9IG9ic2VydmFibGUucGlwZShtYXRlcmlhbGl6ZSgpKTtcblxuICAgICAgcmV0dXJuIG1hdGVyaWFsaXplZCQucGlwZShcbiAgICAgICAgbWFwKFxuICAgICAgICAgIChub3RpZmljYXRpb246IE5vdGlmaWNhdGlvbjxBY3Rpb24+KTogRWZmZWN0Tm90aWZpY2F0aW9uID0+ICh7XG4gICAgICAgICAgICBlZmZlY3Q6IHNvdXJjZUluc3RhbmNlW3Byb3BlcnR5TmFtZV0sXG4gICAgICAgICAgICBub3RpZmljYXRpb24sXG4gICAgICAgICAgICBwcm9wZXJ0eU5hbWUsXG4gICAgICAgICAgICBzb3VyY2VOYW1lLFxuICAgICAgICAgICAgc291cmNlSW5zdGFuY2UsXG4gICAgICAgICAgfSlcbiAgICAgICAgKVxuICAgICAgKTtcbiAgICB9XG4gICk7XG5cbiAgcmV0dXJuIG1lcmdlKC4uLm9ic2VydmFibGVzKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHJlc29sdmVFZmZlY3RTb3VyY2Uoc291cmNlSW5zdGFuY2U6IGFueSkge1xuICBjb25zdCBtZXJnZWRFZmZlY3RzJCA9IG1lcmdlRWZmZWN0cyhzb3VyY2VJbnN0YW5jZSk7XG5cbiAgaWYgKGlzT25SdW5FZmZlY3RzKHNvdXJjZUluc3RhbmNlKSkge1xuICAgIHJldHVybiBzb3VyY2VJbnN0YW5jZS5uZ3J4T25SdW5FZmZlY3RzKG1lcmdlZEVmZmVjdHMkKTtcbiAgfVxuXG4gIHJldHVybiBtZXJnZWRFZmZlY3RzJDtcbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWZmZWN0c19yZXNvbHZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4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G4gIEVmZmVjdCxcbiAgRWZmZWN0c01ldGFkYXRhLFxuICBnZXRFZmZlY3RzTWV0YWRhdGEsXG59IGZyb20gJy4vZWZmZWN0c19tZXRhZGF0YSc7XG5leHBvcnQgeyBtZXJnZUVmZmVjdHMgfSBmcm9tICcuL2VmZmVjdHNfcmVzb2x2ZXInO1xuZXhwb3J0IHsgQWN0aW9ucywgb2ZUeXBlIH0gZnJvbSAnLi9hY3Rpb25zJztcbmV4cG9ydCB7IEVmZmVjdHNNb2R1bGUgfSBmcm9tICcuL2VmZmVjdHNfbW9kdWxlJztcbmV4cG9ydCB7IEVmZmVjdFNvdXJjZXMgfSBmcm9tICcuL2VmZmVjdF9zb3VyY2VzJztcbmV4cG9ydCB7IEVmZmVjdE5vdGlmaWNhdGlvbiB9IGZyb20gJy4vZWZmZWN0X25vdGlmaWNhdGlvbic7XG5leHBvcnQgeyBST09UX0VGRkVDVFNfSU5JVCB9IGZyb20gJy4vZWZmZWN0c19yb290X21vZHVsZSc7XG5leHBvcnQgeyBVUERBVEVfRUZGRUNUUywgVXBkYXRlRWZmZWN0cyB9IGZyb20gJy4vZWZmZWN0c19mZWF0dXJlX21vZHVsZSc7XG5leHBvcnQgeyBPbklkZW50aWZ5RWZmZWN0cywgT25SdW5FZmZlY3RzIH0gZnJvbSAnLi9saWZlY3ljbGVfaG9va3MnO1xuIl19 |
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -88,4 +88,2 @@ * License: MIT | ||
*/ | ||
/** @type {?} */ | ||
const onRunEffectsKey = 'ngrxOnRunEffects'; | ||
/** | ||
@@ -95,16 +93,2 @@ * @param {?} sourceInstance | ||
*/ | ||
function isOnRunEffects(sourceInstance) { | ||
/** @type {?} */ | ||
const source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function mergeEffects(sourceInstance) { | ||
@@ -134,14 +118,2 @@ /** @type {?} */ | ||
} | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function resolveEffectSource(sourceInstance) { | ||
/** @type {?} */ | ||
const mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
@@ -265,2 +237,11 @@ /** | ||
*/ | ||
/** @type {?} */ | ||
const onIdentifyEffectsKey = 'ngrxOnIdentifyEffects'; | ||
/** @type {?} */ | ||
const onRunEffectsKey = 'ngrxOnRunEffects'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
*/ | ||
class EffectSources extends Subject { | ||
@@ -286,3 +267,3 @@ /** | ||
toActions() { | ||
return this.pipe(groupBy(source => source), mergeMap(source$ => source$.pipe(exhaustMap(resolveEffectSource), map(output => { | ||
return this.pipe(groupBy(getSourceForInstance), mergeMap(source$ => source$.pipe(groupBy(effectsInstance))), mergeMap(source$ => source$.pipe(exhaustMap(resolveEffectSource), map(output => { | ||
verifyOutput(output, this.errorHandler); | ||
@@ -300,2 +281,34 @@ return output.notification; | ||
]; | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function effectsInstance(sourceInstance) { | ||
if (onIdentifyEffectsKey in sourceInstance && | ||
typeof sourceInstance[onIdentifyEffectsKey] === 'function') { | ||
return sourceInstance[onIdentifyEffectsKey](); | ||
} | ||
return ''; | ||
} | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function resolveEffectSource(sourceInstance) { | ||
/** @type {?} */ | ||
const mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
/** | ||
* @param {?} sourceInstance | ||
* @return {?} | ||
*/ | ||
function isOnRunEffects(sourceInstance) { | ||
/** @type {?} */ | ||
const source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
@@ -302,0 +315,0 @@ /** |
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -66,8 +66,2 @@ * License: MIT | ||
var onRunEffectsKey = 'ngrxOnRunEffects'; | ||
function isOnRunEffects(sourceInstance) { | ||
var source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
var __read = (undefined && undefined.__read) || function (o, n) { | ||
@@ -114,9 +108,2 @@ var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
} | ||
function resolveEffectSource(sourceInstance) { | ||
var mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
@@ -217,2 +204,5 @@ var __extends = (undefined && undefined.__extends) || (function () { | ||
var onIdentifyEffectsKey = 'ngrxOnIdentifyEffects'; | ||
var onRunEffectsKey = 'ngrxOnRunEffects'; | ||
var __extends$1 = (undefined && undefined.__extends) || (function () { | ||
@@ -255,3 +245,3 @@ var extendStatics = function (d, b) { | ||
var _this = this; | ||
return this.pipe(groupBy(function (source) { return source; }), mergeMap(function (source$) { | ||
return this.pipe(groupBy(getSourceForInstance), mergeMap(function (source$) { return source$.pipe(groupBy(effectsInstance)); }), mergeMap(function (source$) { | ||
return source$.pipe(exhaustMap(resolveEffectSource), map(function (output) { | ||
@@ -271,2 +261,20 @@ verifyOutput(output, _this.errorHandler); | ||
}(Subject)); | ||
function effectsInstance(sourceInstance) { | ||
if (onIdentifyEffectsKey in sourceInstance && | ||
typeof sourceInstance[onIdentifyEffectsKey] === 'function') { | ||
return sourceInstance[onIdentifyEffectsKey](); | ||
} | ||
return ''; | ||
} | ||
function resolveEffectSource(sourceInstance) { | ||
var mergedEffects$ = mergeEffects(sourceInstance); | ||
if (isOnRunEffects(sourceInstance)) { | ||
return sourceInstance.ngrxOnRunEffects(mergedEffects$); | ||
} | ||
return mergedEffects$; | ||
} | ||
function isOnRunEffects(sourceInstance) { | ||
var source = getSourceForInstance(sourceInstance); | ||
return (onRunEffectsKey in source && typeof source[onRunEffectsKey] === 'function'); | ||
} | ||
@@ -273,0 +281,0 @@ var IMMEDIATE_EFFECTS = new InjectionToken('ngrx/effects: Immediate Effects'); |
/** | ||
* @license NgRx 7.0.0-beta.0 | ||
* @license NgRx 7.0.0-beta.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@ngrx/effects", | ||
"version": "7.0.0-beta.0", | ||
"version": "7.0.0-beta.1", | ||
"description": "Side effect model for @ngrx/store", | ||
@@ -25,3 +25,3 @@ "repository": { | ||
"@angular/core": "^7.0.0", | ||
"@ngrx/store": "7.0.0-beta.0", | ||
"@ngrx/store": "7.0.0-beta.1", | ||
"rxjs": "^6.0.0" | ||
@@ -28,0 +28,0 @@ }, |
import { Observable } from 'rxjs'; | ||
import { EffectNotification } from './effect_notification'; | ||
export declare function mergeEffects(sourceInstance: any): Observable<EffectNotification>; | ||
export declare function resolveEffectSource(sourceInstance: any): Observable<EffectNotification>; |
@@ -6,5 +6,5 @@ export { Effect, EffectsMetadata, getEffectsMetadata, } from './effects_metadata'; | ||
export { EffectSources } from './effect_sources'; | ||
export { OnRunEffects } from './on_run_effects'; | ||
export { EffectNotification } from './effect_notification'; | ||
export { ROOT_EFFECTS_INIT } from './effects_root_module'; | ||
export { UPDATE_EFFECTS, UpdateEffects } from './effects_feature_module'; | ||
export { OnIdentifyEffects, OnRunEffects } from './lifecycle_hooks'; |
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
550653
5064