@ngxs/devtools-plugin 3.7.6-dev.master-fb318b1 → 3.7.6-dev.master-40a2210

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,348 +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
- * If more than one action is dispatched in the indicated interval, all new actions will be collected
291
- * and sent at once. It is the joint between performance and speed. When set to 0, all actions will be
292
- * sent instantly. Set it to a higher value when experiencing perf issues (also maxAge to a lower value).
293
- * Default is 500 ms.
294
- * @type {?|undefined}
295
- */
296
- NgxsDevtoolsOptions.prototype.latency;
297
- /**
298
- * string or array of strings as regex - actions types to be hidden in the monitors (while passed to the reducers).
299
- * If actionsWhitelist specified, actionsBlacklist is ignored.
300
- * @type {?|undefined}
301
- */
302
- NgxsDevtoolsOptions.prototype.actionsBlacklist;
303
- /**
304
- * string or array of strings as regex - actions types to be shown in the monitors (while passed to the reducers).
305
- * If actionsWhitelist specified, actionsBlacklist is ignored.
306
- * @type {?|undefined}
307
- */
308
- NgxsDevtoolsOptions.prototype.actionsWhitelist;
309
- /**
310
- * called for every action before sending, takes state and action object, and returns true in case it allows
311
- * sending the current data to the monitor. Use it as a more advanced version of
312
- * actionsBlacklist/actionsWhitelist parameters
313
- * @type {?|undefined}
314
- */
315
- NgxsDevtoolsOptions.prototype.predicate;
316
- /**
317
- * Reformat actions before sending to dev tools
318
- * @type {?|undefined}
319
- */
320
- NgxsDevtoolsOptions.prototype.actionSanitizer;
321
- /**
322
- * Reformat state before sending to devtools
323
- * @type {?|undefined}
324
- */
325
- NgxsDevtoolsOptions.prototype.stateSanitizer;
326
- }
327
- /** @type {?} */
328
- 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');
329
28
 
