@ngxs/devtools-plugin
Advanced tools
Comparing version 2.1.0-dev.1ecb454 to 2.1.0-dev.35f3e14
@@ -33,3 +33,3 @@ (function (global, factory) { | ||
else { | ||
var type = store.getActionTypeFromInstance(action); | ||
var type = store.getActionNameFromInstance(action); | ||
_this.devtoolsExtension.send(Object.assign({}, action, { type: type }), newState); | ||
@@ -36,0 +36,0 @@ } |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@ngxs/store"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@ngxs/devtools-plugin",["exports","@angular/core","@ngxs/store","rxjs/operators"],t):t((e.ngxs=e.ngxs||{},e.ngxs["devtools-plugin"]={}),e.ng.core,e["ngxs-store"],e.Rx.Observable.prototype)}(this,function(e,t,i,r){"use strict";var o=new t.InjectionToken("NGXS_DEVTOOLS_OPTIONS"),n=function(){function e(e,t){var o=this;this._options=e,this._state=t,this.devtoolsExtension=null,this.windowObj="undefined"!=typeof window?window:{};var n=this.windowObj.__REDUX_DEVTOOLS_EXTENSION__||this.windowObj.devToolsExtension;n&&(this.devtoolsExtension=n.connect(e),this.devtoolsExtension.subscribe(function(e){return o.dispatched(e)}))}return e.prototype.handle=function(o,n,e){var s=this,t=this._options&&this._options.disabled;return!this.devtoolsExtension||t?e(o,n):e(o,n).pipe(r.tap(function(e){if("@@INIT"===i.getActionTypeFromInstance(n))s.devtoolsExtension.init(o);else{var t=i.getActionTypeFromInstance(n);s.devtoolsExtension.send(Object.assign({},n,{type:t}),e)}}))},e.prototype.dispatched=function(e){if("DISPATCH"===e.type)if("JUMP_TO_ACTION"===e.payload.type||"JUMP_TO_STATE"===e.payload.type){var t=JSON.parse(e.state);this._state.next(t)}else"TOGGLE_ACTION"===e.payload.type&&console.warn("Skip is not supported at this time.");else"ACTION"===e.type&&console.warn("Dispatch is not supported at this time.")},e}();n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Inject,args:[o]}]},{type:i.StateStream}]};var s={name:"NGXS"},a=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:i.NGXS_PLUGINS,useClass:n,multi:!0},{provide:o,useValue:Object.assign({},s,e)}]}},t}();a.decorators=[{type:t.NgModule,args:[{imports:[i.NgxsModule]}]}],a.ctorParameters=function(){return[]},e.NgxsReduxDevtoolsPluginModule=a,e.NgxsReduxDevtoolsPlugin=n,e.ɵb=o,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@ngxs/store"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@ngxs/devtools-plugin",["exports","@angular/core","@ngxs/store","rxjs/operators"],t):t((e.ngxs=e.ngxs||{},e.ngxs["devtools-plugin"]={}),e.ng.core,e["ngxs-store"],e.Rx.Observable.prototype)}(this,function(e,t,i,r){"use strict";var o=new t.InjectionToken("NGXS_DEVTOOLS_OPTIONS"),n=function(){function e(e,t){var o=this;this._options=e,this._state=t,this.devtoolsExtension=null,this.windowObj="undefined"!=typeof window?window:{};var n=this.windowObj.__REDUX_DEVTOOLS_EXTENSION__||this.windowObj.devToolsExtension;n&&(this.devtoolsExtension=n.connect(e),this.devtoolsExtension.subscribe(function(e){return o.dispatched(e)}))}return e.prototype.handle=function(o,n,e){var s=this,t=this._options&&this._options.disabled;return!this.devtoolsExtension||t?e(o,n):e(o,n).pipe(r.tap(function(e){if("@@INIT"===i.getActionTypeFromInstance(n))s.devtoolsExtension.init(o);else{var t=i.getActionNameFromInstance(n);s.devtoolsExtension.send(Object.assign({},n,{type:t}),e)}}))},e.prototype.dispatched=function(e){if("DISPATCH"===e.type)if("JUMP_TO_ACTION"===e.payload.type||"JUMP_TO_STATE"===e.payload.type){var t=JSON.parse(e.state);this._state.next(t)}else"TOGGLE_ACTION"===e.payload.type&&console.warn("Skip is not supported at this time.");else"ACTION"===e.type&&console.warn("Dispatch is not supported at this time.")},e}();n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Inject,args:[o]}]},{type:i.StateStream}]};var s={name:"NGXS"},a=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:i.NGXS_PLUGINS,useClass:n,multi:!0},{provide:o,useValue:Object.assign({},s,e)}]}},t}();a.decorators=[{type:t.NgModule,args:[{imports:[i.NgxsModule]}]}],a.ctorParameters=function(){return[]},e.NgxsReduxDevtoolsPluginModule=a,e.NgxsReduxDevtoolsPlugin=n,e.ɵb=o,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngxs-devtools-plugin.umd.min.js.map |
import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core'; | ||
import { getActionTypeFromInstance, StateStream, NgxsModule, NGXS_PLUGINS } from '@ngxs/store'; | ||
import { getActionTypeFromInstance, StateStream, getActionNameFromInstance, NgxsModule, NGXS_PLUGINS } from '@ngxs/store'; | ||
import { tap } from 'rxjs/operators'; | ||
@@ -67,3 +67,3 @@ | ||
else { | ||
const /** @type {?} */ type = getActionTypeFromInstance(action); | ||
const /** @type {?} */ type = getActionNameFromInstance(action); | ||
this.devtoolsExtension.send(Object.assign({}, action, { type }), newState); | ||
@@ -70,0 +70,0 @@ } |
import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core'; | ||
import { getActionTypeFromInstance, StateStream, NgxsModule, NGXS_PLUGINS } from '@ngxs/store'; | ||
import { getActionTypeFromInstance, StateStream, getActionNameFromInstance, NgxsModule, NGXS_PLUGINS } from '@ngxs/store'; | ||
import { tap } from 'rxjs/operators'; | ||
@@ -31,3 +31,3 @@ | ||
else { | ||
var type = getActionTypeFromInstance(action); | ||
var type = getActionNameFromInstance(action); | ||
_this.devtoolsExtension.send(Object.assign({}, action, { type: type }), newState); | ||
@@ -34,0 +34,0 @@ } |
{ | ||
"name": "@ngxs/devtools-plugin", | ||
"description": "redux devtools plugin for @ngxs/store", | ||
"version": "2.1.0-dev.1ecb454", | ||
"version": "2.1.0-dev.35f3e14", | ||
"peerDependencies": { | ||
"@angular/core": "^5.0.0", | ||
"@ngxs/store": "2.1.0-beta.3" | ||
"@ngxs/store": "2.1.0-beta.7" | ||
}, | ||
@@ -9,0 +9,0 @@ "main": "bundles/ngxs-devtools-plugin.umd.js", |
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
49070