@ngxs/router-plugin 3.7.4 → 3.7.5

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,883 +1,777 @@
1
1
  import { NgZone, Injectable, NgModule } from '@angular/core';
2
2
  import { Store, Action, Selector, State, NgxsModule } from '@ngxs/store';
3
3
  import { __assign, __decorate, __metadata } from 'tslib';
4
- import { NavigationStart, RoutesRecognized, ResolveEnd, NavigationCancel, NavigationError, NavigationEnd, Router, UrlSerializer } from '@angular/router';
5
- import { LocationStrategy, Location } from '@angular/common';
6
- import { isAngularInTestMode } from '@ngxs/store/internals';
4
+ import { NavigationStart, RoutesRecognized, ResolveEnd, NavigationCancel, NavigationError, NavigationEnd, Router } from '@angular/router';
7
5
  import { Subscription } from 'rxjs';
8
- import { first } from 'rxjs/operators';
9
6
 
10
- /**
11
- * @fileoverview added by tsickle
12
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13
- */
14
- /**
15
- * Public event api of the router
16
- */
17
- var /**
18
- * Public event api of the router
19
- */
20
- Navigate = /** @class */ (function () {
21
- function Navigate(path, queryParams, extras) {
22
- this.path = path;
23
- this.queryParams = queryParams;
24
- this.extras = extras;
25
- }
26
- Object.defineProperty(Navigate, "type", {
27
- get: /**
28
- * @return {?}
29
- */
30
- function () {
31
- // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
32
- return '[Router] Navigate';
33
- },
34
- enumerable: true,
35
- configurable: true
36
- });
37
- return Navigate;
38
- }());
39
- if (false) {
40
- /** @type {?} */
41
- Navigate.prototype.path;
42
- /** @type {?} */
43
- Navigate.prototype.queryParams;
44
- /** @type {?} */
45
- Navigate.prototype.extras;
46
- }
47
- /**
48
- *
49
- * Angular Routers internal state events
50
- *
51
- */
52
- /**
53
- * An action dispatched when the router navigates.
54
- * @template T
55
- */
56
- var /**
57
- *
58
- * Angular Routers internal state events
59
- *
60
- */
61
- /**
62
- * An action dispatched when the router navigates.
63
- * @template T
64
- */
65
- RouterNavigation = /** @class */ (function () {
66
- function RouterNavigation(routerState, event, trigger) {
67
- if (trigger === void 0) { trigger = 'none'; }
68
- this.routerState = routerState;
69
- this.event = event;
70
- this.trigger = trigger;
71
- }
72
- Object.defineProperty(RouterNavigation, "type", {
73
- get: /**
74
- * @return {?}
75
- */
76
- function () {
77
- // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
78
- return '[Router] RouterNavigation';
79
- },
80
- enumerable: true,
81
- configurable: true
82
- });
83
- return RouterNavigation;
84
- }());
85
- if (false) {
86
- /** @type {?} */
87
- RouterNavigation.prototype.routerState;
88
- /** @type {?} */
89
- RouterNavigation.prototype.event;
90
- /** @type {?} */
91
- RouterNavigation.prototype.trigger;
92
- }
93
- /**
94
- * An action dispatched when the router cancel navigation.
95
- * @template T, V
96
- */
97
- var /**
98
- * An action dispatched when the router cancel navigation.
99
- * @template T, V
100
- */
101
- RouterCancel = /** @class */ (function () {
102
- function RouterCancel(routerState, storeState, event, trigger) {
103
- if (trigger === void 0) { trigger = 'none'; }
104
- this.routerState = routerState;
105
- this.storeState = storeState;
106
- this.event = event;
107
- this.trigger = trigger;
108
- }
109
- Object.defineProperty(RouterCancel, "type", {
110
- get: /**
111
- * @return {?}
112
- */
113
- function () {
114
- // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
115
- return '[Router] RouterCancel';
116
- },
117
- enumerable: true,
118
- configurable: true
119
- });
120
- return RouterCancel;
121
- }());
122
- if (false) {
123
- /** @type {?} */
124
- RouterCancel.prototype.routerState;
125
- /** @type {?} */
126
- RouterCancel.prototype.storeState;
127
- /** @type {?} */
128
- RouterCancel.prototype.event;
129
- /** @type {?} */
130
- RouterCancel.prototype.trigger;
131
- }
132
- /**
133
- * An action dispatched when the router errors.
134
- * @template T, V
135
- */
136
- var /**
137
- * An action dispatched when the router errors.
138
- * @template T, V
139
- */
140
- RouterError = /** @class */ (function () {
141
- function RouterError(routerState, storeState, event, trigger) {
142
- if (trigger === void 0) { trigger = 'none'; }
143
- this.routerState = routerState;
144
- this.storeState = storeState;
145
- this.event = event;
146
- this.trigger = trigger;
147
- }
148
- Object.defineProperty(RouterError, "type", {
149
- get: /**
150
- * @return {?}
151
- */
152
- function () {
153
- // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
154
- return '[Router] RouterError';
155
- },
156
- enumerable: true,
157
- configurable: true
158
- });
159
- return RouterError;
160
- }());
161
- if (false) {
162
- /** @type {?} */
163
- RouterError.prototype.routerState;
164
- /** @type {?} */
165
- RouterError.prototype.storeState;
166
- /** @type {?} */
167
- RouterError.prototype.event;
168
- /** @type {?} */
169
- RouterError.prototype.trigger;
170
- }
171
- /**
172
- * An action dispatched when the `ResolveEnd` event is triggered.
173
- * @template T
174
- */
175
- var /**
176
- * An action dispatched when the `ResolveEnd` event is triggered.
177
- * @template T
178
- */
179
- RouterDataResolved = /** @class */ (function () {
180
- function RouterDataResolved(routerState, event, trigger) {
181
- if (trigger === void 0) { trigger = 'none'; }
182
- this.routerState = routerState;
183
- this.event = event;
184
- this.trigger = trigger;
185
- }
186
- Object.defineProperty(RouterDataResolved, "type", {
187
- get: /**
188
- * @return {?}
189
- */
190
- function () {
191
- // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
192
- return '[Router] RouterDataResolved';
193
- },
194
- enumerable: true,
195
- configurable: true
196
- });
197
- return RouterDataResolved;
198
- }());
199
- if (false) {
200
- /** @type {?} */
201
- RouterDataResolved.prototype.routerState;
202
- /** @type {?} */
203
- RouterDataResolved.prototype.event;
204
- /** @type {?} */
205
- RouterDataResolved.prototype.trigger;
7
+ /**
8
+ * @fileoverview added by tsickle
9
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
10
+ */
11
+ /**
12
+ * Public event api of the router
13
+ */
14
+ var /**
15
+ * Public event api of the router
16
+ */
17
+ Navigate = /** @class */ (function () {
18
+ function Navigate(path, queryParams, extras) {
19
+ this.path = path;
20
+ this.queryParams = queryParams;
21
+ this.extras = extras;
22
+ }
23
+ Object.defineProperty(Navigate, "type", {
24
+ get: /**
25
+ * @return {?}
26
+ */
27
+ function () {
28
+ // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
29
+ return '[Router] Navigate';
30
+ },
31
+ enumerable: true,
32
+ configurable: true
33
+ });
34
+ return Navigate;
35
+ }());
36
+ if (false) {
37
+ /** @type {?} */
38
+ Navigate.prototype.path;
39
+ /** @type {?} */
40
+ Navigate.prototype.queryParams;
41
+ /** @type {?} */
42
+ Navigate.prototype.extras;
43
+ }
44
+ /**
45
+ *
46
+ * Angular Routers internal state events
47
+ *
48
+ */
49
+ /**
50
+ * An action dispatched when the router navigates.
51
+ * @template T
52
+ */
53
+ var /**
54
+ *
55
+ * Angular Routers internal state events
56
+ *
57
+ */
58
+ /**
59
+ * An action dispatched when the router navigates.
60
+ * @template T
61
+ */
62
+ RouterNavigation = /** @class */ (function () {
63
+ function RouterNavigation(routerState, event, trigger) {
64
+ if (trigger === void 0) { trigger = 'none'; }
65
+ this.routerState = routerState;
66
+ this.event = event;
67
+ this.trigger = trigger;
68
+ }
69
+ Object.defineProperty(RouterNavigation, "type", {
70
+ get: /**
71
+ * @return {?}
72
+ */
73
+ function () {
74
+ // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
75
+ return '[Router] RouterNavigation';
76
+ },
77
+ enumerable: true,
78
+ configurable: true
79
+ });
80
+ return RouterNavigation;
81
+ }());
82
+ if (false) {
83
+ /** @type {?} */
84
+ RouterNavigation.prototype.routerState;
85
+ /** @type {?} */
86
+ RouterNavigation.prototype.event;
87
+ /** @type {?} */
88
+ RouterNavigation.prototype.trigger;
89
+ }
90
+ /**
91
+ * An action dispatched when the router cancel navigation.
92
+ * @template T, V
93
+ */
94
+ var /**
95
+ * An action dispatched when the router cancel navigation.
96
+ * @template T, V
97
+ */
98
+ RouterCancel = /** @class */ (function () {
99
+ function RouterCancel(routerState, storeState, event, trigger) {
100
+ if (trigger === void 0) { trigger = 'none'; }
101
+ this.routerState = routerState;
102
+ this.storeState = storeState;
103
+ this.event = event;
104
+ this.trigger = trigger;
105
+ }
106
+ Object.defineProperty(RouterCancel, "type", {
107
+ get: /**
108
+ * @return {?}
109
+ */
110
+ function () {
111
+ // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
112
+ return '[Router] RouterCancel';
113
+ },
114
+ enumerable: true,
115
+ configurable: true
116
+ });
117
+ return RouterCancel;
118
+ }());
119
+ if (false) {
120
+ /** @type {?} */
121
+ RouterCancel.prototype.routerState;
122
+ /** @type {?} */
123
+ RouterCancel.prototype.storeState;
124
+ /** @type {?} */
125
+ RouterCancel.prototype.event;
126
+ /** @type {?} */
127
+ RouterCancel.prototype.trigger;
128
+ }
129
+ /**
130
+ * An action dispatched when the router errors.
131
+ * @template T, V
132
+ */
133
+ var /**
134
+ * An action dispatched when the router errors.
135
+ * @template T, V
136
+ */
137
+ RouterError = /** @class */ (function () {
138
+ function RouterError(routerState, storeState, event, trigger) {
139
+ if (trigger === void 0) { trigger = 'none'; }
140
+ this.routerState = routerState;
141
+ this.storeState = storeState;
142
+ this.event = event;
143
+ this.trigger = trigger;
144
+ }
145
+ Object.defineProperty(RouterError, "type", {
146
+ get: /**
147
+ * @return {?}
148
+ */
149
+ function () {
150
+ // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
151
+ return '[Router] RouterError';
152
+ },
153
+ enumerable: true,
154
+ configurable: true
155
+ });
156
+ return RouterError;
157
+ }());
158
+ if (false) {
159
+ /** @type {?} */
160
+ RouterError.prototype.routerState;
161
+ /** @type {?} */
162
+ RouterError.prototype.storeState;
163
+ /** @type {?} */
164
+ RouterError.prototype.event;
165
+ /** @type {?} */
166
+ RouterError.prototype.trigger;
167
+ }
168
+ /**
169
+ * An action dispatched when the `ResolveEnd` event is triggered.
170
+ * @template T
171
+ */
172
+ var /**
173
+ * An action dispatched when the `ResolveEnd` event is triggered.
174
+ * @template T
175
+ */
176
+ RouterDataResolved = /** @class */ (function () {
177
+ function RouterDataResolved(routerState, event, trigger) {
178
+ if (trigger === void 0) { trigger = 'none'; }
179
+ this.routerState = routerState;
180
+ this.event = event;
181
+ this.trigger = trigger;
182
+ }
183
+ Object.defineProperty(RouterDataResolved, "type", {
184
+ get: /**
185
+ * @return {?}
186
+ */
187
+ function () {
188
+ // NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
189
+ return '[Router] RouterDataResolved';
190
+ },
191
+ enumerable: true,
192
+ configurable: true
193
+ });
194
+ return RouterDataResolved;
195
+ }());
196
+ if (false) {
197
+ /** @type {?} */
198
+ RouterDataResolved.prototype.routerState;
199
+ /** @type {?} */
200
+ RouterDataResolved.prototype.event;
201
+ /** @type {?} */
202
+ RouterDataResolved.prototype.trigger;
206
203
  }
207
204
 
208
- /**
209
- * @fileoverview added by tsickle
210
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
211
- */
212
- /**
213
- * @abstract
214
- * @template T
215
- */
216
- var /**
217
- * @abstract
218
- * @template T
219
- */
220
- RouterStateSerializer = /** @class */ (function () {
221
- function RouterStateSerializer() {
222
- }
223
- return RouterStateSerializer;
224
- }());
225
- if (false) {
226
- /**
227
- * @abstract
228
- * @param {?} routerState
229
- * @return {?}
230
- */
231
- RouterStateSerializer.prototype.serialize = function (routerState) { };
232
- }
233
- /**
234
- * @record
235
- */
236
- function SerializedRouterStateSnapshot() { }
237
- if (false) {
238
- /** @type {?} */
239
- SerializedRouterStateSnapshot.prototype.root;
240
- /** @type {?} */
241
- SerializedRouterStateSnapshot.prototype.url;
242
- }
243
- var DefaultRouterStateSerializer = /** @class */ (function () {
244
- function DefaultRouterStateSerializer() {
245
- }
246
- /**
247
- * @param {?} routerState
248
- * @return {?}
249
- */
250
- DefaultRouterStateSerializer.prototype.serialize = /**
251
- * @param {?} routerState
252
- * @return {?}
253
- */
254
- function (routerState) {
255
- return {
256
- root: this.serializeRoute(routerState.root),
257
- url: routerState.url
258
- };
259
- };
260
- /**
261
- * @private
262
- * @param {?} route
263
- * @return {?}
264
- */
265
- DefaultRouterStateSerializer.prototype.serializeRoute = /**
266
- * @private
267
- * @param {?} route
268
- * @return {?}
269
- */
270
- function (route) {
271
- var _this = this;
272
- /** @type {?} */
273
- var children = route.children.map((/**
274
- * @param {?} c
275
- * @return {?}
276
- */
277
- function (c) { return _this.serializeRoute(c); }));
278
- return {
279
- url: route.url,
280
- params: route.params,
281
- queryParams: route.queryParams,
282
- fragment: route.fragment,
283
- data: route.data,
284
- outlet: route.outlet,
285
- component: null,
286
- routeConfig: null,
287
- root: (/** @type {?} */ (null)),
288
- parent: null,
289
- firstChild: children[0],
290
- children: children,
291
- pathFromRoot: (/** @type {?} */ (null)),
292
- paramMap: route.paramMap,
293
- queryParamMap: route.queryParamMap,
294
- toString: route.toString
295
- };
296
- };
297
- return DefaultRouterStateSerializer;
205
+ /**
206
+ * @fileoverview added by tsickle
207
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
208
+ */
209
+ /**
210
+ * @abstract
211
+ * @template T
212
+ */
213
+ var /**
214
+ * @abstract
215
+ * @template T
216
+ */
217
+ RouterStateSerializer = /** @class */ (function () {
218
+ function RouterStateSerializer() {
219
+ }
220
+ return RouterStateSerializer;
221
+ }());
222
+ if (false) {
223
+ /**
224
+ * @abstract
225
+ * @param {?} routerState
226
+ * @return {?}
227
+ */
228
+ RouterStateSerializer.prototype.serialize = function (routerState) { };
229
+ }
230
+ /**
231
+ * @record
232
+ */
233
+ function SerializedRouterStateSnapshot() { }
234
+ if (false) {
235
+ /** @type {?} */
236
+ SerializedRouterStateSnapshot.prototype.root;
237
+ /** @type {?} */
238
+ SerializedRouterStateSnapshot.prototype.url;
239
+ }
240
+ var DefaultRouterStateSerializer = /** @class */ (function () {
241
+ function DefaultRouterStateSerializer() {
242
+ }
243
+ /**
244
+ * @param {?} routerState
245
+ * @return {?}
246
+ */
247
+ DefaultRouterStateSerializer.prototype.serialize = /**
248
+ * @param {?} routerState
249
+ * @return {?}
250
+ */
251
+ function (routerState) {
252
+ return {
253
+ root: this.serializeRoute(routerState.root),
254
+ url: routerState.url
255
+ };
256
+ };
257
+ /**
258
+ * @private
259
+ * @param {?} route
260
+ * @return {?}
261
+ */
262
+ DefaultRouterStateSerializer.prototype.serializeRoute = /**
263
+ * @private
264
+ * @param {?} route
265
+ * @return {?}
266
+ */
267
+ function (route) {
268
+ var _this = this;
269
+ /** @type {?} */
270
+ var children = route.children.map((/**
271
+ * @param {?} c
272
+ * @return {?}
273
+ */
274
+ function (c) { return _this.serializeRoute(c); }));
275
+ return {
276
+ url: route.url,
277
+ params: route.params,
278
+ queryParams: route.queryParams,
279
+ fragment: route.fragment,
280
+ data: route.data,
281
+ outlet: route.outlet,
282
+ component: null,
283
+ routeConfig: null,
284
+ root: (/** @type {?} */ (null)),
285
+ parent: null,
286
+ firstChild: children[0],
287
+ children: children,
288
+ pathFromRoot: (/** @type {?} */ (null)),
289
+ paramMap: route.paramMap,
290
+ queryParamMap: route.queryParamMap,
291
+ toString: route.toString
292
+ };
293
+ };
294
+ return DefaultRouterStateSerializer;
298
295
  }());
299
296
 
300
- /**
301
- * @fileoverview added by tsickle
302
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
303
- */
304
- /**
305
- * @record
306
- * @template T
307
- */
308
- function RouterStateModel() { }
309
- if (false) {
310
- /** @type {?|undefined} */
311
- RouterStateModel.prototype.state;
312
- /** @type {?|undefined} */
313
- RouterStateModel.prototype.navigationId;
314
- /** @type {?} */
315
- RouterStateModel.prototype.trigger;
316
- }
317
- var RouterState = /** @class */ (function () {
318
- function RouterState(_store, _router, _serializer, _ngZone, _urlSerializer, _locationStrategy, _location) {
319
- this._store = _store;
320
- this._router = _router;
321
- this._serializer = _serializer;
322
- this._ngZone = _ngZone;
323
- this._urlSerializer = _urlSerializer;
324
- this._locationStrategy = _locationStrategy;
325
- this._location = _location;
326
- /**
327
- * Determines how navigation was performed by the `RouterState` itself
328
- * or outside via `new Navigate(...)`
329
- */
330
- this._trigger = 'none';
331
- /**
332
- * That's the serialized state from the `Router` class
333
- */
334
- this._routerState = null;
335
- /**
336
- * That's the value of the `RouterState` state
337
- */
338
- this._storeState = null;
339
- this._lastRoutesRecognized = (/** @type {?} */ (null));
340
- this._subscription = new Subscription();
341
- this.setUpStoreListener();
342
- this.setUpRouterEventsListener();
343
- this.checkInitialNavigationOnce();
344
- }
345
- RouterState_1 = RouterState;
346
- /**
347
- * @template T
348
- * @param {?} state
349
- * @return {?}
350
- */
351
- RouterState.state = /**
352
- * @template T
353
- * @param {?} state
354
- * @return {?}
355
- */
356
- function (state) {
357
- return state && state.state;
358
- };
359
- /**
360
- * @param {?} state
361
- * @return {?}
362
- */
363
- RouterState.url = /**
364
- * @param {?} state
365
- * @return {?}
366
- */
367
- function (state) {
368
- return state && state.state && state.state.url;
369
- };
370
- /**
371
- * @return {?}
372
- */
373
- RouterState.prototype.ngOnDestroy = /**
374
- * @return {?}
375
- */
376
- function () {
377
- this._subscription.unsubscribe();
378
- };
379
- /**
380
- * @param {?} _
381
- * @param {?} action
382
- * @return {?}
383
- */
384
- RouterState.prototype.navigate = /**
385
- * @param {?} _
386
- * @param {?} action
387
- * @return {?}
388
- */
389
- function (_, action) {
390
- var _this = this;
391
- return this._ngZone.run((/**
392
- * @return {?}
393
- */
394
- function () {
395
- return _this._router.navigate(action.path, __assign({ queryParams: action.queryParams }, action.extras));
396
- }));
397
- };
398
- /**
399
- * @param {?} ctx
400
- * @param {?} action
401
- * @return {?}
402
- */
403
- RouterState.prototype.angularRouterAction = /**
404
- * @param {?} ctx
405
- * @param {?} action
406
- * @return {?}
407
- */
408
- function (ctx, action) {
409
- ctx.setState(__assign({}, ctx.getState(), { trigger: action.trigger, state: action.routerState, navigationId: action.event.id }));
410
- };
411
- /**
412
- * @private
413
- * @return {?}
414
- */
415
- RouterState.prototype.setUpStoreListener = /**
416
- * @private
417
- * @return {?}
418
- */
419
- function () {
420
- var _this = this;
421
- /** @type {?} */
422
- var subscription = this._store
423
- .select(RouterState_1)
424
- .subscribe((/**
425
- * @param {?} state
426
- * @return {?}
427
- */
428
- function (state) {
429
- _this.navigateIfNeeded(state);
430
- }));
431
- this._subscription.add(subscription);
432
- };
433
- /**
434
- * @private
435
- * @return {?}
436
- */
437
- RouterState.prototype.setUpRouterEventsListener = /**
438
- * @private
439
- * @return {?}
440
- */
441
- function () {
442
- var _this = this;
443
- /** @type {?} */
444
- var subscription = this._router.events.subscribe((/**
445
- * @param {?} event
446
- * @return {?}
447
- */
448
- function (event) {
449
- if (event instanceof NavigationStart) {
450
- _this.navigationStart();
451
- }
452
- else if (event instanceof RoutesRecognized) {
453
- _this._lastRoutesRecognized = event;
454
- }
455
- else if (event instanceof ResolveEnd) {
456
- _this.dispatchRouterDataResolved(event);
457
- }
458
- else if (event instanceof NavigationCancel) {
459
- _this.dispatchRouterCancel(event);
460
- _this.reset();
461
- }
462
- else if (event instanceof NavigationError) {
463
- _this.dispatchRouterError(event);
464
- _this.reset();
465
- }
466
- else if (event instanceof NavigationEnd) {
467
- _this.navigationEnd();
468
- _this.reset();
469
- }
470
- }));
471
- this._subscription.add(subscription);
472
- };
473
- /**
474
- * @private
475
- * @return {?}
476
- */
477
- RouterState.prototype.navigationStart = /**
478
- * @private
479
- * @return {?}
480
- */
481
- function () {
482
- this._routerState = this._serializer.serialize(this._router.routerState.snapshot);
483
- if (this._trigger !== 'none') {
484
- this._storeState = this._store.selectSnapshot(RouterState_1);
485
- }
486
- };
487
- /**
488
- * @private
489
- * @return {?}
490
- */
491
- RouterState.prototype.navigationEnd = /**
492
- * @private
493
- * @return {?}
494
- */
495
- function () {
496
- if (this.shouldDispatchRouterNavigation()) {
497
- this.dispatchRouterNavigation();
498
- }
499
- };
500
- /**
501
- * @private
502
- * @return {?}
503
- */
504
- RouterState.prototype.shouldDispatchRouterNavigation = /**
505
- * @private
506
- * @return {?}
507
- */
508
- function () {
509
- if (!this._storeState)
510
- return true;
511
- return this._trigger !== 'store';
512
- };
513
- /**
514
- * @private
515
- * @param {?} state
516
- * @return {?}
517
- */
518
- RouterState.prototype.navigateIfNeeded = /**
519
- * @private
520
- * @param {?} state
521
- * @return {?}
522
- */
523
- function (state) {
524
- var _this = this;
525
- /** @type {?} */
526
- var canSkipNavigation = !this._storeState ||
527
- !this._storeState.state ||
528
- !state ||
529
- state.trigger === 'router' ||
530
- this._router.url === this._storeState.state.url;
531
- if (canSkipNavigation) {
532
- return;
533
- }
534
- this._trigger = 'store';
535
- this._ngZone.run((/**
536
- * @return {?}
537
- */
538
- function () {
539
- _this._router.navigateByUrl((/** @type {?} */ ((/** @type {?} */ (_this._storeState)).state)).url);
540
- }));
541
- };
542
- /**
543
- * @private
544
- * @return {?}
545
- */
546
- RouterState.prototype.dispatchRouterNavigation = /**
547
- * @private
548
- * @return {?}
549
- */
550
- function () {
551
- /** @type {?} */
552
- var nextRouterState = this._serializer.serialize(this._lastRoutesRecognized.state);
553
- this.dispatchRouterAction(new RouterNavigation(nextRouterState, new RoutesRecognized(this._lastRoutesRecognized.id, this._lastRoutesRecognized.url, this._lastRoutesRecognized.urlAfterRedirects, nextRouterState), this._trigger));
554
- };
555
- /**
556
- * @private
557
- * @param {?} event
558
- * @return {?}
559
- */
560
- RouterState.prototype.dispatchRouterCancel = /**
561
- * @private
562
- * @param {?} event
563
- * @return {?}
564
- */
565
- function (event) {
566
- this.dispatchRouterAction(new RouterCancel((/** @type {?} */ (this._routerState)), this._storeState, event, this._trigger));
567
- };
568
- /**
569
- * @private
570
- * @param {?} event
571
- * @return {?}
572
- */
573
- RouterState.prototype.dispatchRouterError = /**
574
- * @private
575
- * @param {?} event
576
- * @return {?}
577
- */
578
- function (event) {
579
- this.dispatchRouterAction(new RouterError((/** @type {?} */ (this._routerState)), this._storeState, new NavigationError(event.id, event.url, "" + event), this._trigger));
580
- };
581
- /**
582
- * @private
583
- * @template T
584
- * @param {?} action
585
- * @return {?}
586
- */
587
- RouterState.prototype.dispatchRouterAction = /**
588
- * @private
589
- * @template T
590
- * @param {?} action
591
- * @return {?}
592
- */
593
- function (action) {
594
- this._trigger = 'router';
595
- try {
596
- this._store.dispatch(action);
597
- }
598
- finally {
599
- this._trigger = 'none';
600
- }
601
- };
602
- /**
603
- * @private
604
- * @param {?} event
605
- * @return {?}
606
- */
607
- RouterState.prototype.dispatchRouterDataResolved = /**
608
- * @private
609
- * @param {?} event
610
- * @return {?}
611
- */
612
- function (event) {
613
- /** @type {?} */
614
- var routerState = this._serializer.serialize(event.state);
615
- this.dispatchRouterAction(new RouterDataResolved(routerState, event, this._trigger));
616
- };
617
- /**
618
- * @private
619
- * @return {?}
620
- */
621
- RouterState.prototype.reset = /**
622
- * @private
623
- * @return {?}
624
- */
625
- function () {
626
- this._trigger = 'none';
627
- this._storeState = null;
628
- this._routerState = null;
629
- };
630
- /**
631
- * No sense to mess up the `setUpRouterEventsListener` method as we have
632
- * to perform this check only once and unsubscribe after the first event
633
- * is triggered
634
- */
635
- /**
636
- * No sense to mess up the `setUpRouterEventsListener` method as we have
637
- * to perform this check only once and unsubscribe after the first event
638
- * is triggered
639
- * @private
640
- * @return {?}
641
- */
642
- RouterState.prototype.checkInitialNavigationOnce = /**
643
- * No sense to mess up the `setUpRouterEventsListener` method as we have
644
- * to perform this check only once and unsubscribe after the first event
645
- * is triggered
646
- * @private
647
- * @return {?}
648
- */
649
- function () {
650
- var _this = this;
651
- // Caretaker note: we have still left the `typeof` condition in order to avoid
652
- // creating a breaking change for projects that still use the View Engine.
653
- if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
654
- // Angular is running tests in development mode thus we can be sure that this method will be
655
- // skipped in tests.
656
- isAngularInTestMode()) {
657
- return;
658
- }
659
- /** @type {?} */
660
- var subscription = this._router.events
661
- .pipe(first((/**
662
- * @param {?} event
663
- * @return {?}
664
- */
665
- function (event) { return event instanceof RoutesRecognized; })))
666
- .subscribe((/**
667
- * @param {?} __0
668
- * @return {?}
669
- */
670
- function (_a) {
671
- // `location.pathname` always equals manually entered URL in the address bar
672
- // e.g. `location.pathname === '/foo'`, but the `router` state has been initialized
673
- // with another URL (e.g. used in combination with `NgxsStoragePlugin`), thus the
674
- // `RouterNavigation` action will be dispatched and the user will be redirected to the
675
- // previously saved URL. We want to prevent such behavior, so we perform this check
676
- var url = _a.url;
677
- // `location.pathname` always equals manually entered URL in the address bar
678
- // e.g. `location.pathname === '/foo'`, but the `router` state has been initialized
679
- // with another URL (e.g. used in combination with `NgxsStoragePlugin`), thus the
680
- // `RouterNavigation` action will be dispatched and the user will be redirected to the
681
- // previously saved URL. We want to prevent such behavior, so we perform this check
682
- // `url` is a recognized URL by the Angular's router, while `currentUrl` is an actual URL
683
- // entered in the browser's address bar
684
- // `PathLocationStrategy.prototype.path()` returns a concatenation of
685
- // `PlatformLocation.pathname` and normalized `PlatformLocation.search`.
686
- // `Location.prototype.normalize` strips base href from the URL,
687
- // if `baseHref` (declared in angular.json) for example is `/en`
688
- // and the URL is `/test#anchor` - then `_locationStrategy.path(true)` will return `/en/test#anchor`,
689
- // but `/en/test#anchor` is not known to the Angular's router, so we have to strip `/en`
690
- // from the URL
691
- /** @type {?} */
692
- var currentUrl = _this._location.normalize(_this._locationStrategy.path(true));
693
- /** @type {?} */
694
- var currentUrlTree = _this._urlSerializer.parse(currentUrl);
695
- // We need to serialize the URL because in that example `/test/?redirect=https://google.com/`
696
- // Angular will recognize it as `/test?redirect=https:%2F%2Fwww.google.com%2F`
697
- // so we have to run the `currentUrl` via the `UrlSerializer` that will encode characters
698
- /** @type {?} */
699
- var currentSerializedUrl = _this._urlSerializer.serialize(currentUrlTree);
700
- // If URLs differ from each other - we've got to perform a redirect to the manually entered URL
701
- // in the address bar, as it must have a priority
702
- if (currentSerializedUrl !== url) {
703
- _this._router.navigateByUrl(currentUrl);
704
- }
705
- }));
706
- this._subscription.add(subscription);
707
- };
708
- var RouterState_1;
709
- RouterState.ctorParameters = function () { return [
710
- { type: Store },
711
- { type: Router },
712
- { type: RouterStateSerializer },
713
- { type: NgZone },
714
- { type: UrlSerializer },
715
- { type: LocationStrategy },
716
- { type: Location }
717
- ]; };
718
- RouterState.decorators = [
719
- { type: Injectable }
720
- ];
721
- /** @nocollapse */
722
- RouterState.ctorParameters = function () { return [
723
- { type: Store },
724
- { type: Router },
725
- { type: RouterStateSerializer },
726
- { type: NgZone },
727
- { type: UrlSerializer },
728
- { type: LocationStrategy },
729
- { type: Location }
730
- ]; };
731
- __decorate([
732
- Action(Navigate),
733
- __metadata("design:type", Function),
734
- __metadata("design:paramtypes", [Object, Navigate]),
735
- __metadata("design:returntype", void 0)
736
- ], RouterState.prototype, "navigate", null);
737
- __decorate([
738
- Action([RouterNavigation, RouterError, RouterCancel, RouterDataResolved]),
739
- __metadata("design:type", Function),
740
- __metadata("design:paramtypes", [Object, Object]),
741
- __metadata("design:returntype", void 0)
742
- ], RouterState.prototype, "angularRouterAction", null);
743
- __decorate([
744
- Selector(),
745
- __metadata("design:type", Function),
746
- __metadata("design:paramtypes", [Object]),
747
- __metadata("design:returntype", void 0)
748
- ], RouterState, "state", null);
749
- __decorate([
750
- Selector(),
751
- __metadata("design:type", Function),
752
- __metadata("design:paramtypes", [Object]),
753
- __metadata("design:returntype", Object)
754
- ], RouterState, "url", null);
755
- RouterState = RouterState_1 = __decorate([
756
- State({
757
- name: 'router',
758
- defaults: {
759
- state: undefined,
760
- navigationId: undefined,
761
- trigger: 'none'
762
- }
763
- }),
764
- __metadata("design:paramtypes", [Store,
765
- Router,
766
- RouterStateSerializer,
767
- NgZone,
768
- UrlSerializer,
769
- LocationStrategy,
770
- Location])
771
- ], RouterState);
772
- return RouterState;
773
- }());
774
- if (false) {
775
- /**
776
- * Determines how navigation was performed by the `RouterState` itself
777
- * or outside via `new Navigate(...)`
778
- * @type {?}
779
- * @private
780
- */
781
- RouterState.prototype._trigger;
782
- /**
783
- * That's the serialized state from the `Router` class
784
- * @type {?}
785
- * @private
786
- */
787
- RouterState.prototype._routerState;
788
- /**
789
- * That's the value of the `RouterState` state
790
- * @type {?}
791
- * @private
792
- */
793
- RouterState.prototype._storeState;
794
- /**
795
- * @type {?}
796
- * @private
797
- */
798
- RouterState.prototype._lastRoutesRecognized;
799
- /**
800
- * @type {?}
801
- * @private
802
- */
803
- RouterState.prototype._subscription;
804
- /**
805
- * @type {?}
806
- * @private
807
- */
808
- RouterState.prototype._store;
809
- /**
810
- * @type {?}
811
- * @private
812
- */
813
- RouterState.prototype._router;
814
- /**
815
- * @type {?}
816
- * @private
817
- */
818
- RouterState.prototype._serializer;
819
- /**
820
- * @type {?}
821
- * @private
822
- */
823
- RouterState.prototype._ngZone;
824
- /**
825
- * @type {?}
826
- * @private
827
- */
828
- RouterState.prototype._urlSerializer;
829
- /**
830
- * @type {?}
831
- * @private
832
- */
833
- RouterState.prototype._locationStrategy;
834
- /**
835
- * @type {?}
836
- * @private
837
- */
838
- RouterState.prototype._location;
297
+ /**
298
+ * @fileoverview added by tsickle
299
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
300
+ */
301
+ /**
302
+ * @record
303
+ * @template T
304
+ */
305
+ function RouterStateModel() { }
306
+ if (false) {
307
+ /** @type {?|undefined} */
308
+ RouterStateModel.prototype.state;
309
+ /** @type {?|undefined} */
310
+ RouterStateModel.prototype.navigationId;
311
+ /** @type {?} */
312
+ RouterStateModel.prototype.trigger;
313
+ }
314
+ var RouterState = /** @class */ (function () {
315
+ function RouterState(_store, _router, _serializer, _ngZone) {
316
+ this._store = _store;
317
+ this._router = _router;
318
+ this._serializer = _serializer;
319
+ this._ngZone = _ngZone;
320
+ /**
321
+ * Determines how navigation was performed by the `RouterState` itself
322
+ * or outside via `new Navigate(...)`
323
+ */
324
+ this._trigger = 'none';
325
+ /**
326
+ * That's the serialized state from the `Router` class
327
+ */
328
+ this._routerState = null;
329
+ /**
330
+ * That's the value of the `RouterState` state
331
+ */
332
+ this._storeState = null;
333
+ this._lastRoutesRecognized = (/** @type {?} */ (null));
334
+ this._subscription = new Subscription();
335
+ this.setUpStoreListener();
336
+ this.setUpRouterEventsListener();
337
+ }
338
+ RouterState_1 = RouterState;
339
+ /**
340
+ * @template T
341
+ * @param {?} state
342
+ * @return {?}
343
+ */
344
+ RouterState.state = /**
345
+ * @template T
346
+ * @param {?} state
347
+ * @return {?}
348
+ */
349
+ function (state) {
350
+ return state && state.state;
351
+ };
352
+ /**
353
+ * @param {?} state
354
+ * @return {?}
355
+ */
356
+ RouterState.url = /**
357
+ * @param {?} state
358
+ * @return {?}
359
+ */
360
+ function (state) {
361
+ return state && state.state && state.state.url;
362
+ };
363
+ /**
364
+ * @return {?}
365
+ */
366
+ RouterState.prototype.ngOnDestroy = /**
367
+ * @return {?}
368
+ */
369
+ function () {
370
+ this._subscription.unsubscribe();
371
+ };
372
+ /**
373
+ * @param {?} _
374
+ * @param {?} action
375
+ * @return {?}
376
+ */
377
+ RouterState.prototype.navigate = /**
378
+ * @param {?} _
379
+ * @param {?} action
380
+ * @return {?}
381
+ */
382
+ function (_, action) {
383
+ var _this = this;
384
+ return this._ngZone.run((/**
385
+ * @return {?}
386
+ */
387
+ function () {
388
+ return _this._router.navigate(action.path, __assign({ queryParams: action.queryParams }, action.extras));
389
+ }));
390
+ };
391
+ /**
392
+ * @param {?} ctx
393
+ * @param {?} action
394
+ * @return {?}
395
+ */
396
+ RouterState.prototype.angularRouterAction = /**
397
+ * @param {?} ctx
398
+ * @param {?} action
399
+ * @return {?}
400
+ */
401
+ function (ctx, action) {
402
+ ctx.setState(__assign({}, ctx.getState(), { trigger: action.trigger, state: action.routerState, navigationId: action.event.id }));
403
+ };
404
+ /**
405
+ * @private
406
+ * @return {?}
407
+ */
408
+ RouterState.prototype.setUpStoreListener = /**
409
+ * @private
410
+ * @return {?}
411
+ */
412
+ function () {
413
+ var _this = this;
414
+ /** @type {?} */
415
+ var subscription = this._store
416
+ .select(RouterState_1)
417
+ .subscribe((/**
418
+ * @param {?} state
419
+ * @return {?}
420
+ */
421
+ function (state) {
422
+ _this.navigateIfNeeded(state);
423
+ }));
424
+ this._subscription.add(subscription);
425
+ };
426
+ /**
427
+ * @private
428
+ * @return {?}
429
+ */
430
+ RouterState.prototype.setUpRouterEventsListener = /**
431
+ * @private
432
+ * @return {?}
433
+ */
434
+ function () {
435
+ var _this = this;
436
+ /** @type {?} */
437
+ var subscription = this._router.events.subscribe((/**
438
+ * @param {?} event
439
+ * @return {?}
440
+ */
441
+ function (event) {
442
+ if (event instanceof NavigationStart) {
443
+ _this.navigationStart();
444
+ }
445
+ else if (event instanceof RoutesRecognized) {
446
+ _this._lastRoutesRecognized = event;
447
+ }
448
+ else if (event instanceof ResolveEnd) {
449
+ _this.dispatchRouterDataResolved(event);
450
+ }
451
+ else if (event instanceof NavigationCancel) {
452
+ _this.dispatchRouterCancel(event);
453
+ _this.reset();
454
+ }
455
+ else if (event instanceof NavigationError) {
456
+ _this.dispatchRouterError(event);
457
+ _this.reset();
458
+ }
459
+ else if (event instanceof NavigationEnd) {
460
+ _this.navigationEnd();
461
+ _this.reset();
462
+ }
463
+ }));
464
+ this._subscription.add(subscription);
465
+ };
466
+ /**
467
+ * @private
468
+ * @return {?}
469
+ */
470
+ RouterState.prototype.navigationStart = /**
471
+ * @private
472
+ * @return {?}
473
+ */
474
+ function () {
475
+ this._routerState = this._serializer.serialize(this._router.routerState.snapshot);
476
+ if (this._trigger !== 'none') {
477
+ this._storeState = this._store.selectSnapshot(RouterState_1);
478
+ }
479
+ };
480
+ /**
481
+ * @private
482
+ * @return {?}
483
+ */
484
+ RouterState.prototype.navigationEnd = /**
485
+ * @private
486
+ * @return {?}
487
+ */
488
+ function () {
489
+ if (this.shouldDispatchRouterNavigation()) {
490
+ this.dispatchRouterNavigation();
491
+ }
492
+ };
493
+ /**
494
+ * @private
495
+ * @return {?}
496
+ */
497
+ RouterState.prototype.shouldDispatchRouterNavigation = /**
498
+ * @private
499
+ * @return {?}
500
+ */
501
+ function () {
502
+ if (!this._storeState)
503
+ return true;
504
+ return this._trigger !== 'store';
505
+ };
506
+ /**
507
+ * @private
508
+ * @param {?} state
509
+ * @return {?}
510
+ */
511
+ RouterState.prototype.navigateIfNeeded = /**
512
+ * @private
513
+ * @param {?} state
514
+ * @return {?}
515
+ */
516
+ function (state) {
517
+ var _this = this;
518
+ if (state && state.trigger === 'devtools') {
519
+ this._storeState = this._store.selectSnapshot(RouterState_1);
520
+ }
521
+ /** @type {?} */
522
+ var canSkipNavigation = !this._storeState ||
523
+ !this._storeState.state ||
524
+ !state ||
525
+ state.trigger === 'router' ||
526
+ this._router.url === this._storeState.state.url;
527
+ if (canSkipNavigation) {
528
+ return;
529
+ }
530
+ this._trigger = 'store';
531
+ this._ngZone.run((/**
532
+ * @return {?}
533
+ */
534
+ function () {
535
+ _this._router.navigateByUrl((/** @type {?} */ ((/** @type {?} */ (_this._storeState)).state)).url);
536
+ }));
537
+ };
538
+ /**
539
+ * @private
540
+ * @return {?}
541
+ */
542
+ RouterState.prototype.dispatchRouterNavigation = /**
543
+ * @private
544
+ * @return {?}
545
+ */
546
+ function () {
547
+ /** @type {?} */
548
+ var nextRouterState = this._serializer.serialize(this._lastRoutesRecognized.state);
549
+ this.dispatchRouterAction(new RouterNavigation(nextRouterState, new RoutesRecognized(this._lastRoutesRecognized.id, this._lastRoutesRecognized.url, this._lastRoutesRecognized.urlAfterRedirects, nextRouterState), this._trigger));
550
+ };
551
+ /**
552
+ * @private
553
+ * @param {?} event
554
+ * @return {?}
555
+ */
556
+ RouterState.prototype.dispatchRouterCancel = /**
557
+ * @private
558
+ * @param {?} event
559
+ * @return {?}
560
+ */
561
+ function (event) {
562
+ this.dispatchRouterAction(new RouterCancel((/** @type {?} */ (this._routerState)), this._storeState, event, this._trigger));
563
+ };
564
+ /**
565
+ * @private
566
+ * @param {?} event
567
+ * @return {?}
568
+ */
569
+ RouterState.prototype.dispatchRouterError = /**
570
+ * @private
571
+ * @param {?} event
572
+ * @return {?}
573
+ */
574
+ function (event) {
575
+ this.dispatchRouterAction(new RouterError((/** @type {?} */ (this._routerState)), this._storeState, new NavigationError(event.id, event.url, "" + event), this._trigger));
576
+ };
577
+ /**
578
+ * @private
579
+ * @template T
580
+ * @param {?} action
581
+ * @return {?}
582
+ */
583
+ RouterState.prototype.dispatchRouterAction = /**
584
+ * @private
585
+ * @template T
586
+ * @param {?} action
587
+ * @return {?}
588
+ */
589
+ function (action) {
590
+ this._trigger = 'router';
591
+ try {
592
+ this._store.dispatch(action);
593
+ }
594
+ finally {
595
+ this._trigger = 'none';
596
+ }
597
+ };
598
+ /**
599
+ * @private
600
+ * @param {?} event
601
+ * @return {?}
602
+ */
603
+ RouterState.prototype.dispatchRouterDataResolved = /**
604
+ * @private
605
+ * @param {?} event
606
+ * @return {?}
607
+ */
608
+ function (event) {
609
+ /** @type {?} */
610
+ var routerState = this._serializer.serialize(event.state);
611
+ this.dispatchRouterAction(new RouterDataResolved(routerState, event, this._trigger));
612
+ };
613
+ /**
614
+ * @private
615
+ * @return {?}
616
+ */
617
+ RouterState.prototype.reset = /**
618
+ * @private
619
+ * @return {?}
620
+ */
621
+ function () {
622
+ this._trigger = 'none';
623
+ this._storeState = null;
624
+ this._routerState = null;
625
+ };
626
+ var RouterState_1;
627
+ RouterState.ctorParameters = function () { return [
628
+ { type: Store },
629
+ { type: Router },
630
+ { type: RouterStateSerializer },
631
+ { type: NgZone }
632
+ ]; };
633
+ RouterState.decorators = [
634
+ { type: Injectable }
635
+ ];
636
+ /** @nocollapse */
637
+ RouterState.ctorParameters = function () { return [
638
+ { type: Store },
639
+ { type: Router },
640
+ { type: RouterStateSerializer },
641
+ { type: NgZone }
642
+ ]; };
643
+ __decorate([
644
+ Action(Navigate),
645
+ __metadata("design:type", Function),
646
+ __metadata("design:paramtypes", [Object, Navigate]),
647
+ __metadata("design:returntype", void 0)
648
+ ], RouterState.prototype, "navigate", null);
649
+ __decorate([
650
+ Action([RouterNavigation, RouterError, RouterCancel, RouterDataResolved]),
651
+ __metadata("design:type", Function),
652
+ __metadata("design:paramtypes", [Object, Object]),
653
+ __metadata("design:returntype", void 0)
654
+ ], RouterState.prototype, "angularRouterAction", null);
655
+ __decorate([
656
+ Selector(),
657
+ __metadata("design:type", Function),
658
+ __metadata("design:paramtypes", [Object]),
659
+ __metadata("design:returntype", void 0)
660
+ ], RouterState, "state", null);
661
+ __decorate([
662
+ Selector(),
663
+ __metadata("design:type", Function),
664
+ __metadata("design:paramtypes", [Object]),
665
+ __metadata("design:returntype", Object)
666
+ ], RouterState, "url", null);
667
+ RouterState = RouterState_1 = __decorate([
668
+ State({
669
+ name: 'router',
670
+ defaults: {
671
+ state: undefined,
672
+ navigationId: undefined,
673
+ trigger: 'none'
674
+ }
675
+ }),
676
+ __metadata("design:paramtypes", [Store,
677
+ Router,
678
+ RouterStateSerializer,
679
+ NgZone])
680
+ ], RouterState);
681
+ return RouterState;
682
+ }());
683
+ if (false) {
684
+ /**
685
+ * Determines how navigation was performed by the `RouterState` itself
686
+ * or outside via `new Navigate(...)`
687
+ * @type {?}
688
+ * @private
689
+ */
690
+ RouterState.prototype._trigger;
691
+ /**
692
+ * That's the serialized state from the `Router` class
693
+ * @type {?}
694
+ * @private
695
+ */
696
+ RouterState.prototype._routerState;
697
+ /**
698
+ * That's the value of the `RouterState` state
699
+ * @type {?}
700
+ * @private
701
+ */
702
+ RouterState.prototype._storeState;
703
+ /**
704
+ * @type {?}
705
+ * @private
706
+ */
707
+ RouterState.prototype._lastRoutesRecognized;
708
+ /**
709
+ * @type {?}
710
+ * @private
711
+ */
712
+ RouterState.prototype._subscription;
713
+ /**
714
+ * @type {?}
715
+ * @private
716
+ */
717
+ RouterState.prototype._store;
718
+ /**
719
+ * @type {?}
720
+ * @private
721
+ */
722
+ RouterState.prototype._router;
723
+ /**
724
+ * @type {?}
725
+ * @private
726
+ */
727
+ RouterState.prototype._serializer;
728
+ /**
729
+ * @type {?}
730
+ * @private
731
+ */
732
+ RouterState.prototype._ngZone;
839
733
  }
840
734
 
841
- /**
842
- * @fileoverview added by tsickle
843
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
844
- */
845
- var NgxsRouterPluginModule = /** @class */ (function () {
846
- function NgxsRouterPluginModule() {
847
- }
848
- /**
849
- * @return {?}
850
- */
851
- NgxsRouterPluginModule.forRoot = /**
852
- * @return {?}
853
- */
854
- function () {
855
- return {
856
- ngModule: NgxsRouterPluginModule,
857
- providers: [{ provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }]
858
- };
859
- };
860
- NgxsRouterPluginModule.decorators = [
861
- { type: NgModule, args: [{
862
- imports: [NgxsModule.forFeature([RouterState])]
863
- },] }
864
- ];
865
- return NgxsRouterPluginModule;
735
+ /**
736
+ * @fileoverview added by tsickle
737
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
738
+ */
739
+ var NgxsRouterPluginModule = /** @class */ (function () {
740
+ function NgxsRouterPluginModule() {
741
+ }
742
+ /**
743
+ * @return {?}
744
+ */
745
+ NgxsRouterPluginModule.forRoot = /**
746
+ * @return {?}
747
+ */
748
+ function () {
749
+ return {
750
+ ngModule: NgxsRouterPluginModule,
751
+ providers: [{ provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }]
752
+ };
753
+ };
754
+ NgxsRouterPluginModule.decorators = [
755
+ { type: NgModule, args: [{
756
+ imports: [NgxsModule.forFeature([RouterState])]
757
+ },] }
758
+ ];
759
+ return NgxsRouterPluginModule;
866
760
  }());
867
761
 
868
- /**
869
- * @fileoverview added by tsickle
870
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
762
+ /**
763
+ * @fileoverview added by tsickle
764
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
871
765
  */
872
766
 
873
- /**
874
- * @fileoverview added by tsickle
875
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
767
+ /**
768
+ * @fileoverview added by tsickle
769
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
876
770
  */
877
771
 
878
- /**
879
- * @fileoverview added by tsickle
880
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
772
+ /**
773
+ * @fileoverview added by tsickle
774
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
881
775
  */
882
776
 
883
777
  export { DefaultRouterStateSerializer, Navigate, NgxsRouterPluginModule, RouterCancel, RouterDataResolved, RouterError, RouterNavigation, RouterState, RouterStateSerializer };