Huge News!Announcing our $40M Series B led by Abstract Ventures.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.0.1 to 1.0.2

4

bundles/datorama-akita-ng-entity-service.umd.js

@@ -441,3 +441,3 @@ (function (global, factory) {

});
return ( /** @type {?} */(this.http[method.toLowerCase()](url, _config).pipe(mapResponse(config), operators.tap(( /**
return ( /** @type {?} */(this.http[method.toLowerCase()](url, _config).pipe(mapResponse(_config), operators.tap(( /**
* @param {?} data

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

*/function (entity) {
_this.store.update(id, entity);
_this.store.update(id, ( /** @type {?} */(entity)));
_this.dispatchSuccess({

@@ -585,0 +585,0 @@ method: method,

@@ -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,r){var t,o=this,n=m(e),i=(n?r:e)||{},s=this.getHttpMethod(u.GET);return t=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()](t,i).pipe(v(r),a.tap(function(t){n?o.store.upsert(e,t):i.append?o.store.add(t):o.store.set(t),o.dispatchSuccess({method:s,payload:t,successMsg:i.successMsg})}),a.catchError(function(t){return o.handleError(s,t,r.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("@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,r){var t,o=this,n=m(e),i=(n?r:e)||{},s=this.getHttpMethod(u.GET);return t=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()](t,i).pipe(v(i),a.tap(function(t){n?o.store.upsert(e,t):i.append?o.store.add(t):o.store.set(t),o.dispatchSuccess({method:s,payload:t,successMsg:i.successMsg})}),a.catchError(function(t){return o.handleError(s,t,r.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})});
//# sourceMappingURL=datorama-akita-ng-entity-service.umd.min.js.map

@@ -92,3 +92,3 @@ /**

});
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(config), tap((/**
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(_config), tap((/**
* @param {?} data

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

entity => {
this.store.update(id, entity);
this.store.update(id, (/** @type {?} */ (entity)));
this.dispatchSuccess({

@@ -360,2 +360,2 @@ method,

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctZW50aXR5LnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZGF0b3JhbWEvYWtpdGEtbmctZW50aXR5LXNlcnZpY2UvIiwic291cmNlcyI6WyJsaWIvbmctZW50aXR5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFFTCxhQUFhLEVBS2IsU0FBUyxFQUNWLE1BQU0saUJBQWlCLENBQUM7QUFDekIsT0FBTyxFQUFjLFVBQVUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUM5QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3ZDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFaEUsT0FBTyxFQUF1QixVQUFVLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUN4RyxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUNuRSxPQUFPLEVBQ0wsYUFBYSxFQUNiLFNBQVMsRUFDVCx3QkFBd0IsRUFFekIsTUFBTSw0QkFBNEIsQ0FBQztBQUNwQyxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQ2pDLE9BQU8sRUFBRSxXQUFXLEVBQUUsYUFBYSxFQUFFLE1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XG4gICAgICAgICAgbG9hZGluZzogZmFsc2UsXG4gICAgICAgICAgZW50aXR5SWQ6IGlkLFxuICAgICAgICAgIHN0b3JlTmFtZTogdGhpcy5zdG9yZS5zdG9yZU5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9KVxuICAgICkgYXMgT2JzZXJ2YWJsZTxUPjtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0SHR0cE1ldGhvZCh0eXBlOiBIdHRwTWV0aG9kKSB7XG4gICAgcmV0dXJuIHRoaXMubWVyZ2VkQ29uZmlnLmh0dHBNZXRob2RzW3R5cGVdO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRDb25maWdWYWx1ZShrZXk6IHN0cmluZykge1xuICAgIHJldHVybiB0aGlzLmNvbnN0cnVjdG9yW2tleV0gfHwgdGhpcy5tZXJnZWRDb25maWdba2V5XTtcbiAgfVxuXG4gIHByaXZhdGUgcmVzb2x2ZVVybChjb25maWc6IEh0dHBDb25maWcsIGlkPzogYW55KSB7XG4gICAgY29uc3QgY3VzdG9tVXJsID0gKGNvbmZpZyB8fCB7fSkudXJsO1xuICAgIGlmIChpc0RlZmluZWQoaWQpKSB7XG4gICAgICByZXR1cm4gY3VzdG9tVXJsIHx8IGAke3RoaXMuYXBpfS8ke2lkfWA7XG4gICAgfVxuICAgIHJldHVybiBjdXN0b21VcmwgfHwgdGhpcy5hcGk7XG4gIH1cblxuICBwcml2YXRlIGhhbmRsZUVycm9yKG1ldGhvZDogSHR0cE1ldGhvZCwgZXJyb3I6IGFueSwgZXJyb3JNc2c6IHN0cmluZykge1xuICAgIHRoaXMuZGlzcGF0Y2hFcnJvcih7XG4gICAgICBtZXRob2QsXG4gICAgICBlcnJvck1zZyxcbiAgICAgIHBheWxvYWQ6IGVycm9yXG4gICAgfSk7XG4gICAgcmV0dXJuIHRocm93RXJyb3IoZXJyb3IpO1xuICB9XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm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H1cblxuICBwcml2YXRlIGdldEh0dHBNZXRob2QodHlwZTogSHR0cE1ldGhvZCkge1xuICAgIHJldHVybiB0aGlzLm1lcmdlZENvbmZpZy5odHRwTWV0aG9kc1t0eXBlXTtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0Q29uZmlnVmFsdWUoa2V5OiBzdHJpbmcpIHtcbiAgICByZXR1cm4gdGhpcy5jb25zdHJ1Y3RvcltrZXldIHx8IHRoaXMubWVyZ2VkQ29uZmlnW2tleV07XG4gIH1cblxuICBwcml2YXRlIHJlc29sdmVVcmwoY29uZmlnOiBIdHRwQ29uZmlnLCBpZD86IGFueSkge1xuICAgIGNvbnN0IGN1c3RvbVVybCA9IChjb25maWcgfHwge30pLnVybDtcbiAgICBpZiAoaXNEZWZpbmVkKGlkKSkge1xuICAgICAgcmV0dXJuIGN1c3RvbVVybCB8fCBgJHt0aGlzLmFwaX0vJHtpZH1gO1xuICAgIH1cbiAgICByZXR1cm4gY3VzdG9tVXJsIHx8IHRoaXMuYXBpO1xuICB9XG5cbiAgcHJpdmF0ZSBoYW5kbGVFcnJvcihtZXRob2Q6IEh0dHBNZXRob2QsIGVycm9yOiBhbnksIGVycm9yTXNnOiBzdHJpbmcpIHtcbiAgICB0aGlzLmRpc3BhdGNoRXJyb3Ioe1xuICAgICAgbWV0aG9kLFxuICAgICAgZXJyb3JNc2csXG4gICAgICBwYXlsb2FkOiBlcnJvclxuICAgIH0pO1xuICAgIHJldHVybiB0aHJvd0Vycm9yKGVycm9yKTtcbiAgfVxufVxuIl19

@@ -128,3 +128,3 @@ var __extends = (this && this.__extends) || (function () {

});
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(config), tap((/**
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(_config), tap((/**
* @param {?} data

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

function (entity) {
_this.store.update(id, entity);
_this.store.update(id, (/** @type {?} */ (entity)));
_this.dispatchSuccess({

@@ -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ZmlnLmh0dHBNZXRob2RzW3R5cGVdO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRDb25maWdWYWx1ZShrZXk6IHN0cmluZykge1xuICAgIHJldHVybiB0aGlzLmNvbnN0cnVjdG9yW2tleV0gfHwgdGhpcy5tZXJnZWRDb25maWdba2V5XTtcbiAgfVxuXG4gIHByaXZhdGUgcmVzb2x2ZVVybChjb25maWc6IEh0dHBDb25maWcsIGlkPzogYW55KSB7XG4gICAgY29uc3QgY3VzdG9tVXJsID0gKGNvbmZpZyB8fCB7fSkudXJsO1xuICAgIGlmIChpc0RlZmluZWQoaWQpKSB7XG4gICAgICByZXR1cm4gY3VzdG9tVXJsIHx8IGAke3RoaXMuYXBpfS8ke2lkfWA7XG4gICAgfVxuICAgIHJldHVybiBjdXN0b21VcmwgfHwgdGhpcy5hcGk7XG4gIH1cblxuICBwcml2YXRlIGhhbmRsZUVycm9yKG1ldGhvZDogSHR0cE1ldGhvZCwgZXJyb3I6IGFueSwgZXJyb3JNc2c6IHN0cmluZykge1xuICAgIHRoaXMuZGlzcGF0Y2hFcnJvcih7XG4gICAgICBtZXRob2QsXG4gICAgICBlcnJvck1zZyxcbiAgICAgIHBheWxvYWQ6IGVycm9yXG4gICAgfSk7XG4gICAgcmV0dXJuIHRocm93RXJyb3IoZXJyb3IpO1xuICB9XG59XG4iXX0=

@@ -364,3 +364,3 @@ import { HttpClient } from '@angular/common/http';

});
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(config), tap((/**
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(_config), tap((/**
* @param {?} data

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

entity => {
this.store.update(id, entity);
this.store.update(id, (/** @type {?} */ (entity)));
this.dispatchSuccess({

@@ -472,0 +472,0 @@ method,

@@ -447,3 +447,3 @@ import { HttpClient } from '@angular/common/http';

});
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(config), tap((/**
return (/** @type {?} */ (this.http[method.toLowerCase()](url, _config).pipe(mapResponse(_config), tap((/**
* @param {?} data

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

function (entity) {
_this.store.update(id, entity);
_this.store.update(id, (/** @type {?} */ (entity)));
_this.dispatchSuccess({

@@ -598,0 +598,0 @@ method: method,

{
"name": "@datorama/akita-ng-entity-service",
"version": "1.0.1",
"version": "1.0.2",
"license": "Apache License 2.0",

@@ -5,0 +5,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