@ngxs/devtools-plugin 3.8.2-dev.master-2afb16f → 3.8.2-dev.master-1a7514e

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/index.d.ts CHANGED
@@ -1,114 +1,4 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, ModuleWithProviders, EnvironmentProviders, OnDestroy, Injector, NgZone } from '@angular/core';
3
- import { NgxsPlugin, NgxsNextPluginFn } from '@ngxs/store/plugins';
4
-
5
1
  /**
6
- * Interface for the redux-devtools-extension API.
2
+ * The public api for consumers of @ngxs/devtools-plugin
7
3
  */
8
- interface NgxsDevtoolsExtension {
9
- init(state: any): void;
10
- send(action: any, state?: any): void;
11
- subscribe(fn: (message: NgxsDevtoolsAction) => void): VoidFunction;
12
- }
13
- interface NgxsDevtoolsAction {
14
- type: string;
15
- payload: any;
16
- state: any;
17
- id: number;
18
- source: string;
19
- }
20
- interface NgxsDevtoolsOptions {
21
- /**
22
- * The name of the extension
23
- */
24
- name?: string;
25
- /**
26
- * Whether the dev tools is enabled or note. Useful for setting during production.
27
- */
28
- disabled?: boolean;
29
- /**
30
- * Max number of entiries to keep.
31
- */
32
- maxAge?: number;
33
- /**
34
- * If more than one action is dispatched in the indicated interval, all new actions will be collected
35
- * and sent at once. It is the joint between performance and speed. When set to 0, all actions will be
36
- * sent instantly. Set it to a higher value when experiencing perf issues (also maxAge to a lower value).
37
- * Default is 500 ms.
38
- */
39
- latency?: number;
40
- /**
41
- * string or array of strings as regex - actions types to be hidden in the monitors (while passed to the reducers).
42
- * If actionsWhitelist specified, actionsBlacklist is ignored.
43
- */
44
- actionsBlacklist?: string | string[];
45
- /**
46
- * string or array of strings as regex - actions types to be shown in the monitors (while passed to the reducers).
47
- * If actionsWhitelist specified, actionsBlacklist is ignored.
48
- */
49
- actionsWhitelist?: string | string[];
50
- /**
51
- * called for every action before sending, takes state and action object, and returns true in case it allows
52
- * sending the current data to the monitor. Use it as a more advanced version of
53
- * actionsBlacklist/actionsWhitelist parameters
54
- */
55
- predicate?: (state: any, action: any) => boolean;
56
- /**
57
- * Reformat actions before sending to dev tools
58
- */
59
- actionSanitizer?: (action: any) => void;
60
- /**
61
- * Reformat state before sending to devtools
62
- */
63
- stateSanitizer?: (state: any) => void;
64
- /**
65
- * If set to true, will include stack trace for every dispatched action
66
- */
67
- trace?: boolean | (() => string);
68
- /**
69
- * Maximum stack trace frames to be stored (in case trace option was provided as true)
70
- */
71
- traceLimit?: number;
72
- }
73
- declare const NGXS_DEVTOOLS_OPTIONS: InjectionToken<unknown>;
74
-
75
- declare class NgxsReduxDevtoolsPluginModule {
76
- static forRoot(options?: NgxsDevtoolsOptions): ModuleWithProviders<NgxsReduxDevtoolsPluginModule>;
77
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxsReduxDevtoolsPluginModule, never>;
78
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsReduxDevtoolsPluginModule, never, never, never>;
79
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxsReduxDevtoolsPluginModule>;
80
- }
81
- declare function withNgxsReduxDevtoolsPlugin(options?: NgxsDevtoolsOptions): EnvironmentProviders;
82
-
83
- /**
84
- * Adds support for the Redux Devtools extension:
85
- * http://extension.remotedev.io/
86
- */
87
- declare class NgxsReduxDevtoolsPlugin implements OnDestroy, NgxsPlugin {
88
- private _options;
89
- private _injector;
90
- private _ngZone;
91
- private devtoolsExtension;
92
- private readonly globalDevtools;
93
- private unsubscribe;
94
- constructor(_options: NgxsDevtoolsOptions, _injector: Injector, _ngZone: NgZone);
95
- ngOnDestroy(): void;
96
- /**
97
- * Lazy get the store for circular dependency issues
98
- */
99
- private get store();
100
- /**
101
- * Middleware handle function
102
- */
103
- handle(state: any, action: any, next: NgxsNextPluginFn): any;
104
- private sendToDevTools;
105
- /**
106
- * Handle the action from the dev tools subscription
107
- */
108
- dispatched(action: NgxsDevtoolsAction): void;
109
- private connect;
110
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxsReduxDevtoolsPlugin, never>;
111
- static ɵprov: i0.ɵɵInjectableDeclaration<NgxsReduxDevtoolsPlugin>;
112
- }
113
-
114
- export { NGXS_DEVTOOLS_OPTIONS, type NgxsDevtoolsAction, type NgxsDevtoolsExtension, type NgxsDevtoolsOptions, NgxsReduxDevtoolsPlugin, NgxsReduxDevtoolsPluginModule, withNgxsReduxDevtoolsPlugin };
4
+ export * from './src/public_api';
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@ngxs/devtools-plugin",
3
3
  "description": "redux devtools plugin for @ngxs/store",
