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

@ngrx/component-store

Package Overview
Dependencies
Maintainers
4
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngrx/component-store - npm Package Compare versions

Comparing version 10.0.1 to 10.1.0

esm2015/src/tap-response.js

70

bundles/ngrx-component-store.umd.js

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

*
* @template V
* @template ProvidedType, OriginType, ValueType, ReturnType
* @param {?} updaterFn A static updater function that takes 2 parameters (the

@@ -429,3 +429,3 @@ * current state and an argument object) and returns a new instance of the

var _this = this;
return ( /** @type {?} */((( /**
return ( /** @type {?} */((( /** @type {?} */((( /**
* @param {?=} observableOrValue

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

return subscription;
}))));
})))))));
};

@@ -509,2 +509,22 @@ /**

/**
* Patches the state with provided partial state.
*
* @throws Error if the state is not initialized.
* @param {?} partialStateOrUpdaterFn a partial state or a partial updater
* function that accepts the state and returns the partial state.
* @return {?}
*/
ComponentStore.prototype.patchState = function (partialStateOrUpdaterFn) {
this.setState(( /**
* @param {?} state
* @return {?}
*/function (state) {
/** @type {?} */
var patchedState = typeof partialStateOrUpdaterFn === 'function'
? partialStateOrUpdaterFn(state)
: partialStateOrUpdaterFn;
return Object.assign(Object.assign({}, state), patchedState);
}));
};
/**
* @protected

@@ -672,2 +692,45 @@ * @template R

* @fileoverview added by tsickle
* Generated from: src/tap-response.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Handles the response in ComponentStore effects in a safe way, without
* additional boilerplate.
* It enforces that the error case is handled and that the effect would still be
* running should an error occur.
*
* Takes an optional third argument for a `complete` callback.
*
* ```typescript
* readonly dismissedAlerts = this.effect<Alert>(alert$ => {
* return alert$.pipe(
* concatMap(
* (alert) => this.alertsService.dismissAlert(alert).pipe(
* tapResponse(
* (dismissedAlert) => this.alertDismissed(dismissedAlert),
* (error) => this.logError(error),
* ))));
* });
* ```
* @template T
* @param {?} nextFn
* @param {?} errorFn
* @param {?=} completeFn
* @return {?}
*/
function tapResponse(nextFn, errorFn, completeFn) {
return ( /**
* @param {?} source
* @return {?}
*/function (source) { return source.pipe(operators.tap({
next: nextFn,
error: errorFn,
complete: completeFn,
}), operators.catchError(( /**
* @return {?}
*/function () { return rxjs.EMPTY; }))); });
}
/**
* @fileoverview added by tsickle
* Generated from: src/index.ts

@@ -697,2 +760,3 @@ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc

exports.initialStateToken = initialStateToken;
exports.tapResponse = tapResponse;

@@ -699,0 +763,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

4

bundles/ngrx-component-store.umd.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ngrx/component-store",["exports","rxjs","rxjs/operators","@angular/core"],t):t(((e=e||self).ngrx=e.ngrx||{},e.ngrx["component-store"]={}),e.rxjs,e.rxjs.operators,e.ng.core)}(this,(function(e,t,r,n){"use strict";
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ngrx/component-store",["exports","rxjs","rxjs/operators","@angular/core"],e):e(((t=t||self).ngrx=t.ngrx||{},t.ngrx["component-store"]={}),t.rxjs,t.rxjs.operators,t.ng.core)}(this,(function(t,e,r,n){"use strict";
/*! *****************************************************************************

@@ -15,3 +15,3 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */Object.create;function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}Object.create;function s(){return function(e){return new t.Observable((function(r){var n,o,i=new t.Subscription;return i.add(e.subscribe({complete:function(){n&&r.next(o),r.complete()},error:function(e){r.error(e)},next:function(e){o=e,n||(n=t.asapScheduler.schedule((function(){r.next(o),n=void 0})),i.add(n))}})),i}))}}var u=new n.InjectionToken("ComponentStore InitState"),c=function(){function e(e){this.destroySubject$=new t.ReplaySubject(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new t.ReplaySubject(1),this.isInitialized=!1,this.notInitializedErrorMessage=this.constructor.name+" has not been initialized yet. Please make sure it is initialized before updating/getting.",this.state$=this.select((function(e){return e})),e&&this.initState(e)}return e.prototype.ngOnDestroy=function(){this.stateSubject$.complete(),this.destroySubject$.next()},e.prototype.updater=function(e){var n=this;return(function(i){var s,u=(t.isObservable(i)?i:t.of(i)).pipe(r.concatMap((function(e){return n.isInitialized?t.scheduled([e],t.queueScheduler).pipe(r.withLatestFrom(n.stateSubject$)):t.throwError(new Error(n.notInitializedErrorMessage))})),r.takeUntil(n.destroy$)).subscribe({next:function(t){var r=o(t,2),i=r[0],s=r[1];n.stateSubject$.next(e(s,i))},error:function(e){s=e,n.stateSubject$.error(e)}});if(s)throw s;return u})},e.prototype.initState=function(e){var r=this;t.scheduled([e],t.queueScheduler).subscribe((function(e){r.isInitialized=!0,r.stateSubject$.next(e)}))},e.prototype.setState=function(e){"function"!=typeof e?this.initState(e):this.updater(e)()},e.prototype.get=function(e){if(!this.isInitialized)throw new Error(this.notInitializedErrorMessage);var t;return this.stateSubject$.pipe(r.take(1)).subscribe((function(r){t=e?e(r):r})),t},e.prototype.select=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=a(e),u=o.observables,c=o.projector,p=o.config;return(0===u.length?this.stateSubject$.pipe(p.debounce?s():function(e){return e},r.map(c)):t.combineLatest(u).pipe(p.debounce?s():function(e){return e},r.map((function(e){return c.apply(void 0,i(e))})))).pipe(r.distinctUntilChanged(),r.shareReplay({refCount:!0,bufferSize:1}),r.takeUntil(this.destroy$))},e.prototype.effect=function(e){var n=this,o=new t.Subject;return e(o).pipe(r.takeUntil(this.destroy$)).subscribe(),function(e){return(t.isObservable(e)?e:t.of(e)).pipe(r.takeUntil(n.destroy$)).subscribe((function(e){o.next(e)}))}},e}();function a(e){var t,r=Array.from(e),n={debounce:!1},o=r.pop();return"function"!=typeof o?(n=Object.assign(Object.assign({},n),o),t=r.pop()):t=o,{observables:r,projector:t,config:n}}c.decorators=[{type:n.Injectable}],c.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[u]}]}]},e.ComponentStore=c,e.initialStateToken=u,Object.defineProperty(e,"__esModule",{value:!0})}));
***************************************************************************** */Object.create;function o(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}Object.create;function s(){return function(t){return new e.Observable((function(r){var n,o,i=new e.Subscription;return i.add(t.subscribe({complete:function(){n&&r.next(o),r.complete()},error:function(t){r.error(t)},next:function(t){o=t,n||(n=e.asapScheduler.schedule((function(){r.next(o),n=void 0})),i.add(n))}})),i}))}}var c=new n.InjectionToken("ComponentStore InitState"),u=function(){function t(t){this.destroySubject$=new e.ReplaySubject(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new e.ReplaySubject(1),this.isInitialized=!1,this.notInitializedErrorMessage=this.constructor.name+" has not been initialized yet. Please make sure it is initialized before updating/getting.",this.state$=this.select((function(t){return t})),t&&this.initState(t)}return t.prototype.ngOnDestroy=function(){this.stateSubject$.complete(),this.destroySubject$.next()},t.prototype.updater=function(t){var n=this;return(function(i){var s,c=(e.isObservable(i)?i:e.of(i)).pipe(r.concatMap((function(t){return n.isInitialized?e.scheduled([t],e.queueScheduler).pipe(r.withLatestFrom(n.stateSubject$)):e.throwError(new Error(n.notInitializedErrorMessage))})),r.takeUntil(n.destroy$)).subscribe({next:function(e){var r=o(e,2),i=r[0],s=r[1];n.stateSubject$.next(t(s,i))},error:function(t){s=t,n.stateSubject$.error(t)}});if(s)throw s;return c})},t.prototype.initState=function(t){var r=this;e.scheduled([t],e.queueScheduler).subscribe((function(t){r.isInitialized=!0,r.stateSubject$.next(t)}))},t.prototype.setState=function(t){"function"!=typeof t?this.initState(t):this.updater(t)()},t.prototype.patchState=function(t){this.setState((function(e){var r="function"==typeof t?t(e):t;return Object.assign(Object.assign({},e),r)}))},t.prototype.get=function(t){if(!this.isInitialized)throw new Error(this.notInitializedErrorMessage);var e;return this.stateSubject$.pipe(r.take(1)).subscribe((function(r){e=t?t(r):r})),e},t.prototype.select=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=a(t),c=o.observables,u=o.projector,p=o.config;return(0===c.length?this.stateSubject$.pipe(p.debounce?s():function(t){return t},r.map(u)):e.combineLatest(c).pipe(p.debounce?s():function(t){return t},r.map((function(t){return u.apply(void 0,i(t))})))).pipe(r.distinctUntilChanged(),r.shareReplay({refCount:!0,bufferSize:1}),r.takeUntil(this.destroy$))},t.prototype.effect=function(t){var n=this,o=new e.Subject;return t(o).pipe(r.takeUntil(this.destroy$)).subscribe(),function(t){return(e.isObservable(t)?t:e.of(t)).pipe(r.takeUntil(n.destroy$)).subscribe((function(t){o.next(t)}))}},t}();function a(t){var e,r=Array.from(t),n={debounce:!1},o=r.pop();return"function"!=typeof o?(n=Object.assign(Object.assign({},n),o),e=r.pop()):e=o,{observables:r,projector:e,config:n}}u.decorators=[{type:n.Injectable}],u.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[c]}]}]},t.ComponentStore=u,t.initialStateToken=c,t.tapResponse=function(t,n,o){return function(i){return i.pipe(r.tap({next:t,error:n,complete:o}),r.catchError((function(){return e.EMPTY})))}},Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=ngrx-component-store.umd.min.js.map

