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

@ngrx/router-store

Package Overview
Dependencies
Maintainers
4
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngrx/router-store - npm Package Compare versions

Comparing version 5.0.1 to 5.2.0

8

@ngrx/router-store.es5.js

@@ -12,3 +12,3 @@ import { Inject, InjectionToken, NgModule } from '@angular/core';

*/
var RouterStateSerializer = (function () {
var RouterStateSerializer = /** @class */ (function () {
function RouterStateSerializer() {

@@ -18,3 +18,3 @@ }

}());
var DefaultRouterStateSerializer = (function () {
var DefaultRouterStateSerializer = /** @class */ (function () {
function DefaultRouterStateSerializer() {

@@ -129,3 +129,3 @@ }

*/
var StoreRouterConnectingModule = (function () {
var StoreRouterConnectingModule = /** @class */ (function () {
/**

@@ -144,3 +144,3 @@ * @param {?} store

this.navigationTriggeredByDispatch = false;
this.stateKey = (this.config.stateKey);
this.stateKey = /** @type {?} */ (this.config.stateKey);
this.setUpBeforePreactivationHook();

@@ -147,0 +147,0 @@ this.setUpStoreStateListener();

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@ngrx/store'), require('rxjs/observable/of')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/router', '@ngrx/store', 'rxjs/observable/of'], factory) :
typeof define === 'function' && define.amd ? define('@ngrx/router-store', ['exports', '@angular/core', '@angular/router', '@ngrx/store', 'rxjs/observable/of'], factory) :
(factory((global.ngrx = global.ngrx || {}, global.ngrx.routerStore = {}),global.ng.core,global.ng.router,global.ngrx.store,global.Rx.Observable));

@@ -14,3 +14,3 @@ }(this, (function (exports,core,router,store,of) { 'use strict';

*/
var RouterStateSerializer = (function () {
var RouterStateSerializer = /** @class */ (function () {
function RouterStateSerializer() {

@@ -20,3 +20,3 @@ }

}());
var DefaultRouterStateSerializer = (function () {
var DefaultRouterStateSerializer = /** @class */ (function () {
function DefaultRouterStateSerializer() {

@@ -131,3 +131,3 @@ }

*/
var StoreRouterConnectingModule = (function () {
var StoreRouterConnectingModule = /** @class */ (function () {
/**

@@ -146,3 +146,3 @@ * @param {?} store

this.navigationTriggeredByDispatch = false;
this.stateKey = (this.config.stateKey);
this.stateKey = /** @type {?} */ (this.config.stateKey);
this.setUpBeforePreactivationHook();

@@ -149,0 +149,0 @@ this.setUpStoreStateListener();

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("@ngrx/store"),require("rxjs/observable/of")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/router","@ngrx/store","rxjs/observable/of"],e):e((t.ngrx=t.ngrx||{},t.ngrx.routerStore={}),t.ng.core,t.ng.router,t.ngrx.store,t.Rx.Observable)}(this,function(t,e,r,o,i){"use strict";function s(t){var e;return e="function"==typeof t?t():t||{},Object.assign({stateKey:g},e)}var n=function(){return function(){}}(),a=function(){function t(){}return t.prototype.serialize=function(t){return t},t}(),u="ROUTER_NAVIGATION",c="ROUTER_CANCEL",p="ROUTE_ERROR",h=new e.InjectionToken("@ngrx/router-store Internal Configuration"),d=new e.InjectionToken("@ngrx/router-store Configuration"),g="routerReducer",R={stateKey:g},f=function(){function t(t,e,r,o){this.store=t,this.router=e,this.serializer=r,this.config=o,this.dispatchTriggeredByRouter=!1,this.navigationTriggeredByDispatch=!1,this.stateKey=this.config.stateKey,this.setUpBeforePreactivationHook(),this.setUpStoreStateListener(),this.setUpStateRollbackEvents()}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:h,useValue:e},{provide:d,useFactory:s,deps:[h]}]}},t.prototype.setUpBeforePreactivationHook=function(){var t=this;this.router.hooks.beforePreactivation=function(e){return t.routerState=t.serializer.serialize(e),t.shouldDispatchRouterNavigation()&&t.dispatchRouterNavigation(),i.of(!0)}},t.prototype.setUpStoreStateListener=function(){var t=this;this.store.subscribe(function(e){t.storeState=e}),this.store.pipe(o.select(this.stateKey)).subscribe(function(){t.navigateIfNeeded()})},t.prototype.shouldDispatchRouterNavigation=function(){return!this.storeState[this.stateKey]||!this.navigationTriggeredByDispatch},t.prototype.navigateIfNeeded=function(){this.storeState[this.stateKey]&&this.storeState[this.stateKey].state&&(this.dispatchTriggeredByRouter||this.router.url!==this.storeState[this.stateKey].state.url&&(this.navigationTriggeredByDispatch=!0,this.router.navigateByUrl(this.storeState[this.stateKey].state.url)))},t.prototype.setUpStateRollbackEvents=function(){var t=this;this.router.events.subscribe(function(e){e instanceof r.RoutesRecognized?t.lastRoutesRecognized=e:e instanceof r.NavigationCancel?t.dispatchRouterCancel(e):e instanceof r.NavigationError&&t.dispatchRouterError(e)})},t.prototype.dispatchRouterNavigation=function(){this.dispatchRouterAction(u,{routerState:this.routerState,event:new r.RoutesRecognized(this.lastRoutesRecognized.id,this.lastRoutesRecognized.url,this.lastRoutesRecognized.urlAfterRedirects,this.routerState)})},t.prototype.dispatchRouterCancel=function(t){this.dispatchRouterAction(c,{routerState:this.routerState,storeState:this.storeState,event:t})},t.prototype.dispatchRouterError=function(t){this.dispatchRouterAction(p,{routerState:this.routerState,storeState:this.storeState,event:new r.NavigationError(t.id,t.url,""+t)})},t.prototype.dispatchRouterAction=function(t,e){this.dispatchTriggeredByRouter=!0;try{this.store.dispatch({type:t,payload:e})}finally{this.dispatchTriggeredByRouter=!1,this.navigationTriggeredByDispatch=!1}},t}();f.decorators=[{type:e.NgModule,args:[{providers:[{provide:n,useClass:a},{provide:h,useValue:R},{provide:d,useFactory:s,deps:[h]}]}]}],f.ctorParameters=function(){return[{type:o.Store},{type:r.Router},{type:n},{type:void 0,decorators:[{type:e.Inject,args:[d]}]}]},t.ROUTER_ERROR=p,t.ROUTER_CANCEL=c,t.ROUTER_NAVIGATION=u,t.routerReducer=function(t,e){switch(e.type){case u:case p:case c:return{state:e.payload.routerState,navigationId:e.payload.event.id};default:return t}},t.StoreRouterConnectingModule=f,t.ROUTER_CONFIG=d,t.DEFAULT_ROUTER_FEATURENAME=g,t.RouterStateSerializer=n,t.DefaultRouterStateSerializer=a,t.ɵa=h,t.ɵb=s,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("@ngrx/store"),require("rxjs/observable/of")):"function"==typeof define&&define.amd?define("@ngrx/router-store",["exports","@angular/core","@angular/router","@ngrx/store","rxjs/observable/of"],e):e((t.ngrx=t.ngrx||{},t.ngrx.routerStore={}),t.ng.core,t.ng.router,t.ngrx.store,t.Rx.Observable)}(this,function(t,e,r,o,i){"use strict";function s(t){var e;return e="function"==typeof t?t():t||{},Object.assign({stateKey:g},e)}var n=function(){return function(){}}(),a=function(){function t(){}return t.prototype.serialize=function(t){return t},t}(),u="ROUTER_NAVIGATION",c="ROUTER_CANCEL",p="ROUTE_ERROR",h=new e.InjectionToken("@ngrx/router-store Internal Configuration"),d=new e.InjectionToken("@ngrx/router-store Configuration"),g="routerReducer",R={stateKey:g},f=function(){function t(t,e,r,o){this.store=t,this.router=e,this.serializer=r,this.config=o,this.dispatchTriggeredByRouter=!1,this.navigationTriggeredByDispatch=!1,this.stateKey=this.config.stateKey,this.setUpBeforePreactivationHook(),this.setUpStoreStateListener(),this.setUpStateRollbackEvents()}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:h,useValue:e},{provide:d,useFactory:s,deps:[h]}]}},t.prototype.setUpBeforePreactivationHook=function(){var t=this;this.router.hooks.beforePreactivation=function(e){return t.routerState=t.serializer.serialize(e),t.shouldDispatchRouterNavigation()&&t.dispatchRouterNavigation(),i.of(!0)}},t.prototype.setUpStoreStateListener=function(){var t=this;this.store.subscribe(function(e){t.storeState=e}),this.store.pipe(o.select(this.stateKey)).subscribe(function(){t.navigateIfNeeded()})},t.prototype.shouldDispatchRouterNavigation=function(){return!this.storeState[this.stateKey]||!this.navigationTriggeredByDispatch},t.prototype.navigateIfNeeded=function(){this.storeState[this.stateKey]&&this.storeState[this.stateKey].state&&(this.dispatchTriggeredByRouter||this.router.url!==this.storeState[this.stateKey].state.url&&(this.navigationTriggeredByDispatch=!0,this.router.navigateByUrl(this.storeState[this.stateKey].state.url)))},t.prototype.setUpStateRollbackEvents=function(){var t=this;this.router.events.subscribe(function(e){e instanceof r.RoutesRecognized?t.lastRoutesRecognized=e:e instanceof r.NavigationCancel?t.dispatchRouterCancel(e):e instanceof r.NavigationError&&t.dispatchRouterError(e)})},t.prototype.dispatchRouterNavigation=function(){this.dispatchRouterAction(u,{routerState:this.routerState,event:new r.RoutesRecognized(this.lastRoutesRecognized.id,this.lastRoutesRecognized.url,this.lastRoutesRecognized.urlAfterRedirects,this.routerState)})},t.prototype.dispatchRouterCancel=function(t){this.dispatchRouterAction(c,{routerState:this.routerState,storeState:this.storeState,event:t})},t.prototype.dispatchRouterError=function(t){this.dispatchRouterAction(p,{routerState:this.routerState,storeState:this.storeState,event:new r.NavigationError(t.id,t.url,""+t)})},t.prototype.dispatchRouterAction=function(t,e){this.dispatchTriggeredByRouter=!0;try{this.store.dispatch({type:t,payload:e})}finally{this.dispatchTriggeredByRouter=!1,this.navigationTriggeredByDispatch=!1}},t}();f.decorators=[{type:e.NgModule,args:[{providers:[{provide:n,useClass:a},{provide:h,useValue:R},{provide:d,useFactory:s,deps:[h]}]}]}],f.ctorParameters=function(){return[{type:o.Store},{type:r.Router},{type:n},{type:void 0,decorators:[{type:e.Inject,args:[d]}]}]},t.ROUTER_ERROR=p,t.ROUTER_CANCEL=c,t.ROUTER_NAVIGATION=u,t.routerReducer=function(t,e){switch(e.type){case u:case p:case c:return{state:e.payload.routerState,navigationId:e.payload.event.id};default:return t}},t.StoreRouterConnectingModule=f,t.ROUTER_CONFIG=d,t.DEFAULT_ROUTER_FEATURENAME=g,t.RouterStateSerializer=n,t.DefaultRouterStateSerializer=a,t.ɵa=h,t.ɵb=s,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "@ngrx/router-store",
"version": "5.0.1",
"version": "5.2.0",
"description": "Bindings to connect @angular/router to @ngrx/store",

@@ -5,0 +5,0 @@ "module": "@ngrx/router-store.es5.js",

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

{"__symbolic":"module","version":4,"metadata":{"ɵa":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["@ngrx/router-store Internal Configuration"]},"ɵb":{"__symbolic":"function"},"ROUTER_ERROR":"ROUTE_ERROR","ROUTER_CANCEL":"ROUTER_CANCEL","ROUTER_NAVIGATION":"ROUTER_NAVIGATION","RouterNavigationAction":{"__symbolic":"interface"},"RouterCancelAction":{"__symbolic":"interface"},"RouterErrorAction":{"__symbolic":"interface"},"RouterAction":{"__symbolic":"interface"},"routerReducer":{"__symbolic":"function"},"RouterErrorPayload":{"__symbolic":"interface"},"RouterReducerState":{"__symbolic":"interface"},"RouterCancelPayload":{"__symbolic":"interface"},"RouterNavigationPayload":{"__symbolic":"interface"},"StoreRouterConnectingModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"providers":[{"provide":{"__symbolic":"reference","name":"RouterStateSerializer"},"useClass":{"__symbolic":"reference","name":"DefaultRouterStateSerializer"}},{"provide":{"__symbolic":"reference","name":"ɵa"},"useValue":{"stateKey":{"__symbolic":"reference","name":"DEFAULT_ROUTER_FEATURENAME"}}},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIG"},"useFactory":{"__symbolic":"reference","name":"ɵb"},"deps":[{"__symbolic":"reference","name":"ɵa"}]}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ROUTER_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/router","name":"Router"},{"__symbolic":"reference","name":"RouterStateSerializer"},{"__symbolic":"reference","name":"any"}]}],"setUpBeforePreactivationHook":[{"__symbolic":"method"}],"setUpStoreStateListener":[{"__symbolic":"method"}],"shouldDispatchRouterNavigation":[{"__symbolic":"method"}],"navigateIfNeeded":[{"__symbolic":"method"}],"setUpStateRollbackEvents":[{"__symbolic":"method"}],"dispatchRouterNavigation":[{"__symbolic":"method"}],"dispatchRouterCancel":[{"__symbolic":"method"}],"dispatchRouterError":[{"__symbolic":"method"}],"dispatchRouterAction":[{"__symbolic":"method"}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"StoreRouterConnectingModule"},"providers":[{"provide":{"__symbolic":"reference","name":"ɵa"},"useValue":{"__symbolic":"reference","name":"config"}},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIG"},"useFactory":{"__symbolic":"reference","name":"ɵb"},"deps":[{"__symbolic":"reference","name":"ɵa"}]}]}}}},"StoreRouterConfig":{"__symbolic":"interface"},"StoreRouterConfigFunction":{"__symbolic":"interface"},"ROUTER_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["@ngrx/router-store Configuration"]},"DEFAULT_ROUTER_FEATURENAME":"routerReducer","RouterStateSerializer":{"__symbolic":"class","arity":1,"members":{"serialize":[{"__symbolic":"method"}]}},"DefaultRouterStateSerializer":{"__symbolic":"class","members":{"serialize":[{"__symbolic":"method"}]}}},"origins":{"ɵa":"./src/router_store_module","ɵb":"./src/router_store_module","ROUTER_ERROR":"./src/router_store_module","ROUTER_CANCEL":"./src/router_store_module","ROUTER_NAVIGATION":"./src/router_store_module","RouterNavigationAction":"./src/router_store_module","RouterCancelAction":"./src/router_store_module","RouterErrorAction":"./src/router_store_module","RouterAction":"./src/router_store_module","routerReducer":"./src/router_store_module","RouterErrorPayload":"./src/router_store_module","RouterReducerState":"./src/router_store_module","RouterCancelPayload":"./src/router_store_module","RouterNavigationPayload":"./src/router_store_module","StoreRouterConnectingModule":"./src/router_store_module","StoreRouterConfig":"./src/router_store_module","StoreRouterConfigFunction":"./src/router_store_module","ROUTER_CONFIG":"./src/router_store_module","DEFAULT_ROUTER_FEATURENAME":"./src/router_store_module","RouterStateSerializer":"./src/serializer","DefaultRouterStateSerializer":"./src/serializer"},"importAs":"@ngrx/router-store"}
{"__symbolic":"module","version":4,"metadata":{"ɵa":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":118,"character":34},"arguments":["@ngrx/router-store Internal Configuration"]},"ɵb":{"__symbolic":"function"},"ROUTER_ERROR":"ROUTE_ERROR","ROUTER_CANCEL":"ROUTER_CANCEL","ROUTER_NAVIGATION":"ROUTER_NAVIGATION","RouterNavigationAction":{"__symbolic":"interface"},"RouterCancelAction":{"__symbolic":"interface"},"RouterErrorAction":{"__symbolic":"interface"},"RouterAction":{"__symbolic":"interface"},"routerReducer":{"__symbolic":"function"},"RouterErrorPayload":{"__symbolic":"interface"},"RouterReducerState":{"__symbolic":"interface"},"RouterCancelPayload":{"__symbolic":"interface"},"RouterNavigationPayload":{"__symbolic":"interface"},"StoreRouterConnectingModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":187,"character":1},"arguments":[{"providers":[{"provide":{"__symbolic":"reference","name":"RouterStateSerializer"},"useClass":{"__symbolic":"reference","name":"DefaultRouterStateSerializer"}},{"provide":{"__symbolic":"reference","name":"ɵa"},"useValue":{"stateKey":{"__symbolic":"reference","name":"DEFAULT_ROUTER_FEATURENAME"}}},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIG"},"useFactory":{"__symbolic":"reference","name":"ɵb"},"deps":[{"__symbolic":"reference","name":"ɵa"}]}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":233,"character":5},"arguments":[{"__symbolic":"reference","name":"ROUTER_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":231,"character":20},{"__symbolic":"reference","name":"RouterStateSerializer"},{"__symbolic":"reference","name":"any"}]}],"setUpBeforePreactivationHook":[{"__symbolic":"method"}],"setUpStoreStateListener":[{"__symbolic":"method"}],"shouldDispatchRouterNavigation":[{"__symbolic":"method"}],"navigateIfNeeded":[{"__symbolic":"method"}],"setUpStateRollbackEvents":[{"__symbolic":"method"}],"dispatchRouterNavigation":[{"__symbolic":"method"}],"dispatchRouterCancel":[{"__symbolic":"method"}],"dispatchRouterError":[{"__symbolic":"method"}],"dispatchRouterAction":[{"__symbolic":"method"}]},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"StoreRouterConnectingModule"},"providers":[{"provide":{"__symbolic":"reference","name":"ɵa"},"useValue":{"__symbolic":"reference","name":"config"}},{"provide":{"__symbolic":"reference","name":"ROUTER_CONFIG"},"useFactory":{"__symbolic":"reference","name":"ɵb"},"deps":[{"__symbolic":"reference","name":"ɵa"}]}]}}}},"StoreRouterConfig":{"__symbolic":"interface"},"StoreRouterConfigFunction":{"__symbolic":"interface"},"ROUTER_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":121,"character":33},"arguments":["@ngrx/router-store Configuration"]},"DEFAULT_ROUTER_FEATURENAME":"routerReducer","RouterStateSerializer":{"__symbolic":"class","arity":1,"members":{"serialize":[{"__symbolic":"method"}]}},"DefaultRouterStateSerializer":{"__symbolic":"class","members":{"serialize":[{"__symbolic":"method"}]}}},"origins":{"ɵa":"./src/router_store_module","ɵb":"./src/router_store_module","ROUTER_ERROR":"./src/router_store_module","ROUTER_CANCEL":"./src/router_store_module","ROUTER_NAVIGATION":"./src/router_store_module","RouterNavigationAction":"./src/router_store_module","RouterCancelAction":"./src/router_store_module","RouterErrorAction":"./src/router_store_module","RouterAction":"./src/router_store_module","routerReducer":"./src/router_store_module","RouterErrorPayload":"./src/router_store_module","RouterReducerState":"./src/router_store_module","RouterCancelPayload":"./src/router_store_module","RouterNavigationPayload":"./src/router_store_module","StoreRouterConnectingModule":"./src/router_store_module","StoreRouterConfig":"./src/router_store_module","StoreRouterConfigFunction":"./src/router_store_module","ROUTER_CONFIG":"./src/router_store_module","DEFAULT_ROUTER_FEATURENAME":"./src/router_store_module","RouterStateSerializer":"./src/serializer","DefaultRouterStateSerializer":"./src/serializer"},"importAs":"@ngrx/router-store"}

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