@ngxs/devtools-plugin 3.7.6 → 3.8.0-dev.master-743a236

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.
@@ -1,321 +1,31 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngxs/store'), require('rxjs/operators')) :
3
3
  typeof define === 'function' && define.amd ? define('@ngxs/devtools-plugin', ['exports', '@angular/core', '@ngxs/store', 'rxjs/operators'], factory) :
4
- (global = global || self, factory((global.ngxs = global.ngxs || {}, global.ngxs['devtools-plugin'] = {}), global.ng.core, global['ngxs-store'], global.rxjs.operators));
5
- }(this, function (exports, core, store, operators) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ngxs = global.ngxs || {}, global.ngxs["devtools-plugin"] = {}), global.ng.core, global["ngxs-store"], global.rxjs.operators));
5
+ })(this, (function (exports, i0, store, operators) { 'use strict';
6
6
 
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
-
23
- var extendStatics = function(d, b) {
24
- extendStatics = Object.setPrototypeOf ||
25
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
- return extendStatics(d, b);
28
- };
29
-
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
-
36
- var __assign = function() {
37
- __assign = Object.assign || function __assign(t) {
38
- for (var s, i = 1, n = arguments.length; i < n; i++) {
39
- s = arguments[i];
40
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
- }
42
- return t;
43
- };
44
- return __assign.apply(this, arguments);
45
- };
46
-
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- }
58
-
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63
- return c > 3 && r && Object.defineProperty(target, key, r), r;
64
- }
65
-
66
- function __param(paramIndex, decorator) {
67
- return function (target, key) { decorator(target, key, paramIndex); }
68
- }
69
-
70
- function __metadata(metadataKey, metadataValue) {
71
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
- }
73
-
74
- function __awaiter(thisArg, _arguments, P, generator) {
75
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
- return new (P || (P = Promise))(function (resolve, reject) {
77
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
- step((generator = generator.apply(thisArg, _arguments || [])).next());
81
- });
82
- }
83
-
84
- function __generator(thisArg, body) {
85
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
- function verb(n) { return function (v) { return step([n, v]); }; }
88
- function step(op) {
89
- if (f) throw new TypeError("Generator is already executing.");
90
- while (_) try {
91
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
92
- if (y = 0, t) op = [op[0] & 2, t.value];
93
- switch (op[0]) {
94
- case 0: case 1: t = op; break;
95
- case 4: _.label++; return { value: op[1], done: false };
96
- case 5: _.label++; y = op[1]; op = [0]; continue;
97
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
- default:
99
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
- if (t[2]) _.ops.pop();
104
- _.trys.pop(); continue;
105
- }
106
- op = body.call(thisArg, _);
107
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
- }
110
- }
111
-
112
- function __createBinding(o, m, k, k2) {
113
- if (k2 === undefined) k2 = k;
114
- o[k2] = m[k];
115
- }
116
-
117
- function __exportStar(m, exports) {
118
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
119
- }
120
-
121
- function __values(o) {
122
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
123
- if (m) return m.call(o);
124
- if (o && typeof o.length === "number") return {
125
- next: function () {
126
- if (o && i >= o.length) o = void 0;
127
- return { value: o && o[i++], done: !o };
128
- }
129
- };
130
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
131
- }
132
-
133
- function __read(o, n) {
134
- var m = typeof Symbol === "function" && o[Symbol.iterator];
135
- if (!m) return o;
136
- var i = m.call(o), r, ar = [], e;
137
- try {
138
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
139
- }
140
- catch (error) { e = { error: error }; }
141
- finally {
142
- try {
143
- if (r && !r.done && (m = i["return"])) m.call(i);
144
- }
145
- finally { if (e) throw e.error; }
146
- }
147
- return ar;
148
- }
149
-
150
- function __spread() {
151
- for (var ar = [], i = 0; i < arguments.length; i++)
152
- ar = ar.concat(__read(arguments[i]));
153
- return ar;
154
- }
155
-
156
- function __spreadArrays() {
157
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
158
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
159
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
160
- r[k] = a[j];
161
- return r;
162
- };
163
-
164
- function __await(v) {
165
- return this instanceof __await ? (this.v = v, this) : new __await(v);
166
- }
167
-
168
- function __asyncGenerator(thisArg, _arguments, generator) {
169
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
170
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
171
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
172
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
173
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
174
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
175
- function fulfill(value) { resume("next", value); }
176
- function reject(value) { resume("throw", value); }
177
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
178
- }
179
-
180
- function __asyncDelegator(o) {
181
- var i, p;
182
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
183
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
184
- }
185
-
186
- function __asyncValues(o) {
187
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
188
- var m = o[Symbol.asyncIterator], i;
189
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
190
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
191
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
192
- }
193
-
194
- function __makeTemplateObject(cooked, raw) {
195
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
196
- return cooked;
197
- };
198
-
199
- function __importStar(mod) {
200
- if (mod && mod.__esModule) return mod;
201
- var result = {};
202
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
203
- result.default = mod;
204
- return result;
205
- }
206
-
207
- function __importDefault(mod) {
208
- return (mod && mod.__esModule) ? mod : { default: mod };
209
- }
210
-
211
- function __classPrivateFieldGet(receiver, privateMap) {
212
- if (!privateMap.has(receiver)) {
213
- throw new TypeError("attempted to get private field on non-instance");
214
- }
215
- return privateMap.get(receiver);
216
- }
217
-
218
- function __classPrivateFieldSet(receiver, privateMap, value) {
219
- if (!privateMap.has(receiver)) {
220
- throw new TypeError("attempted to set private field on non-instance");
221
- }
222
- privateMap.set(receiver, value);
223
- return value;
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
224
23
  }
225
24
 
226
- /**
227
- * @fileoverview added by tsickle
228
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
229
- */
230
- /**
231
- * Interface for the redux-devtools-extension API.
232
- * @record
233
- */
234
- function NgxsDevtoolsExtension() { }
235
- if (false) {
236
- /**
237
- * @param {?} state
238
- * @return {?}
239
- */
240
- NgxsDevtoolsExtension.prototype.init = function (state) { };
241
- /**
242
- * @param {?} action
243
- * @param {?=} state
244
- * @return {?}
245
- */
246
- NgxsDevtoolsExtension.prototype.send = function (action, state) { };
247
- /**
248
- * @param {?} fn
249
- * @return {?}
250
- */
251
- NgxsDevtoolsExtension.prototype.subscribe = function (fn) { };
252
- }
253
- /**
254
- * @record
255
- */
256
- function NgxsDevtoolsAction() { }
257
- if (false) {
258
- /** @type {?} */
259
- NgxsDevtoolsAction.prototype.type;
260
- /** @type {?} */
261
- NgxsDevtoolsAction.prototype.payload;
262
- /** @type {?} */
263
- NgxsDevtoolsAction.prototype.state;
264
- /** @type {?} */
265
- NgxsDevtoolsAction.prototype.id;
266
- /** @type {?} */
267
- NgxsDevtoolsAction.prototype.source;
268
- }
269
- /**
270
- * @record
271
- */
272
- function NgxsDevtoolsOptions() { }
273
- if (false) {
274
- /**
275
- * The name of the extension
276
- * @type {?|undefined}
277
- */
278
- NgxsDevtoolsOptions.prototype.name;
279
- /**
280
- * Whether the dev tools is enabled or note. Useful for setting during production.
281
- * @type {?|undefined}
282
- */
283
- NgxsDevtoolsOptions.prototype.disabled;
284
- /**
285
- * Max number of entiries to keep.
286
- * @type {?|undefined}
287
- */
288
- NgxsDevtoolsOptions.prototype.maxAge;
289
- /**
290
- * Reformat actions before sending to dev tools
291
- * @type {?|undefined}
292
- */
293
- NgxsDevtoolsOptions.prototype.actionSanitizer;
294
- /**
295
- * Reformat state before sending to devtools
296
- * @type {?|undefined}
297
- */
298
- NgxsDevtoolsOptions.prototype.stateSanitizer;
299
- }
300
- /** @type {?} */
301
- var NGXS_DEVTOOLS_OPTIONS = new core.InjectionToken('NGXS_DEVTOOLS_OPTIONS');
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+
27
+ var NGXS_DEVTOOLS_OPTIONS = new i0.InjectionToken('NGXS_DEVTOOLS_OPTIONS');
302
28
 
303
- /**
304
- * @fileoverview added by tsickle
305
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
306
- */
307
- /** @enum {string} */
308
- var ReduxDevtoolsActionType = {
309
- Dispatch: 'DISPATCH',
310
- Action: 'ACTION',
311
- };
312
- /** @enum {string} */
313
- var ReduxDevtoolsPayloadType = {
314
- JumpToAction: 'JUMP_TO_ACTION',
315
- JumpToState: 'JUMP_TO_STATE',
316
- ToggleAction: 'TOGGLE_ACTION',
317
- ImportState: 'IMPORT_STATE',
318
- };
319
29
  /**
320
30
  * Adds support for the Redux Devtools extension:
321
31
  * http://extension.remotedev.io/
@@ -326,17 +36,11 @@
326
36
  this._injector = _injector;
327
37
  this._ngZone = _ngZone;
328
38
  this.devtoolsExtension = null;
329
- this.globalDevtools = core.ɵglobal['__REDUX_DEVTOOLS_EXTENSION__'] || core.ɵglobal['devToolsExtension'];
39
+ this.globalDevtools = i0["ɵglobal"]['__REDUX_DEVTOOLS_EXTENSION__'] || i0["ɵglobal"]['devToolsExtension'];
330
40
  this.unsubscribe = null;
331
41
  this.connect();
332
42
  }
333
- /**
334
- * @return {?}
335
- */
336
- NgxsReduxDevtoolsPlugin.prototype.ngOnDestroy = /**
337
- * @return {?}
338
- */
339
- function () {
43
+ NgxsReduxDevtoolsPlugin.prototype.ngOnDestroy = function () {
340
44
  if (this.unsubscribe !== null) {
341
45
  this.unsubscribe();
342
46
  }
@@ -348,102 +52,47 @@
348
52
  /**
349
53
  * Lazy get the store for circular dependency issues
350
54
  */
351
- get: /**
352
- * Lazy get the store for circular dependency issues
353
- * @private
354
- * @return {?}
355
- */
356
- function () {
55
+ get: function () {
357
56
  return this._injector.get(store.Store);
358
57
  },
359
- enumerable: true,
58
+ enumerable: false,
360
59
  configurable: true
361
60
  });
362
61
  /**
363
62
  * Middleware handle function
364
63
  */
365
- /**
366
- * Middleware handle function
367
- * @param {?} state
368
- * @param {?} action
369
- * @param {?} next
370
- * @return {?}
371
- */
372
- NgxsReduxDevtoolsPlugin.prototype.handle = /**
373
- * Middleware handle function
374
- * @param {?} state
375
- * @param {?} action
376
- * @param {?} next
377
- * @return {?}
378
- */
379
- function (state, action, next) {
64
+ NgxsReduxDevtoolsPlugin.prototype.handle = function (state, action, next) {
380
65
  var _this = this;
381
66
  if (!this.devtoolsExtension || this._options.disabled) {
382
67
  return next(state, action);
383
68
  }
384
- return next(state, action).pipe(operators.catchError((/**
385
- * @param {?} error
386
- * @return {?}
387
- */
388
- function (error) {
389
- /** @type {?} */
69
+ return next(state, action).pipe(operators.catchError(function (error) {
390
70
  var newState = _this.store.snapshot();
391
71
  _this.sendToDevTools(state, action, newState);
392
72
  throw error;
393
- })), operators.tap((/**
394
- * @param {?} newState
395
- * @return {?}
396
- */
397
- function (newState) {
73
+ }), operators.tap(function (newState) {
398
74
  _this.sendToDevTools(state, action, newState);
399
- })));
75
+ }));
400
76
  };
401
- /**
402
- * @private
403
- * @param {?} state
404
- * @param {?} action
405
- * @param {?} newState
406
- * @return {?}
407
- */
408
- NgxsReduxDevtoolsPlugin.prototype.sendToDevTools = /**
409
- * @private
410
- * @param {?} state
411
- * @param {?} action
412
- * @param {?} newState
413
- * @return {?}
414
- */
415
- function (state, action, newState) {
416
- /** @type {?} */
77
+ NgxsReduxDevtoolsPlugin.prototype.sendToDevTools = function (state, action, newState) {
417
78
  var type = store.getActionTypeFromInstance(action);
418
79
  // if init action, send initial state to dev tools
419
- /** @type {?} */
420
80
  var isInitAction = type === '@@INIT';
421
81
  if (isInitAction) {
422
- (/** @type {?} */ (this.devtoolsExtension)).init(state);
82
+ this.devtoolsExtension.init(state);
423
83
  }
424
84
  else {
425
- (/** @type {?} */ (this.devtoolsExtension)).send(__assign({}, action, { action: null, type: type }), newState);
85
+ this.devtoolsExtension.send(Object.assign(Object.assign({}, action), { action: null, type: type }), newState);
426
86
  }
427
87
  };
428
88
  /**
429
89
  * Handle the action from the dev tools subscription
430
90
  */
431
- /**
432
- * Handle the action from the dev tools subscription
433
- * @param {?} action
434
- * @return {?}
435
- */
436
- NgxsReduxDevtoolsPlugin.prototype.dispatched = /**
437
- * Handle the action from the dev tools subscription
438
- * @param {?} action
439
- * @return {?}
440
- */
441
- function (action) {
91
+ NgxsReduxDevtoolsPlugin.prototype.dispatched = function (action) {
442
92
  var _this = this;
443
93
  if (action.type === "DISPATCH" /* Dispatch */) {
444
94
  if (action.payload.type === "JUMP_TO_ACTION" /* JumpToAction */ ||
445
95
  action.payload.type === "JUMP_TO_STATE" /* JumpToState */) {
446
- /** @type {?} */
447
96
  var prevState = JSON.parse(action.state);
448
97
  // This makes the DevTools and Router plugins friends with each other.
449
98
  // We're checking for the `router` state to exist, and it also should
@@ -461,38 +110,19 @@
461
110
  }
462
111
  else if (action.payload.type === "IMPORT_STATE" /* ImportState */) {
463
112
  var _a = action.payload.nextLiftedState, actionsById_1 = _a.actionsById, computedStates_1 = _a.computedStates, currentStateIndex = _a.currentStateIndex;
464
- (/** @type {?} */ (this.devtoolsExtension)).init(computedStates_1[0].state);
113
+ this.devtoolsExtension.init(computedStates_1[0].state);
465
114
  Object.keys(actionsById_1)
466
- .filter((/**
467
- * @param {?} actionId
468
- * @return {?}
469
- */
470
- function (actionId) { return actionId !== '0'; }))
471
- .forEach((/**
472
- * @param {?} actionId
473
- * @return {?}
474
- */
475
- function (actionId) {
476
- return (/** @type {?} */ (_this.devtoolsExtension)).send(actionsById_1[actionId], computedStates_1[actionId].state);
477
- }));
115
+ .filter(function (actionId) { return actionId !== '0'; })
116
+ .forEach(function (actionId) { return _this.devtoolsExtension.send(actionsById_1[actionId], computedStates_1[actionId].state); });
478
117
  this.store.reset(computedStates_1[currentStateIndex].state);
479
118
  }
480
119
  }
481
120
  else if (action.type === "ACTION" /* Action */) {
482
- /** @type {?} */
483
121
  var actionPayload = JSON.parse(action.payload);
484
122
  this.store.dispatch(actionPayload);
485
123
  }
486
124
  };
487
- /**
488
- * @private
489
- * @return {?}
490
- */
491
- NgxsReduxDevtoolsPlugin.prototype.connect = /**
492
- * @private
493
- * @return {?}
494
- */
495
- function () {
125
+ NgxsReduxDevtoolsPlugin.prototype.connect = function () {
496
126
  var _this = this;
497
127
  if (!this.globalDevtools || this._options.disabled) {
498
128
  return;
@@ -501,95 +131,37 @@
501
131
  // with an extension through `window.postMessage` and message events.
502
132
  // We handle only 2 events; thus, we don't want to run many change detections
503
133
  // because the extension sends events that we don't have to handle.
504
- this.devtoolsExtension = this._ngZone.runOutsideAngular((/**
505
- * @return {?}
506
- */
507
- function () { return (/** @type {?} */ (_this.globalDevtools.connect(_this._options))); }));
508
- this.unsubscribe = this.devtoolsExtension.subscribe((/**
509
- * @param {?} action
510
- * @return {?}
511
- */
512
- function (action) {
134
+ this.devtoolsExtension = this._ngZone.runOutsideAngular(function () { return _this.globalDevtools.connect(_this._options); });
135
+ this.unsubscribe = this.devtoolsExtension.subscribe(function (action) {
513
136
  if (action.type === "DISPATCH" /* Dispatch */ ||
514
137
  action.type === "ACTION" /* Action */) {
515
- _this._ngZone.run((/**
516
- * @return {?}
517
- */
518
- function () {
138
+ _this._ngZone.run(function () {
519
139
  _this.dispatched(action);
520
- }));
140
+ });
521
141
  }
522
- }));
142
+ });
523
143
  };
524
- NgxsReduxDevtoolsPlugin.decorators = [
525
- { type: core.Injectable }
526
- ];
527
- /** @nocollapse */
528
- NgxsReduxDevtoolsPlugin.ctorParameters = function () { return [
529
- { type: undefined, decorators: [{ type: core.Inject, args: [NGXS_DEVTOOLS_OPTIONS,] }] },
530
- { type: core.Injector },
531
- { type: core.NgZone }
532
- ]; };
533
144
  return NgxsReduxDevtoolsPlugin;
534
145
  }());
535
- if (false) {
536
- /**
537
- * @type {?}
538
- * @private
539
- */
540
- NgxsReduxDevtoolsPlugin.prototype.devtoolsExtension;
541
- /**
542
- * @type {?}
543
- * @private
544
- */
545
- NgxsReduxDevtoolsPlugin.prototype.globalDevtools;
546
- /**
547
- * @type {?}
548
- * @private
549
- */
550
- NgxsReduxDevtoolsPlugin.prototype.unsubscribe;
551
- /**
552
- * @type {?}
553
- * @private
554
- */
555
- NgxsReduxDevtoolsPlugin.prototype._options;
556
- /**
557
- * @type {?}
558
- * @private
559
- */
560
- NgxsReduxDevtoolsPlugin.prototype._injector;
561
- /**
562
- * @type {?}
563
- * @private
564
- */
565
- NgxsReduxDevtoolsPlugin.prototype._ngZone;
566
- }
146
+ /** @nocollapse */ NgxsReduxDevtoolsPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsReduxDevtoolsPlugin, deps: [{ token: NGXS_DEVTOOLS_OPTIONS }, { token: i0__namespace.Injector }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
147
+ /** @nocollapse */ NgxsReduxDevtoolsPlugin.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsReduxDevtoolsPlugin });
148
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsReduxDevtoolsPlugin, decorators: [{
149
+ type: i0.Injectable
150
+ }], ctorParameters: function () {
151
+ return [{ type: undefined, decorators: [{
152
+ type: i0.Inject,
153
+ args: [NGXS_DEVTOOLS_OPTIONS]
154
+ }] }, { type: i0__namespace.Injector }, { type: i0__namespace.NgZone }];
155
+ } });
567
156
 
568
- /**
569
- * @fileoverview added by tsickle
570
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
571
- */
572
- /**
573
- * @param {?} options
574
- * @return {?}
575
- */
576
157
  function devtoolsOptionsFactory(options) {
577
- return __assign({ name: 'NGXS' }, options);
158
+ return Object.assign({ name: 'NGXS' }, options);
578
159
  }
579
- /** @type {?} */
580
- var USER_OPTIONS = new core.InjectionToken('USER_OPTIONS');
160
+ var USER_OPTIONS = new i0.InjectionToken('USER_OPTIONS');
581
161
  var NgxsReduxDevtoolsPluginModule = /** @class */ (function () {
582
162
  function NgxsReduxDevtoolsPluginModule() {
583
163
  }
584
- /**
585
- * @param {?=} options
586
- * @return {?}
587
- */
588
- NgxsReduxDevtoolsPluginModule.forRoot = /**
589
- * @param {?=} options
590
- * @return {?}
591
- */
592
- function (options) {
164
+ NgxsReduxDevtoolsPluginModule.forRoot = function (options) {
593
165
  return {
594
166
  ngModule: NgxsReduxDevtoolsPluginModule,
595
167
  providers: [
@@ -610,17 +182,26 @@
610
182
  ]
611
183
  };
612
184
  };
613
- NgxsReduxDevtoolsPluginModule.decorators = [
614
- { type: core.NgModule }
615
- ];
616
185
  return NgxsReduxDevtoolsPluginModule;
617
186
  }());
187
+ /** @nocollapse */ NgxsReduxDevtoolsPluginModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsReduxDevtoolsPluginModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
188
+ /** @nocollapse */ NgxsReduxDevtoolsPluginModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsReduxDevtoolsPluginModule });
189
+ /** @nocollapse */ NgxsReduxDevtoolsPluginModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsReduxDevtoolsPluginModule });
190
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsReduxDevtoolsPluginModule, decorators: [{
191
+ type: i0.NgModule
192
+ }] });
193
+
194
+ /**
195
+ * The public api for consumers of @ngxs/devtools-plugin
196
+ */
197
+
198
+ /**
199
+ * Generated bundle index. Do not edit.
200
+ */
618
201
 
619
202
  exports.NGXS_DEVTOOLS_OPTIONS = NGXS_DEVTOOLS_OPTIONS;
620
203
  exports.NgxsReduxDevtoolsPlugin = NgxsReduxDevtoolsPlugin;
621
204
  exports.NgxsReduxDevtoolsPluginModule = NgxsReduxDevtoolsPluginModule;
622
- exports.ɵa = devtoolsOptionsFactory;
623
- exports.ɵb = USER_OPTIONS;
624
205
 
625
206
  Object.defineProperty(exports, '__esModule', { value: true });
626
207