4
- "version": "3.8.2-dev.master-2afb16f",
4
+ "version": "3.8.2-dev.master-1a7514e",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
- "@angular/core": ">=12.0.0 <18.0.0",
7
+ "@angular/core": ">=12.0.0 <19.0.0",
8
8
  "@ngxs/store": "^3.8.2 || ^3.8.2-dev",
9
9
  "rxjs": ">=6.5.5"
10
10
  },
@@ -0,0 +1,24 @@
1
+ import { ModuleWithProviders, InjectionToken, EnvironmentProviders } from '@angular/core';
2
+ import { NgxsDevtoolsOptions } from './symbols';
3
+ import * as i0 from "@angular/core";
4
+ export declare function devtoolsOptionsFactory(options: NgxsDevtoolsOptions): {
5
+ name: string;
6
+ disabled?: boolean | undefined;
7
+ maxAge?: number | undefined;
8
+ latency?: number | undefined;
9
+ actionsBlacklist?: string | string[] | undefined;
10
+ actionsWhitelist?: string | string[] | undefined;
11
+ predicate?: ((state: any, action: any) => boolean) | undefined;
12
+ actionSanitizer?: ((action: any) => void) | undefined;
13
+ stateSanitizer?: ((state: any) => void) | undefined;
14
+ trace?: boolean | (() => string) | undefined;
15
+ traceLimit?: number | undefined;
16
+ };
17
+ export declare const USER_OPTIONS: InjectionToken<unknown>;
18
+ export declare class NgxsReduxDevtoolsPluginModule {
19
+ static forRoot(options?: NgxsDevtoolsOptions): ModuleWithProviders<NgxsReduxDevtoolsPluginModule>;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsReduxDevtoolsPluginModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsReduxDevtoolsPluginModule, never, never, never>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxsReduxDevtoolsPluginModule>;
23
+ }
24
+ export declare function withNgxsReduxDevtoolsPlugin(options?: NgxsDevtoolsOptions): EnvironmentProviders;
@@ -0,0 +1,34 @@
1
+ import { Injector, NgZone, OnDestroy } from '@angular/core';
2
+ import { NgxsNextPluginFn, NgxsPlugin } from '@ngxs/store/plugins';
3
+ import { NgxsDevtoolsAction, NgxsDevtoolsOptions } from './symbols';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Adds support for the Redux Devtools extension:
7
+ * http://extension.remotedev.io/
8
+ */
9
+ export declare class NgxsReduxDevtoolsPlugin implements OnDestroy, NgxsPlugin {
10
+ private _options;
11
+ private _injector;
12
+ private _ngZone;
13
+ private devtoolsExtension;
14
+ private readonly globalDevtools;
15
+ private unsubscribe;
16
+ constructor(_options: NgxsDevtoolsOptions, _injector: Injector, _ngZone: NgZone);
17
+ ngOnDestroy(): void;
18
+ /**
19
+ * Lazy get the store for circular dependency issues
20
+ */
21
+ private get store();
22
+ /**
23
+ * Middleware handle function
24
+ */
25
+ handle(state: any, action: any, next: NgxsNextPluginFn): any;
26
+ private sendToDevTools;
27
+ /**
28
+ * Handle the action from the dev tools subscription
29
+ */
30
+ dispatched(action: NgxsDevtoolsAction): void;
31
+ private connect;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxsReduxDevtoolsPlugin, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxsReduxDevtoolsPlugin>;
34
+ }
@@ -0,0 +1,3 @@
1
+ export { NgxsReduxDevtoolsPluginModule, withNgxsReduxDevtoolsPlugin } from './devtools.module';
2
+ export { NgxsReduxDevtoolsPlugin } from './devtools.plugin';
3
+ export * from './symbols';
@@ -0,0 +1,70 @@
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
+ * If more than one action is dispatched in the indicated interval, all new actions will be collected
32
+ * and sent at once. It is the joint between performance and speed. When set to 0, all actions will be
33
+ * sent instantly. Set it to a higher value when experiencing perf issues (also maxAge to a lower value).
34
+ * Default is 500 ms.
35
+ */
36
+ latency?: number;
37
+ /**
38
+ * string or array of strings as regex - actions types to be hidden in the monitors (while passed to the reducers).
39
+ * If actionsWhitelist specified, actionsBlacklist is ignored.
40
+ */
41
+ actionsBlacklist?: string | string[];
42
+ /**
43
+ * string or array of strings as regex - actions types to be shown in the monitors (while passed to the reducers).
44
+ * If actionsWhitelist specified, actionsBlacklist is ignored.
45
+ */
46
+ actionsWhitelist?: string | string[];
47
+ /**
48
+ * called for every action before sending, takes state and action object, and returns true in case it allows
49
+ * sending the current data to the monitor. Use it as a more advanced version of
50
+ * actionsBlacklist/actionsWhitelist parameters
51
+ */
52
+ predicate?: (state: any, action: any) => boolean;
53
+ /**
54
+ * Reformat actions before sending to dev tools
55
+ */
56
+ actionSanitizer?: (action: any) => void;
57
+ /**
58
+ * Reformat state before sending to devtools
59
+ */
60
+ stateSanitizer?: (state: any) => void;
61
+ /**
62
+ * If set to true, will include stack trace for every dispatched action
63
+ */
64
+ trace?: boolean | (() => string);
65
+ /**
66
+ * Maximum stack trace frames to be stored (in case trace option was provided as true)
67
+ */
68
+ traceLimit?: number;
69
+ }
70
+ export declare const NGXS_DEVTOOLS_OPTIONS: InjectionToken<unknown>;