Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ngxs-labs/dispatch-decorator

Package Overview
Dependencies
Maintainers
8
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngxs-labs/dispatch-decorator - npm Package Compare versions

Comparing version 2.1.1 to 3.0.0

466

bundles/ngxs-labs-dispatch.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngxs/store'), require('rxjs'), require('rxjs/operators')) :
typeof define === 'function' && define.amd ? define('@ngxs-labs/dispatch-decorator', ['exports', '@angular/core', '@ngxs/store', 'rxjs', 'rxjs/operators'], factory) :
(global = global || self, factory((global['ngxs-labs'] = global['ngxs-labs'] || {}, global['ngxs-labs']['dispatch-decorator'] = {}), global.ng.core, global['ngxs-store'], global.rxjs, global.rxjs.operators));
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['ngxs-labs'] = global['ngxs-labs'] || {}, global['ngxs-labs']['dispatch-decorator'] = {}), global.ng.core, global['ngxs-store'], global.rxjs, global.rxjs.operators));
}(this, (function (exports, core, store, rxjs, operators) { 'use strict';

@@ -22,11 +22,13 @@

/* global Reflect, Promise */
var extendStatics = function(d, b) {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b)
if (Object.prototype.hasOwnProperty.call(b, p))
d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -36,8 +38,9 @@ function __() { this.constructor = d; }

}
var __assign = function() {
var __assign = function () {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}

@@ -48,7 +51,7 @@ return t;

};
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")

@@ -61,23 +64,34 @@ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {

}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if (d = decorators[i])
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
return function (target, key) { decorator(target, key, paramIndex); };
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function fulfilled(value) { try {
step(generator.next(value));
}
catch (e) {
reject(e);
} }
function rejected(value) { try {
step(generator["throw"](value));
}
catch (e) {
reject(e);
} }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }

@@ -87,72 +101,124 @@ step((generator = generator.apply(thisArg, _arguments || [])).next());

}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
var _ = { label: 0, sent: function () { if (t[0] & 1)
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
if (f)
throw new TypeError("Generator is already executing.");
while (_)
try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
return t;
if (y = 0, t)
op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
catch (e) {
op = [6, e];
y = 0;
}
finally {
f = t = 0;
}
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
}
const __createBinding = Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var __createBinding = Object.create ? (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
}) : (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
o[k2] = m[k];
});
function __exportStar(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
function __exportStar(m, o) {
for (var p in m)
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
__createBinding(o, m, p);
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
if (m)
return m.call(o);
if (o && typeof o.length === "number")
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
}
catch (error) { e = { error: error }; }
catch (error) {
e = { error: error };
}
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
if (r && !r.done && (m = i["return"]))
m.call(i);
}
finally { if (e) throw e.error; }
finally {
if (e)
throw e.error;
}
}
return ar;
}
/** @deprecated */
function __spread() {

@@ -163,5 +229,6 @@ for (var ar = [], i = 0; i < arguments.length; i++)

}
/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)

@@ -171,20 +238,30 @@ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)

