@ngxs/devtools-plugin 3.7.4 → 3.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/bundles/ngxs-devtools-plugin.umd.js +387 -378
- package/bundles/ngxs-devtools-plugin.umd.js.map +1 -1
- package/bundles/ngxs-devtools-plugin.umd.min.js +1 -1
- package/bundles/ngxs-devtools-plugin.umd.min.js.map +1 -1
- package/esm2015/index.js +9 -9
- package/esm2015/ngxs-devtools-plugin.js +9 -9
- package/esm2015/src/devtools.module.js +48 -48
- package/esm2015/src/devtools.plugin.js +229 -220
- package/esm2015/src/public_api.js +8 -8
- package/esm2015/src/symbols.js +78 -78
- package/esm5/index.js +9 -9
- package/esm5/ngxs-devtools-plugin.js +9 -9
- package/esm5/src/devtools.module.js +57 -57
- package/esm5/src/devtools.plugin.js +271 -262
- package/esm5/src/public_api.js +8 -8
- package/esm5/src/symbols.js +78 -78
- package/fesm2015/ngxs-devtools-plugin.js +349 -340
- package/fesm2015/ngxs-devtools-plugin.js.map +1 -1
- package/fesm5/ngxs-devtools-plugin.js +396 -387
- package/fesm5/ngxs-devtools-plugin.js.map +1 -1
- package/index.d.ts +4 -4
- package/ngxs-devtools-plugin.d.ts +5 -5
- package/package.json +2 -2
- package/src/devtools.module.d.ts +13 -13
- package/src/devtools.plugin.d.ts +31 -31
- package/src/public_api.d.ts +3 -3
- package/src/symbols.d.ts +39 -39
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngxs-devtools-plugin.js","sources":["ng://@ngxs/devtools-plugin/src/symbols.ts","ng://@ngxs/devtools-plugin/src/devtools.plugin.ts","ng://@ngxs/devtools-plugin/src/devtools.module.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * Interface for the redux-devtools-extension API.\r\n */\r\nexport interface NgxsDevtoolsExtension {\r\n init(state: any): void;\r\n send(action: any, state?: any): void;\r\n subscribe(fn: (message: NgxsDevtoolsAction) => void): VoidFunction;\r\n}\r\n\r\nexport interface NgxsDevtoolsAction {\r\n type: string;\r\n payload: any;\r\n state: any;\r\n id: number;\r\n source: string;\r\n}\r\n\r\nexport interface NgxsDevtoolsOptions {\r\n /**\r\n * The name of the extension\r\n */\r\n name?: string;\r\n\r\n /**\r\n * Whether the dev tools is enabled or note. Useful for setting during production.\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Max number of entiries to keep.\r\n */\r\n maxAge?: number;\r\n\r\n /**\r\n * Reformat actions before sending to dev tools\r\n */\r\n actionSanitizer?: (action: any) => void;\r\n\r\n /**\r\n * Reformat state before sending to devtools\r\n */\r\n stateSanitizer?: (state: any) => void;\r\n}\r\n\r\nexport const NGXS_DEVTOOLS_OPTIONS = new InjectionToken('NGXS_DEVTOOLS_OPTIONS');\r\n","import { Inject, Injectable, Injector, NgZone, OnDestroy, ɵglobal } from '@angular/core';\r\nimport { getActionTypeFromInstance, NgxsNextPluginFn, NgxsPlugin, Store } from '@ngxs/store';\r\nimport { tap, catchError } from 'rxjs/operators';\r\n\r\nimport {\r\n NGXS_DEVTOOLS_OPTIONS,\r\n NgxsDevtoolsAction,\r\n NgxsDevtoolsExtension,\r\n NgxsDevtoolsOptions\r\n} from './symbols';\r\n\r\nconst enum ReduxDevtoolsActionType {\r\n Dispatch = 'DISPATCH',\r\n Action = 'ACTION'\r\n}\r\n\r\nconst enum ReduxDevtoolsPayloadType {\r\n JumpToAction = 'JUMP_TO_ACTION',\r\n JumpToState = 'JUMP_TO_STATE',\r\n ToggleAction = 'TOGGLE_ACTION',\r\n ImportState = 'IMPORT_STATE'\r\n}\r\n\r\n/**\r\n * Adds support for the Redux Devtools extension:\r\n * http://extension.remotedev.io/\r\n */\r\n@Injectable()\r\nexport class NgxsReduxDevtoolsPlugin implements OnDestroy, NgxsPlugin {\r\n private devtoolsExtension: NgxsDevtoolsExtension | null = null;\r\n private readonly globalDevtools =\r\n ɵglobal['__REDUX_DEVTOOLS_EXTENSION__'] || ɵglobal['devToolsExtension'];\r\n\r\n private unsubscribe: VoidFunction | null = null;\r\n\r\n constructor(\r\n @Inject(NGXS_DEVTOOLS_OPTIONS) private _options: NgxsDevtoolsOptions,\r\n private _injector: Injector,\r\n private _ngZone: NgZone\r\n ) {\r\n this.connect();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.unsubscribe !== null) {\r\n this.unsubscribe();\r\n }\r\n if (this.globalDevtools) {\r\n this.globalDevtools.disconnect();\r\n }\r\n }\r\n\r\n /**\r\n * Lazy get the store for circular dependency issues\r\n */\r\n private get store(): Store {\r\n return this._injector.get<Store>(Store);\r\n }\r\n\r\n /**\r\n * Middleware handle function\r\n */\r\n handle(state: any, action: any, next: NgxsNextPluginFn) {\r\n if (!this.devtoolsExtension || this._options.disabled) {\r\n return next(state, action);\r\n }\r\n\r\n return next(state, action).pipe(\r\n catchError(error => {\r\n const newState = this.store.snapshot();\r\n this.sendToDevTools(state, action, newState);\r\n throw error;\r\n }),\r\n tap(newState => {\r\n this.sendToDevTools(state, action, newState);\r\n })\r\n );\r\n }\r\n\r\n private sendToDevTools(state: any, action: any, newState: any) {\r\n const type = getActionTypeFromInstance(action);\r\n // if init action, send initial state to dev tools\r\n const isInitAction = type === '@@INIT';\r\n if (isInitAction) {\r\n this.devtoolsExtension!.init(state);\r\n } else {\r\n this.devtoolsExtension!.send({ ...action, action: null, type }, newState);\r\n }\r\n }\r\n\r\n /**\r\n * Handle the action from the dev tools subscription\r\n */\r\n dispatched(action: NgxsDevtoolsAction) {\r\n if (action.type === ReduxDevtoolsActionType.Dispatch) {\r\n if (\r\n action.payload.type === ReduxDevtoolsPayloadType.JumpToAction ||\r\n action.payload.type === ReduxDevtoolsPayloadType.JumpToState\r\n ) {\r\n const prevState = JSON.parse(action.state);\r\n this.store.reset(prevState);\r\n } else if (action.payload.type === ReduxDevtoolsPayloadType.ToggleAction) {\r\n console.warn('Skip is not supported at this time.');\r\n } else if (action.payload.type === ReduxDevtoolsPayloadType.ImportState) {\r\n const {\r\n actionsById,\r\n computedStates,\r\n currentStateIndex\r\n } = action.payload.nextLiftedState;\r\n this.devtoolsExtension!.init(computedStates[0].state);\r\n Object.keys(actionsById)\r\n .filter(actionId => actionId !== '0')\r\n .forEach(actionId =>\r\n this.devtoolsExtension!.send(actionsById[actionId], computedStates[actionId].state)\r\n );\r\n this.store.reset(computedStates[currentStateIndex].state);\r\n }\r\n } else if (action.type === ReduxDevtoolsActionType.Action) {\r\n const actionPayload = JSON.parse(action.payload);\r\n this.store.dispatch(actionPayload);\r\n }\r\n }\r\n\r\n private connect(): void {\r\n if (!this.globalDevtools || this._options.disabled) {\r\n return;\r\n }\r\n\r\n // The `connect` method adds `message` event listener since it communicates\r\n // with an extension through `window.postMessage` and message events.\r\n // We handle only 2 events; thus, we don't want to run many change detections\r\n // because the extension sends events that we don't have to handle.\r\n this.devtoolsExtension = this._ngZone.runOutsideAngular(\r\n () => <NgxsDevtoolsExtension>this.globalDevtools.connect(this._options)\r\n );\r\n\r\n this.unsubscribe = this.devtoolsExtension.subscribe(action => {\r\n if (\r\n action.type === ReduxDevtoolsActionType.Dispatch ||\r\n action.type === ReduxDevtoolsActionType.Action\r\n ) {\r\n this._ngZone.run(() => {\r\n this.dispatched(action);\r\n });\r\n }\r\n });\r\n }\r\n}\r\n","import { NgModule, ModuleWithProviders, InjectionToken } from '@angular/core';\r\nimport { NGXS_PLUGINS } from '@ngxs/store';\r\n\r\nimport { NgxsDevtoolsOptions, NGXS_DEVTOOLS_OPTIONS } from './symbols';\r\nimport { NgxsReduxDevtoolsPlugin } from './devtools.plugin';\r\n\r\nexport function devtoolsOptionsFactory(options: NgxsDevtoolsOptions) {\r\n return {\r\n name: 'NGXS',\r\n ...options\r\n };\r\n}\r\n\r\nexport const USER_OPTIONS = new InjectionToken('USER_OPTIONS');\r\n\r\n@NgModule()\r\nexport class NgxsReduxDevtoolsPluginModule {\r\n static forRoot(\r\n options?: NgxsDevtoolsOptions\r\n ): ModuleWithProviders<NgxsReduxDevtoolsPluginModule> {\r\n return {\r\n ngModule: NgxsReduxDevtoolsPluginModule,\r\n providers: [\r\n {\r\n provide: NGXS_PLUGINS,\r\n useClass: NgxsReduxDevtoolsPlugin,\r\n multi: true\r\n },\r\n {\r\n provide: USER_OPTIONS,\r\n useValue: options\r\n },\r\n {\r\n provide: NGXS_DEVTOOLS_OPTIONS,\r\n useFactory: devtoolsOptionsFactory,\r\n deps: [USER_OPTIONS]\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;AAKA,oCAIC;;;;;;IAHC,4DAAuB;;;;;;IACvB,oEAAqC;;;;;IACrC,8DAAmE;;;;;AAGrE,iCAMC;;;IALC,kCAAa;;IACb,qCAAa;;IACb,mCAAW;;IACX,gCAAW;;IACX,oCAAe;;;;;AAGjB,kCAyBC;;;;;;IArBC,mCAAc;;;;;IAKd,uCAAmB;;;;;IAKnB,qCAAgB;;;;;IAKhB,8CAAwC;;;;;IAKxC,6CAAsC;;;AAGxC,IAAa,qBAAqB,GAAG,IAAI,cAAc,CAAC,uBAAuB,CAAC;;;;;;;;IClC9E,UAAW,UAAU;IACrB,QAAS,QAAQ;;;;IAIjB,cAAe,gBAAgB;IAC/B,aAAc,eAAe;IAC7B,cAAe,eAAe;IAC9B,aAAc,cAAc;;;;;;AAO9B;IAQE,iCACyC,QAA6B,EAC5D,SAAmB,EACnB,OAAe;QAFgB,aAAQ,GAAR,QAAQ,CAAqB;QAC5D,cAAS,GAAT,SAAS,CAAU;QACnB,YAAO,GAAP,OAAO,CAAQ;QATjB,sBAAiB,GAAiC,IAAI,CAAC;QAC9C,mBAAc,GAC7B,OAAO,CAAC,8BAA8B,CAAC,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAElE,gBAAW,GAAwB,IAAI,CAAC;QAO9C,IAAI,CAAC,OAAO,EAAE,CAAC;KAChB;;;;IAED,6CAAW;;;IAAX;QACE,IAAI,IAAI,CA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AQ,EAAE,uBAAuB;oBACjC,KAAK,EAAE,IAAI;iBACZ;gBACD;oBACE,OAAO,EAAE,YAAY;oBACrB,QAAQ,EAAE,OAAO;iBAClB;gBACD;oBACE,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,sBAAsB;oBAClC,IAAI,EAAE,CAAC,YAAY,CAAC;iBACrB;aACF;SACF,CAAC;KACH;;gBAxBF,QAAQ;;IAyBT,oCAAC;CAzBD;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngxs-devtools-plugin.js","sources":["ng://@ngxs/devtools-plugin/src/symbols.ts","ng://@ngxs/devtools-plugin/src/devtools.plugin.ts","ng://@ngxs/devtools-plugin/src/devtools.module.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * Interface for the redux-devtools-extension API.\n */\nexport interface NgxsDevtoolsExtension {\n init(state: any): void;\n send(action: any, state?: any): void;\n subscribe(fn: (message: NgxsDevtoolsAction) => void): VoidFunction;\n}\n\nexport interface NgxsDevtoolsAction {\n type: string;\n payload: any;\n state: any;\n id: number;\n source: string;\n}\n\nexport interface NgxsDevtoolsOptions {\n /**\n * The name of the extension\n */\n name?: string;\n\n /**\n * Whether the dev tools is enabled or note. Useful for setting during production.\n */\n disabled?: boolean;\n\n /**\n * Max number of entiries to keep.\n */\n maxAge?: number;\n\n /**\n * Reformat actions before sending to dev tools\n */\n actionSanitizer?: (action: any) => void;\n\n /**\n * Reformat state before sending to devtools\n */\n stateSanitizer?: (state: any) => void;\n}\n\nexport const NGXS_DEVTOOLS_OPTIONS = new InjectionToken('NGXS_DEVTOOLS_OPTIONS');\n","import { Inject, Injectable, Injector, NgZone, OnDestroy, ɵglobal } from '@angular/core';\nimport { getActionTypeFromInstance, NgxsNextPluginFn, NgxsPlugin, Store } from '@ngxs/store';\nimport { tap, catchError } from 'rxjs/operators';\n\nimport {\n NGXS_DEVTOOLS_OPTIONS,\n NgxsDevtoolsAction,\n NgxsDevtoolsExtension,\n NgxsDevtoolsOptions\n} from './symbols';\n\nconst enum ReduxDevtoolsActionType {\n Dispatch = 'DISPATCH',\n Action = 'ACTION'\n}\n\nconst enum ReduxDevtoolsPayloadType {\n JumpToAction = 'JUMP_TO_ACTION',\n JumpToState = 'JUMP_TO_STATE',\n ToggleAction = 'TOGGLE_ACTION',\n ImportState = 'IMPORT_STATE'\n}\n\n/**\n * Adds support for the Redux Devtools extension:\n * http://extension.remotedev.io/\n */\n@Injectable()\nexport class NgxsReduxDevtoolsPlugin implements OnDestroy, NgxsPlugin {\n private devtoolsExtension: NgxsDevtoolsExtension | null = null;\n private readonly globalDevtools =\n ɵglobal['__REDUX_DEVTOOLS_EXTENSION__'] || ɵglobal['devToolsExtension'];\n\n private unsubscribe: VoidFunction | null = null;\n\n constructor(\n @Inject(NGXS_DEVTOOLS_OPTIONS) private _options: NgxsDevtoolsOptions,\n private _injector: Injector,\n private _ngZone: NgZone\n ) {\n this.connect();\n }\n\n ngOnDestroy(): void {\n if (this.unsubscribe !== null) {\n this.unsubscribe();\n }\n if (this.globalDevtools) {\n this.globalDevtools.disconnect();\n }\n }\n\n /**\n * Lazy get the store for circular dependency issues\n */\n private get store(): Store {\n return this._injector.get<Store>(Store);\n }\n\n /**\n * Middleware handle function\n */\n handle(state: any, action: any, next: NgxsNextPluginFn) {\n if (!this.devtoolsExtension || this._options.disabled) {\n return next(state, action);\n }\n\n return next(state, action).pipe(\n catchError(error => {\n const newState = this.store.snapshot();\n this.sendToDevTools(state, action, newState);\n throw error;\n }),\n tap(newState => {\n this.sendToDevTools(state, action, newState);\n })\n );\n }\n\n private sendToDevTools(state: any, action: any, newState: any) {\n const type = getActionTypeFromInstance(action);\n // if init action, send initial state to dev tools\n const isInitAction = type === '@@INIT';\n if (isInitAction) {\n this.devtoolsExtension!.init(state);\n } else {\n this.devtoolsExtension!.send({ ...action, action: null, type }, newState);\n }\n }\n\n /**\n * Handle the action from the dev tools subscription\n */\n dispatched(action: NgxsDevtoolsAction) {\n if (action.type === ReduxDevtoolsActionType.Dispatch) {\n if (\n action.payload.type === ReduxDevtoolsPayloadType.JumpToAction ||\n action.payload.type === ReduxDevtoolsPayloadType.JumpToState\n ) {\n const prevState = JSON.parse(action.state);\n // This makes the DevTools and Router plugins friends with each other.\n // We're checking for the `router` state to exist, and it also should\n // have the `trigger` property, so we're sure that this is our router\n // state (coming from `@ngxs/router-plugin`). This enables a time-traveling\n // feature since it doesn't only restore the state but also allows the `RouterState`\n // to navigate back when the action is jumped.\n if (prevState.router && prevState.router.trigger) {\n prevState.router.trigger = 'devtools';\n }\n this.store.reset(prevState);\n } else if (action.payload.type === ReduxDevtoolsPayloadType.ToggleAction) {\n console.warn('Skip is not supported at this time.');\n } else if (action.payload.type === ReduxDevtoolsPayloadType.ImportState) {\n const {\n actionsById,\n computedStates,\n currentStateIndex\n } = action.payload.nextLiftedState;\n this.devtoolsExtension!.init(computedStates[0].state);\n Object.keys(actionsById)\n .filter(actionId => actionId !== '0')\n .forEach(actionId =>\n this.devtoolsExtension!.send(actionsById[actionId], computedStates[actionId].state)\n );\n this.store.reset(computedStates[currentStateIndex].state);\n }\n } else if (action.type === ReduxDevtoolsActionType.Action) {\n const actionPayload = JSON.parse(action.payload);\n this.store.dispatch(actionPayload);\n }\n }\n\n private connect(): void {\n if (!this.globalDevtools || this._options.disabled) {\n return;\n }\n\n // The `connect` method adds `message` event listener since it communicates\n // with an extension through `window.postMessage` and message events.\n // We handle only 2 events; thus, we don't want to run many change detections\n // because the extension sends events that we don't have to handle.\n this.devtoolsExtension = this._ngZone.runOutsideAngular(\n () => <NgxsDevtoolsExtension>this.globalDevtools.connect(this._options)\n );\n\n this.unsubscribe = this.devtoolsExtension.subscribe(action => {\n if (\n action.type === ReduxDevtoolsActionType.Dispatch ||\n action.type === ReduxDevtoolsActionType.Action\n ) {\n this._ngZone.run(() => {\n this.dispatched(action);\n });\n }\n });\n }\n}\n","import { NgModule, ModuleWithProviders, InjectionToken } from '@angular/core';\nimport { NGXS_PLUGINS } from '@ngxs/store';\n\nimport { NgxsDevtoolsOptions, NGXS_DEVTOOLS_OPTIONS } from './symbols';\nimport { NgxsReduxDevtoolsPlugin } from './devtools.plugin';\n\nexport function devtoolsOptionsFactory(options: NgxsDevtoolsOptions) {\n return {\n name: 'NGXS',\n ...options\n };\n}\n\nexport const USER_OPTIONS = new InjectionToken('USER_OPTIONS');\n\n@NgModule()\nexport class NgxsReduxDevtoolsPluginModule {\n static forRoot(\n options?: NgxsDevtoolsOptions\n ): ModuleWithProviders<NgxsReduxDevtoolsPluginModule> {\n return {\n ngModule: NgxsReduxDevtoolsPluginModule,\n providers: [\n {\n provide: NGXS_PLUGINS,\n useClass: NgxsReduxDevtoolsPlugin,\n multi: true\n },\n {\n provide: USER_OPTIONS,\n useValue: options\n },\n {\n provide: NGXS_DEVTOOLS_OPTIONS,\n useFactory: devtoolsOptionsFactory,\n deps: [USER_OPTIONS]\n }\n ]\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;AAKA,oCAIC;;;;;;IAHC,4DAAuB;;;;;;IACvB,oEAAqC;;;;;IACrC,8DAAmE;;;;;AAGrE,iCAMC;;;IALC,kCAAa;;IACb,qCAAa;;IACb,mCAAW;;IACX,gCAAW;;IACX,oCAAe;;;;;AAGjB,kCAyBC;;;;;;IArBC,mCAAc;;;;;IAKd,uCAAmB;;;;;IAKnB,qCAAgB;;;;;IAKhB,8CAAwC;;;;;IAKxC,6CAAsC;;;AAGxC,IAAa,qBAAqB,GAAG,IAAI,cAAc,CAAC,uBAAuB,CAAC;;;;;;;;IClC9E,UAAW,UAAU;IACrB,QAAS,QAAQ;;;;IAIjB,cAAe,gBAAgB;IAC/B,aAAc,eAAe;IAC7B,cAAe,eAAe;IAC9B,aAAc,cAAc;;;;;;AAO9B;IAQE,iCACyC,QAA6B,EAC5D,SAAmB,EACnB,OAAe;QAFgB,aAAQ,GAAR,QAAQ,CAAqB;QAC5D,cAAS,GAAT,SAAS,CAAU;QACnB,Y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iDAC0E;;;;;IAE1E,8CAAgD;;;;;IAG9C,2CAAoE;;;;;IACpE,4CAA2B;;;;;IAC3B,0CAAuB;;;;;;;;;;;AChC3B,SAAgB,sBAAsB,CAAC,OAA4B;IACjE,kBACE,IAAI,EAAE,MAAM,IACT,OAAO,EACV;CACH;;AAED,IAAa,YAAY,GAAG,IAAI,cAAc,CAAC,cAAc,CAAC;AAE9D;IAAA;KAyBC;;;;;IAvBQ,qCAAO;;;;IAAd,UACE,OAA6B;QAE7B,OAAO;YACL,QAAQ,EAAE,6BAA6B;YACvC,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,YAAY;oBACrB,QAAQ,EAAE,uBAAuB;oBACjC,KAAK,EAAE,IAAI;iBACZ;gBACD;oBACE,OAAO,EAAE,YAAY;oBACrB,QAAQ,EAAE,OAAO;iBAClB;gBACD;oBACE,OAAO,EAAE,qBAAqB;oBAC9B,UAAU,EAAE,sBAAsB;oBAClC,IAAI,EAAE,CAAC,YAAY,CAAC;iBACrB;aACF;SACF,CAAC;KACH;;gBAxBF,QAAQ;;IAyBT,oCAAC;CAzBD;;;;;;;;;;;;;;;;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The public api for consumers of @ngxs/devtools-plugin
|
|
3
|
-
*/
|
|
4
|
-
export * from './src/public_api';
|
|
1
|
+
/**
|
|
2
|
+
* The public api for consumers of @ngxs/devtools-plugin
|
|
3
|
+
*/
|
|
4
|
+
export * from './src/public_api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
export { USER_OPTIONS as ɵb, devtoolsOptionsFactory as ɵa } from './src/devtools.module';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
export { USER_OPTIONS as ɵb, devtoolsOptionsFactory as ɵa } from './src/devtools.module';
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
|
3
3
|
"name": "@ngxs/devtools-plugin",
|
|
4
4
|
"description": "redux devtools plugin for @ngxs/store",
|
|
5
|
-
"version": "3.7.
|
|
5
|
+
"version": "3.7.5",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@ngxs/store": "^3.7.
|
|
8
|
+
"@ngxs/store": "^3.7.5 || ^3.7.5-dev",
|
|
9
9
|
"@angular/core": ">=6.1.0 <15.0.0",
|
|
10
10
|
"rxjs": ">=6.5.5"
|
|
11
11
|
},
|
package/src/devtools.module.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ModuleWithProviders, InjectionToken } from '@angular/core';
|
|
2
|
-
import { NgxsDevtoolsOptions } from './symbols';
|
|
3
|
-
export declare function devtoolsOptionsFactory(options: NgxsDevtoolsOptions): {
|
|
4
|
-
name: string;
|
|
5
|
-
disabled?: boolean | undefined;
|
|
6
|
-
maxAge?: number | undefined;
|
|
7
|
-
actionSanitizer?: ((action: any) => void) | undefined;
|
|
8
|
-
stateSanitizer?: ((state: any) => void) | undefined;
|
|
9
|
-
};
|
|
10
|
-
export declare const USER_OPTIONS: InjectionToken<{}>;
|
|
11
|
-
export declare class NgxsReduxDevtoolsPluginModule {
|
|
12
|
-
static forRoot(options?: NgxsDevtoolsOptions): ModuleWithProviders<NgxsReduxDevtoolsPluginModule>;
|
|
13
|
-
}
|
|
1
|
+
import { ModuleWithProviders, InjectionToken } from '@angular/core';
|
|
2
|
+
import { NgxsDevtoolsOptions } from './symbols';
|
|
3
|
+
export declare function devtoolsOptionsFactory(options: NgxsDevtoolsOptions): {
|
|
4
|
+
name: string;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
maxAge?: number | undefined;
|
|
7
|
+
actionSanitizer?: ((action: any) => void) | undefined;
|
|
8
|
+
stateSanitizer?: ((state: any) => void) | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const USER_OPTIONS: InjectionToken<{}>;
|
|
11
|
+
export declare class NgxsReduxDevtoolsPluginModule {
|
|
12
|
+
static forRoot(options?: NgxsDevtoolsOptions): ModuleWithProviders<NgxsReduxDevtoolsPluginModule>;
|
|
13
|
+
}
|
package/src/devtools.plugin.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Injector, NgZone, OnDestroy } from '@angular/core';
|
|
2
|
-
import { NgxsNextPluginFn, NgxsPlugin } from '@ngxs/store';
|
|
3
|
-
import { NgxsDevtoolsAction, NgxsDevtoolsOptions } from './symbols';
|
|
4
|
-
/**
|
|
5
|
-
* Adds support for the Redux Devtools extension:
|
|
6
|
-
* http://extension.remotedev.io/
|
|
7
|
-
*/
|
|
8
|
-
export declare class NgxsReduxDevtoolsPlugin implements OnDestroy, NgxsPlugin {
|
|
9
|
-
private _options;
|
|
10
|
-
private _injector;
|
|
11
|
-
private _ngZone;
|
|
12
|
-
private devtoolsExtension;
|
|
13
|
-
private readonly globalDevtools;
|
|
14
|
-
private unsubscribe;
|
|
15
|
-
constructor(_options: NgxsDevtoolsOptions, _injector: Injector, _ngZone: NgZone);
|
|
16
|
-
ngOnDestroy(): void;
|
|
17
|
-
/**
|
|
18
|
-
* Lazy get the store for circular dependency issues
|
|
19
|
-
*/
|
|
20
|
-
private readonly store;
|
|
21
|
-
/**
|
|
22
|
-
* Middleware handle function
|
|
23
|
-
*/
|
|
24
|
-
handle(state: any, action: any, next: NgxsNextPluginFn): any;
|
|
25
|
-
private sendToDevTools;
|
|
26
|
-
/**
|
|
27
|
-
* Handle the action from the dev tools subscription
|
|
28
|
-
*/
|
|
29
|
-
dispatched(action: NgxsDevtoolsAction): void;
|
|
30
|
-
private connect;
|
|
31
|
-
}
|
|
1
|
+
import { Injector, NgZone, OnDestroy } from '@angular/core';
|
|
2
|
+
import { NgxsNextPluginFn, NgxsPlugin } from '@ngxs/store';
|
|
3
|
+
import { NgxsDevtoolsAction, NgxsDevtoolsOptions } from './symbols';
|
|
4
|
+
/**
|
|
5
|
+
* Adds support for the Redux Devtools extension:
|
|
6
|
+
* http://extension.remotedev.io/
|
|
7
|
+
*/
|
|
8
|
+
export declare class NgxsReduxDevtoolsPlugin implements OnDestroy, NgxsPlugin {
|
|
9
|
+
private _options;
|
|
10
|
+
private _injector;
|
|
11
|
+
private _ngZone;
|
|
12
|
+
private devtoolsExtension;
|
|
13
|
+
private readonly globalDevtools;
|
|
14
|
+
private unsubscribe;
|
|
15
|
+
constructor(_options: NgxsDevtoolsOptions, _injector: Injector, _ngZone: NgZone);
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Lazy get the store for circular dependency issues
|
|
19
|
+
*/
|
|
20
|
+
private readonly store;
|
|
21
|
+
/**
|
|
22
|
+
* Middleware handle function
|
|
23
|
+
*/
|
|
24
|
+
handle(state: any, action: any, next: NgxsNextPluginFn): any;
|
|
25
|
+
private sendToDevTools;
|
|
26
|
+
/**
|
|
27
|
+
* Handle the action from the dev tools subscription
|
|
28
|
+
*/
|
|
29
|
+
dispatched(action: NgxsDevtoolsAction): void;
|
|
30
|
+
private connect;
|
|
31
|
+
}
|
package/src/public_api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { NgxsReduxDevtoolsPluginModule } from './devtools.module';
|
|
2
|
-
export { NgxsReduxDevtoolsPlugin } from './devtools.plugin';
|
|
3
|
-
export * from './symbols';
|
|
1
|
+
export { NgxsReduxDevtoolsPluginModule } from './devtools.module';
|
|
2
|
+
export { NgxsReduxDevtoolsPlugin } from './devtools.plugin';
|
|
3
|
+
export * from './symbols';
|
package/src/symbols.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Interface for the redux-devtools-extension API.
|
|
4
|
-
*/
|
|
5
|
-
export interface NgxsDevtoolsExtension {
|
|
6
|
-
init(state: any): void;
|
|
7
|
-
send(action: any, state?: any): void;
|
|
8
|
-
subscribe(fn: (message: NgxsDevtoolsAction) => void): VoidFunction;
|
|
9
|
-
}
|
|
10
|
-
export interface NgxsDevtoolsAction {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
state: any;
|
|
14
|
-
id: number;
|
|
15
|
-
source: string;
|
|
16
|
-
}
|
|
17
|
-
export interface NgxsDevtoolsOptions {
|
|
18
|
-
/**
|
|
19
|
-
* The name of the extension
|
|
20
|
-
*/
|
|
21
|
-
name?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Whether the dev tools is enabled or note. Useful for setting during production.
|
|
24
|
-
*/
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Max number of entiries to keep.
|
|
28
|
-
*/
|
|
29
|
-
maxAge?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Reformat actions before sending to dev tools
|
|
32
|
-
*/
|
|
33
|
-
actionSanitizer?: (action: any) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Reformat state before sending to devtools
|
|
36
|
-
*/
|
|
37
|
-
stateSanitizer?: (state: any) => void;
|
|
38
|
-
}
|
|
39
|
-
export declare const NGXS_DEVTOOLS_OPTIONS: InjectionToken<{}>;
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for the redux-devtools-extension API.
|
|
4
|
+
*/
|
|
5
|
+
export interface NgxsDevtoolsExtension {
|
|
6
|
+
init(state: any): void;
|
|
7
|
+
send(action: any, state?: any): void;
|
|
8
|
+
subscribe(fn: (message: NgxsDevtoolsAction) => void): VoidFunction;
|
|
9
|
+
}
|
|
10
|
+
export interface NgxsDevtoolsAction {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
state: any;
|
|
14
|
+
id: number;
|
|
15
|
+
source: string;
|
|
16
|
+
}
|
|
17
|
+
export interface NgxsDevtoolsOptions {
|
|
18
|
+
/**
|
|
19
|
+
* The name of the extension
|
|
20
|
+
*/
|
|
21
|
+
name?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the dev tools is enabled or note. Useful for setting during production.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Max number of entiries to keep.
|
|
28
|
+
*/
|
|
29
|
+
maxAge?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Reformat actions before sending to dev tools
|
|
32
|
+
*/
|
|
33
|
+
actionSanitizer?: (action: any) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Reformat state before sending to devtools
|
|
36
|
+
*/
|
|
37
|
+
stateSanitizer?: (state: any) => void;
|
|
38
|
+
}
|
|
39
|
+
export declare const NGXS_DEVTOOLS_OPTIONS: InjectionToken<{}>;
|