@@ -11,3 +11,3 @@ /**

*/
export { initialStateToken, ComponentStore } from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9tb2R1bGVzL2NvbXBvbmVudC1zdG9yZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBTUEsa0RBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBETyBOT1QgRURJVFxuICpcbiAqIFRoaXMgZmlsZSBpcyBhdXRvbWF0aWNhbGx5IGdlbmVyYXRlZCBhdCBidWlsZFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
export { initialStateToken, ComponentStore, tapResponse } from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9tb2R1bGVzL2NvbXBvbmVudC1zdG9yZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBTUEsK0RBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBETyBOT1QgRURJVFxuICpcbiAqIFRoaXMgZmlsZSBpcyBhdXRvbWF0aWNhbGx5IGdlbmVyYXRlZCBhdCBidWlsZFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=

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

{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./index"},{"__symbol":1,"name":"SelectConfig","filePath":"./public_api"},{"__symbol":2,"name":"initialStateToken","filePath":"./index"},{"__symbol":3,"name":"initialStateToken","filePath":"./public_api"},{"__symbol":4,"name":"ComponentStore","filePath":"./index"},{"__symbol":5,"name":"ComponentStore","filePath":"./public_api"}]}
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}},{"symbol":{"__symbol":6,"members":[]},"metadata":{"__symbol":7,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./index"},{"__symbol":1,"name":"SelectConfig","filePath":"./public_api"},{"__symbol":2,"name":"initialStateToken","filePath":"./index"},{"__symbol":3,"name":"initialStateToken","filePath":"./public_api"},{"__symbol":4,"name":"ComponentStore","filePath":"./index"},{"__symbol":5,"name":"ComponentStore","filePath":"./public_api"},{"__symbol":6,"name":"tapResponse","filePath":"./index"},{"__symbol":7,"name":"tapResponse","filePath":"./public_api"}]}

@@ -9,3 +9,3 @@ /**

*/
export { initialStateToken, ComponentStore } from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmdyeC1jb21wb25lbnQtc3RvcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9tb2R1bGVzL2NvbXBvbmVudC1zdG9yZS9uZ3J4LWNvbXBvbmVudC1zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUlBLGtEQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
export { initialStateToken, ComponentStore, tapResponse } from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmdyeC1jb21wb25lbnQtc3RvcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9tb2R1bGVzL2NvbXBvbmVudC1zdG9yZS9uZ3J4LWNvbXBvbmVudC1zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUlBLCtEQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=

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

{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./ngrx-component-store"},{"__symbol":1,"name":"SelectConfig","filePath":"./index"},{"__symbol":2,"name":"initialStateToken","filePath":"./ngrx-component-store"},{"__symbol":3,"name":"initialStateToken","filePath":"./index"},{"__symbol":4,"name":"ComponentStore","filePath":"./ngrx-component-store"},{"__symbol":5,"name":"ComponentStore","filePath":"./index"}]}
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}},{"symbol":{"__symbol":6,"members":[]},"metadata":{"__symbol":7,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./ngrx-component-store"},{"__symbol":1,"name":"SelectConfig","filePath":"./index"},{"__symbol":2,"name":"initialStateToken","filePath":"./ngrx-component-store"},{"__symbol":3,"name":"initialStateToken","filePath":"./index"},{"__symbol":4,"name":"ComponentStore","filePath":"./ngrx-component-store"},{"__symbol":5,"name":"ComponentStore","filePath":"./index"},{"__symbol":6,"name":"tapResponse","filePath":"./ngrx-component-store"},{"__symbol":7,"name":"tapResponse","filePath":"./index"}]}

@@ -6,3 +6,3 @@ /**

*/
export { initialStateToken, ComponentStore } from './src/index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL21vZHVsZXMvY29tcG9uZW50LXN0b3JlL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxrREFBYyxhQUFhLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NyYy9pbmRleCc7XG4iXX0=
export { initialStateToken, ComponentStore, tapResponse } from './src/index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL21vZHVsZXMvY29tcG9uZW50LXN0b3JlL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSwrREFBYyxhQUFhLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NyYy9pbmRleCc7XG4iXX0=

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

{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./public_api"},{"__symbol":1,"name":"SelectConfig","filePath":"./src/index"},{"__symbol":2,"name":"initialStateToken","filePath":"./public_api"},{"__symbol":3,"name":"initialStateToken","filePath":"./src/index"},{"__symbol":4,"name":"ComponentStore","filePath":"./public_api"},{"__symbol":5,"name":"ComponentStore","filePath":"./src/index"}]}
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}},{"symbol":{"__symbol":6,"members":[]},"metadata":{"__symbol":7,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./public_api"},{"__symbol":1,"name":"SelectConfig","filePath":"./src/index"},{"__symbol":2,"name":"initialStateToken","filePath":"./public_api"},{"__symbol":3,"name":"initialStateToken","filePath":"./src/index"},{"__symbol":4,"name":"ComponentStore","filePath":"./public_api"},{"__symbol":5,"name":"ComponentStore","filePath":"./src/index"},{"__symbol":6,"name":"tapResponse","filePath":"./public_api"},{"__symbol":7,"name":"tapResponse","filePath":"./src/index"}]}

@@ -63,3 +63,3 @@ /**

*
* @template V
* @template ProvidedType, OriginType, ValueType, ReturnType
* @param {?} updaterFn A static updater function that takes 2 parameters (the

@@ -73,3 +73,3 @@ * current state and an argument object) and returns a new instance of the

updater(updaterFn) {
return (/** @type {?} */ (((/**
return (/** @type {?} */ (((/** @type {?} */ (((/**
* @param {?=} observableOrValue

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

return subscription;
}))));
})))))));
}

@@ -156,2 +156,23 @@ /**

/**
* Patches the state with provided partial state.
*
* @throws Error if the state is not initialized.
* @param {?} partialStateOrUpdaterFn a partial state or a partial updater
* function that accepts the state and returns the partial state.
* @return {?}
*/
patchState(partialStateOrUpdaterFn) {
this.setState((/**
* @param {?} state
* @return {?}
*/
(state) => {
/** @type {?} */
const patchedState = typeof partialStateOrUpdaterFn === 'function'
? partialStateOrUpdaterFn(state)
: partialStateOrUpdaterFn;
return Object.assign(Object.assign({}, state), patchedState);
}));
}
/**
* @protected

@@ -316,2 +337,2 @@ * @template R

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

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

{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"interface"}},{"symbol":{"__symbol":1,"members":[]},"metadata":{"__symbolic":"new","expression":{"__symbol":2,"members":[]},"arguments":["ComponentStore InitState"]}},{"symbol":{"__symbol":3,"members":[]},"metadata":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbol":4,"members":[]}},{"__symbolic":"call","expression":{"__symbol":5,"members":[]},"arguments":[{"__symbol":1,"members":[]}]}]],"parameters":[{"__symbolic":"error","message":"Could not resolve type","context":{"typeName":"T"},"fileName":"modules/component-store/src/component-store.ts"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"updater":[{"__symbolic":"method"}],"initState":[{"__symbolic":"method"}],"setState":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"select":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"effect":[{"__symbolic":"method"}]}},"type":{"summaryKind":3,"type":{"reference":{"__symbol":3,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":true,"token":{"identifier":{"reference":{"__symbol":1,"members":[]}}}}],"lifecycleHooks":[1]}}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./component-store"},{"__symbol":1,"name":"initialStateToken","filePath":"./component-store"},{"__symbol":2,"name":"InjectionToken","filePath":"@angular/core"},{"__symbol":3,"name":"ComponentStore","filePath":"./component-store"},{"__symbol":4,"name":"Optional","filePath":"@angular/core"},{"__symbol":5,"name":"Inject","filePath":"@angular/core"}]}
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"interface"}},{"symbol":{"__symbol":1,"members":[]},"metadata":{"__symbolic":"new","expression":{"__symbol":2,"members":[]},"arguments":["ComponentStore InitState"]}},{"symbol":{"__symbol":3,"members":[]},"metadata":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbol":4,"members":[]}},{"__symbolic":"call","expression":{"__symbol":5,"members":[]},"arguments":[{"__symbol":1,"members":[]}]}]],"parameters":[{"__symbolic":"error","message":"Could not resolve type","context":{"typeName":"T"},"fileName":"modules/component-store/src/component-store.ts"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"updater":[{"__symbolic":"method"}],"initState":[{"__symbolic":"method"}],"setState":[{"__symbolic":"method"}],"patchState":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"select":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"effect":[{"__symbolic":"method"}]}},"type":{"summaryKind":3,"type":{"reference":{"__symbol":3,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":true,"token":{"identifier":{"reference":{"__symbol":1,"members":[]}}}}],"lifecycleHooks":[1]}}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./component-store"},{"__symbol":1,"name":"initialStateToken","filePath":"./component-store"},{"__symbol":2,"name":"InjectionToken","filePath":"@angular/core"},{"__symbol":3,"name":"ComponentStore","filePath":"./component-store"},{"__symbol":4,"name":"Optional","filePath":"@angular/core"},{"__symbol":5,"name":"Inject","filePath":"@angular/core"}]}

@@ -7,2 +7,3 @@ /**

export { initialStateToken, ComponentStore } from './component-store';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2NvbXBvbmVudC1zdG9yZS9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxrREFBYyxtQkFBbUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29tcG9uZW50LXN0b3JlJztcbiJdfQ==
export { tapResponse } from './tap-response';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2NvbXBvbmVudC1zdG9yZS9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxrREFBYyxtQkFBbUIsQ0FBQztBQUNsQyw0QkFBYyxnQkFBZ0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29tcG9uZW50LXN0b3JlJztcbmV4cG9ydCAqIGZyb20gJy4vdGFwLXJlc3BvbnNlJztcbiJdfQ==

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

{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./index"},{"__symbol":1,"name":"SelectConfig","filePath":"./component-store"},{"__symbol":2,"name":"initialStateToken","filePath":"./index"},{"__symbol":3,"name":"initialStateToken","filePath":"./component-store"},{"__symbol":4,"name":"ComponentStore","filePath":"./index"},{"__symbol":5,"name":"ComponentStore","filePath":"./component-store"}]}
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbol":1,"members":[]}},{"symbol":{"__symbol":2,"members":[]},"metadata":{"__symbol":3,"members":[]}},{"symbol":{"__symbol":4,"members":[]},"metadata":{"__symbol":5,"members":[]}},{"symbol":{"__symbol":6,"members":[]},"metadata":{"__symbol":7,"members":[]}}],"symbols":[{"__symbol":0,"name":"SelectConfig","filePath":"./index"},{"__symbol":1,"name":"SelectConfig","filePath":"./component-store"},{"__symbol":2,"name":"initialStateToken","filePath":"./index"},{"__symbol":3,"name":"initialStateToken","filePath":"./component-store"},{"__symbol":4,"name":"ComponentStore","filePath":"./index"},{"__symbol":5,"name":"ComponentStore","filePath":"./component-store"},{"__symbol":6,"name":"tapResponse","filePath":"./index"},{"__symbol":7,"name":"tapResponse","filePath":"./tap-response"}]}

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

import { Observable, Subscription, asapScheduler, ReplaySubject, isObservable, of, scheduled, queueScheduler, throwError, combineLatest, Subject } from 'rxjs';
import { concatMap, withLatestFrom, takeUntil, take, map, distinctUntilChanged, shareReplay } from 'rxjs/operators';
import { Observable, Subscription, asapScheduler, ReplaySubject, isObservable, of, scheduled, queueScheduler, throwError, combineLatest, Subject, EMPTY } from 'rxjs';
import { concatMap, withLatestFrom, takeUntil, take, map, distinctUntilChanged, shareReplay, tap, catchError } from 'rxjs/operators';
import { InjectionToken, Injectable, Optional, Inject } from '@angular/core';

@@ -127,3 +127,3 @@

*
* @template V
* @template ProvidedType, OriginType, ValueType, ReturnType
* @param {?} updaterFn A static updater function that takes 2 parameters (the

@@ -137,3 +137,3 @@ * current state and an argument object) and returns a new instance of the

updater(updaterFn) {
return (/** @type {?} */ (((/**
return (/** @type {?} */ (((/** @type {?} */ (((/**
* @param {?=} observableOrValue

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

return subscription;
}))));
})))))));
}

@@ -220,2 +220,23 @@ /**

/**
* Patches the state with provided partial state.
*
* @throws Error if the state is not initialized.
* @param {?} partialStateOrUpdaterFn a partial state or a partial updater
* function that accepts the state and returns the partial state.
* @return {?}
*/
patchState(partialStateOrUpdaterFn) {
this.setState((/**
* @param {?} state
* @return {?}
*/
(state) => {
/** @type {?} */
const patchedState = typeof partialStateOrUpdaterFn === 'function'
? partialStateOrUpdaterFn(state)
: partialStateOrUpdaterFn;
return Object.assign(Object.assign({}, state), patchedState);
}));
}
/**
* @protected

@@ -383,2 +404,47 @@ * @template R

* @fileoverview added by tsickle
* Generated from: src/tap-response.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Handles the response in ComponentStore effects in a safe way, without
* additional boilerplate.
* It enforces that the error case is handled and that the effect would still be
* running should an error occur.
*
* Takes an optional third argument for a `complete` callback.
*
* ```typescript
* readonly dismissedAlerts = this.effect<Alert>(alert$ => {
* return alert$.pipe(
* concatMap(
* (alert) => this.alertsService.dismissAlert(alert).pipe(
* tapResponse(
* (dismissedAlert) => this.alertDismissed(dismissedAlert),
* (error) => this.logError(error),
* ))));
* });
* ```
* @template T
* @param {?} nextFn
* @param {?} errorFn
* @param {?=} completeFn
* @return {?}
*/
function tapResponse(nextFn, errorFn, completeFn) {
return (/**
* @param {?} source
* @return {?}
*/
(source) => source.pipe(tap({
next: nextFn,
error: errorFn,
complete: completeFn,
}), catchError((/**
* @return {?}
*/
() => EMPTY))));
}
/**
* @fileoverview added by tsickle
* Generated from: src/index.ts

@@ -406,3 +472,3 @@ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc

export { ComponentStore, initialStateToken };
export { ComponentStore, initialStateToken, tapResponse };
//# sourceMappingURL=ngrx-component-store.js.map

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

{"__symbolic":"module","version":4,"metadata":{"SelectConfig":{"__symbolic":"interface"},"initialStateToken":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":34,"character":37},"arguments":["ComponentStore InitState"]},"ComponentStore":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":36,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":51,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":51,"character":27},"arguments":[{"__symbolic":"reference","name":"initialStateToken"}]}]],"parameters":[{"__symbolic":"error","message":"Could not resolve type","line":51,"character":68,"context":{"typeName":"T"},"module":"./src/component-store"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"updater":[{"__symbolic":"method"}],"initState":[{"__symbolic":"method"}],"setState":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"select":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"effect":[{"__symbolic":"method"}]}}},"origins":{"SelectConfig":"./src/component-store","initialStateToken":"./src/component-store","ComponentStore":"./src/component-store"},"importAs":"@ngrx/component-store"}
{"__symbolic":"module","version":4,"metadata":{"SelectConfig":{"__symbolic":"interface"},"initialStateToken":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":34,"character":37},"arguments":["ComponentStore InitState"]},"ComponentStore":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":36,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":51,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":51,"character":27},"arguments":[{"__symbolic":"reference","name":"initialStateToken"}]}]],"parameters":[{"__symbolic":"error","message":"Could not resolve type","line":51,"character":68,"context":{"typeName":"T"},"module":"./src/component-store"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"updater":[{"__symbolic":"method"}],"initState":[{"__symbolic":"method"}],"setState":[{"__symbolic":"method"}],"patchState":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"select":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"effect":[{"__symbolic":"method"}]}},"tapResponse":{"__symbolic":"function","parameters":["nextFn","errorFn","completeFn"],"value":{"__symbolic":"error","message":"Lambda not supported","line":29,"character":9,"module":"./src/tap-response"}}},"origins":{"SelectConfig":"./src/component-store","initialStateToken":"./src/component-store","ComponentStore":"./src/component-store","tapResponse":"./src/tap-response"},"importAs":"@ngrx/component-store"}
{
"name": "@ngrx/component-store",
"version": "10.0.1",
"version": "10.1.0",
"description": "Reactive store for component state",

@@ -5,0 +5,0 @@ "repository": {

"use strict";
exports.__esModule = true;
exports.platformVersion = void 0;
exports.platformVersion = '^10.0.1';
exports.platformVersion = '^10.1.0';
//# sourceMappingURL=libs-version.js.map

@@ -32,3 +32,3 @@ import { Observable, Subscription } from 'rxjs';

*/
updater<V>(updaterFn: (state: T, value: V) => T): unknown extends V ? () => void : (t: V | Observable<V>) => Subscription;
updater<ProvidedType = void, OriginType = ProvidedType, ValueType = OriginType, ReturnType = OriginType extends void ? () => void : (observableOrValue: ValueType | Observable<ValueType>) => Subscription>(updaterFn: (state: T, value: OriginType) => T): ReturnType;
/**

@@ -45,2 +45,10 @@ * Initializes state. If it was already initialized then it resets the

setState(stateOrUpdaterFn: T | ((state: T) => T)): void;
/**
* Patches the state with provided partial state.
*
* @param partialStateOrUpdaterFn a partial state or a partial updater
* function that accepts the state and returns the partial state.
* @throws Error if the state is not initialized.
*/
patchState(partialStateOrUpdaterFn: Partial<T> | ((state: T) => Partial<T>)): void;
protected get(): T;

@@ -47,0 +55,0 @@ protected get<R>(projector: (s: T) => R): R;

export * from './component-store';
export * from './tap-response';

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