@ngxs-labs/emitter
Advanced tools
Comparing version 1.6.4 to 1.7.0
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@ngxs/store'), require('@angular/core'), require('rxjs/operators')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@ngxs/store', '@angular/core', 'rxjs/operators'], factory) : | ||
(factory((global['ngxs-labs'] = global['ngxs-labs'] || {}, global['ngxs-labs'].emitter = {}),global.ngxs.store,global.ng.core,global.rxjs.operators)); | ||
}(this, (function (exports,store,core,operators) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngxs/store'), require('rxjs/operators')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@ngxs/store', 'rxjs/operators'], factory) : | ||
(global = global || self, factory((global['ngxs-labs'] = global['ngxs-labs'] || {}, global['ngxs-labs'].emitter = {}), global.ng.core, global.ngxs.store, global.rxjs.operators)); | ||
}(this, function (exports, core, store, operators) { 'use strict'; | ||
@@ -534,2 +534,2 @@ /*! ***************************************************************************** | ||
}))); | ||
})); |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@ngxs/store"),require("@angular/core"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@ngxs-labs/emitter",["exports","@ngxs/store","@angular/core","rxjs/operators"],e):e((t["ngxs-labs"]=t["ngxs-labs"]||{},t["ngxs-labs"].emitter={}),t["ngxs-store"],t.ng.core,t.rxjs.operators)}(this,function(t,l,r,e){"use strict";var d="NGXS_RECEIVER_META";function i(t){return Array.isArray(t)?t:[t]}function h(t,e,r){var n={type:"[ID:"+function u(){return(Math.random()*Date.now()).toString(36).slice(0,8)}()+"] "+e.name+"."+r,payload:undefined,action:undefined,cancelUncompleted:!0};if(!t)return n;var o=t.type,i=t.payload,a=t.action,c=t.cancelUncompleted;return o&&(n.type=o),i&&(n.payload=i),a&&(n.action=a,Array.isArray(a)||(n.type=a.type)),"boolean"==typeof c&&(n.cancelUncompleted=c),n}var n=function(){function e(t){e.injector=t}return e.getInjector=function(){if(!this.injector)throw new Error("You've forgotten to import `NgxsEmitPluginModule`");return this.injector},e.injector=null,e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[{type:r.Injector}]},e}(),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var a=function(){function t(t){this.payload=t}return t.type=null,t}(),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function n(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.emitter=function(t){var e=this,r=t[d];if(!r)throw new Error("I can't seem to find static metadata. Have you decorated "+t.name+" with @Receiver()?");return{emit:function(t){return e.dispatchSingle(r,t)},emitMany:function(t){return e.dispatchMany(r,t)}}},e.prototype.dispatchSingle=function(t,e){a.type=t.type,void 0===e&&t.payload!==undefined&&(e=t.payload);var r=t.action;if(r){var n=i(r);return this.dispatch(function o(t,e){return t.map(function(t){return new t(e)})}(n,e))}return this.dispatch(new a(e))},e.prototype.dispatchMany=function(t,e){if(!Array.isArray(e))return this.dispatch([]);a.type=t.type;var r=t.action;if(r){var n=i(r);return this.dispatch(function u(t,e){for(var r=[],n=0,o=t.length;n<o;n++)for(var i=t[n],a=0,c=e.length;a<c;a++)r.push(new i(e[a]));return r}(n,e))}return this.dispatch(e.map(function(t){return new a(t)}))},e.decorators=[{type:r.Injectable}],e}(l.Store);var u=function(){function t(t){this.injectorAccessor=t}return t.forRoot=function(){return{ngModule:t,providers:[c,n]}},t.decorators=[{type:r.NgModule}],t.ctorParameters=function(){return[{type:n,decorators:[{type:r.Self}]}]},t}();function p(t){for(var e={},r=t.length-1;0<=r;r--){var n=t[r];if("function"!=typeof n)throw new TypeError("Receiver should be a function, got "+n);var o=n[d];if(!o||!o.type)throw new Error(n.name+" should be decorated using @Receiver() decorator");e[o.type]=!0}return e}function f(n,o){return function(t){return t.pipe(e.filter(function(t){var e=n[l.getActionTypeFromInstance(t.action)],r=t.status===o;return e&&r}),e.map(function(t){var e=t.action,r=t.error;return{type:l.getActionTypeFromInstance(e),payload:e.payload,error:r}}))}}t.Receiver=function s(y){return function(t,e,r){if("undefined"==typeof t.prototype||!r||"function"!=typeof t[e])throw new TypeError("Only static functions can be decorated with @Receiver() decorator");if(e in t.prototype)throw new Error("Property with name `"+e.toString()+"` already exists, please rename to avoid conflicts");"string"!=typeof e&&(e=String(e));var n=l.ensureStoreMetadata(t),o=h(y,t,e),i=o.type,a=o.payload,c=o.action,u=o.cancelUncompleted;if(n.actions.hasOwnProperty(i))throw new Error("Method decorated with such type `"+i+"` already exists");if(Array.isArray(c))for(var p=0,f=c.length;p<f;p++){var s=c[p].type;n.actions[s]=[{fn:""+e,options:{cancelUncompleted:u},type:s}]}else n.actions[i]=[{fn:""+e,options:{cancelUncompleted:u},type:i}];r.value[d]={type:i,action:c,payload:a},t.prototype[e]=function(){return t[e].apply(t,arguments)}}},t.Emitter=function y(r){return function(t,e){Object.defineProperty(t,e,{get:function(){return n.getInjector().get(c).emitter(r)}})}},t.EmitterAction=a,t.NgxsEmitPluginModule=u,t.EmitStore=c,t.ofEmittableDispatched=function g(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"DISPATCHED")},t.ofEmittableSuccessful=function m(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"SUCCESSFUL")},t.ofEmittableCanceled=function v(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"CANCELED")},t.ofEmittableErrored=function E(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"ERRORED")},t.ɵb=f,t.ɵc=n,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@ngxs/store"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@ngxs-labs/emitter",["exports","@angular/core","@ngxs/store","rxjs/operators"],e):e((t["ngxs-labs"]=t["ngxs-labs"]||{},t["ngxs-labs"].emitter={}),t.ng.core,t["ngxs-store"],t.rxjs.operators)}(this,function(t,r,l,e){"use strict";var d="NGXS_RECEIVER_META";function i(t){return Array.isArray(t)?t:[t]}function h(t,e,r){var n={type:"[ID:"+function u(){return(Math.random()*Date.now()).toString(36).slice(0,8)}()+"] "+e.name+"."+r,payload:undefined,action:undefined,cancelUncompleted:!0};if(!t)return n;var o=t.type,i=t.payload,a=t.action,c=t.cancelUncompleted;return o&&(n.type=o),i&&(n.payload=i),a&&(n.action=a,Array.isArray(a)||(n.type=a.type)),"boolean"==typeof c&&(n.cancelUncompleted=c),n}var n=function(){function e(t){e.injector=t}return e.getInjector=function(){if(!this.injector)throw new Error("You've forgotten to import `NgxsEmitPluginModule`");return this.injector},e.injector=null,e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[{type:r.Injector}]},e}(),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};var a=function(){function t(t){this.payload=t}return t.type=null,t}(),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function n(t,e){function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.emitter=function(t){var e=this,r=t[d];if(!r)throw new Error("I can't seem to find static metadata. Have you decorated "+t.name+" with @Receiver()?");return{emit:function(t){return e.dispatchSingle(r,t)},emitMany:function(t){return e.dispatchMany(r,t)}}},e.prototype.dispatchSingle=function(t,e){a.type=t.type,void 0===e&&t.payload!==undefined&&(e=t.payload);var r=t.action;if(r){var n=i(r);return this.dispatch(function o(t,e){return t.map(function(t){return new t(e)})}(n,e))}return this.dispatch(new a(e))},e.prototype.dispatchMany=function(t,e){if(!Array.isArray(e))return this.dispatch([]);a.type=t.type;var r=t.action;if(r){var n=i(r);return this.dispatch(function u(t,e){for(var r=[],n=0,o=t.length;n<o;n++)for(var i=t[n],a=0,c=e.length;a<c;a++)r.push(new i(e[a]));return r}(n,e))}return this.dispatch(e.map(function(t){return new a(t)}))},e.decorators=[{type:r.Injectable}],e}(l.Store);var u=function(){function t(t){this.injectorAccessor=t}return t.forRoot=function(){return{ngModule:t,providers:[c,n]}},t.decorators=[{type:r.NgModule}],t.ctorParameters=function(){return[{type:n,decorators:[{type:r.Self}]}]},t}();function p(t){for(var e={},r=t.length-1;0<=r;r--){var n=t[r];if("function"!=typeof n)throw new TypeError("Receiver should be a function, got "+n);var o=n[d];if(!o||!o.type)throw new Error(n.name+" should be decorated using @Receiver() decorator");e[o.type]=!0}return e}function f(n,o){return function(t){return t.pipe(e.filter(function(t){var e=n[l.getActionTypeFromInstance(t.action)],r=t.status===o;return e&&r}),e.map(function(t){var e=t.action,r=t.error;return{type:l.getActionTypeFromInstance(e),payload:e.payload,error:r}}))}}t.Receiver=function s(y){return function(t,e,r){if("undefined"==typeof t.prototype||!r||"function"!=typeof t[e])throw new TypeError("Only static functions can be decorated with @Receiver() decorator");if(e in t.prototype)throw new Error("Property with name `"+e.toString()+"` already exists, please rename to avoid conflicts");"string"!=typeof e&&(e=String(e));var n=l.ensureStoreMetadata(t),o=h(y,t,e),i=o.type,a=o.payload,c=o.action,u=o.cancelUncompleted;if(n.actions.hasOwnProperty(i))throw new Error("Method decorated with such type `"+i+"` already exists");if(Array.isArray(c))for(var p=0,f=c.length;p<f;p++){var s=c[p].type;n.actions[s]=[{fn:""+e,options:{cancelUncompleted:u},type:s}]}else n.actions[i]=[{fn:""+e,options:{cancelUncompleted:u},type:i}];r.value[d]={type:i,action:c,payload:a},t.prototype[e]=function(){return t[e].apply(t,arguments)}}},t.Emitter=function y(r){return function(t,e){Object.defineProperty(t,e,{get:function(){return n.getInjector().get(c).emitter(r)}})}},t.EmitterAction=a,t.NgxsEmitPluginModule=u,t.EmitStore=c,t.ofEmittableDispatched=function g(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"DISPATCHED")},t.ofEmittableSuccessful=function m(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"SUCCESSFUL")},t.ofEmittableCanceled=function v(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"CANCELED")},t.ofEmittableErrored=function E(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f(p(t),"ERRORED")},t.ɵb=f,t.ɵc=n,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngxs-labs-emitter.umd.min.js.map |
@@ -85,3 +85,3 @@ /** | ||
OfEmittableActionContext.prototype.payload; | ||
/** @type {?} */ | ||
/** @type {?|undefined} */ | ||
OfEmittableActionContext.prototype.error; | ||
@@ -141,2 +141,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWxzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMtbGFicy9lbWl0dGVyLyIsInNvdXJjZXMiOlsibGliL2NvcmUvaW50ZXJuYWwvaW50ZXJuYWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztJQVFJLFlBQWEsWUFBWTtJQUN6QixZQUFhLFlBQVk7SUFDekIsVUFBVyxVQUFVO0lBQ3JCLFNBQVUsU0FBUzs7Ozs7Ozs7Ozs7QUFnQnZCLHNDQUtDOzs7SUFKRyxnQ0FBYTs7SUFDYixtQ0FBYTs7SUFDYixrQ0FBZ0M7O0lBQ2hDLDZDQUEyQjs7Ozs7Ozs7OztBQVMvQiwrQkFHQzs7Ozs7O0lBRkcsa0RBQWlDOzs7OztJQUNqQyx1REFBd0M7Ozs7Ozs7Ozs7QUFVNUMsbUNBS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W5ndGg7IGogPCBwYXlsb2Fkc0xlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICBldmVudHMucHVzaChuZXcgQWN0aW9uKHBheWxvYWRzW2pdKSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gZXZlbnRzO1xufVxuIl19 |
@@ -85,3 +85,3 @@ /** | ||
OfEmittableActionContext.prototype.payload; | ||
/** @type {?} */ | ||
/** @type {?|undefined} */ | ||
OfEmittableActionContext.prototype.error; | ||
@@ -141,2 +141,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWxzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMtbGFicy9lbWl0dGVyLyIsInNvdXJjZXMiOlsibGliL2NvcmUvaW50ZXJuYWwvaW50ZXJuYWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztJQVFJLFlBQWEsWUFBWTtJQUN6QixZQUFhLFlBQVk7SUFDekIsVUFBVyxVQUFVO0lBQ3JCLFNBQVUsU0FBUzs7Ozs7Ozs7Ozs7QUFnQnZCLHNDQUtDOzs7SUFKRyxnQ0FBYTs7SUFDYixtQ0FBYTs7SUFDYixrQ0FBZ0M7O0lBQ2hDLDZDQUEyQjs7Ozs7Ozs7OztBQVMvQiwrQkFHQzs7Ozs7O0lBRkcsa0RBQWlDOzs7OztJQUNqQyx1REFBd0M7Ozs7Ozs7Ozs7QUFVNUMsbUNBSUM7OztJQUhHLCtCQUFxQjs7SUFDckIsK0JBQVk7O0lBQ1osOEJBQWM7Ozs7Ozs7Ozs7O0FBVWxCLDhDQUlDOzs7SUFIRyx3Q0FBYTs7SUFDYiwyQ0FBVzs7SUFDWCx5Q0FBeUI7Ozs7Ozs7O0FBUTdCLDJCQUVDOzs7OztBQUtELE1BQU0sS0FBTyxpQkFBaUIsR0FBRyxvQkFBb0I7Ozs7OztBQU9yRCxNQUFNLFVBQV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|
@@ -0,3 +1,3 @@ | ||
import { Injectable, Injector, NgModule, Self } from '@angular/core'; | ||
import { ensureStoreMetadata, Store, getActionTypeFromInstance } from '@ngxs/store'; | ||
import { Injectable, Injector, NgModule, Self } from '@angular/core'; | ||
import { filter, map } from 'rxjs/operators'; | ||
@@ -436,2 +436,2 @@ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4cy1sYWJzLWVtaXR0ZXIuanMubWFwIiwic291cmNlcyI6WyJuZzovL0BuZ3hzLWxhYnMvZW1pdHRlci9saWIvY29yZS9pbnRlcm5hbC9pbnRlcm5hbHMudHMiLCJuZzovL0BuZ3hzLWxhYnMvZW1pdHRlci9saWIvY29yZS9kZWNvcmF0b3JzL3JlY2VpdmVyLnRzIiwibmc6Ly9Abmd4cy1sYWJzL2VtaXR0ZXIvbGliL2NvcmUvc2VydmljZXMvaW5qZWN0b3ItYWNjZXNzb3Iuc2VydmljZS50cyIsIm5nOi8vQG5neHMtbGFicy9lbWl0dGVyL2xpYi9jb3JlL2FjdGlvbnMvYWN0aW9ucy50cyIsIm5nOi8vQG5neHMtbGFicy9lbWl0dGVyL2xpYi9jb3JlL3NlcnZpY2VzL2VtaXQtc3RvcmUuc2VydmljZS50cyIsIm5nOi8vQG5neHMtbGFicy9lbWl0dGVyL2xpYi9jb3JlL2RlY29yYXRvcnMvZW1pdHRlci50cyIsIm5nOi8vQG5neHMtbGFicy9lbWl0dGVyL2xpYi9lbWl0Lm1vZHVsZS50cyIsIm5nOi8vQG5neHMtbGFicy9lbWl0dGVyL2xpYi9jb3JlL29wZXJhdG9ycy9vZi1lbWl0dGFibGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5pbXBvcnQgeyBPYnNlcnZhYmxlIH0gZnJvbSAncnhqcyc7XG5cbi8qKlxuICogU3RhdHVzIG9mIGEg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1ldGFkYXRhKHRhcmdldCk7XG4gICAgICAgIGNvbnN0IHsgdHlwZSwgcGF5bG9hZCwgYWN0aW9uLCBjYW5jZWxVbmNvbXBsZXRlZCB9ID0gZ2V0QWN0aW9uUHJvcGVydGllcyhvcHRpb25zLCB0YXJnZXQsIGtleSk7XG5cbiAgICAgICAgaWYgKG1ldGEuYWN0aW9ucy5oYXNPd25Qcm9wZXJ0eSh0eXBlKSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBNZXRob2QgZGVjb3JhdGVkIHdpdGggc3VjaCB0eXBlIFxcYCR7dHlwZX1cXGAgYWxyZWFkeSBleGlzdHNgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghQXJyYXkuaXNBcnJheShhY3Rpb24pKSB7XG4gICAgICAgICAgICBtZXRhLmFjdGlvbnNbdHlwZV0gPSBbe1xuICAgICAgICAgICAgICAgIGZuOiBgJHtrZXl9YCxcbiAgICAgICAgICAgICAgICBvcHRpb25zOiB7IGNhbmNlbFVuY29tcGxldGVkIH0sXG4gICAgICAgICAgICAgICAgdHlwZVxuICAgICAgICAgICAgfV07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuZ3RoID0gYWN0aW9uLmxlbmd0aDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyB0eXBlIH0gPSBhY3Rpb25baV07XG4gICAgICAgICAgICAgICAgbWV0YS5hY3Rpb25zW3R5cGVdID0gW3tcbiAgICAgICAgICAgICAgICAgICAgZm46IGAke2tleX1gLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7IGNhbmNlbFVuY29tcGxldGVkIH0sXG4gICAgICAgICAgICAgICAgICAgIHR5cGVcbiAgICAgICAgICAgICAgICB9XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGRlc2NyaXB0b3IudmFsdWUhW1JFQ0VJVkVS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FDeEQsT0FBTyxXQUFXLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLDRCQUF3QixDQUFDO0NBQzFFOzs7OztBQUtELFNBQWdCLGtCQUFrQixDQUFDLEdBQUcsU0FBcUI7SUFDdkQsT0FBTyxXQUFXLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLDBCQUF1QixDQUFDO0NBQ3pFOzs7Ozs7QUFPRCxTQUFnQixXQUFXLENBQUMsS0FBWSxFQUFFLE1BQW9CO0lBQzFELE9BQU8sQ0FBQyxNQUFpQztRQUNyQyxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQ2QsTUFBTSxDQUFDLENBQUMsR0FBa0I7O2tCQUNoQixjQUFjLEdBQUcsS0FBSyxDQUFDLHlCQUF5QixDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQzs7a0JBQzdELDJCQUEyQixHQUFHLEdBQUcsQ0FBQyxNQUFNLEtBQUssTUFBTTtZQUN6RCxPQUFPLGNBQWMsSUFBSSwyQkFBMkIsQ0FBQztTQUN4RCxDQUFDLEVBQ0YsR0FBRyxDQUFDLENBQUMsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFpQixNQUFNO1lBQ3ZDLElBQUksRUFBRSx5QkFBeUIsQ0FBQyxNQUFNLENBQUM7WUFDdkMsT0FBTyxFQUFFLE1BQU0sQ0FBQyxPQUFPO1lBQ3ZCLEtBQUs7U0FDUixDQUFDLENBQUMsQ0FDTixDQUFDO0tBQ0wsQ0FBQztDQUNMOzs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9 | ||
//# sourceMappingURL=ngxs-labs-emitter.js.map |
@@ -0,4 +1,4 @@ | ||
import { __extends } from 'tslib'; | ||
import { Injectable, Injector, NgModule, Self } from '@angular/core'; | ||
import { ensureStoreMetadata, Store, getActionTypeFromInstance } from '@ngxs/store'; | ||
import { Injectable, Injector, NgModule, Self } from '@angular/core'; | ||
import { __extends } from 'tslib'; | ||
import { filter, map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25zLCB0YXJnZXQsIGtleSk7XG5cbiAgICAgICAgaWYgKG1ldGEuYWN0aW9ucy5oYXNPd25Qcm9wZXJ0eSh0eXBlKSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBNZXRob2QgZGVjb3JhdGVkIHdpdGggc3VjaCB0eXBlIFxcYCR7dHlwZX1cXGAgYWxyZWFkeSBleGlzdHNgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghQXJyYXkuaXNBcnJheShhY3Rpb24pKSB7XG4gICAgICAgICAgICBtZXRhLmFjdGlvbnNbdHlwZV0gPSBbe1xuICAgICAgICAgICAgICAgIGZuOiBgJHtrZXl9YCxcbiAgICAgICAgICAgICAgICBvcHRpb25zOiB7IGNhbmNlbFVuY29tcGxldGVkIH0sXG4gICAgICAgICAgICAgICAgdHlwZVxuICAgICAgICAgICAgfV07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuZ3RoID0gYWN0aW9uLmxlbmd0aDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyB0eXBlIH0gPSBhY3Rpb25baV07XG4gICAgICAgICAgICAgICAgbWV0YS5hY3Rpb25zW3R5cGVdID0gW3tcbiAgICAgICAgICAgICAgICAgICAgZm46IGAke2tleX1gLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7IGNhbmNlbFVuY29tcGxldGVkIH0sXG4gICAgICAgICAgICAgICAgICAgIHR5cGVcbiAgICAgICAgICAgICAgICB9XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGRlc2NyaXB0b3IudmFsdWUhW1JFQ0VJVkVSX01FVEFfS0VZXSA9IHtcbiAgICAgICAgICAgIHR5cGUsXG4gICAgICAgICAgICBhY3Rpb24sXG4gICAgICAgICAgICBwYXlsb2FkXG4gICAgICAgIH07XG5cbiAgICAgICAgdGFyZ2V0LnByb3RvdHlw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Ozs7Ozs7Ozs7Ozs7In0= | ||
//# sourceMappingURL=ngxs-labs-emitter.js.map |
@@ -62,3 +62,3 @@ import { Type } from '@angular/core'; | ||
payload: T; | ||
error: Error | undefined; | ||
error?: Error; | ||
} | ||
@@ -65,0 +65,0 @@ /** |
{ | ||
"$schema": "../node_modules/ng-packagr/package.schema.json", | ||
"name": "@ngxs-labs/emitter", | ||
"version": "1.6.4", | ||
"version": "1.7.0", | ||
"repository": { | ||
@@ -22,3 +22,3 @@ "type": "git", | ||
"@angular/core": "^7.0.0", | ||
"@ngxs/store": ">=3.3.0" | ||
"@ngxs/store": ">=3.3.4" | ||
}, | ||
@@ -25,0 +25,0 @@ "main": "bundles/ngxs-labs-emitter.umd.js", |
@@ -13,3 +13,3 @@ <p align="center"> | ||
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/ngxs-labs/tools/blob/master/license) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/079272acc4104332b904dc6818929d06)](https://www.codacy.com/app/arturovt/emitter?utm_source=github.com&utm_medium=referral&utm_content=ngxs-contrib/emitter&utm_campaign=Badge_Grade) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/079272acc4104332b904dc6818929d06)](https://www.codacy.com/app/arturovt/emitter?utm_source=github.com&utm_medium=referral&utm_content=ngxs-contrib/emitter&utm_campaign=Badge_Grade) [![Greenkeeper badge](https://badges.greenkeeper.io/ngxs-labs/emitter.svg)](https://greenkeeper.io/) | ||
@@ -140,2 +140,55 @@ [🚀 See it in action on Stackblitz](https://stackblitz.com/edit/ngxs-emitter-example) | ||
## Payload type safety | ||
```typescript | ||
import { Component } from '@angular/core'; | ||
import { Select } from '@ngxs/store'; | ||
import { Emitter, Emittable } from '@ngxs-labs/emitter'; | ||
import { Observable } from 'rxjs'; | ||
import { CustomCounter, CounterState } from './counter.state'; | ||
@Component({ | ||
selector: 'app-root', | ||
template: ` | ||
{{ counter$ | async | json }} | ||
<button (click)="update()">update</button> | ||
` | ||
}) | ||
export class AppComponent { | ||
@Select(CounterState) | ||
public counter$: Observable<CustomCounter>; | ||
@Emitter(CounterState.update) | ||
private update: Emittable<CustomCounter>; | ||
public update(): void { | ||
this.update.emit(undefined as any); | ||
} | ||
} | ||
``` | ||
```typescript | ||
import { State, StateContext } from '@ngxs/store'; | ||
import { Receiver, EmitterAction } from '@ngxs-labs/emitter'; | ||
export interface CustomCounter { | ||
value: number; | ||
} | ||
@State<CustomCounter>({ | ||
name: 'counter', | ||
defaults: { | ||
value: 0 | ||
} | ||
}) | ||
export class CounterState { | ||
@Receiver({ payload: { value: -1 } }) // default value if payload emitted as undefined | ||
public static update({ setState }: StateContext<CustomCounter>, { payload }: EmitterAction<CustomCounter>) { | ||
setState({ value: payload.value }); | ||
} | ||
} | ||
``` | ||
## Actions | ||
@@ -142,0 +195,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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
66
3267
588
343455
2