Comparing version 1.0.4 to 1.0.5
@@ -1,1 +0,1 @@ | ||
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@ngrx/store"),require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","@angular/core"],factory):factory(global.ngrxUndo=global.ngrxUndo||{},global.ngrx.store,global.ng.core)}(this,function(exports,_ngrx_store,_angular_core){"use strict";function handleUndo(rootReducer,bufferSize){var executedActions=[],initialState=void 0;return function(state,action){if(action.type===UNDO_ACTION){var newState_1=initialState;return executedActions=executedActions.filter(function(eAct){return eAct!==action.payload}),executedActions.forEach(function(executedAction){return newState_1=rootReducer(newState_1,executedAction)}),newState_1}executedActions.push(action);var updatedState=rootReducer(state,action);if(executedActions.length===bufferSize+1){var firstAction=executedActions[0];initialState=rootReducer(initialState,firstAction),executedActions=executedActions.slice(1,bufferSize+1)}return updatedState}}function createReducer(dispatcher,reducer,options){return new _ngrx_store.Reducer(dispatcher,handleUndo(reducer,options.bufferSize))}function undo(action){return{type:UNDO_ACTION,payload:action}}var UNDO_ACTION="ngrx-undo/UNDO_ACTION",UNDO_DEVTOOLS_CONFIG=new _angular_core.OpaqueToken("@ngrx/undodevtools Options"),StoreUndoModule=function(){function StoreUndoModule(){}return StoreUndoModule.interceptStore=function(options){return void 0===options&&(options={bufferSize:100}),{ngModule:StoreUndoModule,providers:[{provide:UNDO_DEVTOOLS_CONFIG,useValue:options},{provide:_ngrx_store.Reducer,deps:[_ngrx_store.Dispatcher,_ngrx_store.INITIAL_REDUCER,UNDO_DEVTOOLS_CONFIG],useFactory:createReducer}]}},StoreUndoModule.decorators=[{type:_angular_core.NgModule,args:[{imports:[_ngrx_store.StoreModule]}]}],StoreUndoModule.ctorParameters=[],StoreUndoModule}();exports.UNDO_DEVTOOLS_CONFIG=UNDO_DEVTOOLS_CONFIG,exports.StoreUndoModule=StoreUndoModule,exports.UNDO_ACTION=UNDO_ACTION,exports.undo=undo,Object.defineProperty(exports,"__esModule",{value:!0})}); | ||
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@ngrx/store"),require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","@angular/core"],factory):factory(global.ngrxUndo=global.ngrxUndo||{},global.ngrx.store,global.ng.core)}(this,function(exports,_ngrx_store,_angular_core){"use strict";function handleUndo(rootReducer,bufferSize){var executedActions=[],initialState=void 0;return function(state,action){if(action.type===UNDO_ACTION){var newState_1=initialState;return executedActions=executedActions.filter(function(eAct){return eAct!==action.payload}),executedActions.forEach(function(executedAction){return newState_1=rootReducer(newState_1,executedAction)}),newState_1}executedActions.push(action);var updatedState=rootReducer(state,action);if(executedActions.length===bufferSize+1){var firstAction=executedActions[0];initialState=rootReducer(initialState,firstAction),executedActions=executedActions.slice(1,bufferSize+1)}return updatedState}}function createReducer(dispatcher,reducer,options){return new _ngrx_store.Reducer(dispatcher,handleUndo(reducer,options.bufferSize))}function undo(action){return{type:UNDO_ACTION,payload:action}}var UNDO_ACTION="ngrx-undo/UNDO_ACTION",UNDO_DEVTOOLS_CONFIG=new _angular_core.OpaqueToken("@ngrx/undodevtools Options"),StoreUndoModule=function(){function StoreUndoModule(){}return StoreUndoModule.interceptStore=function(options){return void 0===options&&(options={bufferSize:100}),{ngModule:StoreUndoModule,providers:[{provide:UNDO_DEVTOOLS_CONFIG,useValue:options},{provide:_ngrx_store.Reducer,deps:[_ngrx_store.Dispatcher,_ngrx_store.INITIAL_REDUCER,UNDO_DEVTOOLS_CONFIG],useFactory:createReducer}]}},StoreUndoModule.decorators=[{type:_angular_core.NgModule,args:[{imports:[_ngrx_store.StoreModule]}]}],StoreUndoModule.ctorParameters=function(){return[]},StoreUndoModule}();exports.UNDO_DEVTOOLS_CONFIG=UNDO_DEVTOOLS_CONFIG,exports.StoreUndoModule=StoreUndoModule,exports.UNDO_ACTION=UNDO_ACTION,exports.undo=undo,Object.defineProperty(exports,"__esModule",{value:!0})}); |
@@ -76,3 +76,3 @@ (function (global, factory) { | ||
/** @nocollapse */ | ||
StoreUndoModule.ctorParameters = []; | ||
StoreUndoModule.ctorParameters = function () { return []; }; | ||
return StoreUndoModule; | ||
@@ -79,0 +79,0 @@ }()); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/storeUndo"}]} | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./src/storeUndo"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/storeUndo"}]}] |
{ | ||
"name": "ngrx-undo", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Undo support for @ngrx/store", | ||
@@ -33,9 +33,9 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@angular/compiler": "2.0.0", | ||
"@angular/compiler-cli": "0.6.3", | ||
"@angular/compiler": "^2.4.6", | ||
"@angular/compiler-cli": "^2.4.6", | ||
"@angular/core": "^2.4.6", | ||
"@ngrx/core": "^1.2.0", | ||
"@ngrx/store": "^2.2.1", | ||
"rimraf": "2.5.4", | ||
"@angular/core": "2.0.0", | ||
"@ngrx/core": "1.2.0", | ||
"@ngrx/store": "2.2.1", | ||
"rxjs": "5.0.0-beta.12", | ||
"rxjs": "5.1.0", | ||
"@types/jasmine": "^2.2.33", | ||
@@ -62,3 +62,3 @@ "@types/node": "^6.0.38", | ||
"webpack": "^2.1.0-beta.21", | ||
"zone.js": "^0.6.17" | ||
"zone.js": "^0.7.6" | ||
}, | ||
@@ -65,0 +65,0 @@ "peerDependencies": { |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"createReducer":{"__symbolic":"function","parameters":["dispatcher","reducer","options"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@ngrx/store","name":"Reducer"},"arguments":[{"__symbolic":"reference","name":"dispatcher"},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./handleUndo","name":"handleUndo"},"arguments":[{"__symbolic":"reference","name":"reducer"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"bufferSize"}]}]}}}} | ||
[{"__symbolic":"module","version":3,"metadata":{"createReducer":{"__symbolic":"function","parameters":["dispatcher","reducer","options"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@ngrx/store","name":"Reducer"},"arguments":[{"__symbolic":"reference","name":"dispatcher"},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./handleUndo","name":"handleUndo"},"arguments":[{"__symbolic":"reference","name":"reducer"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"bufferSize"}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"createReducer":{"__symbolic":"function","parameters":["dispatcher","reducer","options"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@ngrx/store","name":"Reducer"},"arguments":[{"__symbolic":"reference","name":"dispatcher"},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./handleUndo","name":"handleUndo"},"arguments":[{"__symbolic":"reference","name":"reducer"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"options"},"member":"bufferSize"}]}]}}}}] |
@@ -1,3 +0,3 @@ | ||
import { Reducer, Dispatcher } from "@ngrx/store"; | ||
import { OpaqueToken } from "@angular/core"; | ||
import { Reducer, Dispatcher } from '@ngrx/store'; | ||
import { OpaqueToken } from '@angular/core'; | ||
export { UNDO_ACTION, undo } from "./undoAction"; | ||
@@ -4,0 +4,0 @@ export declare const UNDO_DEVTOOLS_CONFIG: OpaqueToken; |
@@ -1,4 +0,4 @@ | ||
import { Reducer, Dispatcher, INITIAL_REDUCER, StoreModule } from "@ngrx/store"; | ||
import { OpaqueToken, NgModule } from "@angular/core"; | ||
import { createReducer } from "./createReducer"; | ||
import { Reducer, Dispatcher, INITIAL_REDUCER, StoreModule } from '@ngrx/store'; | ||
import { OpaqueToken, NgModule } from '@angular/core'; | ||
import { createReducer } from './createReducer'; | ||
export { UNDO_ACTION, undo } from "./undoAction"; | ||
@@ -31,5 +31,5 @@ export var UNDO_DEVTOOLS_CONFIG = new OpaqueToken('@ngrx/undodevtools Options'); | ||
/** @nocollapse */ | ||
StoreUndoModule.ctorParameters = []; | ||
StoreUndoModule.ctorParameters = function () { return []; }; | ||
return StoreUndoModule; | ||
}()); | ||
//# sourceMappingURL=storeUndo.js.map |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"UNDO_DEVTOOLS_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["@ngrx/undodevtools Options"]},"StoreUndoModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@ngrx/store","name":"StoreModule"}]}]}],"statics":{"interceptStore":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"StoreUndoModule"},"providers":[{"provide":{"__symbolic":"reference","name":"UNDO_DEVTOOLS_CONFIG"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@ngrx/store","name":"Reducer"},"deps":[{"__symbolic":"reference","module":"@ngrx/store","name":"Dispatcher"},{"__symbolic":"reference","module":"@ngrx/store","name":"INITIAL_REDUCER"},{"__symbolic":"reference","name":"UNDO_DEVTOOLS_CONFIG"}],"useFactory":{"__symbolic":"reference","module":"./createReducer","name":"createReducer"}}]},"defaults":[{"bufferSize":100}]}}}},"exports":[{"from":"./undoAction","export":["UNDO_ACTION","undo"]}]} | ||
[{"__symbolic":"module","version":3,"metadata":{"UNDO_DEVTOOLS_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["@ngrx/undodevtools Options"]},"StoreUndoModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@ngrx/store","name":"StoreModule"}]}]}],"statics":{"interceptStore":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"StoreUndoModule"},"providers":[{"provide":{"__symbolic":"reference","name":"UNDO_DEVTOOLS_CONFIG"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@ngrx/store","name":"Reducer"},"deps":[{"__symbolic":"reference","module":"@ngrx/store","name":"Dispatcher"},{"__symbolic":"reference","module":"@ngrx/store","name":"INITIAL_REDUCER"},{"__symbolic":"reference","name":"UNDO_DEVTOOLS_CONFIG"}],"useFactory":{"__symbolic":"reference","module":"./createReducer","name":"createReducer"}}]},"defaults":[{"bufferSize":100}]}}}},"exports":[{"from":"./undoAction","export":["UNDO_ACTION","undo"]}]},{"__symbolic":"module","version":1,"metadata":{"UNDO_DEVTOOLS_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["@ngrx/undodevtools Options"]},"StoreUndoModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@ngrx/store","name":"StoreModule"}]}]}],"statics":{"interceptStore":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"StoreUndoModule"},"providers":[{"provide":{"__symbolic":"reference","name":"UNDO_DEVTOOLS_CONFIG"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@ngrx/store","name":"Reducer"},"deps":[{"__symbolic":"reference","module":"@ngrx/store","name":"Dispatcher"},{"__symbolic":"reference","module":"@ngrx/store","name":"INITIAL_REDUCER"},{"__symbolic":"reference","name":"UNDO_DEVTOOLS_CONFIG"}],"useFactory":{"__symbolic":"reference","module":"./createReducer","name":"createReducer"}}]},"defaults":[{"bufferSize":100}]}}}},"exports":[{"from":"./undoAction","export":["UNDO_ACTION","undo"]}]}] |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":1,"metadata":{"UNDO_ACTION":"ngrx-undo/UNDO_ACTION","undo":{"__symbolic":"function","parameters":["action"],"value":{"type":"ngrx-undo/UNDO_ACTION","payload":{"__symbolic":"reference","name":"action"}}}}} | ||
[{"__symbolic":"module","version":3,"metadata":{"UNDO_ACTION":"ngrx-undo/UNDO_ACTION","undo":{"__symbolic":"function","parameters":["action"],"value":{"type":"ngrx-undo/UNDO_ACTION","payload":{"__symbolic":"reference","name":"action"}}}}},{"__symbolic":"module","version":1,"metadata":{"UNDO_ACTION":"ngrx-undo/UNDO_ACTION","undo":{"__symbolic":"function","parameters":["action"],"value":{"type":"ngrx-undo/UNDO_ACTION","payload":{"__symbolic":"reference","name":"action"}}}}}] |
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
26515
25