@ngrx/store-devtools 20.0.1 → 21.0.0-beta.0

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.
Files changed (56) hide show
  1. package/fesm2022/ngrx-store-devtools.mjs +13 -13
  2. package/fesm2022/ngrx-store-devtools.mjs.map +1 -1
  3. package/migrations/17_0_0-beta/index.js +11 -14
  4. package/migrations/17_0_0-beta/index.js.map +1 -1
  5. package/migrations/6_0_0/index.js +3 -6
  6. package/migrations/6_0_0/index.js.map +1 -1
  7. package/package.json +5 -5
  8. package/schematics/ng-add/index.js +30 -33
  9. package/schematics/ng-add/index.js.map +1 -1
  10. package/schematics/ng-add/schema.js +0 -2
  11. package/schematics-core/index.js +24 -75
  12. package/schematics-core/index.js.map +1 -1
  13. package/schematics-core/utility/ast-utils.js +28 -44
  14. package/schematics-core/utility/ast-utils.js.map +1 -1
  15. package/schematics-core/utility/change.js +8 -15
  16. package/schematics-core/utility/change.js.map +1 -1
  17. package/schematics-core/utility/config.js +4 -8
  18. package/schematics-core/utility/config.js.map +1 -1
  19. package/schematics-core/utility/find-component.js +17 -22
  20. package/schematics-core/utility/find-component.js.map +1 -1
  21. package/schematics-core/utility/find-module.js +19 -24
  22. package/schematics-core/utility/find-module.js.map +1 -1
  23. package/schematics-core/utility/json-utilts.js +1 -4
  24. package/schematics-core/utility/json-utilts.js.map +1 -1
  25. package/schematics-core/utility/libs-version.js +1 -4
  26. package/schematics-core/utility/libs-version.js.map +1 -1
  27. package/schematics-core/utility/ngrx-utils.js +28 -36
  28. package/schematics-core/utility/ngrx-utils.js.map +1 -1
  29. package/schematics-core/utility/package.js +1 -4
  30. package/schematics-core/utility/package.js.map +1 -1
  31. package/schematics-core/utility/parse-name.js +5 -8
  32. package/schematics-core/utility/parse-name.js.map +1 -1
  33. package/schematics-core/utility/project.js +9 -15
  34. package/schematics-core/utility/project.js.map +1 -1
  35. package/schematics-core/utility/standalone.js +13 -18
  36. package/schematics-core/utility/standalone.js.map +1 -1
  37. package/schematics-core/utility/strings.js +9 -20
  38. package/schematics-core/utility/strings.js.map +1 -1
  39. package/schematics-core/utility/update.js +4 -7
  40. package/schematics-core/utility/update.js.map +1 -1
  41. package/schematics-core/utility/visitors.js +16 -30
  42. package/schematics-core/utility/visitors.js.map +1 -1
  43. package/types/ngrx-store-devtools.d.ts +252 -0
  44. package/index.d.ts +0 -6
  45. package/public_api.d.ts +0 -1
  46. package/src/actions.d.ts +0 -79
  47. package/src/config.d.ts +0 -126
  48. package/src/devtools-dispatcher.d.ts +0 -6
  49. package/src/devtools.d.ts +0 -35
  50. package/src/extension.d.ts +0 -52
  51. package/src/index.d.ts +0 -6
  52. package/src/instrument.d.ts +0 -9
  53. package/src/provide-store-devtools.d.ts +0 -26
  54. package/src/reducer.d.ts +0 -47
  55. package/src/utils.d.ts +0 -42
  56. package/src/zone-config.d.ts +0 -9