330
- /**
331
- * @fileoverview added by tsickle
332
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
333
- */
334
- /** @enum {string} */
335
- var ReduxDevtoolsActionType = {
336
- Dispatch: 'DISPATCH',
337
- Action: 'ACTION',
338
- };
339
- /** @enum {string} */
340
- var ReduxDevtoolsPayloadType = {
341
- JumpToAction: 'JUMP_TO_ACTION',
342
- JumpToState: 'JUMP_TO_STATE',
343
- ToggleAction: 'TOGGLE_ACTION',
344
- ImportState: 'IMPORT_STATE',
345
- };
346
29
  /**
347
30
  * Adds support for the Redux Devtools extension:
348
31
  * http://extension.remotedev.io/
@@ -353,17 +36,11 @@
353
36
  this._injector = _injector;
354
37
  this._ngZone = _ngZone;
355
38
  this.devtoolsExtension = null;
356
- this.globalDevtools = core.ɵglobal['__REDUX_DEVTOOLS_EXTENSION__'] || core.ɵglobal['devToolsExtension'];
39
+ this.globalDevtools = i0["ɵglobal"]['__REDUX_DEVTOOLS_EXTENSION__'] || i0["ɵglobal"]['devToolsExtension'];
357
40
  this.unsubscribe = null;
358
41
  this.connect();
359
42
  }
360
- /**
361
- * @return {?}
362
- */
363
- NgxsReduxDevtoolsPlugin.prototype.ngOnDestroy = /**
364
- * @return {?}
365
- */
366
- function () {
43
+ NgxsReduxDevtoolsPlugin.prototype.ngOnDestroy = function () {
367
44
  if (this.unsubscribe !== null) {
368
45
  this.unsubscribe();
369
46
  }
@@ -375,102 +52,47 @@
375
52
  /**
376
53
  * Lazy get the store for circular dependency issues
377
54
  */
378
- get: /**
379
- * Lazy get the store for circular dependency issues
380
- * @private
381
- * @return {?}
382
- */
383
- function () {
55
+ get: function () {
384
56
  return this._injector.get(store.Store);
385
57
  },
386
- enumerable: true,
58
+ enumerable: false,
387
59
  configurable: true
388
60
  });
389
61
  /**
390
62
  * Middleware handle function
391
63
  */
392
- /**
393
- * Middleware handle function
394
- * @param {?} state
395
- * @param {?} action
396
- * @param {?} next
397
- * @return {?}
398
- */
399
- NgxsReduxDevtoolsPlugin.prototype.handle = /**
400
- * Middleware handle function
401
- * @param {?} state
402
- * @param {?} action
403
- * @param {?} next
404
- * @return {?}
405
- */
406
- function (state, action, next) {
64
+ NgxsReduxDevtoolsPlugin.prototype.handle = function (state, action, next) {
407
65
  var _this = this;
408
66
  if (!this.devtoolsExtension || this._options.disabled) {
409
67
  return next(state, action);
410
68
  }
411
- return next(state, action).pipe(operators.catchError((/**
412
- * @param {?} error
413
- * @return {?}
414
- */
415
- function (error) {
416
- /** @type {?} */
69
+ return next(state, action).pipe(operators.catchError(function (error) {
417
70
  var newState = _this.store.snapshot();
418
71
  _this.sendToDevTools(state, action, newState);
419
72
  throw error;
420
- })), operators.tap((/**
421
- * @param {?} newState
422
- * @return {?}
423
- */
424
- function (newState) {
73
+ }), operators.tap(function (newState) {
425
74
  _this.sendToDevTools(state, action, newState);
426
- })));
75
+ }));
427
76
  };
428
- /**
429
- * @private
430
- * @param {?} state
431
- * @param {?} action
432
- * @param {?} newState
433
- * @return {?}
434
- */
435
- NgxsReduxDevtoolsPlugin.prototype.sendToDevTools = /**
436
- * @private
437
- * @param {?} state
438
- * @param {?} action
439
- * @param {?} newState
440
- * @return {?}
441
- */
442
- function (state, action, newState) {
443
- /** @type {?} */
77
+ NgxsReduxDevtoolsPlugin.prototype.sendToDevTools = function (state, action, newState) {
444
78
  var type = store.getActionTypeFromInstance(action);
445
79
  // if init action, send initial state to dev tools
446
- /** @type {?} */
447
80
  var isInitAction = type === '@@INIT';
448
81
  if (isInitAction) {
449
- (/** @type {?} */ (this.devtoolsExtension)).init(state);
82
+ this.devtoolsExtension.init(state);
450
83
  }
451
84
  else {
452
- (/** @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);
453
86
  }
454
87
  };
455
88
  /**
456
89
  * Handle the action from the dev tools subscription
457
90
  */
458
- /**
459
- * Handle the action from the dev tools subscription
460
- * @param {?} action
461
- * @return {?}
462
- */
463
- NgxsReduxDevtoolsPlugin.prototype.dispatched = /**
464
- * Handle the action from the dev tools subscription
465
- * @param {?} action
466
- * @return {?}
467
- */
468
- function (action) {
91
+ NgxsReduxDevtoolsPlugin.prototype.dispatched = function (action) {
469
92
  var _this = this;
470
93
  if (action.type === "DISPATCH" /* Dispatch */) {
471
94
  if (action.payload.type === "JUMP_TO_ACTION" /* JumpToAction */ ||
472
95
  action.payload.type === "JUMP_TO_STATE" /* JumpToState */) {
473
- /** @type {?} */
474
96
  var prevState = JSON.parse(action.state);
475
97
  // This makes the DevTools and Router plugins friends with each other.
476
98
  // We're checking for the `router` state to exist, and it also should
@@ -488,38 +110,19 @@
488
110
  }
489
111
  else if (action.payload.type === "IMPORT_STATE" /* ImportState */) {
490
112
  var _a = action.payload.nextLiftedState, actionsById_1 = _a.actionsById, computedStates_1 = _a.computedStates, currentStateIndex = _a.currentStateIndex;
491
- (/** @type {?} */ (this.devtoolsExtension)).init(computedStates_1[0].state);
113
+ this.devtoolsExtension.init(computedStates_1[0].state);
492
114
  Object.keys(actionsById_1)
493
- .filter((/**
494
- * @param {?} actionId
495
- * @return {?}
496
- */
497
- function (actionId) { return actionId !== '0'; }))
498
- .forEach((/**
499
- * @param {?} actionId
500
- * @return {?}
501
- */
502
- function (actionId) {
503
- return (/** @type {?} */ (_this.devtoolsExtension)).send(actionsById_1[actionId], computedStates_1[actionId].state);
504
- }));
115
+ .filter(function (actionId) { return actionId !== '0'; })
116
+ .forEach(function (actionId) { return _this.devtoolsExtension.send(actionsById_1[actionId], computedStates_1[actionId].state); });
505
117
  this.store.reset(computedStates_1[currentStateIndex].state);
506
118
  }
507
119
  }
508
120
  else if (action.type === "ACTION" /* Action */) {
509
- /** @type {?} */
510
121
  var actionPayload = JSON.parse(action.payload);
511
122
  this.store.dispatch(actionPayload);
512
123
  }
513
124
  };
514
- /**
515
- * @private
516
- * @return {?}
517
- */
518
- NgxsReduxDevtoolsPlugin.prototype.connect = /**
519
- * @private
520
- * @return {?}
521
- */
522
- function () {
125
+ NgxsReduxDevtoolsPlugin.prototype.connect = function () {
523
126
  var _this = this;
524
127
  if (!this.globalDevtools || this._options.disabled) {
525
128
  return;
@@ -528,95 +131,37 @@
528
131
  // with an extension through `window.postMessage` and message events.
529
132
  // We handle only 2 events; thus, we don't want to run many change detections
530
133
  // because the extension sends events that we don't have to handle.
531
- this.devtoolsExtension = this._ngZone.runOutsideAngular((/**
532
- * @return {?}
533
- */
534
- function () { return (/** @type {?} */ (_this.globalDevtools.connect(_this._options))); }));
535
- this.unsubscribe = this.devtoolsExtension.subscribe((/**
536
- * @param {?} action
537
- * @return {?}
538
- */
539
- function (action) {
134
+ this.devtoolsExtension = this._ngZone.runOutsideAngular(function () { return _this.globalDevtools.connect(_this._options); });
135
+ this.unsubscribe = this.devtoolsExtension.subscribe(function (action) {
540
136
  if (action.type === "DISPATCH" /* Dispatch */ ||
541
137
  action.type === "ACTION" /* Action */) {
542
- _this._ngZone.run((/**
543
- * @return {?}
544
- */
545
- function () {
138
+ _this._ngZone.run(function () {
546
139
  _this.dispatched(action);
547
- }));
140
+ });
548
141
  }
549
- }));
142
+ });
550
143
  };
551
- NgxsReduxDevtoolsPlugin.decorators = [
552
- { type: core.Injectable }
553
- ];
554
- /** @nocollapse */
555
- NgxsReduxDevtoolsPlugin.ctorParameters = function () { return [
556
- { type: undefined, decorators: [{ type: core.Inject, args: [NGXS_DEVTOOLS_OPTIONS,] }] },
557
- { type: core.Injector },
558
- { type: core.NgZone }
559
- ]; };
560
144
  return NgxsReduxDevtoolsPlugin;
561
145
  }());
562
- if (false) {
563
- /**
564
- * @type {?}
565
- * @private
566
- */
567
- NgxsReduxDevtoolsPlugin.prototype.devtoolsExtension;
568
- /**
569
- * @type {?}
570
- * @private
571
- */
572
- NgxsReduxDevtoolsPlugin.prototype.globalDevtools;
573
- /**
574
- * @type {?}
575
- * @private
576
- */
577
- NgxsReduxDevtoolsPlugin.prototype.unsubscribe;
578
- /**
579
- * @type {?}
580
- * @private
581
- */
582
- NgxsReduxDevtoolsPlugin.prototype._options;
583
- /**
584
- * @type {?}
585
- * @private
586
- */
587
- NgxsReduxDevtoolsPlugin.prototype._injector;
588
- /**
589
- * @type {?}
590
- * @private
591
- */
592
- NgxsReduxDevtoolsPlugin.prototype._ngZone;
593
- }
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
+ } });
594
156
 
595
- /**
596
- * @fileoverview added by tsickle
597
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
598
- */
599
- /**
600
- * @param {?} options
601
- * @return {?}
602
- */
603
157
  function devtoolsOptionsFactory(options) {
604
- return __assign({ name: 'NGXS' }, options);
158
+ return Object.assign({ name: 'NGXS' }, options);
605
159
  }
606
- /** @type {?} */
607
- var USER_OPTIONS = new core.InjectionToken('USER_OPTIONS');
160
+ var USER_OPTIONS = new i0.InjectionToken('USER_OPTIONS');
608
161
  var NgxsReduxDevtoolsPluginModule = /** @class */ (function () {
609
162
  function NgxsReduxDevtoolsPluginModule() {
610
163
  }
611
- /**
612
- * @param {?=} options
613
- * @return {?}
614
- */
615
- NgxsReduxDevtoolsPluginModule.forRoot = /**
616
- * @param {?=} options
617
- * @return {?}
618
- */
619
- function (options) {
164
+ NgxsReduxDevtoolsPluginModule.forRoot = function (options) {
620
165
  return {
621
166
  ngModule: NgxsReduxDevtoolsPluginModule,
622
167
  providers: [
@@ -637,17 +182,26 @@
637
182
  ]
638
183
  };
639
184
  };
640
- NgxsReduxDevtoolsPluginModule.decorators = [
641
- { type: core.NgModule }
642
- ];
643
185
  return NgxsReduxDevtoolsPluginModule;
644
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
+ */
645
201
 
646
202
  exports.NGXS_DEVTOOLS_OPTIONS = NGXS_DEVTOOLS_OPTIONS;
647
203
  exports.NgxsReduxDevtoolsPlugin = NgxsReduxDevtoolsPlugin;
648
204
  exports.NgxsReduxDevtoolsPluginModule = NgxsReduxDevtoolsPluginModule;
649
- exports.ɵa = devtoolsOptionsFactory;
650
- exports.ɵb = USER_OPTIONS;
651
205
 
652
206
  Object.defineProperty(exports, '__esModule', { value: true });
653
207