@ngxs/devtools-plugin 3.7.3-dev.master-5175b98 → 3.7.3
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 +314 -378
- package/bundles/ngxs-devtools-plugin.umd.js.map +1 -1
- package/bundles/ngxs-devtools-plugin.umd.min.js +2 -2
- 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 +162 -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 +198 -262
- package/esm5/src/public_api.js +8 -8
- package/esm5/src/symbols.js +78 -78
- package/fesm2015/ngxs-devtools-plugin.js +283 -341
- package/fesm2015/ngxs-devtools-plugin.js.map +1 -1
- package/fesm5/ngxs-devtools-plugin.js +324 -388
- package/fesm5/ngxs-devtools-plugin.js.map +1 -1
- package/index.d.ts +4 -4
- package/ngxs-devtools-plugin.d.ts +5 -5
- package/ngxs-devtools-plugin.metadata.json +1 -1
- package/package.json +3 -3
- package/src/devtools.module.d.ts +13 -13
- package/src/devtools.plugin.d.ts +27 -31
- package/src/public_api.d.ts +3 -3
- package/src/symbols.d.ts +40 -39
|
@@ -1,357 +1,299 @@
|
|
|
1
|
-
import { InjectionToken,
|
|
1
|
+
import { InjectionToken, Injectable, Inject, Injector, NgModule } from '@angular/core';
|
|
2
2
|
import { Store, getActionTypeFromInstance, NGXS_PLUGINS } from '@ngxs/store';
|
|
3
3
|
import { catchError, tap } from 'rxjs/operators';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @fileoverview added by tsickle
|
|
7
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Interface for the redux-devtools-extension API.
|
|
11
|
-
* @record
|
|
12
|
-
*/
|
|
13
|
-
function NgxsDevtoolsExtension() { }
|
|
14
|
-
if (false) {
|
|
15
|
-
/**
|
|
16
|
-
* @param {?} state
|
|
17
|
-
* @return {?}
|
|
18
|
-
*/
|
|
19
|
-
NgxsDevtoolsExtension.prototype.init = function (state) { };
|
|
20
|
-
/**
|
|
21
|
-
* @param {?} action
|
|
22
|
-
* @param {?=} state
|
|
23
|
-
* @return {?}
|
|
24
|
-
*/
|
|
25
|
-
NgxsDevtoolsExtension.prototype.send = function (action, state) { };
|
|
26
|
-
/**
|
|
27
|
-
* @param {?} fn
|
|
28
|
-
* @return {?}
|
|
29
|
-
*/
|
|
30
|
-
NgxsDevtoolsExtension.prototype.subscribe = function (fn) { };
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @record
|
|
34
|
-
*/
|
|
35
|
-
function NgxsDevtoolsAction() { }
|
|
36
|
-
if (false) {
|
|
37
|
-
/** @type {?} */
|
|
38
|
-
NgxsDevtoolsAction.prototype.type;
|
|
39
|
-
/** @type {?} */
|
|
40
|
-
NgxsDevtoolsAction.prototype.payload;
|
|
41
|
-
/** @type {?} */
|
|
42
|
-
NgxsDevtoolsAction.prototype.state;
|
|
43
|
-
/** @type {?} */
|
|
44
|
-
NgxsDevtoolsAction.prototype.id;
|
|
45
|
-
/** @type {?} */
|
|
46
|
-
NgxsDevtoolsAction.prototype.source;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @record
|
|
50
|
-
*/
|
|
51
|
-
function NgxsDevtoolsOptions() { }
|
|
52
|
-
if (false) {
|
|
53
|
-
/**
|
|
54
|
-
* The name of the extension
|
|
55
|
-
* @type {?|undefined}
|
|
56
|
-
*/
|
|
57
|
-
NgxsDevtoolsOptions.prototype.name;
|
|
58
|
-
/**
|
|
59
|
-
* Whether the dev tools is enabled or note. Useful for setting during production.
|
|
60
|
-
* @type {?|undefined}
|
|
61
|
-
*/
|
|
62
|
-
NgxsDevtoolsOptions.prototype.disabled;
|
|
63
|
-
/**
|
|
64
|
-
* Max number of entiries to keep.
|
|
65
|
-
* @type {?|undefined}
|
|
66
|
-
*/
|
|
67
|
-
NgxsDevtoolsOptions.prototype.maxAge;
|
|
68
|
-
/**
|
|
69
|
-
* Reformat actions before sending to dev tools
|
|
70
|
-
* @type {?|undefined}
|
|
71
|
-
*/
|
|
72
|
-
NgxsDevtoolsOptions.prototype.actionSanitizer;
|
|
73
|
-
/**
|
|
74
|
-
* Reformat state before sending to devtools
|
|
75
|
-
* @type {?|undefined}
|
|
76
|
-
*/
|
|
77
|
-
NgxsDevtoolsOptions.prototype.stateSanitizer;
|
|
78
|
-
}
|
|
79
|
-
/** @type {?} */
|
|
5
|
+
/**
|
|
6
|
+
* @fileoverview added by tsickle
|
|
7
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Interface for the redux-devtools-extension API.
|
|
11
|
+
* @record
|
|
12
|
+
*/
|
|
13
|
+
function NgxsDevtoolsExtension() { }
|
|
14
|
+
if (false) {
|
|
15
|
+
/**
|
|
16
|
+
* @param {?} state
|
|
17
|
+
* @return {?}
|
|
18
|
+
*/
|
|
19
|
+
NgxsDevtoolsExtension.prototype.init = function (state) { };
|
|
20
|
+
/**
|
|
21
|
+
* @param {?} action
|
|
22
|
+
* @param {?=} state
|
|
23
|
+
* @return {?}
|
|
24
|
+
*/
|
|
25
|
+
NgxsDevtoolsExtension.prototype.send = function (action, state) { };
|
|
26
|
+
/**
|
|
27
|
+
* @param {?} fn
|
|
28
|
+
* @return {?}
|
|
29
|
+
*/
|
|
30
|
+
NgxsDevtoolsExtension.prototype.subscribe = function (fn) { };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @record
|
|
34
|
+
*/
|
|
35
|
+
function NgxsDevtoolsAction() { }
|
|
36
|
+
if (false) {
|
|
37
|
+
/** @type {?} */
|
|
38
|
+
NgxsDevtoolsAction.prototype.type;
|
|
39
|
+
/** @type {?} */
|
|
40
|
+
NgxsDevtoolsAction.prototype.payload;
|
|
41
|
+
/** @type {?} */
|
|
42
|
+
NgxsDevtoolsAction.prototype.state;
|
|
43
|
+
/** @type {?} */
|
|
44
|
+
NgxsDevtoolsAction.prototype.id;
|
|
45
|
+
/** @type {?} */
|
|
46
|
+
NgxsDevtoolsAction.prototype.source;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @record
|
|
50
|
+
*/
|
|
51
|
+
function NgxsDevtoolsOptions() { }
|
|
52
|
+
if (false) {
|
|
53
|
+
/**
|
|
54
|
+
* The name of the extension
|
|
55
|
+
* @type {?|undefined}
|
|
56
|
+
*/
|
|
57
|
+
NgxsDevtoolsOptions.prototype.name;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the dev tools is enabled or note. Useful for setting during production.
|
|
60
|
+
* @type {?|undefined}
|
|
61
|
+
*/
|
|
62
|
+
NgxsDevtoolsOptions.prototype.disabled;
|
|
63
|
+
/**
|
|
64
|
+
* Max number of entiries to keep.
|
|
65
|
+
* @type {?|undefined}
|
|
66
|
+
*/
|
|
67
|
+
NgxsDevtoolsOptions.prototype.maxAge;
|
|
68
|
+
/**
|
|
69
|
+
* Reformat actions before sending to dev tools
|
|
70
|
+
* @type {?|undefined}
|
|
71
|
+
*/
|
|
72
|
+
NgxsDevtoolsOptions.prototype.actionSanitizer;
|
|
73
|
+
/**
|
|
74
|
+
* Reformat state before sending to devtools
|
|
75
|
+
* @type {?|undefined}
|
|
76
|
+
*/
|
|
77
|
+
NgxsDevtoolsOptions.prototype.stateSanitizer;
|
|
78
|
+
}
|
|
79
|
+
/** @type {?} */
|
|
80
80
|
const NGXS_DEVTOOLS_OPTIONS = new InjectionToken('NGXS_DEVTOOLS_OPTIONS');
|
|
81
81
|
|
|
82
|
-
/**
|
|
83
|
-
* @fileoverview added by tsickle
|
|
84
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @
|
|
225
|
-
* @
|
|
226
|
-
*/
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
() => (/** @type {?} */ (this.globalDevtools.connect(this._options)))));
|
|
239
|
-
this.unsubscribe = this.devtoolsExtension.subscribe((/**
|
|
240
|
-
* @param {?} action
|
|
241
|
-
* @return {?}
|
|
242
|
-
*/
|
|
243
|
-
action => {
|
|
244
|
-
if (action.type === "DISPATCH" /* Dispatch */ ||
|
|
245
|
-
action.type === "ACTION" /* Action */) {
|
|
246
|
-
this._ngZone.run((/**
|
|
247
|
-
* @return {?}
|
|
248
|
-
*/
|
|
249
|
-
() => {
|
|
250
|
-
this.dispatched(action);
|
|
251
|
-
}));
|
|
252
|
-
}
|
|
253
|
-
}));
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
NgxsReduxDevtoolsPlugin.decorators = [
|
|
257
|
-
{ type: Injectable }
|
|
258
|
-
];
|
|
259
|
-
/** @nocollapse */
|
|
260
|
-
NgxsReduxDevtoolsPlugin.ctorParameters = () => [
|
|
261
|
-
{ type: undefined, decorators: [{ type: Inject, args: [NGXS_DEVTOOLS_OPTIONS,] }] },
|
|
262
|
-
{ type: Injector },
|
|
263
|
-
{ type: NgZone }
|
|
264
|
-
];
|
|
265
|
-
if (false) {
|
|
266
|
-
/**
|
|
267
|
-
* @type {?}
|
|
268
|
-
* @private
|
|
269
|
-
*/
|
|
270
|
-
NgxsReduxDevtoolsPlugin.prototype.devtoolsExtension;
|
|
271
|
-
/**
|
|
272
|
-
* @type {?}
|
|
273
|
-
* @private
|
|
274
|
-
*/
|
|
275
|
-
NgxsReduxDevtoolsPlugin.prototype.globalDevtools;
|
|
276
|
-
/**
|
|
277
|
-
* @type {?}
|
|
278
|
-
* @private
|
|
279
|
-
*/
|
|
280
|
-
NgxsReduxDevtoolsPlugin.prototype.unsubscribe;
|
|
281
|
-
/**
|
|
282
|
-
* @type {?}
|
|
283
|
-
* @private
|
|
284
|
-
*/
|
|
285
|
-
NgxsReduxDevtoolsPlugin.prototype._options;
|
|
286
|
-
/**
|
|
287
|
-
* @type {?}
|
|
288
|
-
* @private
|
|
289
|
-
*/
|
|
290
|
-
NgxsReduxDevtoolsPlugin.prototype._injector;
|
|
291
|
-
/**
|
|
292
|
-
* @type {?}
|
|
293
|
-
* @private
|
|
294
|
-
*/
|
|
295
|
-
NgxsReduxDevtoolsPlugin.prototype._ngZone;
|
|
82
|
+
/**
|
|
83
|
+
* @fileoverview added by tsickle
|
|
84
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* Adds support for the Redux Devtools extension:
|
|
88
|
+
* http://extension.remotedev.io/
|
|
89
|
+
*/
|
|
90
|
+
class NgxsReduxDevtoolsPlugin {
|
|
91
|
+
/**
|
|
92
|
+
* @param {?} _options
|
|
93
|
+
* @param {?} _injector
|
|
94
|
+
*/
|
|
95
|
+
constructor(_options, _injector) {
|
|
96
|
+
this._options = _options;
|
|
97
|
+
this._injector = _injector;
|
|
98
|
+
this.devtoolsExtension = null;
|
|
99
|
+
this.windowObj = typeof window !== 'undefined' ? window : {};
|
|
100
|
+
/** @type {?} */
|
|
101
|
+
const globalDevtools = this.windowObj['__REDUX_DEVTOOLS_EXTENSION__'] || this.windowObj['devToolsExtension'];
|
|
102
|
+
if (globalDevtools) {
|
|
103
|
+
this.devtoolsExtension = (/** @type {?} */ (globalDevtools.connect(_options)));
|
|
104
|
+
this.devtoolsExtension.subscribe((/**
|
|
105
|
+
* @param {?} a
|
|
106
|
+
* @return {?}
|
|
107
|
+
*/
|
|
108
|
+
a => this.dispatched(a)));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Lazy get the store for circular dependency issues
|
|
113
|
+
* @private
|
|
114
|
+
* @return {?}
|
|
115
|
+
*/
|
|
116
|
+
get store() {
|
|
117
|
+
return this._injector.get(Store);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Middleware handle function
|
|
121
|
+
* @param {?} state
|
|
122
|
+
* @param {?} action
|
|
123
|
+
* @param {?} next
|
|
124
|
+
* @return {?}
|
|
125
|
+
*/
|
|
126
|
+
handle(state, action, next) {
|
|
127
|
+
/** @type {?} */
|
|
128
|
+
const isDisabled = this._options && this._options.disabled;
|
|
129
|
+
if (!this.devtoolsExtension || isDisabled) {
|
|
130
|
+
return next(state, action);
|
|
131
|
+
}
|
|
132
|
+
return next(state, action).pipe(catchError((/**
|
|
133
|
+
* @param {?} error
|
|
134
|
+
* @return {?}
|
|
135
|
+
*/
|
|
136
|
+
error => {
|
|
137
|
+
/** @type {?} */
|
|
138
|
+
const newState = this.store.snapshot();
|
|
139
|
+
this.sendToDevTools(state, action, newState);
|
|
140
|
+
throw error;
|
|
141
|
+
})), tap((/**
|
|
142
|
+
* @param {?} newState
|
|
143
|
+
* @return {?}
|
|
144
|
+
*/
|
|
145
|
+
newState => {
|
|
146
|
+
this.sendToDevTools(state, action, newState);
|
|
147
|
+
})));
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @private
|
|
151
|
+
* @param {?} state
|
|
152
|
+
* @param {?} action
|
|
153
|
+
* @param {?} newState
|
|
154
|
+
* @return {?}
|
|
155
|
+
*/
|
|
156
|
+
sendToDevTools(state, action, newState) {
|
|
157
|
+
/** @type {?} */
|
|
158
|
+
const type = getActionTypeFromInstance(action);
|
|
159
|
+
// if init action, send initial state to dev tools
|
|
160
|
+
/** @type {?} */
|
|
161
|
+
const isInitAction = type === '@@INIT';
|
|
162
|
+
if (isInitAction) {
|
|
163
|
+
(/** @type {?} */ (this.devtoolsExtension)).init(state);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
(/** @type {?} */ (this.devtoolsExtension)).send(Object.assign({}, action, { action: null, type }), newState);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Handle the action from the dev tools subscription
|
|
171
|
+
* @param {?} action
|
|
172
|
+
* @return {?}
|
|
173
|
+
*/
|
|
174
|
+
dispatched(action) {
|
|
175
|
+
if (action.type === 'DISPATCH') {
|
|
176
|
+
if (action.payload.type === 'JUMP_TO_ACTION' ||
|
|
177
|
+
action.payload.type === 'JUMP_TO_STATE') {
|
|
178
|
+
/** @type {?} */
|
|
179
|
+
const prevState = JSON.parse(action.state);
|
|
180
|
+
this.store.reset(prevState);
|
|
181
|
+
}
|
|
182
|
+
else if (action.payload.type === 'TOGGLE_ACTION') {
|
|
183
|
+
console.warn('Skip is not supported at this time.');
|
|
184
|
+
}
|
|
185
|
+
else if (action.payload.type === 'IMPORT_STATE') {
|
|
186
|
+
const { actionsById, computedStates, currentStateIndex } = action.payload.nextLiftedState;
|
|
187
|
+
(/** @type {?} */ (this.devtoolsExtension)).init(computedStates[0].state);
|
|
188
|
+
Object.keys(actionsById)
|
|
189
|
+
.filter((/**
|
|
190
|
+
* @param {?} actionId
|
|
191
|
+
* @return {?}
|
|
192
|
+
*/
|
|
193
|
+
actionId => actionId !== '0'))
|
|
194
|
+
.forEach((/**
|
|
195
|
+
* @param {?} actionId
|
|
196
|
+
* @return {?}
|
|
197
|
+
*/
|
|
198
|
+
actionId => (/** @type {?} */ (this.devtoolsExtension)).send(actionsById[actionId], computedStates[actionId].state)));
|
|
199
|
+
this.store.reset(computedStates[currentStateIndex].state);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
else if (action.type === 'ACTION') {
|
|
203
|
+
/** @type {?} */
|
|
204
|
+
const actionPayload = JSON.parse(action.payload);
|
|
205
|
+
this.store.dispatch(actionPayload);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
NgxsReduxDevtoolsPlugin.decorators = [
|
|
210
|
+
{ type: Injectable }
|
|
211
|
+
];
|
|
212
|
+
/** @nocollapse */
|
|
213
|
+
NgxsReduxDevtoolsPlugin.ctorParameters = () => [
|
|
214
|
+
{ type: undefined, decorators: [{ type: Inject, args: [NGXS_DEVTOOLS_OPTIONS,] }] },
|
|
215
|
+
{ type: Injector }
|
|
216
|
+
];
|
|
217
|
+
if (false) {
|
|
218
|
+
/**
|
|
219
|
+
* @type {?}
|
|
220
|
+
* @private
|
|
221
|
+
*/
|
|
222
|
+
NgxsReduxDevtoolsPlugin.prototype.devtoolsExtension;
|
|
223
|
+
/**
|
|
224
|
+
* @type {?}
|
|
225
|
+
* @private
|
|
226
|
+
*/
|
|
227
|
+
NgxsReduxDevtoolsPlugin.prototype.windowObj;
|
|
228
|
+
/**
|
|
229
|
+
* @type {?}
|
|
230
|
+
* @private
|
|
231
|
+
*/
|
|
232
|
+
NgxsReduxDevtoolsPlugin.prototype._options;
|
|
233
|
+
/**
|
|
234
|
+
* @type {?}
|
|
235
|
+
* @private
|
|
236
|
+
*/
|
|
237
|
+
NgxsReduxDevtoolsPlugin.prototype._injector;
|
|
296
238
|
}
|
|
297
239
|
|
|
298
|
-
/**
|
|
299
|
-
* @fileoverview added by tsickle
|
|
300
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
301
|
-
*/
|
|
302
|
-
/**
|
|
303
|
-
* @param {?} options
|
|
304
|
-
* @return {?}
|
|
305
|
-
*/
|
|
306
|
-
function devtoolsOptionsFactory(options) {
|
|
307
|
-
return Object.assign({ name: 'NGXS' }, options);
|
|
308
|
-
}
|
|
309
|
-
/** @type {?} */
|
|
310
|
-
const USER_OPTIONS = new InjectionToken('USER_OPTIONS');
|
|
311
|
-
class NgxsReduxDevtoolsPluginModule {
|
|
312
|
-
/**
|
|
313
|
-
* @param {?=} options
|
|
314
|
-
* @return {?}
|
|
315
|
-
*/
|
|
316
|
-
static forRoot(options) {
|
|
317
|
-
return {
|
|
318
|
-
ngModule: NgxsReduxDevtoolsPluginModule,
|
|
319
|
-
providers: [
|
|
320
|
-
{
|
|
321
|
-
provide: NGXS_PLUGINS,
|
|
322
|
-
useClass: NgxsReduxDevtoolsPlugin,
|
|
323
|
-
multi: true
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
provide: USER_OPTIONS,
|
|
327
|
-
useValue: options
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
provide: NGXS_DEVTOOLS_OPTIONS,
|
|
331
|
-
useFactory: devtoolsOptionsFactory,
|
|
332
|
-
deps: [USER_OPTIONS]
|
|
333
|
-
}
|
|
334
|
-
]
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
NgxsReduxDevtoolsPluginModule.decorators = [
|
|
339
|
-
{ type: NgModule }
|
|
240
|
+
/**
|
|
241
|
+
* @fileoverview added by tsickle
|
|
242
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
243
|
+
*/
|
|
244
|
+
/**
|
|
245
|
+
* @param {?} options
|
|
246
|
+
* @return {?}
|
|
247
|
+
*/
|
|
248
|
+
function devtoolsOptionsFactory(options) {
|
|
249
|
+
return Object.assign({ name: 'NGXS' }, options);
|
|
250
|
+
}
|
|
251
|
+
/** @type {?} */
|
|
252
|
+
const USER_OPTIONS = new InjectionToken('USER_OPTIONS');
|
|
253
|
+
class NgxsReduxDevtoolsPluginModule {
|
|
254
|
+
/**
|
|
255
|
+
* @param {?=} options
|
|
256
|
+
* @return {?}
|
|
257
|
+
*/
|
|
258
|
+
static forRoot(options) {
|
|
259
|
+
return {
|
|
260
|
+
ngModule: NgxsReduxDevtoolsPluginModule,
|
|
261
|
+
providers: [
|
|
262
|
+
{
|
|
263
|
+
provide: NGXS_PLUGINS,
|
|
264
|
+
useClass: NgxsReduxDevtoolsPlugin,
|
|
265
|
+
multi: true
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
provide: USER_OPTIONS,
|
|
269
|
+
useValue: options
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
provide: NGXS_DEVTOOLS_OPTIONS,
|
|
273
|
+
useFactory: devtoolsOptionsFactory,
|
|
274
|
+
deps: [USER_OPTIONS]
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
NgxsReduxDevtoolsPluginModule.decorators = [
|
|
281
|
+
{ type: NgModule }
|
|
340
282
|
];
|
|
341
283
|
|
|
342
|
-
/**
|
|
343
|
-
* @fileoverview added by tsickle
|
|
344
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
284
|
+
/**
|
|
285
|
+
* @fileoverview added by tsickle
|
|
286
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
345
287
|
*/
|
|
346
288
|
|
|
347
|
-
/**
|
|
348
|
-
* @fileoverview added by tsickle
|
|
349
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
289
|
+
/**
|
|
290
|
+
* @fileoverview added by tsickle
|
|
291
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
350
292
|
*/
|
|
351
293
|
|
|
352
|
-
/**
|
|
353
|
-
* @fileoverview added by tsickle
|
|
354
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
294
|
+
/**
|
|
295
|
+
* @fileoverview added by tsickle
|
|
296
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
355
297
|
*/
|
|
356
298
|
|
|
357
299
|
export { NGXS_DEVTOOLS_OPTIONS, NgxsReduxDevtoolsPlugin, NgxsReduxDevtoolsPluginModule, devtoolsOptionsFactory as ɵa, USER_OPTIONS as ɵb };
|