New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@datorama/akita-ng-entity-service

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datorama/akita-ng-entity-service - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

682

bundles/datorama-akita-ng-entity-service.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@datorama/akita')) :
typeof define === 'function' && define.amd ? define('@datorama/akita-ng-entity-service', ['exports', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/core', '@datorama/akita'], factory) :
(factory((global.datorama = global.datorama || {}, global.datorama['akita-ng-entity-service'] = {}),global.ng.common.http,global.rxjs,global.rxjs.operators,global.ng.core,global.akita));
}(this, (function (exports,http,rxjs,operators,i0,akita) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@datorama/akita'), require('rxjs'), require('@angular/core'), require('@angular/common/http'), require('rxjs/operators')) :
typeof define === 'function' && define.amd ? define('@datorama/akita-ng-entity-service', ['exports', '@datorama/akita', 'rxjs', '@angular/core', '@angular/common/http', 'rxjs/operators'], factory) :
(global = global || self, factory((global.datorama = global.datorama || {}, global.datorama['akita-ng-entity-service'] = {}), global.akita, global.rxjs, global.ng.core, global.ng.common.http, global.rxjs.operators));
}(this, function (exports, akita, rxjs, core, http, operators) { 'use strict';

@@ -20,31 +20,33 @@ /**

/** @type {?} */
var ofType = ( /**
var ofType = (/**
* @param {?} type
* @return {?}
*/function (type) {
return operators.filter(( /**
* @param {?} action
* @return {?}
*/function (action) { return action.type === type; }));
});
*/
function (type) { return operators.filter((/**
* @param {?} action
* @return {?}
*/
function (action) { return action.type === type; })); });
/** @type {?} */
var filterMethod = ( /**
var filterMethod = (/**
* @param {?} method
* @return {?}
*/function (method) {
return operators.filter(( /**
*/
function (method) {
return operators.filter((/**
* @param {?} action
* @return {?}
*/function (action) { return action.method === method; }));
*/
function (action) { return action.method === method; }));
});
/** @type {?} */
var filterStore = ( /**
var filterStore = (/**
* @param {?} name
* @return {?}
*/function (name) {
return operators.filter(( /**
* @param {?} action
* @return {?}
*/function (action) { return action.storeName === name; }));
});
*/
function (name) { return operators.filter((/**
* @param {?} action
* @return {?}
*/
function (action) { return action.storeName === name; })); });
var NgEntityServiceNotifier = /** @class */ (function () {

@@ -63,9 +65,9 @@ function NgEntityServiceNotifier() {

*/
function (event) {
this.dispatcher.next(event);
};
function (event) {
this.dispatcher.next(event);
};
NgEntityServiceNotifier.decorators = [
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
{ type: core.Injectable, args: [{ providedIn: 'root' },] }
];
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = i0.defineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
return NgEntityServiceNotifier;

@@ -91,5 +93,5 @@ }());

*/
function (event) {
this.dispatcher.next(event);
};
function (event) {
this.dispatcher.next(event);
};
/**

@@ -103,80 +105,91 @@ * @param {?=} name

*/
function (name) {
var _this = this;
/** @type {?} */
var filterStore$$1 = operators.filter(( /**
function (name) {
var _this = this;
/** @type {?} */
var filterStore = operators.filter((/**
* @param {?} __0
* @return {?}
*/
function (_a) {
var storeName = _a.storeName;
return (name ? storeName === name : true);
}));
/** @type {?} */
var filterMethod = (/**
* @param {?} mthd
* @return {?}
*/
function (mthd) {
return operators.filter((/**
* @param {?} __0
* @return {?}
*/function (_a) {
var storeName = _a.storeName;
return (name ? storeName === name : true);
*/
function (_a) {
var method = _a.method;
return akita.isFunction(mthd) ? mthd(method) : method === mthd;
}));
/** @type {?} */
var filterMethod$$1 = ( /**
* @param {?} mthd
});
/** @type {?} */
var actionBased = (/**
* @param {?} current
* @return {?}
*/
function (current) {
return _this.loading$.pipe(filterStore, filterMethod(current), operators.map((/**
* @param {?} action
* @return {?}
*/function (mthd) {
return operators.filter(( /**
* @param {?} __0
* @return {?}
*/function (_a) {
var method = _a.method;
return akita.isFunction(mthd) ? mthd(method) : method === mthd;
}));
});
/** @type {?} */
var actionBased = ( /**
* @param {?} current
*/
function (action) { return action.loading; })));
});
/** @type {?} */
var idBased = (/**
* @param {?} id
* @param {?} mthd
* @return {?}
*/
function (id, mthd) {
return _this.loading$.pipe(filterStore, filterMethod(mthd), operators.filter((/**
* @param {?} action
* @return {?}
*/function (current) {
return _this.loading$.pipe(filterStore$$1, filterMethod$$1(current), operators.map(( /**
* @param {?} action
* @return {?}
*/function (action) { return action.loading; })));
});
/** @type {?} */
var idBased = ( /**
*/
function (action) { return action.entityId === id; })), operators.map((/**
* @param {?} action
* @return {?}
*/
function (action) { return action.loading; })));
});
return {
get$: actionBased(HttpMethod.GET),
add$: actionBased(HttpMethod.POST),
update$: actionBased((/**
* @param {?} method
* @return {?}
*/
function (method) { return method === HttpMethod.PUT || method === HttpMethod.PATCH; })),
delete$: actionBased(HttpMethod.DELETE),
getEntity: (/**
* @param {?} id
* @param {?} mthd
* @return {?}
*/function (id, mthd) {
return _this.loading$.pipe(filterStore$$1, filterMethod$$1(mthd), operators.filter(( /**
* @param {?} action
* @return {?}
*/function (action) { return action.entityId === id; })), operators.map(( /**
* @param {?} action
* @return {?}
*/function (action) { return action.loading; })));
});
return {
get$: actionBased(HttpMethod.GET),
add$: actionBased(HttpMethod.POST),
update$: actionBased(( /**
* @param {?} method
* @return {?}
*/function (method) { return method === HttpMethod.PUT || method === HttpMethod.PATCH; })),
delete$: actionBased(HttpMethod.DELETE),
getEntity: ( /**
* @param {?} id
* @return {?}
*/function (id) { return idBased(id, HttpMethod.GET); }),
updateEntity: ( /**
* @param {?} id
* @return {?}
*/function (id) {
return idBased(id, ( /**
* @param {?} method
* @return {?}
*/function (method) { return method === HttpMethod.PUT || method === HttpMethod.PATCH; }));
}),
deleteEntity: ( /**
* @param {?} id
* @return {?}
*/function (id) { return idBased(id, HttpMethod.DELETE); })
};
*/
function (id) { return idBased(id, HttpMethod.GET); }),
updateEntity: (/**
* @param {?} id
* @return {?}
*/
function (id) { return idBased(id, (/**
* @param {?} method
* @return {?}
*/
function (method) { return method === HttpMethod.PUT || method === HttpMethod.PATCH; })); }),
deleteEntity: (/**
* @param {?} id
* @return {?}
*/
function (id) { return idBased(id, HttpMethod.DELETE); })
};
};
NgEntityServiceLoader.decorators = [
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
{ type: core.Injectable, args: [{ providedIn: 'root' },] }
];
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = i0.defineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
return NgEntityServiceLoader;

@@ -187,21 +200,13 @@ }());

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; }
}

@@ -211,8 +216,7 @@ return ar;

var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
/** @type {?} */
var NG_ENTITY_SERVICE_CONFIG = new i0.InjectionToken('NgEntityServiceGlobalConfig');
var NG_ENTITY_SERVICE_CONFIG = new core.InjectionToken('NgEntityServiceGlobalConfig');
/** @type {?} */

@@ -234,2 +238,3 @@ var defaultConfig = {

function mergeDeep(target) {
var _a, _b;
var sources = [];

@@ -239,3 +244,2 @@ for (var _i = 1; _i < arguments.length; _i++) {

}
var _a, _b;
if (!sources.length)

@@ -264,9 +268,8 @@ return target;

function NgEntityServiceConfig(config) {
if (config === void 0) {
config = {};
}
return ( /**
if (config === void 0) { config = {}; }
return (/**
* @param {?} constructor
* @return {?}
*/function (constructor) {
*/
function (constructor) {
if (config.baseUrl) {

@@ -303,6 +306,7 @@ constructor['baseUrl'] = config.baseUrl;

function successAction(storeName, notifier) {
return ( /**
return (/**
* @param {?} __0
* @return {?}
*/function (_a) {
*/
function (_a) {
var payload = _a.payload, method = _a.method, successMsg = _a.successMsg;

@@ -324,6 +328,7 @@ notifier.dispatch({

function errorAction(storeName, notifier) {
return ( /**
return (/**
* @param {?} __0
* @return {?}
*/function (_a) {
*/
function (_a) {
var payload = _a.payload, method = _a.method, errorMsg = _a.errorMsg;

@@ -344,5 +349,3 @@ notifier.dispatch({

({ __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 (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -357,10 +360,12 @@ };

/** @type {?} */
var mapResponse = ( /**
var mapResponse = (/**
* @param {?} config
* @return {?}
*/function (config) {
return operators.map(( /**
*/
function (config) {
return operators.map((/**
* @param {?} res
* @return {?}
*/function (res) { return ((config || {}).mapResponseFn ? config.mapResponseFn(res) : res); }));
*/
function (res) { return ((config || {}).mapResponseFn ? config.mapResponseFn(res) : res); }));
});

@@ -370,10 +375,9 @@ /**

*/
var /**
var /**
* @template S
*/ NgEntityService = /** @class */ (function (_super) {
*/
NgEntityService = /** @class */ (function (_super) {
__extends(NgEntityService, _super);
function NgEntityService(store, config) {
if (config === void 0) {
config = {};
}
if (config === void 0) { config = {}; }
var _this = _super.call(this) || this;

@@ -383,6 +387,6 @@ _this.store = store;

_this.globalConfig = {};
_this.http = i0.inject(http.HttpClient);
_this.loader = i0.inject(NgEntityServiceLoader);
_this.notifier = i0.inject(NgEntityServiceNotifier);
_this.globalConfig = i0.inject(NG_ENTITY_SERVICE_CONFIG);
_this.http = core.inject(http.HttpClient);
_this.loader = core.inject(NgEntityServiceLoader);
_this.notifier = core.inject(NgEntityServiceNotifier);
_this.globalConfig = core.inject(NG_ENTITY_SERVICE_CONFIG);
_this.mergedConfig = mergeDeep(defaultConfig, _this.globalConfig, config);

@@ -396,3 +400,4 @@ _this.dispatchSuccess = successAction(_this.store.storeName, _this.notifier);

* @return {?}
*/ function () {
*/
function () {
return (this.baseUrl || this.getConfigValue('baseUrl')) + "/" + this.resourceName;

@@ -406,3 +411,4 @@ },

* @return {?}
*/ function () {
*/
function () {
return this.getConfigValue('resourceName') || this.store.storeName;

@@ -421,6 +427,15 @@ },

*/
function (api) {
this.baseUrl = api;
};
function (api) {
this.baseUrl = api;
};
/**
* @return {?}
*/
NgEntityService.prototype.getHttp = /**
* @return {?}
*/
function () {
return this.http;
};
/**
* @template T

@@ -437,60 +452,63 @@ * @param {?=} idOrConfig

*/
function (idOrConfig, config) {
var _this = this;
/** @type {?} */
var url;
/** @type {?} */
var isSingle = isID(idOrConfig);
/** @type {?} */
var _config = (isSingle ? config : idOrConfig) || {};
/** @type {?} */
var method = this.getHttpMethod(HttpMethod.GET);
if (_config.url) {
url = _config.url;
function (idOrConfig, config) {
var _this = this;
/** @type {?} */
var url;
/** @type {?} */
var isSingle = isID(idOrConfig);
/** @type {?} */
var _config = (isSingle ? config : idOrConfig) || {};
/** @type {?} */
var method = this.getHttpMethod(HttpMethod.GET);
if (_config.url) {
url = _config.url;
}
else {
url = isSingle ? this.api + "/" + idOrConfig : this.api;
}
this.loader.dispatch({
method: method,
loading: true,
entityId: isSingle ? idOrConfig : null,
storeName: this.store.storeName
});
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(_config), operators.tap((/**
* @param {?} data
* @return {?}
*/
function (data) {
if (isSingle) {
_this.store.upsert((/** @type {?} */ (idOrConfig)), data);
}
else {
url = isSingle ? this.api + "/" + idOrConfig : this.api;
if (_config.append) {
_this.store.add(data);
}
else if (_config.upsert) {
_this.store.upsertMany(data);
}
else {
_this.store.set(data);
}
}
this.loader.dispatch({
_this.dispatchSuccess({
method: method,
loading: true,
entityId: isSingle ? idOrConfig : null,
storeName: this.store.storeName
payload: data,
successMsg: _config.successMsg
});
return ( /** @type {?} */(this.http[method.toLowerCase()](url, _config).pipe(mapResponse(_config), operators.tap(( /**
* @param {?} data
* @return {?}
*/function (data) {
if (isSingle) {
_this.store.upsert(( /** @type {?} */(idOrConfig)), data);
}
else {
if (_config.append) {
_this.store.add(data);
}
else if (_config.upsert) {
_this.store.upsertMany(data);
}
else {
_this.store.set(data);
}
}
_this.dispatchSuccess({
method: method,
payload: data,
successMsg: _config.successMsg
});
})), operators.catchError(( /**
* @param {?} error
* @return {?}
*/function (error) { return _this.handleError(method, error, _config.errorMsg); })), operators.finalize(( /**
* @return {?}
*/function () {
_this.loader.dispatch({
method: method,
loading: false,
storeName: _this.store.storeName
});
})))));
};
})), operators.catchError((/**
* @param {?} error
* @return {?}
*/
function (error) { return _this.handleError(method, error, _config.errorMsg); })), operators.finalize((/**
* @return {?}
*/
function () {
_this.loader.dispatch({
method: method,
loading: false,
storeName: _this.store.storeName
});
})))));
};
/**

@@ -528,34 +546,37 @@ *

*/
function (entity, config) {
var _this = this;
/** @type {?} */
var method = this.getHttpMethod(HttpMethod.POST);
this.loader.dispatch({
function (entity, config) {
var _this = this;
/** @type {?} */
var method = this.getHttpMethod(HttpMethod.POST);
this.loader.dispatch({
method: method,
loading: true,
storeName: this.store.storeName
});
return (/** @type {?} */ (this.http[method.toLowerCase()](this.resolveUrl(config), entity, config).pipe(mapResponse(config), operators.tap((/**
* @param {?} entity
* @return {?}
*/
function (entity) {
_this.store.add(entity, config);
_this.dispatchSuccess({
method: method,
loading: true,
storeName: this.store.storeName
payload: entity,
successMsg: config && config.successMsg
});
return ( /** @type {?} */(this.http[method.toLowerCase()](this.resolveUrl(config), entity, config).pipe(mapResponse(config), operators.tap(( /**
* @param {?} entity
* @return {?}
*/function (entity) {
_this.store.add(entity, config);
_this.dispatchSuccess({
method: method,
payload: entity,
successMsg: config && config.successMsg
});
})), operators.catchError(( /**
* @param {?} error
* @return {?}
*/function (error) { return _this.handleError(method, error, config && config.errorMsg); })), operators.finalize(( /**
* @return {?}
*/function () {
_this.loader.dispatch({
method: method,
loading: false,
storeName: _this.store.storeName
});
})))));
};
})), operators.catchError((/**
* @param {?} error
* @return {?}
*/
function (error) { return _this.handleError(method, error, config && config.errorMsg); })), operators.finalize((/**
* @return {?}
*/
function () {
_this.loader.dispatch({
method: method,
loading: false,
storeName: _this.store.storeName
});
})))));
};
/**

@@ -595,36 +616,39 @@ *

*/
function (id, entity, config) {
var _this = this;
/** @type {?} */
var method = config && config.method ? config.method : this.getHttpMethod(HttpMethod.PUT);
this.loader.dispatch({
function (id, entity, config) {
var _this = this;
/** @type {?} */
var method = config && config.method ? config.method : this.getHttpMethod(HttpMethod.PUT);
this.loader.dispatch({
method: method,
loading: true,
entityId: id,
storeName: this.store.storeName
});
return (/** @type {?} */ (this.http[method.toLocaleLowerCase()](this.resolveUrl(config, id), entity, config).pipe(mapResponse(config), operators.tap((/**
* @param {?} entity
* @return {?}
*/
function (entity) {
_this.store.update(id, (/** @type {?} */ (entity)));
_this.dispatchSuccess({
method: method,
loading: true,
payload: entity,
successMsg: config && config.successMsg
});
})), operators.catchError((/**
* @param {?} error
* @return {?}
*/
function (error) { return _this.handleError(method, error, config && config.errorMsg); })), operators.finalize((/**
* @return {?}
*/
function () {
_this.loader.dispatch({
method: method,
loading: false,
entityId: id,
storeName: this.store.storeName
storeName: _this.store.storeName
});
return ( /** @type {?} */(this.http[method.toLocaleLowerCase()](this.resolveUrl(config, id), entity, config).pipe(mapResponse(config), operators.tap(( /**
* @param {?} entity
* @return {?}
*/function (entity) {
_this.store.update(id, ( /** @type {?} */(entity)));
_this.dispatchSuccess({
method: method,
payload: entity,
successMsg: config && config.successMsg
});
})), operators.catchError(( /**
* @param {?} error
* @return {?}
*/function (error) { return _this.handleError(method, error, config && config.errorMsg); })), operators.finalize(( /**
* @return {?}
*/function () {
_this.loader.dispatch({
method: method,
loading: false,
entityId: id,
storeName: _this.store.storeName
});
})))));
};
})))));
};
/**

@@ -662,36 +686,39 @@ *

*/
function (id, config) {
var _this = this;
/** @type {?} */
var method = this.getHttpMethod(HttpMethod.DELETE);
this.loader.dispatch({
function (id, config) {
var _this = this;
/** @type {?} */
var method = this.getHttpMethod(HttpMethod.DELETE);
this.loader.dispatch({
method: method,
loading: true,
entityId: id,
storeName: this.store.storeName
});
return (/** @type {?} */ (this.http[method.toLowerCase()](this.resolveUrl(config, id), config).pipe(mapResponse(config), operators.tap((/**
* @param {?} res
* @return {?}
*/
function (res) {
_this.store.remove(id);
_this.dispatchSuccess({
method: method,
loading: true,
payload: res,
successMsg: config && config.successMsg
});
})), operators.catchError((/**
* @param {?} error
* @return {?}
*/
function (error) { return _this.handleError(method, error, config && config.errorMsg); })), operators.finalize((/**
* @return {?}
*/
function () {
_this.loader.dispatch({
method: method,
loading: false,
entityId: id,
storeName: this.store.storeName
storeName: _this.store.storeName
});
return ( /** @type {?} */(this.http[method.toLowerCase()](this.resolveUrl(config, id), config).pipe(mapResponse(config), operators.tap(( /**
* @param {?} res
* @return {?}
*/function (res) {
_this.store.remove(id);
_this.dispatchSuccess({
method: method,
payload: res,
successMsg: config && config.successMsg
});
})), operators.catchError(( /**
* @param {?} error
* @return {?}
*/function (error) { return _this.handleError(method, error, config && config.errorMsg); })), operators.finalize(( /**
* @return {?}
*/function () {
_this.loader.dispatch({
method: method,
loading: false,
entityId: id,
storeName: _this.store.storeName
});
})))));
};
})))));
};
/**

@@ -707,5 +734,5 @@ * @private

*/
function (type) {
return this.mergedConfig.httpMethods[type];
};
function (type) {
return this.mergedConfig.httpMethods[type];
};
/**

@@ -721,5 +748,5 @@ * @private

*/
function (key) {
return this.constructor[key] || this.mergedConfig[key];
};
function (key) {
return this.constructor[key] || this.mergedConfig[key];
};
/**

@@ -737,10 +764,10 @@ * @private

*/
function (config, id) {
/** @type {?} */
var customUrl = (config || {}).url;
if (akita.isDefined(id)) {
return customUrl || this.api + "/" + id;
}
return customUrl || this.api;
};
function (config, id) {
/** @type {?} */
var customUrl = (config || {}).url;
if (akita.isDefined(id)) {
return customUrl || this.api + "/" + id;
}
return customUrl || this.api;
};
/**

@@ -760,43 +787,32 @@ * @private

*/
function (method, error, errorMsg) {
this.dispatchError({
method: method,
errorMsg: errorMsg,
payload: error
});
return rxjs.throwError(error);
};
function (method, error, errorMsg) {
this.dispatchError({
method: method,
errorMsg: errorMsg,
payload: error
});
return rxjs.throwError(error);
};
return NgEntityService;
}(akita.EntityService));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
exports.mapResponse = mapResponse;
exports.HttpMethod = HttpMethod;
exports.NG_ENTITY_SERVICE_CONFIG = NG_ENTITY_SERVICE_CONFIG;
exports.NgEntityService = NgEntityService;
exports.mergeDeep = mergeDeep;
exports.NgEntityServiceConfig = NgEntityServiceConfig;
exports.NG_ENTITY_SERVICE_CONFIG = NG_ENTITY_SERVICE_CONFIG;
exports.NgEntityServiceLoader = NgEntityServiceLoader;
exports.NgEntityServiceNotifier = NgEntityServiceNotifier;
exports.defaultConfig = defaultConfig;
exports.HttpMethod = HttpMethod;
exports.ofType = ofType;
exports.errorAction = errorAction;
exports.filterMethod = filterMethod;
exports.filterStore = filterStore;
exports.NgEntityServiceNotifier = NgEntityServiceNotifier;
exports.isID = isID;
exports.NgEntityServiceLoader = NgEntityServiceLoader;
exports.mapResponse = mapResponse;
exports.mergeDeep = mergeDeep;
exports.ofType = ofType;
exports.successAction = successAction;
exports.errorAction = errorAction;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=datorama-akita-ng-entity-service.umd.js.map
}));
//# sourceMappingURL=datorama-akita-ng-entity-service.umd.js.map

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common/http"),require("rxjs"),require("rxjs/operators"),require("@angular/core"),require("@datorama/akita")):"function"==typeof define&&define.amd?define("@datorama/akita-ng-entity-service",["exports","@angular/common/http","rxjs","rxjs/operators","@angular/core","@datorama/akita"],e):e((t.datorama=t.datorama||{},t.datorama["akita-ng-entity-service"]={}),t.ng.common.http,t.rxjs,t.rxjs.operators,t.ng.core,t.akita)}(this,function(t,o,n,a,i,c){"use strict";var u={GET:"GET",POST:"POST",PUT:"PUT",PATCH:"PATCH",DELETE:"DELETE"},s=(e.prototype.dispatch=function(t){this.dispatcher.next(t)},e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=i.defineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e);function e(){this.dispatcher=new n.Subject,this.action$=this.dispatcher.asObservable()}var d=(r.prototype.dispatch=function(t){this.dispatcher.next(t)},r.prototype.loadersFor=function(r){function o(r){return a.filter(function(t){var e=t.method;return c.isFunction(r)?r(e):e===r})}function t(t){return n.loading$.pipe(i,o(t),a.map(function(t){return t.loading}))}function e(e,t){return n.loading$.pipe(i,o(t),a.filter(function(t){return t.entityId===e}),a.map(function(t){return t.loading}))}var n=this,i=a.filter(function(t){var e=t.storeName;return!r||e===r});return{get$:t(u.GET),add$:t(u.POST),update$:t(function(t){return t===u.PUT||t===u.PATCH}),delete$:t(u.DELETE),getEntity:function(t){return e(t,u.GET)},updateEntity:function(t){return e(t,function(t){return t===u.PUT||t===u.PATCH})},deleteEntity:function(t){return e(t,u.DELETE)}}},r.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],r.ngInjectableDef=i.defineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r);function r(){this.dispatcher=new n.Subject,this.loading$=this.dispatcher.asObservable()}var p=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,n,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)s.push(o.value)}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}return s},h=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t},f=new i.InjectionToken("NgEntityServiceGlobalConfig"),l={httpMethods:{GET:u.GET,POST:u.POST,PATCH:u.PATCH,PUT:u.PUT,DELETE:u.DELETE}};function g(t){for(var e,r,o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];if(!o.length)return t;var i=o.shift();if(c.isObject(t)&&c.isObject(i))for(var s in i)c.isObject(i[s])?(t[s]||Object.assign(t,((e={})[s]={},e)),g(t[s],i[s])):Object.assign(t,((r={})[s]=i[s],r));return g.apply(void 0,h([t],o))}function m(t){return c.isNumber(t)||c.isString(t)}function y(n,i){return function(t){var e=t.payload,r=t.method,o=t.successMsg;i.dispatch({type:"success",storeName:n,payload:e,method:r,successMsg:o})}}function E(n,i){return function(t){var e=t.payload,r=t.method,o=t.errorMsg;i.dispatch({type:"error",storeName:n,payload:e,method:r,errorMsg:o})}}function v(e){return a.map(function(t){return(e||{}).mapResponseFn?e.mapResponseFn(t):t})}var b,N,T=this&&this.__extends||(b=function(t,e){return(b=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)},function(t,e){function r(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),j=(N=c.EntityService,T(M,N),Object.defineProperty(M.prototype,"api",{get:function(){return(this.baseUrl||this.getConfigValue("baseUrl"))+"/"+this.resourceName},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"resourceName",{get:function(){return this.getConfigValue("resourceName")||this.store.storeName},enumerable:!0,configurable:!0}),M.prototype.setBaseUrl=function(t){this.baseUrl=t},M.prototype.get=function(e,t){var r,o=this,n=m(e),i=(n?t:e)||{},s=this.getHttpMethod(u.GET);return r=i.url?i.url:n?this.api+"/"+e:this.api,this.loader.dispatch({method:s,loading:!0,entityId:n?e:null,storeName:this.store.storeName}),this.http[s.toLowerCase()](r,i).pipe(v(i),a.tap(function(t){n?o.store.upsert(e,t):i.append?o.store.add(t):i.upsert?o.store.upsertMany(t):o.store.set(t),o.dispatchSuccess({method:s,payload:t,successMsg:i.successMsg})}),a.catchError(function(t){return o.handleError(s,t,i.errorMsg)}),a.finalize(function(){o.loader.dispatch({method:s,loading:!1,storeName:o.store.storeName})}))},M.prototype.add=function(t,e){var r=this,o=this.getHttpMethod(u.POST);return this.loader.dispatch({method:o,loading:!0,storeName:this.store.storeName}),this.http[o.toLowerCase()](this.resolveUrl(e),t,e).pipe(v(e),a.tap(function(t){r.store.add(t,e),r.dispatchSuccess({method:o,payload:t,successMsg:e&&e.successMsg})}),a.catchError(function(t){return r.handleError(o,t,e&&e.errorMsg)}),a.finalize(function(){r.loader.dispatch({method:o,loading:!1,storeName:r.store.storeName})}))},M.prototype.update=function(e,t,r){var o=this,n=r&&r.method?r.method:this.getHttpMethod(u.PUT);return this.loader.dispatch({method:n,loading:!0,entityId:e,storeName:this.store.storeName}),this.http[n.toLocaleLowerCase()](this.resolveUrl(r,e),t,r).pipe(v(r),a.tap(function(t){o.store.update(e,t),o.dispatchSuccess({method:n,payload:t,successMsg:r&&r.successMsg})}),a.catchError(function(t){return o.handleError(n,t,r&&r.errorMsg)}),a.finalize(function(){o.loader.dispatch({method:n,loading:!1,entityId:e,storeName:o.store.storeName})}))},M.prototype["delete"]=function(e,r){var o=this,n=this.getHttpMethod(u.DELETE);return this.loader.dispatch({method:n,loading:!0,entityId:e,storeName:this.store.storeName}),this.http[n.toLowerCase()](this.resolveUrl(r,e),r).pipe(v(r),a.tap(function(t){o.store.remove(e),o.dispatchSuccess({method:n,payload:t,successMsg:r&&r.successMsg})}),a.catchError(function(t){return o.handleError(n,t,r&&r.errorMsg)}),a.finalize(function(){o.loader.dispatch({method:n,loading:!1,entityId:e,storeName:o.store.storeName})}))},M.prototype.getHttpMethod=function(t){return this.mergedConfig.httpMethods[t]},M.prototype.getConfigValue=function(t){return this.constructor[t]||this.mergedConfig[t]},M.prototype.resolveUrl=function(t,e){var r=(t||{}).url;return c.isDefined(e)?r||this.api+"/"+e:r||this.api},M.prototype.handleError=function(t,e,r){return this.dispatchError({method:t,errorMsg:r,payload:e}),n.throwError(e)},M);function M(t,e){void 0===e&&(e={});var r=N.call(this)||this;return r.store=t,r.config=e,r.globalConfig={},r.http=i.inject(o.HttpClient),r.loader=i.inject(d),r.notifier=i.inject(s),r.globalConfig=i.inject(f),r.mergedConfig=g(l,r.globalConfig,e),r.dispatchSuccess=y(r.store.storeName,r.notifier),r.dispatchError=E(r.store.storeName,r.notifier),r}t.mapResponse=v,t.NgEntityService=j,t.mergeDeep=g,t.NgEntityServiceConfig=function C(e){return void 0===e&&(e={}),function(t){e.baseUrl&&(t.baseUrl=e.baseUrl),e.resourceName&&(t.resourceName=e.resourceName)}},t.NG_ENTITY_SERVICE_CONFIG=f,t.defaultConfig=l,t.HttpMethod=u,t.ofType=function(e){return a.filter(function(t){return t.type===e})},t.filterMethod=function(e){return a.filter(function(t){return t.method===e})},t.filterStore=function(e){return a.filter(function(t){return t.storeName===e})},t.NgEntityServiceNotifier=s,t.isID=m,t.NgEntityServiceLoader=d,t.successAction=y,t.errorAction=E,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@datorama/akita"),require("rxjs"),require("@angular/core"),require("@angular/common/http"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@datorama/akita-ng-entity-service",["exports","@datorama/akita","rxjs","@angular/core","@angular/common/http","rxjs/operators"],e):e(((t=t||self).datorama=t.datorama||{},t.datorama["akita-ng-entity-service"]={}),t.akita,t.rxjs,t.ng.core,t.ng.common.http,t.rxjs.operators)}(this,function(t,e,r,o,n,i){"use strict";var s={GET:"GET",POST:"POST",PUT:"PUT",PATCH:"PATCH",DELETE:"DELETE"},a=function(){function t(){this.dispatcher=new r.Subject,this.action$=this.dispatcher.asObservable()}return t.prototype.dispatch=function(t){this.dispatcher.next(t)},t.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],t.ngInjectableDef=o.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),c=function(){function t(){this.dispatcher=new r.Subject,this.loading$=this.dispatcher.asObservable()}return t.prototype.dispatch=function(t){this.dispatcher.next(t)},t.prototype.loadersFor=function(t){var r=this,o=i.filter(function(e){var r=e.storeName;return!t||r===t}),n=function(t){return i.filter(function(r){var o=r.method;return e.isFunction(t)?t(o):o===t})},a=function(t){return r.loading$.pipe(o,n(t),i.map(function(t){return t.loading}))},c=function(t,e){return r.loading$.pipe(o,n(e),i.filter(function(e){return e.entityId===t}),i.map(function(t){return t.loading}))};return{get$:a(s.GET),add$:a(s.POST),update$:a(function(t){return t===s.PUT||t===s.PATCH}),delete$:a(s.DELETE),getEntity:function(t){return c(t,s.GET)},updateEntity:function(t){return c(t,function(t){return t===s.PUT||t===s.PATCH})},deleteEntity:function(t){return c(t,s.DELETE)}}},t.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],t.ngInjectableDef=o.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),u=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,n,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}return s},p=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t},d=new o.InjectionToken("NgEntityServiceGlobalConfig"),f={httpMethods:{GET:s.GET,POST:s.POST,PATCH:s.PATCH,PUT:s.PUT,DELETE:s.DELETE}};function h(t){for(var r,o,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!n.length)return t;var s=n.shift();if(e.isObject(t)&&e.isObject(s))for(var a in s)e.isObject(s[a])?(t[a]||Object.assign(t,((r={})[a]={},r)),h(t[a],s[a])):Object.assign(t,((o={})[a]=s[a],o));return h.apply(void 0,p([t],n))}function l(t){return e.isNumber(t)||e.isString(t)}function g(t,e){return function(r){var o=r.payload,n=r.method,i=r.successMsg;e.dispatch({type:"success",storeName:t,payload:o,method:n,successMsg:i})}}function m(t,e){return function(r){var o=r.payload,n=r.method,i=r.errorMsg;e.dispatch({type:"error",storeName:t,payload:o,method:n,errorMsg:i})}}var y,E=this&&this.__extends||(y=function(t,e){return(y=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)},function(t,e){function r(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),v=function(t){return i.map(function(e){return(t||{}).mapResponseFn?t.mapResponseFn(e):e})},b=function(t){function u(e,r){void 0===r&&(r={});var i=t.call(this)||this;return i.store=e,i.config=r,i.globalConfig={},i.http=o.inject(n.HttpClient),i.loader=o.inject(c),i.notifier=o.inject(a),i.globalConfig=o.inject(d),i.mergedConfig=h(f,i.globalConfig,r),i.dispatchSuccess=g(i.store.storeName,i.notifier),i.dispatchError=m(i.store.storeName,i.notifier),i}return E(u,t),Object.defineProperty(u.prototype,"api",{get:function(){return(this.baseUrl||this.getConfigValue("baseUrl"))+"/"+this.resourceName},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"resourceName",{get:function(){return this.getConfigValue("resourceName")||this.store.storeName},enumerable:!0,configurable:!0}),u.prototype.setBaseUrl=function(t){this.baseUrl=t},u.prototype.getHttp=function(){return this.http},u.prototype.get=function(t,e){var r,o=this,n=l(t),a=(n?e:t)||{},c=this.getHttpMethod(s.GET);return r=a.url?a.url:n?this.api+"/"+t:this.api,this.loader.dispatch({method:c,loading:!0,entityId:n?t:null,storeName:this.store.storeName}),this.http[c.toLowerCase()](r,a).pipe(v(a),i.tap(function(e){n?o.store.upsert(t,e):a.append?o.store.add(e):a.upsert?o.store.upsertMany(e):o.store.set(e),o.dispatchSuccess({method:c,payload:e,successMsg:a.successMsg})}),i.catchError(function(t){return o.handleError(c,t,a.errorMsg)}),i.finalize(function(){o.loader.dispatch({method:c,loading:!1,storeName:o.store.storeName})}))},u.prototype.add=function(t,e){var r=this,o=this.getHttpMethod(s.POST);return this.loader.dispatch({method:o,loading:!0,storeName:this.store.storeName}),this.http[o.toLowerCase()](this.resolveUrl(e),t,e).pipe(v(e),i.tap(function(t){r.store.add(t,e),r.dispatchSuccess({method:o,payload:t,successMsg:e&&e.successMsg})}),i.catchError(function(t){return r.handleError(o,t,e&&e.errorMsg)}),i.finalize(function(){r.loader.dispatch({method:o,loading:!1,storeName:r.store.storeName})}))},u.prototype.update=function(t,e,r){var o=this,n=r&&r.method?r.method:this.getHttpMethod(s.PUT);return this.loader.dispatch({method:n,loading:!0,entityId:t,storeName:this.store.storeName}),this.http[n.toLocaleLowerCase()](this.resolveUrl(r,t),e,r).pipe(v(r),i.tap(function(e){o.store.update(t,e),o.dispatchSuccess({method:n,payload:e,successMsg:r&&r.successMsg})}),i.catchError(function(t){return o.handleError(n,t,r&&r.errorMsg)}),i.finalize(function(){o.loader.dispatch({method:n,loading:!1,entityId:t,storeName:o.store.storeName})}))},u.prototype["delete"]=function(t,e){var r=this,o=this.getHttpMethod(s.DELETE);return this.loader.dispatch({method:o,loading:!0,entityId:t,storeName:this.store.storeName}),this.http[o.toLowerCase()](this.resolveUrl(e,t),e).pipe(v(e),i.tap(function(n){r.store.remove(t),r.dispatchSuccess({method:o,payload:n,successMsg:e&&e.successMsg})}),i.catchError(function(t){return r.handleError(o,t,e&&e.errorMsg)}),i.finalize(function(){r.loader.dispatch({method:o,loading:!1,entityId:t,storeName:r.store.storeName})}))},u.prototype.getHttpMethod=function(t){return this.mergedConfig.httpMethods[t]},u.prototype.getConfigValue=function(t){return this.constructor[t]||this.mergedConfig[t]},u.prototype.resolveUrl=function(t,r){var o=(t||{}).url;return e.isDefined(r)?o||this.api+"/"+r:o||this.api},u.prototype.handleError=function(t,e,o){return this.dispatchError({method:t,errorMsg:o,payload:e}),r.throwError(e)},u}(e.EntityService);t.HttpMethod=s,t.NG_ENTITY_SERVICE_CONFIG=d,t.NgEntityService=b,t.NgEntityServiceConfig=function(t){return void 0===t&&(t={}),function(e){t.baseUrl&&(e.baseUrl=t.baseUrl),t.resourceName&&(e.resourceName=t.resourceName)}},t.NgEntityServiceLoader=c,t.NgEntityServiceNotifier=a,t.defaultConfig=f,t.errorAction=m,t.filterMethod=function(t){return i.filter(function(e){return e.method===t})},t.filterStore=function(t){return i.filter(function(e){return e.storeName===t})},t.isID=l,t.mapResponse=v,t.mergeDeep=h,t.ofType=function(t){return i.filter(function(e){return e.type===t})},t.successAction=g,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=datorama-akita-ng-entity-service.umd.min.js.map

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

{"__symbolic":"module","version":4,"metadata":{"mapResponse":{"__symbolic":"error","message":"Lambda not supported","line":25,"character":27,"module":"./lib/ng-entity.service"},"NgEntityService":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","module":"@datorama/akita","name":"EntityService","line":28,"character":66},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EntityStore","module":"@datorama/akita","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":40,"character":43,"context":{"typeName":"S"},"module":"./lib/ng-entity.service"}]},{"__symbolic":"reference","name":"NgEntityServiceParams"}]}],"setBaseUrl":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"add":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"getHttpMethod":[{"__symbolic":"method"}],"getConfigValue":[{"__symbolic":"method"}],"resolveUrl":[{"__symbolic":"method"}],"handleError":[{"__symbolic":"method"}]}},"NgEntityServiceGlobalConfig":{"__symbolic":"interface"},"NG_ENTITY_SERVICE_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":16,"character":44},"arguments":["NgEntityServiceGlobalConfig"]},"defaultConfig":{"httpMethods":{"GET":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"GET"},"POST":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"POST"},"PATCH":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"PATCH"},"PUT":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"PUT"},"DELETE":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"DELETE"}}},"mergeDeep":{"__symbolic":"function"},"NgEntityServiceConfig":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"__symbolic":"error","message":"Lambda not supported","line":47,"character":9,"module":"./lib/ng-entity-service.config"}},"HttpMethod":{"GET":"GET","POST":"POST","PUT":"PUT","PATCH":"PATCH","DELETE":"DELETE"},"ActionType":{"__symbolic":"interface"},"EntityServiceAction":{"__symbolic":"interface"},"ofType":{"__symbolic":"error","message":"Lambda not supported","line":22,"character":22,"module":"./lib/ng-entity-service-notifier"},"filterMethod":{"__symbolic":"error","message":"Lambda not supported","line":24,"character":28,"module":"./lib/ng-entity-service-notifier"},"filterStore":{"__symbolic":"error","message":"Lambda not supported","line":27,"character":27,"module":"./lib/ng-entity-service-notifier"},"NgEntityServiceNotifier":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":29,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"dispatch":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"isID":{"__symbolic":"function","parameters":["idOrConfig"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@datorama/akita","name":"isNumber","line":3,"character":9},"arguments":[{"__symbolic":"reference","name":"idOrConfig"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@datorama/akita","name":"isString","line":3,"character":33},"arguments":[{"__symbolic":"reference","name":"idOrConfig"}]}}},"NgEntityServiceParams":{"__symbolic":"interface"},"Msg":{"__symbolic":"interface"},"HttpConfig":{"__symbolic":"interface"},"NgEntityServiceLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"dispatch":[{"__symbolic":"method"}],"loadersFor":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"successAction":{"__symbolic":"function","parameters":["storeName","notifier"],"value":{"__symbolic":"error","message":"Lambda not supported","line":6,"character":9,"module":"./lib/action-factory"}},"errorAction":{"__symbolic":"function","parameters":["storeName","notifier"],"value":{"__symbolic":"error","message":"Lambda not supported","line":21,"character":9,"module":"./lib/action-factory"}}},"origins":{"mapResponse":"./lib/ng-entity.service","NgEntityService":"./lib/ng-entity.service","NgEntityServiceGlobalConfig":"./lib/ng-entity-service.config","NG_ENTITY_SERVICE_CONFIG":"./lib/ng-entity-service.config","defaultConfig":"./lib/ng-entity-service.config","mergeDeep":"./lib/ng-entity-service.config","NgEntityServiceConfig":"./lib/ng-entity-service.config","HttpMethod":"./lib/ng-entity-service-notifier","ActionType":"./lib/ng-entity-service-notifier","EntityServiceAction":"./lib/ng-entity-service-notifier","ofType":"./lib/ng-entity-service-notifier","filterMethod":"./lib/ng-entity-service-notifier","filterStore":"./lib/ng-entity-service-notifier","NgEntityServiceNotifier":"./lib/ng-entity-service-notifier","isID":"./lib/helpers","NgEntityServiceParams":"./lib/types","Msg":"./lib/types","HttpConfig":"./lib/types","NgEntityServiceLoader":"./lib/ng-entity-service.loader","successAction":"./lib/action-factory","errorAction":"./lib/action-factory"},"importAs":"@datorama/akita-ng-entity-service"}
{"__symbolic":"module","version":4,"metadata":{"mapResponse":{"__symbolic":"error","message":"Lambda not supported","line":25,"character":27,"module":"./lib/ng-entity.service"},"NgEntityService":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","module":"@datorama/akita","name":"EntityService","line":28,"character":66},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EntityStore","module":"@datorama/akita","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":40,"character":43,"context":{"typeName":"S"},"module":"./lib/ng-entity.service"}]},{"__symbolic":"reference","name":"NgEntityServiceParams"}]}],"setBaseUrl":[{"__symbolic":"method"}],"getHttp":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"add":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"getHttpMethod":[{"__symbolic":"method"}],"getConfigValue":[{"__symbolic":"method"}],"resolveUrl":[{"__symbolic":"method"}],"handleError":[{"__symbolic":"method"}]}},"NgEntityServiceGlobalConfig":{"__symbolic":"interface"},"NG_ENTITY_SERVICE_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":16,"character":44},"arguments":["NgEntityServiceGlobalConfig"]},"defaultConfig":{"httpMethods":{"GET":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"GET"},"POST":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"POST"},"PATCH":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"PATCH"},"PUT":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"PUT"},"DELETE":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpMethod"},"member":"DELETE"}}},"mergeDeep":{"__symbolic":"function"},"NgEntityServiceConfig":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"__symbolic":"error","message":"Lambda not supported","line":47,"character":9,"module":"./lib/ng-entity-service.config"}},"HttpMethod":{"GET":"GET","POST":"POST","PUT":"PUT","PATCH":"PATCH","DELETE":"DELETE"},"ActionType":{"__symbolic":"interface"},"EntityServiceAction":{"__symbolic":"interface"},"ofType":{"__symbolic":"error","message":"Lambda not supported","line":22,"character":22,"module":"./lib/ng-entity-service-notifier"},"filterMethod":{"__symbolic":"error","message":"Lambda not supported","line":24,"character":28,"module":"./lib/ng-entity-service-notifier"},"filterStore":{"__symbolic":"error","message":"Lambda not supported","line":27,"character":27,"module":"./lib/ng-entity-service-notifier"},"NgEntityServiceNotifier":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":29,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"dispatch":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"isID":{"__symbolic":"function","parameters":["idOrConfig"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@datorama/akita","name":"isNumber","line":3,"character":9},"arguments":[{"__symbolic":"reference","name":"idOrConfig"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@datorama/akita","name":"isString","line":3,"character":33},"arguments":[{"__symbolic":"reference","name":"idOrConfig"}]}}},"NgEntityServiceParams":{"__symbolic":"interface"},"Msg":{"__symbolic":"interface"},"HttpConfig":{"__symbolic":"interface"},"NgEntityServiceLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"dispatch":[{"__symbolic":"method"}],"loadersFor":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"successAction":{"__symbolic":"function","parameters":["storeName","notifier"],"value":{"__symbolic":"error","message":"Lambda not supported","line":6,"character":9,"module":"./lib/action-factory"}},"errorAction":{"__symbolic":"function","parameters":["storeName","notifier"],"value":{"__symbolic":"error","message":"Lambda not supported","line":21,"character":9,"module":"./lib/action-factory"}}},"origins":{"mapResponse":"./lib/ng-entity.service","NgEntityService":"./lib/ng-entity.service","NgEntityServiceGlobalConfig":"./lib/ng-entity-service.config","NG_ENTITY_SERVICE_CONFIG":"./lib/ng-entity-service.config","defaultConfig":"./lib/ng-entity-service.config","mergeDeep":"./lib/ng-entity-service.config","NgEntityServiceConfig":"./lib/ng-entity-service.config","HttpMethod":"./lib/ng-entity-service-notifier","ActionType":"./lib/ng-entity-service-notifier","EntityServiceAction":"./lib/ng-entity-service-notifier","ofType":"./lib/ng-entity-service-notifier","filterMethod":"./lib/ng-entity-service-notifier","filterStore":"./lib/ng-entity-service-notifier","NgEntityServiceNotifier":"./lib/ng-entity-service-notifier","isID":"./lib/helpers","NgEntityServiceParams":"./lib/types","Msg":"./lib/types","HttpConfig":"./lib/types","NgEntityServiceLoader":"./lib/ng-entity-service.loader","successAction":"./lib/action-factory","errorAction":"./lib/action-factory"},"importAs":"@datorama/akita-ng-entity-service"}

@@ -64,3 +64,3 @@ /**

];
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = i0.defineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
if (false) {

@@ -67,0 +67,0 @@ /**

@@ -105,3 +105,3 @@ /**

];
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = i0.defineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
if (false) {

@@ -108,0 +108,0 @@ /**

@@ -66,2 +66,8 @@ /**

/**
* @return {?}
*/
getHttp() {
return this.http;
}
/**
* @template T

@@ -367,2 +373,2 @@ * @param {?=} idOrConfig

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctZW50aXR5LnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZGF0b3JhbWEvYWtpdGEtbmctZW50aXR5LXNlcnZpY2UvIiwic291cmNlcyI6WyJsaWIvbmctZW50aXR5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFFTCxhQUFhLEVBS2IsU0FBUyxFQUNWLE1BQU0saUJBQWlCLENBQUM7QUFDekIsT0FBTyxFQUFjLFVBQVUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUM5QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3ZDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxHQUFHLEVB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mh0dHBNZXRob2RzW3R5cGVdO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRDb25maWdWYWx1ZShrZXk6IHN0cmluZykge1xuICAgIHJldHVybiB0aGlzLmNvbnN0cnVjdG9yW2tleV0gfHwgdGhpcy5tZXJnZWRDb25maWdba2V5XTtcbiAgfVxuXG4gIHByaXZhdGUgcmVzb2x2ZVVybChjb25maWc6IEh0dHBDb25maWcsIGlkPzogYW55KSB7XG4gICAgY29uc3QgY3VzdG9tVXJsID0gKGNvbmZpZyB8fCB7fSkudXJsO1xuICAgIGlmIChpc0RlZmluZWQoaWQpKSB7XG4gICAgICByZXR1cm4gY3VzdG9tVXJsIHx8IGAke3RoaXMuYXBpfS8ke2lkfWA7XG4gICAgfVxuICAgIHJldHVybiBjdXN0b21VcmwgfHwgdGhpcy5hcGk7XG4gIH1cblxuICBwcml2YXRlIGhhbmRsZUVycm9yKG1ldGhvZDogSHR0cE1ldGhvZCwgZXJyb3I6IGFueSwgZXJyb3JNc2c6IHN0cmluZykge1xuICAgIHRoaXMuZGlzcGF0Y2hFcnJvcih7XG4gICAgICBtZXRob2QsXG4gICAgICBlcnJvck1zZyxcbiAgICAgIHBheWxvYWQ6IGVycm9yXG4gICAgfSk7XG4gICAgcmV0dXJuIHRocm93RXJyb3IoZXJyb3IpO1xuICB9XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctZW50aXR5LnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZGF0b3JhbWEvYWtpdGEtbmctZW50aXR5LXNlcnZpY2UvIiwic291cmNlcyI6WyJsaWIvbmctZW50aXR5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFFTCxhQUFhLEVBS2IsU0FBUyxFQUNWLE1BQU0saUJBQWlCLENBQUM7QUFDekIsT0FBTyxFQUFjLFVBQVUsRUFBRSxNQUFNLE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
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = i0.defineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
return NgEntityServiceNotifier;

@@ -72,0 +72,0 @@ }());

@@ -56,2 +56,3 @@ var __read = (this && this.__read) || function (o, n) {

export function mergeDeep(target) {
var _a, _b;
var sources = [];

@@ -61,3 +62,2 @@ for (var _i = 1; _i < arguments.length; _i++) {

}
var _a, _b;
if (!sources.length)

@@ -100,2 +100,2 @@ return target;

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

@@ -123,3 +123,3 @@ /**

];
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = i0.defineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
return NgEntityServiceLoader;

@@ -126,0 +126,0 @@ }());

@@ -95,2 +95,11 @@ var __extends = (this && this.__extends) || (function () {

/**
* @return {?}
*/
NgEntityService.prototype.getHttp = /**
* @return {?}
*/
function () {
return this.http;
};
/**
* @template T

@@ -495,2 +504,2 @@ * @param {?=} idOrConfig

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

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

import { isFunction, isObject, isNumber, isString, EntityService, isDefined } from '@datorama/akita';
import { Subject, throwError } from 'rxjs';
import { Injectable, ɵɵdefineInjectable, InjectionToken, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Subject, throwError } from 'rxjs';
import { filter, map, catchError, finalize, tap } from 'rxjs/operators';
import { Injectable, InjectionToken, defineInjectable, inject } from '@angular/core';
import { isFunction, isObject, isNumber, isString, EntityService, isDefined } from '@datorama/akita';
import { filter, map, tap, catchError, finalize } from 'rxjs/operators';

@@ -65,3 +65,3 @@ /**

];
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = defineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });

@@ -90,3 +90,3 @@ /**

/** @type {?} */
const filterStore$$1 = filter((/**
const filterStore = filter((/**
* @param {?} __0

@@ -97,3 +97,3 @@ * @return {?}

/** @type {?} */
const filterMethod$$1 = (/**
const filterMethod = (/**
* @param {?} mthd

@@ -114,3 +114,3 @@ * @return {?}

*/
(current) => this.loading$.pipe(filterStore$$1, filterMethod$$1(current), map((/**
(current) => this.loading$.pipe(filterStore, filterMethod(current), map((/**
* @param {?} action

@@ -126,3 +126,3 @@ * @return {?}

*/
(id, mthd) => this.loading$.pipe(filterStore$$1, filterMethod$$1(mthd), filter((/**
(id, mthd) => this.loading$.pipe(filterStore, filterMethod(mthd), filter((/**
* @param {?} action

@@ -170,3 +170,3 @@ * @return {?}

];
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = defineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });

@@ -344,2 +344,8 @@ /**

/**
* @return {?}
*/
getHttp() {
return this.http;
}
/**
* @template T

@@ -600,19 +606,3 @@ * @param {?=} idOrConfig

/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { mapResponse, NgEntityService, mergeDeep, NgEntityServiceConfig, NG_ENTITY_SERVICE_CONFIG, defaultConfig, HttpMethod, ofType, filterMethod, filterStore, NgEntityServiceNotifier, isID, NgEntityServiceLoader, successAction, errorAction };
//# sourceMappingURL=datorama-akita-ng-entity-service.js.map
export { HttpMethod, NG_ENTITY_SERVICE_CONFIG, NgEntityService, NgEntityServiceConfig, NgEntityServiceLoader, NgEntityServiceNotifier, defaultConfig, errorAction, filterMethod, filterStore, isID, mapResponse, mergeDeep, ofType, successAction };
//# sourceMappingURL=datorama-akita-ng-entity-service.js.map

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

import { isFunction, isObject, isNumber, isString, isDefined, EntityService } from '@datorama/akita';
import { Subject, throwError } from 'rxjs';
import { Injectable, ɵɵdefineInjectable, InjectionToken, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Subject, throwError } from 'rxjs';
import { filter, map, catchError, finalize, tap } from 'rxjs/operators';
import { Injectable, InjectionToken, defineInjectable, inject } from '@angular/core';
import { isFunction, isObject, isNumber, isString, EntityService, isDefined } from '@datorama/akita';
import { filter, map, tap, catchError, finalize } from 'rxjs/operators';

@@ -70,3 +70,3 @@ /**

];
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = defineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
/** @nocollapse */ NgEntityServiceNotifier.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgEntityServiceNotifier_Factory() { return new NgEntityServiceNotifier(); }, token: NgEntityServiceNotifier, providedIn: "root" });
return NgEntityServiceNotifier;

@@ -106,3 +106,3 @@ }());

/** @type {?} */
var filterStore$$1 = filter((/**
var filterStore = filter((/**
* @param {?} __0

@@ -116,3 +116,3 @@ * @return {?}

/** @type {?} */
var filterMethod$$1 = (/**
var filterMethod = (/**
* @param {?} mthd

@@ -137,3 +137,3 @@ * @return {?}

function (current) {
return _this.loading$.pipe(filterStore$$1, filterMethod$$1(current), map((/**
return _this.loading$.pipe(filterStore, filterMethod(current), map((/**
* @param {?} action

@@ -151,3 +151,3 @@ * @return {?}

function (id, mthd) {
return _this.loading$.pipe(filterStore$$1, filterMethod$$1(mthd), filter((/**
return _this.loading$.pipe(filterStore, filterMethod(mthd), filter((/**
* @param {?} action

@@ -195,3 +195,3 @@ * @return {?}

];
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = defineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
/** @nocollapse */ NgEntityServiceLoader.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgEntityServiceLoader_Factory() { return new NgEntityServiceLoader(); }, token: NgEntityServiceLoader, providedIn: "root" });
return NgEntityServiceLoader;

@@ -238,2 +238,3 @@ }());

function mergeDeep(target) {
var _a, _b;
var sources = [];

@@ -243,3 +244,2 @@ for (var _i = 1; _i < arguments.length; _i++) {

}
var _a, _b;
if (!sources.length)

@@ -422,2 +422,11 @@ return target;

/**
* @return {?}
*/
NgEntityService.prototype.getHttp = /**
* @return {?}
*/
function () {
return this.http;
};
/**
* @template T

@@ -773,19 +782,3 @@ * @param {?=} idOrConfig

/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { mapResponse, NgEntityService, mergeDeep, NgEntityServiceConfig, NG_ENTITY_SERVICE_CONFIG, defaultConfig, HttpMethod, ofType, filterMethod, filterStore, NgEntityServiceNotifier, isID, NgEntityServiceLoader, successAction, errorAction };
//# sourceMappingURL=datorama-akita-ng-entity-service.js.map
export { HttpMethod, NG_ENTITY_SERVICE_CONFIG, NgEntityService, NgEntityServiceConfig, NgEntityServiceLoader, NgEntityServiceNotifier, defaultConfig, errorAction, filterMethod, filterStore, isID, mapResponse, mergeDeep, ofType, successAction };
//# sourceMappingURL=datorama-akita-ng-entity-service.js.map
import { AddEntitiesOptions, EntityService, EntityState, EntityStore, getEntityType, getIDType } from '@datorama/akita';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { HttpConfig, Msg, NgEntityServiceParams } from './types';

@@ -22,2 +23,3 @@ import { HttpMethod } from './ng-entity-service-notifier';

setBaseUrl(api: string): void;
getHttp(): HttpClient;
/**

@@ -24,0 +26,0 @@ *

{
"name": "@datorama/akita-ng-entity-service",
"description": "Akita entity service",
"version": "1.1.1",
"version": "1.2.0",
"license": "Apache License 2.0",

@@ -6,0 +6,0 @@ "author": {

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

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