@@ -0,0 +1,252 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, ModuleWithProviders, OnDestroy, ErrorHandler, EnvironmentProviders } from '@angular/core';
3
+ import { ActionReducer, Action, ActionsSubject, StateObservable, ReducerObservable, ScannedActionsSubject } from '@ngrx/store';
4
+ import { Observable, Observer } from 'rxjs';
5
+
6
+ type ActionSanitizer = (action: Action, id: number) => Action;
7
+ type StateSanitizer = (state: any, index: number) => any;
8
+ type SerializationOptions = {
9
+ options?: boolean | any;
10
+ replacer?: (key: any, value: any) => {};
11
+ reviver?: (key: any, value: any) => {};
12
+ immutable?: any;
13
+ refs?: Array<any>;
14
+ };
15
+ type Predicate = (state: any, action: Action) => boolean;
16
+ /**
17
+ * Chrome extension documentation
18
+ * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md#features
19
+ * Firefox extension documentation
20
+ * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#features
21
+ */
22
+ interface DevToolsFeatureOptions {
23
+ /**
24
+ * Start/pause recording of dispatched actions
25
+ */
26
+ pause?: boolean;
27
+ /**
28
+ * Lock/unlock dispatching actions and side effects
29
+ */
30
+ lock?: boolean;
31
+ /**
32
+ * Persist states on page reloading
33
+ */
34
+ persist?: boolean;
35
+ /**
36
+ * Export history of actions in a file
37
+ */
38
+ export?: boolean;
39
+ /**
40
+ * Import history of actions from a file
41
+ */
42
+ import?: 'custom' | boolean;
43
+ /**
44
+ * Jump back and forth (time travelling)
45
+ */
46
+ jump?: boolean;
47
+ /**
48
+ * Skip (cancel) actions
49
+ */
50
+ skip?: boolean;
51
+ /**
52
+ * Drag and drop actions in the history list
53
+ */
54
+ reorder?: boolean;
55
+ /**
56
+ * Dispatch custom actions or action creators
57
+ */
58
+ dispatch?: boolean;
59
+ /**
60
+ * Generate tests for the selected actions
61
+ */
62
+ test?: boolean;
63
+ }
64
+ /**
65
+ * Chrome extension documentation
66
+ * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md
67
+ * Firefox extension documentation
68
+ * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md
69
+ */
70
+ declare class StoreDevtoolsConfig {
71
+ /**
72
+ * Maximum allowed actions to be stored in the history tree (default: `false`)
73
+ */
74
+ maxAge: number | false;
75
+ monitor?: ActionReducer<any, any>;
76
+ /**
77
+ * Function which takes `action` object and id number as arguments, and should return `action` object back.
78
+ */
79
+ actionSanitizer?: ActionSanitizer;
80
+ /**
81
+ * Function which takes `state` object and index as arguments, and should return `state` object back.
82
+ */
83
+ stateSanitizer?: StateSanitizer;
84
+ /**
85
+ * The instance name to be shown on the monitor page (default: `document.title`)
86
+ */
87
+ name?: string;
88
+ serialize?: boolean | SerializationOptions;
89
+ logOnly?: boolean;
90
+ features?: DevToolsFeatureOptions;
91
+ /**
92
+ * Action types to be hidden in the monitors. If `actionsSafelist` specified, `actionsBlocklist` is ignored.
93
+ */
94
+ actionsBlocklist?: string[];
95
+ /**
96
+ * Action types to be shown in the monitors
97
+ */
98
+ actionsSafelist?: string[];
99
+ /**
100
+ * Called for every action before sending, takes state and action object, and returns true in case it allows sending the current data to the monitor.
101
+ */
102
+ predicate?: Predicate;
103
+ /**
104
+ * Auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.
105
+ */
106
+ autoPause?: boolean;
107
+ /**
108
+ * If set to true, will include stack trace for every dispatched action
109
+ */
110
+ trace?: boolean | (() => string);
111
+ /**
112
+ * Maximum stack trace frames to be stored (in case trace option was provided as true).
113
+ */
114
+ traceLimit?: number;
115
+ /**
116
+ * The property determines whether the extension connection is established within the
117
+ * Angular zone or not. It is set to `false` by default.
118
+ */
119
+ connectInZone?: boolean;
120
+ }
121
+ /**
122
+ * Used to provide a `StoreDevtoolsConfig` for the store-devtools.
123
+ */
124
+ declare const INITIAL_OPTIONS: InjectionToken<StoreDevtoolsConfig>;
125
+ type StoreDevtoolsOptions = Partial<StoreDevtoolsConfig> | (() => Partial<StoreDevtoolsConfig>);
126
+
127
+ declare class StoreDevtoolsModule {
128
+ static instrument(options?: StoreDevtoolsOptions): ModuleWithProviders<StoreDevtoolsModule>;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<StoreDevtoolsModule, never>;
130
+ static ɵmod: i0.ɵɵNgModuleDeclaration<StoreDevtoolsModule, never, never, never>;
131
+ static ɵinj: i0.ɵɵInjectorDeclaration<StoreDevtoolsModule>;
132
+ }
133
+
134
+ declare const RECOMPUTE: "@ngrx/store-devtools/recompute";
135
+ interface ComputedState {
136
+ state: any;
137
+ error: any;
138
+ }
139
+ interface LiftedAction {
140
+ type: string;
141
+ action: Action;
142
+ }
143
+ interface LiftedActions {
144
+ [id: number]: LiftedAction;
145
+ }
146
+ interface LiftedState {
147
+ monitorState: any;
148
+ nextActionId: number;
149
+ actionsById: LiftedActions;
150
+ stagedActionIds: number[];
151
+ skippedActionIds: number[];
152
+ committedState: any;
153
+ currentStateIndex: number;
154
+ computedStates: ComputedState[];
155
+ isLocked: boolean;
156
+ isPaused: boolean;
157
+ }
158
+
159
+ declare class DevtoolsDispatcher extends ActionsSubject {
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<DevtoolsDispatcher, never>;
161
+ static ɵprov: i0.ɵɵInjectableDeclaration<DevtoolsDispatcher>;
162
+ }
163
+
164
+ declare const REDUX_DEVTOOLS_EXTENSION: InjectionToken<ReduxDevtoolsExtension>;
165
+ interface ReduxDevtoolsExtensionConnection {
166
+ subscribe(listener: (change: any) => void): void;
167
+ unsubscribe(): void;
168
+ send(action: any, state: any): void;
169
+ init(state?: any): void;
170
+ error(anyErr: any): void;
171
+ }
172
+ interface ReduxDevtoolsExtensionConfig {
173
+ features?: object | boolean;
174
+ name: string | undefined;
175
+ maxAge?: number;
176
+ autoPause?: boolean;
177
+ serialize?: boolean | SerializationOptions;
178
+ trace?: boolean | (() => string);
179
+ traceLimit?: number;
180
+ }
181
+ interface ReduxDevtoolsExtension {
182
+ connect(options: ReduxDevtoolsExtensionConfig): ReduxDevtoolsExtensionConnection;
183
+ send(action: any, state: any, options: ReduxDevtoolsExtensionConfig): void;
184
+ }
185
+ declare class DevtoolsExtension {
186
+ private config;
187
+ private dispatcher;
188
+ private devtoolsExtension;
189
+ private extensionConnection;
190
+ liftedActions$: Observable<any>;
191
+ actions$: Observable<any>;
192
+ start$: Observable<any>;
193
+ private zoneConfig;
194
+ constructor(devtoolsExtension: ReduxDevtoolsExtension, config: StoreDevtoolsConfig, dispatcher: DevtoolsDispatcher);
195
+ notify(action: LiftedAction, state: LiftedState): void;
196
+ private createChangesObservable;
197
+ private createActionStreams;
198
+ private unwrapAction;
199
+ private getExtensionConfig;
200
+ private sendToReduxDevtools;
201
+ static ɵfac: i0.ɵɵFactoryDeclaration<DevtoolsExtension, never>;
202
+ static ɵprov: i0.ɵɵInjectableDeclaration<DevtoolsExtension>;
203
+ }
204
+
205
+ declare class StoreDevtools implements Observer<any>, OnDestroy {
206
+ private liftedStateSubscription;
207
+ private extensionStartSubscription;
208
+ dispatcher: ActionsSubject;
209
+ liftedState: Observable<LiftedState>;
210
+ state: StateObservable;
211
+ constructor(dispatcher: DevtoolsDispatcher, actions$: ActionsSubject, reducers$: ReducerObservable, extension: DevtoolsExtension, scannedActions: ScannedActionsSubject, errorHandler: ErrorHandler, initialState: any, config: StoreDevtoolsConfig);
212
+ ngOnDestroy(): void;
213
+ dispatch(action: Action): void;
214
+ next(action: any): void;
215
+ error(error: any): void;
216
+ complete(): void;
217
+ performAction(action: any): void;
218
+ refresh(): void;
219
+ reset(): void;
220
+ rollback(): void;
221
+ commit(): void;
222
+ sweep(): void;
223
+ toggleAction(id: number): void;
224
+ jumpToAction(actionId: number): void;
225
+ jumpToState(index: number): void;
226
+ importState(nextLiftedState: any): void;
227
+ lockChanges(status: boolean): void;
228
+ pauseRecording(status: boolean): void;
229
+ static ɵfac: i0.ɵɵFactoryDeclaration<StoreDevtools, never>;
230
+ static ɵprov: i0.ɵɵInjectableDeclaration<StoreDevtools>;
231
+ }
232
+
233
+ /**
234
+ * Provides developer tools and instrumentation for `Store`.
235
+ *
236
+ * @usageNotes
237
+ *
238
+ * ```ts
239
+ * bootstrapApplication(AppComponent, {
240
+ * providers: [
241
+ * provideStoreDevtools({
242
+ * maxAge: 25,
243
+ * logOnly: !isDevMode(),
244
+ * }),
245
+ * ],
246
+ * });
247
+ * ```
248
+ */
249
+ declare function provideStoreDevtools(options?: StoreDevtoolsOptions): EnvironmentProviders;
250
+
251
+ export { INITIAL_OPTIONS, RECOMPUTE, REDUX_DEVTOOLS_EXTENSION, StoreDevtools, StoreDevtoolsConfig, StoreDevtoolsModule, provideStoreDevtools };
252
+ export type { DevToolsFeatureOptions, LiftedState, StoreDevtoolsOptions };
package/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * DO NOT EDIT
3
- *
4
- * This file is automatically generated at build
5
- */
6
- export * from './public_api';
package/public_api.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './src/index';
package/src/actions.d.ts DELETED
@@ -1,79 +0,0 @@
1
- import { Action } from '@ngrx/store';
2
- export declare const PERFORM_ACTION = "PERFORM_ACTION";
3
- export declare const REFRESH = "REFRESH";
4
- export declare const RESET = "RESET";
5
- export declare const ROLLBACK = "ROLLBACK";
6
- export declare const COMMIT = "COMMIT";
7
- export declare const SWEEP = "SWEEP";
8
- export declare const TOGGLE_ACTION = "TOGGLE_ACTION";
9
- export declare const SET_ACTIONS_ACTIVE = "SET_ACTIONS_ACTIVE";
10
- export declare const JUMP_TO_STATE = "JUMP_TO_STATE";
11
- export declare const JUMP_TO_ACTION = "JUMP_TO_ACTION";
12
- export declare const IMPORT_STATE = "IMPORT_STATE";
13
- export declare const LOCK_CHANGES = "LOCK_CHANGES";
14
- export declare const PAUSE_RECORDING = "PAUSE_RECORDING";
15
- export declare class PerformAction implements Action {
16
- action: Action;
17
- timestamp: number;
18
- readonly type = "PERFORM_ACTION";
19
- constructor(action: Action, timestamp: number);
20
- }
21
- export declare class Refresh implements Action {
22
- readonly type = "REFRESH";
23
- }
24
- export declare class Reset implements Action {
25
- timestamp: number;
26
- readonly type = "RESET";
27
- constructor(timestamp: number);
28
- }
29
- export declare class Rollback implements Action {
30
- timestamp: number;
31
- readonly type = "ROLLBACK";
32
- constructor(timestamp: number);
33
- }
34
- export declare class Commit implements Action {
35
- timestamp: number;
36
- readonly type = "COMMIT";
37
- constructor(timestamp: number);
38
- }
39
- export declare class Sweep implements Action {
40
- readonly type = "SWEEP";
41
- }
42
- export declare class ToggleAction implements Action {
43
- id: number;
44
- readonly type = "TOGGLE_ACTION";
45
- constructor(id: number);
46
- }
47
- export declare class SetActionsActive implements Action {
48
- start: number;
49
- end: number;
50
- active: boolean;
51
- readonly type = "SET_ACTIONS_ACTIVE";
52
- constructor(start: number, end: number, active?: boolean);
53
- }
54
- export declare class JumpToState implements Action {
55
- index: number;
56
- readonly type = "JUMP_TO_STATE";
57
- constructor(index: number);
58
- }
59
- export declare class JumpToAction implements Action {
60
- actionId: number;
61
- readonly type = "JUMP_TO_ACTION";
62
- constructor(actionId: number);
63
- }
64
- export declare class ImportState implements Action {
65
- nextLiftedState: any;
66
- readonly type = "IMPORT_STATE";
67
- constructor(nextLiftedState: any);
68
- }
69
- export declare class LockChanges implements Action {
70
- status: boolean;
71
- readonly type = "LOCK_CHANGES";
72
- constructor(status: boolean);
73
- }
74
- export declare class PauseRecording implements Action {
75
- status: boolean;
76
- readonly type = "PAUSE_RECORDING";
77
- constructor(status: boolean);
78
- }
79
- export type All = PerformAction | Refresh | Reset | Rollback | Commit | Sweep | ToggleAction | SetActionsActive | JumpToState | JumpToAction | ImportState | LockChanges | PauseRecording;
package/src/config.d.ts DELETED
@@ -1,126 +0,0 @@
1
- import { ActionReducer, Action } from '@ngrx/store';
2
- import { InjectionToken } from '@angular/core';
3
- export type ActionSanitizer = (action: Action, id: number) => Action;
4
- export type StateSanitizer = (state: any, index: number) => any;
5
- export type SerializationOptions = {
6
- options?: boolean | any;
7
- replacer?: (key: any, value: any) => {};
8
- reviver?: (key: any, value: any) => {};
9
- immutable?: any;
10
- refs?: Array<any>;
11
- };
12
- export type Predicate = (state: any, action: Action) => boolean;
13
- /**
14
- * Chrome extension documentation
15
- * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md#features
16
- * Firefox extension documentation
17
- * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#features
18
- */
19
- export interface DevToolsFeatureOptions {
20
- /**
21
- * Start/pause recording of dispatched actions
22
- */
23
- pause?: boolean;
24
- /**
25
- * Lock/unlock dispatching actions and side effects
26
- */
27
- lock?: boolean;
28
- /**
29
- * Persist states on page reloading
30
- */
31
- persist?: boolean;
32
- /**
33
- * Export history of actions in a file
34
- */
35
- export?: boolean;
36
- /**
37
- * Import history of actions from a file
38
- */
39
- import?: 'custom' | boolean;
40
- /**
41
- * Jump back and forth (time travelling)
42
- */
43
- jump?: boolean;
44
- /**
45
- * Skip (cancel) actions
46
- */
47
- skip?: boolean;
48
- /**
49
- * Drag and drop actions in the history list
50
- */
51
- reorder?: boolean;
52
- /**
53
- * Dispatch custom actions or action creators
54
- */
55
- dispatch?: boolean;
56
- /**
57
- * Generate tests for the selected actions
58
- */
59
- test?: boolean;
60
- }
61
- /**
62
- * Chrome extension documentation
63
- * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md
64
- * Firefox extension documentation
65
- * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md
66
- */
67
- export declare class StoreDevtoolsConfig {
68
- /**
69
- * Maximum allowed actions to be stored in the history tree (default: `false`)
70
- */
71
- maxAge: number | false;
72
- monitor?: ActionReducer<any, any>;
73
- /**
74
- * Function which takes `action` object and id number as arguments, and should return `action` object back.
75
- */
76
- actionSanitizer?: ActionSanitizer;
77
- /**
78
- * Function which takes `state` object and index as arguments, and should return `state` object back.
79
- */
80
- stateSanitizer?: StateSanitizer;
81
- /**
82
- * The instance name to be shown on the monitor page (default: `document.title`)
83
- */
84
- name?: string;
85
- serialize?: boolean | SerializationOptions;
86
- logOnly?: boolean;
87
- features?: DevToolsFeatureOptions;
88
- /**
89
- * Action types to be hidden in the monitors. If `actionsSafelist` specified, `actionsBlocklist` is ignored.
90
- */
91
- actionsBlocklist?: string[];
92
- /**
93
- * Action types to be shown in the monitors
94
- */
95
- actionsSafelist?: string[];
96
- /**
97
- * Called for every action before sending, takes state and action object, and returns true in case it allows sending the current data to the monitor.
98
- */
99
- predicate?: Predicate;
100
- /**
101
- * Auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.
102
- */
103
- autoPause?: boolean;
104
- /**
105
- * If set to true, will include stack trace for every dispatched action
106
- */
107
- trace?: boolean | (() => string);
108
- /**
109
- * Maximum stack trace frames to be stored (in case trace option was provided as true).
110
- */
111
- traceLimit?: number;
112
- /**
113
- * The property determines whether the extension connection is established within the
114
- * Angular zone or not. It is set to `false` by default.
115
- */
116
- connectInZone?: boolean;
117
- }
118
- export declare const STORE_DEVTOOLS_CONFIG: InjectionToken<StoreDevtoolsConfig>;
119
- /**
120
- * Used to provide a `StoreDevtoolsConfig` for the store-devtools.
121
- */
122
- export declare const INITIAL_OPTIONS: InjectionToken<StoreDevtoolsConfig>;
123
- export type StoreDevtoolsOptions = Partial<StoreDevtoolsConfig> | (() => Partial<StoreDevtoolsConfig>);
124
- export declare function noMonitor(): null;
125
- export declare const DEFAULT_NAME = "NgRx Store DevTools";
126
- export declare function createConfig(optionsInput: StoreDevtoolsOptions): StoreDevtoolsConfig;
@@ -1,6 +0,0 @@
1
- import { ActionsSubject } from '@ngrx/store';
2
- import * as i0 from "@angular/core";
3
- export declare class DevtoolsDispatcher extends ActionsSubject {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<DevtoolsDispatcher, never>;
5
- static ɵprov: i0.ɵɵInjectableDeclaration<DevtoolsDispatcher>;
6
- }
package/src/devtools.d.ts DELETED
@@ -1,35 +0,0 @@
1
- import { ErrorHandler, OnDestroy } from '@angular/core';
2
- import { Action, ActionsSubject, ReducerObservable, ScannedActionsSubject, StateObservable } from '@ngrx/store';
3
- import { Observable, Observer } from 'rxjs';
4
- import { StoreDevtoolsConfig } from './config';
5
- import { DevtoolsExtension } from './extension';
6
- import { LiftedState } from './reducer';
7
- import { DevtoolsDispatcher } from './devtools-dispatcher';
8
- import * as i0 from "@angular/core";
9
- export declare class StoreDevtools implements Observer<any>, OnDestroy {
10
- private liftedStateSubscription;
11
- private extensionStartSubscription;
12
- dispatcher: ActionsSubject;
13
- liftedState: Observable<LiftedState>;
14
- state: StateObservable;
15
- constructor(dispatcher: DevtoolsDispatcher, actions$: ActionsSubject, reducers$: ReducerObservable, extension: DevtoolsExtension, scannedActions: ScannedActionsSubject, errorHandler: ErrorHandler, initialState: any, config: StoreDevtoolsConfig);
16
- ngOnDestroy(): void;
17
- dispatch(action: Action): void;
18
- next(action: any): void;
19
- error(error: any): void;
20
- complete(): void;
21
- performAction(action: any): void;
22
- refresh(): void;
23
- reset(): void;
24
- rollback(): void;
25
- commit(): void;
26
- sweep(): void;
27
- toggleAction(id: number): void;
28
- jumpToAction(actionId: number): void;
29
- jumpToState(index: number): void;
30
- importState(nextLiftedState: any): void;
31
- lockChanges(status: boolean): void;
32
- pauseRecording(status: boolean): void;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<StoreDevtools, never>;
34
- static ɵprov: i0.ɵɵInjectableDeclaration<StoreDevtools>;
35
- }
@@ -1,52 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { SerializationOptions, StoreDevtoolsConfig } from './config';
4
- import { DevtoolsDispatcher } from './devtools-dispatcher';
5
- import { LiftedAction, LiftedState } from './reducer';
6
- import * as i0 from "@angular/core";
7
- export declare const ExtensionActionTypes: {
8
- START: string;
9
- DISPATCH: string;
10
- STOP: string;
11
- ACTION: string;
12
- };
13
- export declare const REDUX_DEVTOOLS_EXTENSION: InjectionToken<ReduxDevtoolsExtension>;
14
- export interface ReduxDevtoolsExtensionConnection {
15
- subscribe(listener: (change: any) => void): void;
16
- unsubscribe(): void;
17
- send(action: any, state: any): void;
18
- init(state?: any): void;
19
- error(anyErr: any): void;
20
- }
21
- export interface ReduxDevtoolsExtensionConfig {
22
- features?: object | boolean;
23
- name: string | undefined;
24
- maxAge?: number;
25
- autoPause?: boolean;
26
- serialize?: boolean | SerializationOptions;
27
- trace?: boolean | (() => string);
28
- traceLimit?: number;
29
- }
30
- export interface ReduxDevtoolsExtension {
31
- connect(options: ReduxDevtoolsExtensionConfig): ReduxDevtoolsExtensionConnection;
32
- send(action: any, state: any, options: ReduxDevtoolsExtensionConfig): void;
33
- }
34
- export declare class DevtoolsExtension {
35
- private config;
36
- private dispatcher;
37
- private devtoolsExtension;
38
- private extensionConnection;
39
- liftedActions$: Observable<any>;
40
- actions$: Observable<any>;
41
- start$: Observable<any>;
42
- private zoneConfig;
43
- constructor(devtoolsExtension: ReduxDevtoolsExtension, config: StoreDevtoolsConfig, dispatcher: DevtoolsDispatcher);
44
- notify(action: LiftedAction, state: LiftedState): void;
45
- private createChangesObservable;
46
- private createActionStreams;
47
- private unwrapAction;
48
- private getExtensionConfig;
49
- private sendToReduxDevtools;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<DevtoolsExtension, never>;
51
- static ɵprov: i0.ɵɵInjectableDeclaration<DevtoolsExtension>;
52
- }
package/src/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { StoreDevtoolsModule } from './instrument';
2
- export { LiftedState, RECOMPUTE } from './reducer';
3
- export { StoreDevtools } from './devtools';
4
- export { REDUX_DEVTOOLS_EXTENSION } from './extension';
5
- export { StoreDevtoolsConfig, StoreDevtoolsOptions, DevToolsFeatureOptions, INITIAL_OPTIONS, } from './config';
6
- export { provideStoreDevtools } from './provide-store-devtools';
@@ -1,9 +0,0 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { StoreDevtoolsOptions } from './config';
3
- import * as i0 from "@angular/core";
4
- export declare class StoreDevtoolsModule {
5
- static instrument(options?: StoreDevtoolsOptions): ModuleWithProviders<StoreDevtoolsModule>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<StoreDevtoolsModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<StoreDevtoolsModule, never, never, never>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<StoreDevtoolsModule>;
9
- }
@@ -1,26 +0,0 @@
1
- import { EnvironmentProviders, InjectionToken } from '@angular/core';
2
- import { ReduxDevtoolsExtension } from './extension';
3
- import { StoreDevtoolsConfig, StoreDevtoolsOptions } from './config';
4
- import { StateObservable } from '@ngrx/store';
5
- import { StoreDevtools } from './devtools';
6
- export declare const IS_EXTENSION_OR_MONITOR_PRESENT: InjectionToken<boolean>;
7
- export declare function createIsExtensionOrMonitorPresent(extension: ReduxDevtoolsExtension | null, config: StoreDevtoolsConfig): boolean;
8
- export declare function createReduxDevtoolsExtension(): any;
9
- export declare function createStateObservable(devtools: StoreDevtools): StateObservable;
10
- /**
11
- * Provides developer tools and instrumentation for `Store`.
12
- *
13
- * @usageNotes
14
- *
15
- * ```ts
16
- * bootstrapApplication(AppComponent, {
17
- * providers: [
18
- * provideStoreDevtools({
19
- * maxAge: 25,
20
- * logOnly: !isDevMode(),
21
- * }),
22
- * ],
23
- * });
24
- * ```
25
- */
26
- export declare function provideStoreDevtools(options?: StoreDevtoolsOptions): EnvironmentProviders;
package/src/reducer.d.ts DELETED
@@ -1,47 +0,0 @@
1
- import { ErrorHandler } from '@angular/core';
2
- import { Action, ActionReducer, UPDATE, INIT } from '@ngrx/store';
3
- import * as DevtoolsActions from './actions';
4
- import { StoreDevtoolsConfig } from './config';
5
- export type InitAction = {
6
- readonly type: typeof INIT;
7
- };
8
- export type UpdateReducerAction = {
9
- readonly type: typeof UPDATE;
10
- };
11
- export type CoreActions = InitAction | UpdateReducerAction;
12
- export type Actions = DevtoolsActions.All | CoreActions;
13
- export declare const INIT_ACTION: {
14
- type: "@ngrx/store/init";
15
- };
16
- export declare const RECOMPUTE: "@ngrx/store-devtools/recompute";
17
- export declare const RECOMPUTE_ACTION: {
18
- type: "@ngrx/store-devtools/recompute";
19
- };
20
- export interface ComputedState {
21
- state: any;
22
- error: any;
23
- }
24
- export interface LiftedAction {
25
- type: string;
26
- action: Action;
27
- }
28
- export interface LiftedActions {
29
- [id: number]: LiftedAction;
30
- }
31
- export interface LiftedState {
32
- monitorState: any;
33
- nextActionId: number;
34
- actionsById: LiftedActions;
35
- stagedActionIds: number[];
36
- skippedActionIds: number[];
37
- committedState: any;
38
- currentStateIndex: number;
39
- computedStates: ComputedState[];
40
- isLocked: boolean;
41
- isPaused: boolean;
42
- }
43
- export declare function liftInitialState(initialCommittedState?: any, monitorReducer?: any): LiftedState;
44
- /**
45
- * Creates a history state reducer from an app's reducer.
46
- */
47
- export declare function liftReducerWith(initialCommittedState: any, initialLiftedState: LiftedState, errorHandler: ErrorHandler, monitorReducer?: any, options?: Partial<StoreDevtoolsConfig>): (reducer: ActionReducer<any, any>) => ActionReducer<LiftedState, Actions>;