@ngrx/router-store
Advanced tools
Comparing version 4.1.1 to 5.0.0
import { Inject, InjectionToken, NgModule } from '@angular/core'; | ||
import { NavigationCancel, NavigationError, Router, RoutesRecognized } from '@angular/router'; | ||
import { Store } from '@ngrx/store'; | ||
import { Store, select } from '@ngrx/store'; | ||
import { of as of$1 } from 'rxjs/observable/of'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @abstract | ||
@@ -11,8 +15,2 @@ */ | ||
} | ||
/** | ||
* @abstract | ||
* @param {?} routerState | ||
* @return {?} | ||
*/ | ||
RouterStateSerializer.prototype.serialize = function (routerState) { }; | ||
return RouterStateSerializer; | ||
@@ -33,2 +31,6 @@ }()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* An action dispatched when the router navigates. | ||
@@ -64,2 +66,5 @@ */ | ||
} | ||
/** | ||
* @record | ||
*/ | ||
var _ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Internal Configuration'); | ||
@@ -73,8 +78,12 @@ var ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Configuration'); | ||
function _createDefaultRouterConfig(config) { | ||
var /** @type {?} */ _config = {}; | ||
var /** @type {?} */ _config; | ||
if (typeof config === 'function') { | ||
_config = config(); | ||
} | ||
else { | ||
_config = config || {}; | ||
} | ||
return Object.assign({ stateKey: DEFAULT_ROUTER_FEATURENAME }, _config); | ||
} | ||
var ɵ0 = { stateKey: DEFAULT_ROUTER_FEATURENAME }; | ||
/** | ||
@@ -136,3 +145,3 @@ * Connects RouterModule with StoreModule. | ||
this.navigationTriggeredByDispatch = false; | ||
this.stateKey = this.config.stateKey; | ||
this.stateKey = (this.config.stateKey); | ||
this.setUpBeforePreactivationHook(); | ||
@@ -180,3 +189,3 @@ this.setUpStoreStateListener(); | ||
}); | ||
this.store.select(this.stateKey).subscribe(function () { | ||
this.store.pipe(select(this.stateKey)).subscribe(function () { | ||
_this.navigateIfNeeded(); | ||
@@ -279,3 +288,3 @@ }); | ||
provide: _ROUTER_CONFIG, | ||
useValue: { stateKey: DEFAULT_ROUTER_FEATURENAME }, | ||
useValue: ɵ0, | ||
}, | ||
@@ -290,5 +299,3 @@ { | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
StoreRouterConnectingModule.ctorParameters = function () { return [ | ||
@@ -301,2 +308,14 @@ { type: Store, }, | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
@@ -303,0 +322,0 @@ */ |
import { Inject, InjectionToken, NgModule } from '@angular/core'; | ||
import { NavigationCancel, NavigationError, Router, RoutesRecognized } from '@angular/router'; | ||
import { Store } from '@ngrx/store'; | ||
import { Store, select } from '@ngrx/store'; | ||
import { of as of$1 } from 'rxjs/observable/of'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @abstract | ||
*/ | ||
class RouterStateSerializer { | ||
/** | ||
* @abstract | ||
* @param {?} routerState | ||
* @return {?} | ||
*/ | ||
serialize(routerState) { } | ||
} | ||
@@ -28,2 +26,6 @@ class DefaultRouterStateSerializer { | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* An action dispatched when the router navigates. | ||
@@ -59,2 +61,6 @@ */ | ||
} | ||
/** | ||
* @record | ||
*/ | ||
const _ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Internal Configuration'); | ||
@@ -68,8 +74,12 @@ const ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Configuration'); | ||
function _createDefaultRouterConfig(config) { | ||
let /** @type {?} */ _config = {}; | ||
let /** @type {?} */ _config; | ||
if (typeof config === 'function') { | ||
_config = config(); | ||
} | ||
else { | ||
_config = config || {}; | ||
} | ||
return Object.assign({ stateKey: DEFAULT_ROUTER_FEATURENAME }, _config); | ||
} | ||
const ɵ0 = { stateKey: DEFAULT_ROUTER_FEATURENAME }; | ||
/** | ||
@@ -131,3 +141,3 @@ * Connects RouterModule with StoreModule. | ||
this.navigationTriggeredByDispatch = false; | ||
this.stateKey = this.config.stateKey; | ||
this.stateKey = /** @type {?} */ (this.config.stateKey); | ||
this.setUpBeforePreactivationHook(); | ||
@@ -158,3 +168,3 @@ this.setUpStoreStateListener(); | ||
setUpBeforePreactivationHook() { | ||
((this.router)).hooks.beforePreactivation = (routerState) => { | ||
(/** @type {?} */ (this.router)).hooks.beforePreactivation = (routerState) => { | ||
this.routerState = this.serializer.serialize(routerState); | ||
@@ -173,3 +183,3 @@ if (this.shouldDispatchRouterNavigation()) | ||
}); | ||
this.store.select(this.stateKey).subscribe(() => { | ||
this.store.pipe(select(this.stateKey)).subscribe(() => { | ||
this.navigateIfNeeded(); | ||
@@ -270,3 +280,3 @@ }); | ||
provide: _ROUTER_CONFIG, | ||
useValue: { stateKey: DEFAULT_ROUTER_FEATURENAME }, | ||
useValue: ɵ0, | ||
}, | ||
@@ -281,5 +291,3 @@ { | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
StoreRouterConnectingModule.ctorParameters = () => [ | ||
@@ -293,2 +301,16 @@ { type: Store, }, | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
@@ -295,0 +317,0 @@ */ |
@@ -8,2 +8,6 @@ (function (global, factory) { | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @abstract | ||
@@ -14,8 +18,2 @@ */ | ||
} | ||
/** | ||
* @abstract | ||
* @param {?} routerState | ||
* @return {?} | ||
*/ | ||
RouterStateSerializer.prototype.serialize = function (routerState) { }; | ||
return RouterStateSerializer; | ||
@@ -36,2 +34,6 @@ }()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* An action dispatched when the router navigates. | ||
@@ -67,2 +69,5 @@ */ | ||
} | ||
/** | ||
* @record | ||
*/ | ||
var _ROUTER_CONFIG = new core.InjectionToken('@ngrx/router-store Internal Configuration'); | ||
@@ -76,8 +81,12 @@ var ROUTER_CONFIG = new core.InjectionToken('@ngrx/router-store Configuration'); | ||
function _createDefaultRouterConfig(config) { | ||
var /** @type {?} */ _config = {}; | ||
var /** @type {?} */ _config; | ||
if (typeof config === 'function') { | ||
_config = config(); | ||
} | ||
else { | ||
_config = config || {}; | ||
} | ||
return Object.assign({ stateKey: DEFAULT_ROUTER_FEATURENAME }, _config); | ||
} | ||
var ɵ0 = { stateKey: DEFAULT_ROUTER_FEATURENAME }; | ||
/** | ||
@@ -139,3 +148,3 @@ * Connects RouterModule with StoreModule. | ||
this.navigationTriggeredByDispatch = false; | ||
this.stateKey = this.config.stateKey; | ||
this.stateKey = (this.config.stateKey); | ||
this.setUpBeforePreactivationHook(); | ||
@@ -183,3 +192,3 @@ this.setUpStoreStateListener(); | ||
}); | ||
this.store.select(this.stateKey).subscribe(function () { | ||
this.store.pipe(store.select(this.stateKey)).subscribe(function () { | ||
_this.navigateIfNeeded(); | ||
@@ -282,3 +291,3 @@ }); | ||
provide: _ROUTER_CONFIG, | ||
useValue: { stateKey: DEFAULT_ROUTER_FEATURENAME }, | ||
useValue: ɵ0, | ||
}, | ||
@@ -293,5 +302,3 @@ { | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
StoreRouterConnectingModule.ctorParameters = function () { return [ | ||
@@ -298,0 +305,0 @@ { type: store.Store, }, |
@@ -1,2 +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,e){switch(e.type){case c:case h:case p:return{state:e.payload.routerState,navigationId:e.payload.event.id};default:return t}}function n(t){var e={};return"function"==typeof t&&(e=t()),Object.assign({stateKey:R},e)}var a=function(){function t(){}return t.prototype.serialize=function(t){},t}(),u=function(){function t(){}return t.prototype.serialize=function(t){return t},t}(),c="ROUTER_NAVIGATION",p="ROUTER_CANCEL",h="ROUTE_ERROR",d=new e.InjectionToken("@ngrx/router-store Internal Configuration"),g=new e.InjectionToken("@ngrx/router-store Configuration"),R="routerReducer",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:d,useValue:e},{provide:g,useFactory:n,deps:[d]}]}},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.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(c,{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(p,{routerState:this.routerState,storeState:this.storeState,event:t})},t.prototype.dispatchRouterError=function(t){this.dispatchRouterAction(h,{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:a,useClass:u},{provide:d,useValue:{stateKey:R}},{provide:g,useFactory:n,deps:[d]}]}]}],f.ctorParameters=function(){return[{type:o.Store},{type:r.Router},{type:a},{type:void 0,decorators:[{type:e.Inject,args:[g]}]}]},t.ROUTER_ERROR=h,t.ROUTER_CANCEL=p,t.ROUTER_NAVIGATION=c,t.routerReducer=s,t.StoreRouterConnectingModule=f,t.ROUTER_CONFIG=g,t.DEFAULT_ROUTER_FEATURENAME=R,t.RouterStateSerializer=a,t.DefaultRouterStateSerializer=u,t.ɵa=d,t.ɵb=n,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=./dist/router-store/bundles/router-store.umd.min.js.map | ||
!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})}); |
{ | ||
"name": "@ngrx/router-store", | ||
"version": "4.1.1", | ||
"version": "5.0.0", | ||
"description": "Bindings to connect @angular/router to @ngrx/store", | ||
@@ -23,8 +23,8 @@ "module": "@ngrx/router-store.es5.js", | ||
"peerDependencies": { | ||
"@angular/common": "^4.0.0 || ^5.0.0-rc.2 || ^5.0.0", | ||
"@angular/core": "^4.0.0 || ^5.0.0-rc.2 || ^5.0.0", | ||
"@angular/router": "^4.0.0 || ^5.0.0-rc.2 || ^5.0.0", | ||
"@ngrx/store": "^4.0.0", | ||
"rxjs": "^5.0.0" | ||
"@angular/common": "^5.0.0", | ||
"@angular/core": "^5.0.0", | ||
"@angular/router": "^5.0.0", | ||
"@ngrx/store": "^5.0.0-alpha.0", | ||
"rxjs": "^5.5.0" | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"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":"error","message":"Could not resolve type","line":230,"character":43,"context":{"typeName":"StoreRouterConfig"},"module":"./src/router_store_module"}]}],"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"},"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"} |
@@ -64,3 +64,3 @@ import { ModuleWithProviders, InjectionToken } from '@angular/core'; | ||
*/ | ||
export declare type RouterAction<T, V = RouterStateSnapshot> = RouterNavigationAction<T> | RouterCancelAction<T, V> | RouterErrorAction<T, V>; | ||
export declare type RouterAction<T, V = RouterStateSnapshot> = RouterNavigationAction<V> | RouterCancelAction<T, V> | RouterErrorAction<T, V>; | ||
export declare type RouterReducerState<T = RouterStateSnapshot> = { | ||
@@ -70,10 +70,10 @@ state: T; | ||
}; | ||
export declare function routerReducer<T = RouterStateSnapshot>(state: RouterReducerState<T>, action: RouterAction<any>): RouterReducerState<T>; | ||
export declare type StoreRouterConfig = { | ||
export declare function routerReducer<T = RouterStateSnapshot>(state: RouterReducerState<T>, action: RouterAction<any, T>): RouterReducerState<T>; | ||
export interface StoreRouterConfig { | ||
stateKey?: string; | ||
}; | ||
} | ||
export declare const _ROUTER_CONFIG: InjectionToken<{}>; | ||
export declare const ROUTER_CONFIG: InjectionToken<{}>; | ||
export declare const DEFAULT_ROUTER_FEATURENAME = "routerReducer"; | ||
export declare function _createDefaultRouterConfig(config: any): StoreRouterConfig; | ||
export declare function _createDefaultRouterConfig(config: StoreRouterConfig | StoreRouterConfigFunction): StoreRouterConfig; | ||
export declare type StoreRouterConfigFunction = () => StoreRouterConfig; | ||
@@ -80,0 +80,0 @@ /** |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94318
18
1093