return r;
};
}
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function verb(n) { if (g[n])
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try {
step(g[n](v));
}
catch (e) {
settle(q[0][3], e);
} }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
function settle(f, v) { if (f(v), q.shift(), q.length)
resume(q[0][0], q[0][1]); }
}
function __asyncDelegator(o) {

@@ -195,58 +272,60 @@ var i, p;

}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", { value: raw });
}
else {
cooked.raw = raw;
}
return cooked;
};
const __setModuleDefault = Object.create ? (function(o, v) {
}
;
var __setModuleDefault = Object.create ? (function (o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
}) : function (o, v) {
o["default"] = v;
};
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null)
for (var k in mod)
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m")
throw new TypeError("Private method is not writable");
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/static-injector.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NgxsDispatchPluginModuleNotImported = /** @class */ (function (_super) {
__extends(NgxsDispatchPluginModuleNotImported, _super);
function NgxsDispatchPluginModuleNotImported() {
var _this = _super !== null && _super.apply(this, arguments) || this;
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
_this.message = 'NgxsDispatchPluginModule is not imported';

@@ -257,13 +336,3 @@ return _this;

}(Error));
if (false) {
/** @type {?} */
NgxsDispatchPluginModuleNotImported.prototype.message;
}
/** @type {?} */
var injector = null;
/**
* @template T
* @param {?} actual
* @return {?}
*/
function assertDefined(actual) {

@@ -274,29 +343,14 @@ if (actual == null) {

}
/**
* @param {?} parentInjector
* @return {?}
*/
function setInjector(parentInjector) {
injector = parentInjector;
}
/**
* @return {?}
*/
function getStore() {
assertDefined(injector);
return (/** @type {?} */ (injector)).get(store.Store);
return injector.get(store.Store);
}
/**
* @return {?}
*/
function getNgZone() {
assertDefined(injector);
return (/** @type {?} */ (injector)).get(core.NgZone);
return injector.get(core.NgZone);
}
/**
* @fileoverview added by tsickle
* Generated from: lib/dispatch.module.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NgxsDispatchPluginModule = /** @class */ (function () {

@@ -306,9 +360,3 @@ function NgxsDispatchPluginModule(injector) {

}
/**
* @return {?}
*/
NgxsDispatchPluginModule.forRoot = /**
* @return {?}
*/
function () {
NgxsDispatchPluginModule.forRoot = function () {
return {

@@ -318,17 +366,11 @@ ngModule: NgxsDispatchPluginModule

};
NgxsDispatchPluginModule.decorators = [
{ type: core.NgModule }
];
/** @nocollapse */
NgxsDispatchPluginModule.ctorParameters = function () { return [
{ type: core.Injector }
]; };
return NgxsDispatchPluginModule;
}());
NgxsDispatchPluginModule.decorators = [
{ type: core.NgModule }
];
NgxsDispatchPluginModule.ctorParameters = function () { return [
{ type: core.Injector }
]; };
/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/action-completer.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ActionCompleter = /** @class */ (function () {

@@ -338,11 +380,3 @@ function ActionCompleter() {

}
/**
* @param {?} cancelUncompleted
* @return {?}
*/
ActionCompleter.create = /**
* @param {?} cancelUncompleted
* @return {?}
*/
function (cancelUncompleted) {
ActionCompleter.create = function (cancelUncompleted) {
if (cancelUncompleted) {

@@ -354,9 +388,3 @@ // Allocate memory lazily only if `cancelUncompleted` is truthy

};
/**
* @return {?}
*/
ActionCompleter.prototype.cancelPreviousAction = /**
* @return {?}
*/
function () {
ActionCompleter.prototype.cancelPreviousAction = function () {
this.cancelUncompleted$.next();

@@ -366,31 +394,8 @@ };

}());
if (false) {
/** @type {?} */
ActionCompleter.prototype.cancelUncompleted$;
}
/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/distribute-actions.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} actionOrActions
* @return {?}
*/
function dispatchFactory(actionOrActions) {
/** @type {?} */
var store = getStore();
/** @type {?} */
var ngZone = getNgZone();
ngZone.run((/**
* @return {?}
*/
function () { return store.dispatch(actionOrActions); }));
ngZone.run(function () { return store.dispatch(actionOrActions); });
}
/**
* @param {?} wrapped
* @param {?} actionCompleter
* @return {?}
*/
function unwrapObservable(wrapped, actionCompleter) {

@@ -402,15 +407,6 @@ // If it is not nully then it means `cancelUncompleted` is truthy

wrapped.subscribe({
next: (/**
* @param {?} actionOrActions
* @return {?}
*/
function (actionOrActions) { return dispatchFactory(actionOrActions); })
next: function (actionOrActions) { return dispatchFactory(actionOrActions); }
});
return wrapped;
}
/**
* @param {?} wrapped
* @return {?}
* @this {*}
*/
function unwrapPromise(wrapped) {

@@ -434,5 +430,2 @@ return __awaiter(this, void 0, void 0, function () {

* and unwrap `Promise` or `Observable`
* @param {?} wrapped
* @param {?} actionCompleter
* @return {?}
*/

@@ -450,35 +443,10 @@ function distributeActions(wrapped, actionCompleter) {

/**
* @fileoverview added by tsickle
* Generated from: lib/core/decorators/dispatch.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?=} descriptor
* @return {?}
*/
function isMethodDecorator(descriptor) {
return !!descriptor && typeof descriptor.value === 'function';
}
/**
* @param {?=} options
* @return {?}
*/
function Dispatch(options) {
if (options === void 0) { options = { cancelUncompleted: false }; }
return (/**
* @param {?} target
* @param {?} propertyKey
* @param {?=} descriptor
* @return {?}
*/
function (target, propertyKey, descriptor) {
/** @type {?} */
var originalValue = (/** @type {?} */ (null));
/** @type {?} */
var actionCompleter = ActionCompleter.create((/** @type {?} */ (options.cancelUncompleted)));
/**
* @this {?}
* @return {?}
*/
return function (target, propertyKey, descriptor) {
var originalValue = null;
var actionCompleter = ActionCompleter.create(options.cancelUncompleted);
function wrapped() {

@@ -490,13 +458,8 @@ // Every time the function is invoked we have to generate event

}
/** @type {?} */
var ngZone = getNgZone();
/** @type {?} */
var wrapped = originalValue.apply(this, arguments);
return ngZone.runOutsideAngular((/**
* @return {?}
*/
function () { return distributeActions(wrapped, actionCompleter); }));
return ngZone.runOutsideAngular(function () { return distributeActions(wrapped, actionCompleter); });
}
if (isMethodDecorator(descriptor)) {
originalValue = (/** @type {?} */ (descriptor.value));
originalValue = descriptor.value;
descriptor.value = wrapped;

@@ -506,16 +469,13 @@ }

Object.defineProperty(target, propertyKey, {
set: (/**
* @param {?} value
* @return {?}
*/
function (value) { return (originalValue = value); }),
get: (/**
* @return {?}
*/
function () { return wrapped; })
set: function (value) { return (originalValue = value); },
get: function () { return wrapped; }
});
}
});
};
}
/**
* Generated bundle index. Do not edit.
*/
exports.Dispatch = Dispatch;

@@ -522,0 +482,0 @@ exports.NgxsDispatchPluginModule = NgxsDispatchPluginModule;

@@ -1,7 +0,2 @@

/**
* @fileoverview added by tsickle
* Generated from: index.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { NgxsDispatchPluginModule, Dispatch } from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4cy1sYWJzL2Rpc3BhdGNoLWRlY29yYXRvci8iLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsbURBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
export * from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuIl19

@@ -1,36 +0,11 @@

/**
* @fileoverview added by tsickle
* Generated from: lib/core/decorators/dispatch.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { getNgZone } from '../internals/static-injector';
import { ActionCompleter } from '../internals/action-completer';
import { distributeActions } from '../internals/distribute-actions';
/**
* @param {?=} descriptor
* @return {?}
*/
function isMethodDecorator(descriptor) {
return !!descriptor && typeof descriptor.value === 'function';
}
/**
* @param {?=} options
* @return {?}
*/
export function Dispatch(options = { cancelUncompleted: false }) {
return (/**
* @param {?} target
* @param {?} propertyKey
* @param {?=} descriptor
* @return {?}
*/
(target, propertyKey, descriptor) => {
/** @type {?} */
let originalValue = (/** @type {?} */ (null));
/** @type {?} */
const actionCompleter = ActionCompleter.create((/** @type {?} */ (options.cancelUncompleted)));
/**
* @this {?}
* @return {?}
*/
return (target, propertyKey, descriptor) => {
let originalValue = null;
const actionCompleter = ActionCompleter.create(options.cancelUncompleted);
function wrapped() {

@@ -42,13 +17,8 @@ // Every time the function is invoked we have to generate event

}
/** @type {?} */
const ngZone = getNgZone();
/** @type {?} */
const wrapped = originalValue.apply(this, arguments);
return ngZone.runOutsideAngular((/**
* @return {?}
*/
() => distributeActions(wrapped, actionCompleter)));
return ngZone.runOutsideAngular(() => distributeActions(wrapped, actionCompleter));
}
if (isMethodDecorator(descriptor)) {
originalValue = (/** @type {?} */ (descriptor.value));
originalValue = descriptor.value;
descriptor.value = wrapped;

@@ -58,15 +28,8 @@ }

Object.defineProperty(target, propertyKey, {
set: (/**
* @param {?} value
* @return {?}
*/
value => (originalValue = value)),
get: (/**
* @return {?}
*/
() => wrapped)
set: value => (originalValue = value),
get: () => wrapped
});
}
});
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcGF0Y2guanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4cy1sYWJzL2Rpc3BhdGNoLWRlY29yYXRvci8iLCJzb3VyY2VzIjpbImxpYi9jb3JlL2RlY29yYXRvcnMvZGlzcGF0Y2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDekQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDOzs7OztBQUVwRSxTQUFTLGlCQUFpQixDQUFDLFVBQWdCO0lBQ3pDLE9BQU8sQ0FBQyxDQUFDLFVBQVUsSUFBSSxPQUFPLFVBQVUsQ0FBQyxLQUFLLEtBQUssVUFBVSxDQUFDO0FBQ2hFLENBQUM7Ozs7O0FBRUQsTUFBTSxVQUFVLFFBQVEsQ0FDdEIsVUFBMkIsRUFBRSxpQkFBaUIsRUF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XJuIG5nWm9uZS5ydW5PdXRzaWRlQW5ndWxhcigoKSA9PiBkaXN0cmlidXRlQWN0aW9ucyh3cmFwcGVkLCBhY3Rpb25Db21wbGV0ZXIpKTtcbiAgICB9XG5cbiAgICBpZiAoaXNNZXRob2REZWNvcmF0b3IoZGVzY3JpcHRvcikpIHtcbiAgICAgIG9yaWdpbmFsVmFsdWUgPSBkZXNjcmlwdG9yLnZhbHVlITtcbiAgICAgIGRlc2NyaXB0b3IudmFsdWUgPSB3cmFwcGVkO1xuICAgIH0gZWxzZSB7XG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LCBwcm9wZXJ0eUtleSwge1xuICAgICAgICBzZXQ6IHZhbHVlID0+IChvcmlnaW5hbFZhbHVlID0gdmFsdWUpLFxuICAgICAgICBnZXQ6ICgpID0+IHdyYXBwZWRcbiAgICAgIH0pO1xuICAgIH1cbiAgfTtcbn1cbiJdfQ==

@@ -1,6 +0,1 @@

/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/action-completer.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { Subject } from 'rxjs';

@@ -11,6 +6,2 @@ export class ActionCompleter {

}
/**
* @param {?} cancelUncompleted
* @return {?}
*/
static create(cancelUncompleted) {

@@ -23,5 +14,2 @@ if (cancelUncompleted) {

}
/**
* @return {?}
*/
cancelPreviousAction() {

@@ -31,6 +19,2 @@ this.cancelUncompleted$.next();

}
if (false) {
/** @type {?} */
ActionCompleter.prototype.cancelUncompleted$;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLWNvbXBsZXRlci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3hzLWxhYnMvZGlzcGF0Y2gtZGVjb3JhdG9yLyIsInNvdXJjZXMiOlsibGliL2NvcmUvaW50ZXJuYWxzL2FjdGlvbi1jb21wbGV0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gIC8vIEFsbG9jYXRlIG1lbW9yeSBsYXppbHkgb25seSBpZiBgY2FuY2VsVW5jb21wbGV0ZWRgIGlzIHRydXRoeVxuICAgICAgcmV0dXJuIG5ldyBBY3Rpb25Db21wbGV0ZXIoKTtcbiAgICB9XG5cbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuXG4gIGNhbmNlbFByZXZpb3VzQWN0aW9uKCk6IHZvaWQge1xuICAgIHRoaXMuY2FuY2VsVW5jb21wbGV0ZWQkLm5leHQoKTtcbiAgfVxufVxuIl19

@@ -1,7 +0,2 @@

/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/distribute-actions.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import * as tslib_1 from "tslib";
import { __awaiter } from "tslib";
import { ɵisPromise as isPromise } from '@angular/core';

@@ -11,21 +6,7 @@ import { isObservable } from 'rxjs';

import { getStore, getNgZone } from './static-injector';
/**
* @param {?} actionOrActions
* @return {?}
*/
function dispatchFactory(actionOrActions) {
/** @type {?} */
const store = getStore();
/** @type {?} */
const ngZone = getNgZone();
ngZone.run((/**
* @return {?}
*/
() => store.dispatch(actionOrActions)));
ngZone.run(() => store.dispatch(actionOrActions));
}
/**
* @param {?} wrapped
* @param {?} actionCompleter
* @return {?}
*/
function unwrapObservable(wrapped, actionCompleter) {

@@ -37,18 +18,8 @@ // If it is not nully then it means `cancelUncompleted` is truthy

wrapped.subscribe({
next: (/**
* @param {?} actionOrActions
* @return {?}
*/
actionOrActions => dispatchFactory(actionOrActions))
next: actionOrActions => dispatchFactory(actionOrActions)
});
return wrapped;
}
/**
* @param {?} wrapped
* @return {?}
* @this {*}
*/
function unwrapPromise(wrapped) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
/** @type {?} */
return __awaiter(this, void 0, void 0, function* () {
const actionOrActions = yield wrapped;

@@ -63,5 +34,2 @@ dispatchFactory(actionOrActions);

* and unwrap `Promise` or `Observable`
* @param {?} wrapped
* @param {?} actionCompleter
* @return {?}
*/

@@ -78,2 +46,2 @@ export function distributeActions(wrapped, actionCompleter) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzdHJpYnV0ZS1hY3Rpb25zLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMtbGFicy9kaXNwYXRjaC1kZWNvcmF0b3IvIiwic291cmNlcyI6WyJsaWIvY29yZS9pbnRlcm5hbHMvZGlzdHJpYnV0ZS1hY3Rpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLElBQUksU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3hELE9BQU8sRUFBRSxZQUFZLEVBQWMsTUFBTSxNQUFNLENBQUM7QUFDaEQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBSTNDLE9BQU8sRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7Ozs7O0FBRXhELFNBQVMsZUFBZSxDQUFDLGVBQWdDOztVQUNqRCxLQUFLLEdBQUcsUUFBUSxFQUFFOztVQUNsQixNQUFNLEdBQUcsU0FBUyxFQUFFO0lBQzFCLE1BQU0sQ0FBQyxHQUFHOzs7SUFBQyxHQUFHLEVBQUUsQ0FBQyxLQUFLLENBQUMsUUFBUSxDQUFDLGVBQWUsQ0FBQyxFQUFDLENBQUM7QUFDcEQsQ0FBQzs7Ozs7O0FBRUQsU0FBUyxnQkFBZ0IsQ0FDdkIsT0FBb0MsRUFDcEMsZUFBdUM7SUFFdkMsaUVBQWlFO0lBQ2pFLElBQUksZUFBZSxLQUFLLElBQUksRUFBRTtRQUM1QixPQUFPLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsZUFBZSxDQUFDLGtCQUFrQixDQUFDLENBQ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XZlIGRpZmZlcmVudCByZXR1cm4gdHlwZXMsIHRoZXkgY2FuIGJlIGVpdGhlclxuICogc3luY2hyb25vdXMgb3IgYXN5bmNocm9ub3VzLCB3ZSBoYXZlIHRvIGRldGVybWluZSBpdHMgcmV0dXJuIHR5cGVcbiAqIGFuZCB1bndyYXAgYFByb21pc2VgIG9yIGBPYnNlcnZhYmxlYFxuICovXG5leHBvcnQgZnVuY3Rpb24gZGlzdHJpYnV0ZUFjdGlvbnMod3JhcHBlZDogV3JhcHBlZCwgYWN0aW9uQ29tcGxldGVyOiBBY3Rpb25Db21wbGV0ZXIgfCBudWxsKSB7XG4gIGlmIChpc09ic2VydmFibGUod3JhcHBlZCkpIHtcbiAgICByZXR1cm4gdW53cmFwT2JzZXJ2YWJsZSh3cmFwcGVkLCBhY3Rpb25Db21wbGV0ZXIpO1xuICB9XG5cbiAgaWYgKGlzUHJvbWlzZSh3cmFwcGVkKSkge1xuICAgIHJldHVybiB1bndyYXBQcm9taXNlKHdyYXBwZWQpO1xuICB9XG5cbiAgZGlzcGF0Y2hGYWN0b3J5KHdyYXBwZWQpO1xuICByZXR1cm4gd3JhcHBlZDtcbn1cbiJdfQ==

@@ -1,14 +0,2 @@

/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/internals.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
export function DispatchOptions() { }
if (false) {
/** @type {?|undefined} */
DispatchOptions.prototype.cancelUncompleted;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWxzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMtbGFicy9kaXNwYXRjaC1kZWNvcmF0b3IvIiwic291cmNlcyI6WyJsaWIvY29yZS9pbnRlcm5hbHMvaW50ZXJuYWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Oz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vc3JjL2xpYi9jb3JlL2ludGVybmFscy9pbnRlcm5hbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9ic2VydmFibGUgfSBmcm9tICdyeGpzJztcblxuZXhwb3J0IHR5cGUgQWN0aW9uPFQgPSB1bmtub3duPiA9IG5ldyAocGF5bG9hZD86IFQpID0+IGFueTtcblxuZXhwb3J0IHR5cGUgRGlzcGF0Y2hGYWN0b3J5ID0gKGFjdGlvbk9yQWN0aW9uczogQWN0aW9uT3JBY3Rpb25zKSA9PiB2b2lkO1xuXG5leHBvcnQgdHlwZSBBY3Rpb25PckFjdGlvbnMgPSBBY3Rpb24gfCBBY3Rpb25bXTtcblxuLyoqXG4gKiBUaGlzIGNhbiBiZSBhIHBsYWluIGFjdGlvbi9hY3Rpb25zIG9yIFByb21pc2lmaWVkL3N0cmVhbWlmZWQgYWN0aW9uL2FjdGlvbnNcbiAqIGBgYHR5cGVzY3JpcHRcbiAqIEBEaXNwYXRjaCgpIGluY3JlbWVudCA9ICgpID0+IG5ldyBJbmNyZW1lbnQoKTtcbiAqIC8vIE9SXG4gKiBARGlzcGF0Y2goKSBpbmNyZW1lbnQgPSAoKSA9PiBQcm9taXNlLnJlc29sdmUobmV3IEluY3JlbWVudCgpKTtcbiAqIGBgYFxuICovXG5leHBvcnQgdHlwZSBXcmFwcGVkID0gQWN0aW9uT3JBY3Rpb25zIHwgT2JzZXJ2YWJsZTxBY3Rpb25PckFjdGlvbnM+IHwgUHJvbWlzZTxBY3Rpb25PckFjdGlvbnM+O1xuXG5leHBvcnQgaW50ZXJmYWNlIERpc3BhdGNoT3B0aW9ucyB7XG4gIGNhbmNlbFVuY29tcGxldGVkPzogYm9vbGVhbjtcbn1cbiJdfQ==

@@ -1,6 +0,1 @@

/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/static-injector.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { NgZone } from '@angular/core';

@@ -14,13 +9,3 @@ import { Store } from '@ngxs/store';

}
if (false) {
/** @type {?} */
NgxsDispatchPluginModuleNotImported.prototype.message;
}
/** @type {?} */
let injector = null;
/**
* @template T
* @param {?} actual
* @return {?}
*/
function assertDefined(actual) {

@@ -31,23 +16,13 @@ if (actual == null) {

}
/**
* @param {?} parentInjector
* @return {?}
*/
export function setInjector(parentInjector) {
injector = parentInjector;
}
/**
* @return {?}
*/
export function getStore() {
assertDefined(injector);
return (/** @type {?} */ (injector)).get(Store);
return injector.get(Store);
}
/**
* @return {?}
*/
export function getNgZone() {
assertDefined(injector);
return (/** @type {?} */ (injector)).get(NgZone);
return injector.get(NgZone);
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLWluamVjdG9yLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMtbGFicy9kaXNwYXRjaC1kZWNvcmF0b3IvIiwic291cmNlcyI6WyJsaWIvY29yZS9pbnRlcm5hbHMvc3RhdGljLWluamVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFZLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNqRCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBRXBDLE1BQU0sbUNBQW9DLFNBQVEsS0FBSztJQUF2RDs7UUFDRSxZQUFPLEdBQUcsMENBQTBDLENBQUM7SUFDdkQsQ0FBQztDQUFBOzs7SUFEQyxzREFBcUQ7OztJQUduRCxRQUFRLEdBQW9CLElBQUk7Ozs7OztBQUVwQyxTQUFTLGFBQWEsQ0FBSSxNQUE0QjtJQUNwRCxJQUFJLE1BQU0sSUFBSSxJQUFJLEVBQUU7UUFDbEIsTUFBTSxJQUFJLG1DQUFtQyxFQUFFLENBQUM7S0FDakQ7QUFDS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b24gZ2V0U3RvcmUoKTogbmV2ZXIgfCBTdG9yZSB7XG4gIGFzc2VydERlZmluZWQoaW5qZWN0b3IpO1xuICByZXR1cm4gaW5qZWN0b3IhLmdldDxTdG9yZT4oU3RvcmUpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZ2V0Tmdab25lKCk6IG5ldmVyIHwgTmdab25lIHtcbiAgYXNzZXJ0RGVmaW5lZChpbmplY3Rvcik7XG4gIHJldHVybiBpbmplY3RvciEuZ2V0PE5nWm9uZT4oTmdab25lKTtcbn1cbiJdfQ==

@@ -1,18 +0,7 @@

/**
* @fileoverview added by tsickle
* Generated from: lib/dispatch.module.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { NgModule, Injector } from '@angular/core';
import { setInjector } from './core/internals/static-injector';
export class NgxsDispatchPluginModule {
/**
* @param {?} injector
*/
constructor(injector) {
setInjector(injector);
}
/**
* @return {?}
*/
static forRoot() {

@@ -27,6 +16,5 @@ return {

];
/** @nocollapse */
NgxsDispatchPluginModule.ctorParameters = () => [
{ type: Injector }
];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcGF0Y2gubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMtbGFicy9kaXNwYXRjaC1kZWNvcmF0b3IvIiwic291cmNlcyI6WyJsaWIvZGlzcGF0Y2gubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFFBQVEsRUFBdUIsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXhFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUcvRCxNQUFNLE9BQU8sd0JBQXdCOzs7O0lBQ25DLFlBQVksUUFBa0I7UUFDNUIsV0FBVyxDQUFDLFFBQVEsQ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sQ0FBQztBQUcvRCxNQUFNLE9BQU8sd0JBQXdCO0lBQ25DLFlBQVksUUFBa0I7UUFDNUIsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQ3hCLENBQUM7SUFFRCxNQUFNLENBQUMsT0FBTztRQUNaLE9BQU87WUFDTCxRQUFRLEVBQUUsd0JBQXdCO1NBQ25DLENBQUM7SUFDSixDQUFDOzs7WUFWRixRQUFROzs7WUFKK0IsUUFBUSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlLCBNb2R1bGVXaXRoUHJvdmlkZXJzLCBJbmplY3RvciB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5pbXBvcnQgeyBzZXRJbmplY3RvciB9IGZyb20gJy4vY29yZS9pbnRlcm5hbHMvc3RhdGljLWluamVjdG9yJztcblxuQE5nTW9kdWxlKClcbmV4cG9ydCBjbGFzcyBOZ3hzRGlzcGF0Y2hQbHVnaW5Nb2R1bGUge1xuICBjb25zdHJ1Y3RvcihpbmplY3RvcjogSW5qZWN0b3IpIHtcbiAgICBzZXRJbmplY3RvcihpbmplY3Rvcik7XG4gIH1cblxuICBzdGF0aWMgZm9yUm9vdCgpOiBNb2R1bGVXaXRoUHJvdmlkZXJzPE5neHNEaXNwYXRjaFBsdWdpbk1vZHVsZT4ge1xuICAgIHJldHVybiB7XG4gICAgICBuZ01vZHVsZTogTmd4c0Rpc3BhdGNoUGx1Z2luTW9kdWxlXG4gICAgfTtcbiAgfVxufVxuIl19
/**
* @fileoverview added by tsickle
* Generated from: ngxs-labs-dispatch.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Generated bundle index. Do not edit.
*/
export { NgxsDispatchPluginModule, Dispatch } from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4cy1sYWJzLWRpc3BhdGNoLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neHMtbGFicy9kaXNwYXRjaC1kZWNvcmF0b3IvIiwic291cmNlcyI6WyJuZ3hzLWxhYnMtZGlzcGF0Y2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFJQSxtREFBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
export * from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4cy1sYWJzLWRpc3BhdGNoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL25neHMtbGFicy1kaXNwYXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==

@@ -1,8 +0,3 @@

/**
* @fileoverview added by tsickle
* Generated from: public_api.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { NgxsDispatchPluginModule } from './lib/dispatch.module';
export { Dispatch } from './lib/core/decorators/dispatch';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3hzLWxhYnMvZGlzcGF0Y2gtZGVjb3JhdG9yLyIsInNvdXJjZXMiOlsicHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ2pFLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IE5neHNEaXNwYXRjaFBsdWdpbk1vZHVsZSB9IGZyb20gJy4vbGliL2Rpc3BhdGNoLm1vZHVsZSc7XG5leHBvcnQgeyBEaXNwYXRjaCB9IGZyb20gJy4vbGliL2NvcmUvZGVjb3JhdG9ycy9kaXNwYXRjaCc7XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ2pFLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IE5neHNEaXNwYXRjaFBsdWdpbk1vZHVsZSB9IGZyb20gJy4vbGliL2Rpc3BhdGNoLm1vZHVsZSc7XG5leHBvcnQgeyBEaXNwYXRjaCB9IGZyb20gJy4vbGliL2NvcmUvZGVjb3JhdG9ycy9kaXNwYXRjaCc7XG4iXX0=

@@ -7,7 +7,2 @@ import { NgZone, NgModule, Injector, ɵisPromise } from '@angular/core';

/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/static-injector.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NgxsDispatchPluginModuleNotImported extends Error {

@@ -19,13 +14,3 @@ constructor() {

}
if (false) {
/** @type {?} */
NgxsDispatchPluginModuleNotImported.prototype.message;
}
/** @type {?} */
let injector = null;
/**
* @template T
* @param {?} actual
* @return {?}
*/
function assertDefined(actual) {

@@ -36,39 +21,18 @@ if (actual == null) {

}
/**
* @param {?} parentInjector
* @return {?}
*/
function setInjector(parentInjector) {
injector = parentInjector;
}
/**
* @return {?}
*/
function getStore() {
assertDefined(injector);
return (/** @type {?} */ (injector)).get(Store);
return injector.get(Store);
}
/**
* @return {?}
*/
function getNgZone() {
assertDefined(injector);
return (/** @type {?} */ (injector)).get(NgZone);
return injector.get(NgZone);
}
/**
* @fileoverview added by tsickle
* Generated from: lib/dispatch.module.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class NgxsDispatchPluginModule {
/**
* @param {?} injector
*/
constructor(injector) {
setInjector(injector);
}
/**
* @return {?}
*/
static forRoot() {

@@ -83,3 +47,2 @@ return {

];
/** @nocollapse */
NgxsDispatchPluginModule.ctorParameters = () => [

@@ -89,7 +52,2 @@ { type: Injector }

/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/action-completer.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class ActionCompleter {

@@ -99,6 +57,2 @@ constructor() {

}
/**
* @param {?} cancelUncompleted
* @return {?}
*/
static create(cancelUncompleted) {

@@ -111,5 +65,2 @@ if (cancelUncompleted) {

}
/**
* @return {?}
*/
cancelPreviousAction() {

@@ -119,31 +70,8 @@ this.cancelUncompleted$.next();

}
if (false) {
/** @type {?} */
ActionCompleter.prototype.cancelUncompleted$;
}
/**
* @fileoverview added by tsickle
* Generated from: lib/core/internals/distribute-actions.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} actionOrActions
* @return {?}
*/
function dispatchFactory(actionOrActions) {
/** @type {?} */
const store = getStore();
/** @type {?} */
const ngZone = getNgZone();
ngZone.run((/**
* @return {?}
*/
() => store.dispatch(actionOrActions)));
ngZone.run(() => store.dispatch(actionOrActions));
}
/**
* @param {?} wrapped
* @param {?} actionCompleter
* @return {?}
*/
function unwrapObservable(wrapped, actionCompleter) {

@@ -155,18 +83,8 @@ // If it is not nully then it means `cancelUncompleted` is truthy

wrapped.subscribe({
next: (/**
* @param {?} actionOrActions
* @return {?}
*/
actionOrActions => dispatchFactory(actionOrActions))
next: actionOrActions => dispatchFactory(actionOrActions)
});
return wrapped;
}
/**
* @param {?} wrapped
* @return {?}
* @this {*}
*/
function unwrapPromise(wrapped) {
return __awaiter(this, void 0, void 0, function* () {
/** @type {?} */
const actionOrActions = yield wrapped;

@@ -181,5 +99,2 @@ dispatchFactory(actionOrActions);

* and unwrap `Promise` or `Observable`
* @param {?} wrapped
* @param {?} actionCompleter
* @return {?}
*/

@@ -197,34 +112,9 @@ function distributeActions(wrapped, actionCompleter) {

/**
* @fileoverview added by tsickle
* Generated from: lib/core/decorators/dispatch.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?=} descriptor
* @return {?}
*/
function isMethodDecorator(descriptor) {
return !!descriptor && typeof descriptor.value === 'function';
}
/**
* @param {?=} options
* @return {?}
*/
function Dispatch(options = { cancelUncompleted: false }) {
return (/**
* @param {?} target
* @param {?} propertyKey
* @param {?=} descriptor
* @return {?}
*/
(target, propertyKey, descriptor) => {
/** @type {?} */
let originalValue = (/** @type {?} */ (null));
/** @type {?} */
const actionCompleter = ActionCompleter.create((/** @type {?} */ (options.cancelUncompleted)));
/**
* @this {?}
* @return {?}
*/
return (target, propertyKey, descriptor) => {
let originalValue = null;
const actionCompleter = ActionCompleter.create(options.cancelUncompleted);
function wrapped() {

@@ -236,13 +126,8 @@ // Every time the function is invoked we have to generate event

}
/** @type {?} */
const ngZone = getNgZone();
/** @type {?} */
const wrapped = originalValue.apply(this, arguments);
return ngZone.runOutsideAngular((/**
* @return {?}
*/
() => distributeActions(wrapped, actionCompleter)));
return ngZone.runOutsideAngular(() => distributeActions(wrapped, actionCompleter));
}
if (isMethodDecorator(descriptor)) {
originalValue = (/** @type {?} */ (descriptor.value));
originalValue = descriptor.value;
descriptor.value = wrapped;

@@ -252,35 +137,14 @@ }

Object.defineProperty(target, propertyKey, {
set: (/**
* @param {?} value
* @return {?}
*/
value => (originalValue = value)),
get: (/**
* @return {?}
*/
() => wrapped)
set: value => (originalValue = value),
get: () => wrapped
});
}
});
};
}
/**
* @fileoverview added by tsickle
* Generated from: public_api.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
* Generated bundle index. Do not edit.
*/
/**
* @fileoverview added by tsickle
* Generated from: index.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* Generated from: ngxs-labs-dispatch.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { Dispatch, NgxsDispatchPluginModule };
//# sourceMappingURL=ngxs-labs-dispatch.js.map

@@ -0,3 +1,4 @@

import { Observable } from 'rxjs';
import { ActionCompleter } from './action-completer';
import { Wrapped } from './internals';
import { Wrapped, ActionOrActions } from './internals';
/**

@@ -8,2 +9,2 @@ * As dispatchers can have different return types, they can be either

*/
export declare function distributeActions(wrapped: Wrapped, actionCompleter: ActionCompleter | null): Wrapped;
export declare function distributeActions(wrapped: Wrapped, actionCompleter: ActionCompleter | null): ActionOrActions | Observable<ActionOrActions> | Promise<ActionOrActions>;
{
"$schema": "../node_modules/ng-packagr/package.schema.json",
"name": "@ngxs-labs/dispatch-decorator",
"version": "2.1.1",
"version": "3.0.0",
"repository": {

@@ -21,12 +21,10 @@ "type": "git",

"peerDependencies": {
"@angular/core": ">=7.0.0 <12.0.0",
"@ngxs/store": ">=3.7.1",
"rxjs": ">=6.6.7"
"@angular/core": ">=12.0.0 <13.0.0",
"@ngxs/store": ">=3.7.2",
"rxjs": ">=6.1.0"
},
"main": "bundles/ngxs-labs-dispatch.umd.js",
"module": "fesm5/ngxs-labs-dispatch.js",
"module": "fesm2015/ngxs-labs-dispatch.js",
"es2015": "fesm2015/ngxs-labs-dispatch.js",
"esm5": "esm5/ngxs-labs-dispatch.js",
"esm2015": "esm2015/ngxs-labs-dispatch.js",
"fesm5": "fesm5/ngxs-labs-dispatch.js",
"fesm2015": "fesm2015/ngxs-labs-dispatch.js",

@@ -36,4 +34,4 @@ "typings": "ngxs-labs-dispatch.d.ts",

"dependencies": {
"tslib": "^1.9.0"
"tslib": "^2.1.0"
}
}
}

@@ -9,12 +9,10 @@ <p align="center">

[![Build Status](https://travis-ci.org/ngxs-labs/dispatch-decorator.svg?branch=master)](https://travis-ci.org/ngxs-labs/dispatch-decorator)
[![NPM](https://badge.fury.io/js/%40ngxs-labs%2Fdispatch-decorator.svg)](https://www.npmjs.com/package/@ngxs-labs/dispatch-decorator)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/ngxs-labs/dispatch-decorator/blob/master/LICENSE)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/610c73ab99434bf9807c080e7feb8b85)](https://www.codacy.com/app/arturovt/dispatch-decorator?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ngxs-labs/dispatch-decorator&amp;utm_campaign=Badge_Grade)
This package simplifies dispatching process, you shouldn't care about `Store` service injection as we provide more declarative way to dispatch events out of the box.
This package simplifies the dispatching process. You shouldn't care about `Store` service injection as we provide a more declarative way to dispatch events out of the box.
## 📦 Install
To install `@ngxs-labs/dispatch-decorator` run the following command:
To install the `@ngxs-labs/dispatch-decorator` run the following command:

@@ -35,6 +33,3 @@ ```console

@NgModule({
imports: [
NgxsModule.forRoot(states),
NgxsDispatchPluginModule.forRoot()
]
imports: [NgxsModule.forRoot(states), NgxsDispatchPluginModule.forRoot()]
})

@@ -46,3 +41,3 @@ export class AppModule {}

`@Dispatch()` is a function that allows you to decorate methods and properties of your classes. Firstly let's create our state for demonstrating purposes:
`@Dispatch()` is a function that allows you to decorate the methods and properties of your classes. Firstly let's create our state for demonstrating purposes:

@@ -77,3 +72,3 @@ ```typescript

After registering our state in the `NgxsModule` we are ready to try the plugin out. Given the following component:
After registering our state in the `NgxsModule`, we are ready to try the plugin out. Given the following component:

@@ -109,5 +104,5 @@ ```typescript

As you may mention we don't have to inject the `Store` class to dispatch those actions. The `@Dispatch` decorator does it for you underneath. It gets the result of the function call and invokes `store.dispatch(...)` under the hood.
As you may mention, we don't have to inject the `Store` class to dispatch those actions. The `@Dispatch` decorator does it for you underneath. It gets the result of the function call and invokes `store.dispatch(...)` under the hood.
Dispatchers can be also asynchronous. They can return either `Promise` or `Observable`. Asynchronous operations are handled outside of Angular's zone, thus it doesn't affect performance:
Dispatchers can also be asynchronous. They can return either `Promise` or `Observable`. Asynchronous operations are handled outside of Angular's zone; thus it doesn't affect performance:

@@ -136,3 +131,3 @@ ```typescript

Notice that it doesn't matter if you use an arrow function or a normal class method.
Notice that it doesn't matter if you use an arrow function or a regular class method.

@@ -154,10 +149,9 @@ ### Dispatching Multiple Actions

If you have an async dispatcher, you may want to cancel a previous `Observable` if the dispatcher has been invoked again. This is useful for canceling previous requests like in a typeahead. Given the following example:
If you have an async dispatcher, you may want to cancel a previous `Observable` if the dispatcher has been invoked again. This is useful for cancelling previous requests like in a typeahead. Given the following example:
```ts
export class NovelsFacade {
@Component({ ... })
export class NovelsComponent {
@Dispatch() searchNovels = (query: string) =>
this.novelsService
.getNovels(query)
.pipe(map(novels => new SetNovels(novels)));
this.novelsService.getNovels(query).pipe(map(novels => new SetNovels(novels)));

@@ -171,7 +165,6 @@ constructor(private novelsService: NovelsService) {}

```ts
export class NovelsFacade {
@Component({ ... })
export class NovelsComponent {
@Dispatch({ cancelUncompleted: true }) searchNovels = (query: string) =>
this.novelsService
.getNovels(query)
.pipe(map(novels => new SetNovels(novels)));
this.novelsService.getNovels(query).pipe(map(novels => new SetNovels(novels)));

@@ -181,5 +174,1 @@ constructor(private novelsService: NovelsService) {}

```
### Business Logic Decomposition with Facades
[There is a great article](https://medium.com/ngxs/ngxs-facade-3aa90c41497b) about using facades and the `@Dispatch` decorator together to mask interaction with more complex components behind the scenes.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc