@ngxs/devtools-plugin
Advanced tools
Comparing version 2.0.0-dev.d110e8b to 2.0.0-dev.d381fbd
@@ -17,8 +17,3 @@ (function (global, factory) { | ||
if (globalDevtools) { | ||
this.devtoolsExtension = (globalDevtools.connect({ | ||
name: 'NGXS', | ||
maxAge: _options.maxAge, | ||
actionSanitizer: _options.actionSanitizer, | ||
stateSanitizer: _options.stateSanitizer | ||
})); | ||
this.devtoolsExtension = (globalDevtools.connect(_options)); | ||
this.devtoolsExtension.subscribe(function (a) { return _this.dispatched(a); }); | ||
@@ -65,2 +60,5 @@ } | ||
]; }; | ||
var defaultNgxsDevtoolsOptions = { | ||
name: 'NGXS' | ||
}; | ||
var NgxsReduxDevtoolsPluginModule = /** @class */ (function () { | ||
@@ -73,4 +71,11 @@ function NgxsReduxDevtoolsPluginModule() { | ||
providers: [ | ||
{ provide: store.NGXS_PLUGINS, useClass: NgxsReduxDevtoolsPlugin, multi: true }, | ||
{ provide: NGXS_DEVTOOLS_OPTIONS, useValue: options ? options : {} } | ||
{ | ||
provide: store.NGXS_PLUGINS, | ||
useClass: NgxsReduxDevtoolsPlugin, | ||
multi: true | ||
}, | ||
{ | ||
provide: NGXS_DEVTOOLS_OPTIONS, | ||
useValue: Object.assign({}, defaultNgxsDevtoolsOptions, options) | ||
} | ||
] | ||
@@ -77,0 +82,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({name:"NGXS",maxAge:e.maxAge,actionSanitizer:e.actionSanitizer,stateSanitizer:e.stateSanitizer}),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 e.payload.type;else e.type},e}();n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Inject,args:[o]}]},{type:i.StateStream}]};var s=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:i.NGXS_PLUGINS,useClass:n,multi:!0},{provide:o,useValue:e||{}}]}},t}();s.decorators=[{type:t.NgModule,args:[{imports:[i.NgxsModule]}]}],s.ctorParameters=function(){return[]},e.NgxsReduxDevtoolsPluginModule=s,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.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 e.payload.type;else e.type},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 |
@@ -44,8 +44,3 @@ import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core'; | ||
if (globalDevtools) { | ||
this.devtoolsExtension = /** @type {?} */ (globalDevtools.connect({ | ||
name: 'NGXS', | ||
maxAge: _options.maxAge, | ||
actionSanitizer: _options.actionSanitizer, | ||
stateSanitizer: _options.stateSanitizer | ||
})); | ||
this.devtoolsExtension = /** @type {?} */ (globalDevtools.connect(_options)); | ||
this.devtoolsExtension.subscribe(a => this.dispatched(a)); | ||
@@ -113,2 +108,5 @@ } | ||
*/ | ||
const defaultNgxsDevtoolsOptions = { | ||
name: 'NGXS' | ||
}; | ||
class NgxsReduxDevtoolsPluginModule { | ||
@@ -123,4 +121,11 @@ /** | ||
providers: [ | ||
{ provide: NGXS_PLUGINS, useClass: NgxsReduxDevtoolsPlugin, multi: true }, | ||
{ provide: NGXS_DEVTOOLS_OPTIONS, useValue: options ? options : {} } | ||
{ | ||
provide: NGXS_PLUGINS, | ||
useClass: NgxsReduxDevtoolsPlugin, | ||
multi: true | ||
}, | ||
{ | ||
provide: NGXS_DEVTOOLS_OPTIONS, | ||
useValue: Object.assign({}, defaultNgxsDevtoolsOptions, options) | ||
} | ||
] | ||
@@ -127,0 +132,0 @@ }; |
@@ -15,8 +15,3 @@ import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core'; | ||
if (globalDevtools) { | ||
this.devtoolsExtension = (globalDevtools.connect({ | ||
name: 'NGXS', | ||
maxAge: _options.maxAge, | ||
actionSanitizer: _options.actionSanitizer, | ||
stateSanitizer: _options.stateSanitizer | ||
})); | ||
this.devtoolsExtension = (globalDevtools.connect(_options)); | ||
this.devtoolsExtension.subscribe(function (a) { return _this.dispatched(a); }); | ||
@@ -63,2 +58,5 @@ } | ||
]; }; | ||
var defaultNgxsDevtoolsOptions = { | ||
name: 'NGXS' | ||
}; | ||
var NgxsReduxDevtoolsPluginModule = /** @class */ (function () { | ||
@@ -71,4 +69,11 @@ function NgxsReduxDevtoolsPluginModule() { | ||
providers: [ | ||
{ provide: NGXS_PLUGINS, useClass: NgxsReduxDevtoolsPlugin, multi: true }, | ||
{ provide: NGXS_DEVTOOLS_OPTIONS, useValue: options ? options : {} } | ||
{ | ||
provide: NGXS_PLUGINS, | ||
useClass: NgxsReduxDevtoolsPlugin, | ||
multi: true | ||
}, | ||
{ | ||
provide: NGXS_DEVTOOLS_OPTIONS, | ||
useValue: Object.assign({}, defaultNgxsDevtoolsOptions, options) | ||
} | ||
] | ||
@@ -75,0 +80,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"NgxsReduxDevtoolsPluginModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@ngxs/store","name":"NgxsModule","line":7,"character":12}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxsReduxDevtoolsPluginModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@ngxs/store","name":"NGXS_PLUGINS","line":14,"character":19},"useClass":{"__symbolic":"reference","name":"NgxsReduxDevtoolsPlugin"},"multi":true},{"provide":{"__symbolic":"reference","name":"ɵb"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"reference","name":"options"},"thenExpression":{"__symbolic":"reference","name":"options"},"elseExpression":{}}}]}}}},"NgxsReduxDevtoolsPlugin":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":15,"character":15},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}],null],"parameters":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@ngxs/store","name":"StateStream","line":15,"character":100}]}],"handle":[{"__symbolic":"method"}],"dispatched":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"interface"},"ɵb":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":41,"character":41},"arguments":["NGXS_DEVTOOLS_OPTIONS"]}},"origins":{"NgxsReduxDevtoolsPluginModule":"./src/devtools.module","NgxsReduxDevtoolsPlugin":"./src/devtools.plugin","ɵa":"./src/symbols","ɵb":"./src/symbols"},"importAs":"@ngxs/devtools-plugin"} | ||
{"__symbolic":"module","version":4,"metadata":{"NgxsReduxDevtoolsPluginModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@ngxs/store","name":"NgxsModule","line":11,"character":12}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["options"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxsReduxDevtoolsPluginModule"},"providers":[{"provide":{"__symbolic":"reference","module":"@ngxs/store","name":"NGXS_PLUGINS","line":19,"character":19},"useClass":{"__symbolic":"reference","name":"NgxsReduxDevtoolsPlugin"},"multi":true},{"provide":{"__symbolic":"reference","name":"ɵb"},"useValue":{}}]}}}},"NgxsReduxDevtoolsPlugin":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":15,"character":15},"arguments":[{"__symbolic":"reference","name":"ɵb"}]}],null],"parameters":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@ngxs/store","name":"StateStream","line":15,"character":100}]}],"handle":[{"__symbolic":"method"}],"dispatched":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"interface"},"ɵb":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":46,"character":41},"arguments":["NGXS_DEVTOOLS_OPTIONS"]}},"origins":{"NgxsReduxDevtoolsPluginModule":"./src/devtools.module","NgxsReduxDevtoolsPlugin":"./src/devtools.plugin","ɵa":"./src/symbols","ɵb":"./src/symbols"},"importAs":"@ngxs/devtools-plugin"} |
{ | ||
"name": "@ngxs/devtools-plugin", | ||
"description": "redux devtools plugin for @ngxs/store", | ||
"version": "2.0.0-dev.d110e8b", | ||
"version": "2.0.0-dev.d381fbd", | ||
"peerDependencies": { | ||
@@ -6,0 +6,0 @@ "@angular/core": "^5.0.0", |
import { ModuleWithProviders } from '@angular/core'; | ||
import { NgxsDevtoolsOptions } from './symbols'; | ||
export declare const defaultNgxsDevtoolsOptions: NgxsDevtoolsOptions; | ||
export declare class NgxsReduxDevtoolsPluginModule { | ||
static forRoot(options?: NgxsDevtoolsOptions): ModuleWithProviders; | ||
} |
@@ -19,2 +19,6 @@ import { InjectionToken } from '@angular/core'; | ||
/** | ||
* The name of the extension | ||
*/ | ||
name?: string; | ||
/** | ||
* Whether the dev tools is enabled or note. Useful for setting during production. | ||
@@ -21,0 +25,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
47604
407
38