@ngxs/router-plugin 3.7.6 → 3.8.0-dev.master-c341c15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngxs-router-plugin.umd.js +590 -769
- package/bundles/ngxs-router-plugin.umd.js.map +1 -1
- package/esm2015/index.js +2 -6
- package/esm2015/ngxs-router-plugin.js +2 -6
- package/esm2015/src/public_api.js +2 -6
- package/esm2015/src/router.actions.js +28 -94
- package/esm2015/src/router.module.js +23 -15
- package/esm2015/src/router.state.js +126 -272
- package/esm2015/src/serializer.js +4 -44
- package/esm2015/src/symbols.js +9 -0
- package/fesm2015/ngxs-router-plugin.js +168 -412
- package/fesm2015/ngxs-router-plugin.js.map +1 -1
- package/ngxs-router-plugin.d.ts +1 -1
- package/package.json +5 -8
- package/src/public_api.d.ts +1 -0
- package/src/router.actions.d.ts +27 -7
- package/src/router.module.d.ts +7 -1
- package/src/router.state.d.ts +24 -15
- package/src/symbols.d.ts +11 -0
- package/bundles/ngxs-router-plugin.umd.min.js +0 -16
- package/bundles/ngxs-router-plugin.umd.min.js.map +0 -1
- package/esm5/index.js +0 -9
- package/esm5/ngxs-router-plugin.js +0 -9
- package/esm5/src/public_api.js +0 -9
- package/esm5/src/router.actions.js +0 -227
- package/esm5/src/router.module.js +0 -32
- package/esm5/src/router.state.js +0 -446
- package/esm5/src/serializer.js +0 -98
- package/fesm5/ngxs-router-plugin.js +0 -778
- package/fesm5/ngxs-router-plugin.js.map +0 -1
- package/ngxs-router-plugin.metadata.json +0 -1
|
@@ -1,284 +1,406 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngxs/store'), require('@angular/router'), require('rxjs')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@ngxs/router-plugin', ['exports', '@angular/core', '@ngxs/store', '@angular/router', 'rxjs'], factory) :
|
|
4
|
-
(global = global || self, factory((global.ngxs = global.ngxs || {}, global.ngxs[
|
|
5
|
-
}(this, function (exports,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ngxs = global.ngxs || {}, global.ngxs["router-plugin"] = {}), global.ng.core, global["ngxs-store"], global.ng.router, global.rxjs));
|
|
5
|
+
})(this, (function (exports, i0, i1, i2, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
+
|
|
29
|
+
/******************************************************************************
|
|
30
|
+
Copyright (c) Microsoft Corporation.
|
|
31
|
+
|
|
32
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
33
|
+
purpose with or without fee is hereby granted.
|
|
34
|
+
|
|
35
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
36
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
37
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
38
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
39
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
40
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
41
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
42
|
+
***************************************************************************** */
|
|
43
|
+
/* global Reflect, Promise */
|
|
44
|
+
var extendStatics = function (d, b) {
|
|
45
|
+
extendStatics = Object.setPrototypeOf ||
|
|
46
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
47
|
+
function (d, b) { for (var p in b)
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
49
|
+
d[p] = b[p]; };
|
|
50
|
+
return extendStatics(d, b);
|
|
51
|
+
};
|
|
52
|
+
function __extends(d, b) {
|
|
53
|
+
if (typeof b !== "function" && b !== null)
|
|
54
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
55
|
+
extendStatics(d, b);
|
|
56
|
+
function __() { this.constructor = d; }
|
|
57
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
58
|
+
}
|
|
59
|
+
var __assign = function () {
|
|
60
|
+
__assign = Object.assign || function __assign(t) {
|
|
61
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
62
|
+
s = arguments[i];
|
|
63
|
+
for (var p in s)
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
65
|
+
t[p] = s[p];
|
|
66
|
+
}
|
|
67
|
+
return t;
|
|
68
|
+
};
|
|
69
|
+
return __assign.apply(this, arguments);
|
|
70
|
+
};
|
|
71
|
+
function __rest(s, e) {
|
|
72
|
+
var t = {};
|
|
73
|
+
for (var p in s)
|
|
74
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
75
|
+
t[p] = s[p];
|
|
76
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
77
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
78
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
79
|
+
t[p[i]] = s[p[i]];
|
|
80
|
+
}
|
|
81
|
+
return t;
|
|
82
|
+
}
|
|
83
|
+
function __decorate(decorators, target, key, desc) {
|
|
84
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
85
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
86
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
87
|
+
else
|
|
88
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
89
|
+
if (d = decorators[i])
|
|
90
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
91
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
92
|
+
}
|
|
93
|
+
function __param(paramIndex, decorator) {
|
|
94
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
95
|
+
}
|
|
96
|
+
function __metadata(metadataKey, metadataValue) {
|
|
97
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
98
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
99
|
+
}
|
|
100
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
101
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
102
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
103
|
+
function fulfilled(value) { try {
|
|
104
|
+
step(generator.next(value));
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
reject(e);
|
|
108
|
+
} }
|
|
109
|
+
function rejected(value) { try {
|
|
110
|
+
step(generator["throw"](value));
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
reject(e);
|
|
114
|
+
} }
|
|
115
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
116
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function __generator(thisArg, body) {
|
|
120
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
121
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
122
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
123
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
124
|
+
function step(op) {
|
|
125
|
+
if (f)
|
|
126
|
+
throw new TypeError("Generator is already executing.");
|
|
127
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
128
|
+
try {
|
|
129
|
+
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)
|
|
130
|
+
return t;
|
|
131
|
+
if (y = 0, t)
|
|
132
|
+
op = [op[0] & 2, t.value];
|
|
133
|
+
switch (op[0]) {
|
|
134
|
+
case 0:
|
|
135
|
+
case 1:
|
|
136
|
+
t = op;
|
|
137
|
+
break;
|
|
138
|
+
case 4:
|
|
139
|
+
_.label++;
|
|
140
|
+
return { value: op[1], done: false };
|
|
141
|
+
case 5:
|
|
142
|
+
_.label++;
|
|
143
|
+
y = op[1];
|
|
144
|
+
op = [0];
|
|
145
|
+
continue;
|
|
146
|
+
case 7:
|
|
147
|
+
op = _.ops.pop();
|
|
148
|
+
_.trys.pop();
|
|
149
|
+
continue;
|
|
150
|
+
default:
|
|
151
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
152
|
+
_ = 0;
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
156
|
+
_.label = op[1];
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
160
|
+
_.label = t[1];
|
|
161
|
+
t = op;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
if (t && _.label < t[2]) {
|
|
165
|
+
_.label = t[2];
|
|
166
|
+
_.ops.push(op);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
if (t[2])
|
|
170
|
+
_.ops.pop();
|
|
171
|
+
_.trys.pop();
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
op = body.call(thisArg, _);
|
|
175
|
+
}
|
|
176
|
+
catch (e) {
|
|
177
|
+
op = [6, e];
|
|
178
|
+
y = 0;
|
|
179
|
+
}
|
|
180
|
+
finally {
|
|
181
|
+
f = t = 0;
|
|
182
|
+
}
|
|
183
|
+
if (op[0] & 5)
|
|
184
|
+
throw op[1];
|
|
185
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
189
|
+
if (k2 === undefined)
|
|
190
|
+
k2 = k;
|
|
191
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
192
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
193
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
194
|
+
}
|
|
195
|
+
Object.defineProperty(o, k2, desc);
|
|
196
|
+
}) : (function (o, m, k, k2) {
|
|
197
|
+
if (k2 === undefined)
|
|
198
|
+
k2 = k;
|
|
199
|
+
o[k2] = m[k];
|
|
200
|
+
});
|
|
201
|
+
function __exportStar(m, o) {
|
|
202
|
+
for (var p in m)
|
|
203
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
204
|
+
__createBinding(o, m, p);
|
|
205
|
+
}
|
|
206
|
+
function __values(o) {
|
|
207
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
208
|
+
if (m)
|
|
209
|
+
return m.call(o);
|
|
210
|
+
if (o && typeof o.length === "number")
|
|
211
|
+
return {
|
|
212
|
+
next: function () {
|
|
213
|
+
if (o && i >= o.length)
|
|
214
|
+
o = void 0;
|
|
215
|
+
return { value: o && o[i++], done: !o };
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
219
|
+
}
|
|
220
|
+
function __read(o, n) {
|
|
221
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
222
|
+
if (!m)
|
|
223
|
+
return o;
|
|
224
|
+
var i = m.call(o), r, ar = [], e;
|
|
225
|
+
try {
|
|
226
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
227
|
+
ar.push(r.value);
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
e = { error: error };
|
|
231
|
+
}
|
|
232
|
+
finally {
|
|
233
|
+
try {
|
|
234
|
+
if (r && !r.done && (m = i["return"]))
|
|
235
|
+
m.call(i);
|
|
236
|
+
}
|
|
237
|
+
finally {
|
|
238
|
+
if (e)
|
|
239
|
+
throw e.error;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return ar;
|
|
243
|
+
}
|
|
244
|
+
/** @deprecated */
|
|
245
|
+
function __spread() {
|
|
246
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
247
|
+
ar = ar.concat(__read(arguments[i]));
|
|
248
|
+
return ar;
|
|
249
|
+
}
|
|
250
|
+
/** @deprecated */
|
|
251
|
+
function __spreadArrays() {
|
|
252
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
253
|
+
s += arguments[i].length;
|
|
254
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
255
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
256
|
+
r[k] = a[j];
|
|
257
|
+
return r;
|
|
258
|
+
}
|
|
259
|
+
function __spreadArray(to, from, pack) {
|
|
260
|
+
if (pack || arguments.length === 2)
|
|
261
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
262
|
+
if (ar || !(i in from)) {
|
|
263
|
+
if (!ar)
|
|
264
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
265
|
+
ar[i] = from[i];
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
269
|
+
}
|
|
270
|
+
function __await(v) {
|
|
271
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
272
|
+
}
|
|
273
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
274
|
+
if (!Symbol.asyncIterator)
|
|
275
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
276
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
277
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
278
|
+
function verb(n) { if (g[n])
|
|
279
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
280
|
+
function resume(n, v) { try {
|
|
281
|
+
step(g[n](v));
|
|
282
|
+
}
|
|
283
|
+
catch (e) {
|
|
284
|
+
settle(q[0][3], e);
|
|
285
|
+
} }
|
|
286
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
287
|
+
function fulfill(value) { resume("next", value); }
|
|
288
|
+
function reject(value) { resume("throw", value); }
|
|
289
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
290
|
+
resume(q[0][0], q[0][1]); }
|
|
291
|
+
}
|
|
292
|
+
function __asyncDelegator(o) {
|
|
293
|
+
var i, p;
|
|
294
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
295
|
+
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; }
|
|
296
|
+
}
|
|
297
|
+
function __asyncValues(o) {
|
|
298
|
+
if (!Symbol.asyncIterator)
|
|
299
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
300
|
+
var m = o[Symbol.asyncIterator], i;
|
|
301
|
+
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);
|
|
302
|
+
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); }); }; }
|
|
303
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
304
|
+
}
|
|
305
|
+
function __makeTemplateObject(cooked, raw) {
|
|
306
|
+
if (Object.defineProperty) {
|
|
307
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
cooked.raw = raw;
|
|
311
|
+
}
|
|
312
|
+
return cooked;
|
|
313
|
+
}
|
|
314
|
+
;
|
|
315
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
316
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
317
|
+
}) : function (o, v) {
|
|
318
|
+
o["default"] = v;
|
|
319
|
+
};
|
|
320
|
+
function __importStar(mod) {
|
|
321
|
+
if (mod && mod.__esModule)
|
|
322
|
+
return mod;
|
|
323
|
+
var result = {};
|
|
324
|
+
if (mod != null)
|
|
325
|
+
for (var k in mod)
|
|
326
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
327
|
+
__createBinding(result, mod, k);
|
|
328
|
+
__setModuleDefault(result, mod);
|
|
329
|
+
return result;
|
|
330
|
+
}
|
|
331
|
+
function __importDefault(mod) {
|
|
332
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
333
|
+
}
|
|
334
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
335
|
+
if (kind === "a" && !f)
|
|
336
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
337
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
338
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
339
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
340
|
+
}
|
|
341
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
342
|
+
if (kind === "m")
|
|
343
|
+
throw new TypeError("Private method is not writable");
|
|
344
|
+
if (kind === "a" && !f)
|
|
345
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
346
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
347
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
348
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
349
|
+
}
|
|
350
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
351
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
352
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
353
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
224
354
|
}
|
|
225
355
|
|
|
226
356
|
/**
|
|
227
|
-
* @fileoverview added by tsickle
|
|
228
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
229
|
-
*/
|
|
230
|
-
/**
|
|
231
|
-
* Public event api of the router
|
|
232
|
-
*/
|
|
233
|
-
var /**
|
|
234
357
|
* Public event api of the router
|
|
235
358
|
*/
|
|
236
|
-
Navigate = /** @class */ (function () {
|
|
359
|
+
var Navigate = /** @class */ (function () {
|
|
237
360
|
function Navigate(path, queryParams, extras) {
|
|
238
361
|
this.path = path;
|
|
239
362
|
this.queryParams = queryParams;
|
|
240
363
|
this.extras = extras;
|
|
241
364
|
}
|
|
242
365
|
Object.defineProperty(Navigate, "type", {
|
|
243
|
-
get:
|
|
244
|
-
* @return {?}
|
|
245
|
-
*/
|
|
246
|
-
function () {
|
|
366
|
+
get: function () {
|
|
247
367
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
248
368
|
return '[Router] Navigate';
|
|
249
369
|
},
|
|
250
|
-
enumerable:
|
|
370
|
+
enumerable: false,
|
|
251
371
|
configurable: true
|
|
252
372
|
});
|
|
253
373
|
return Navigate;
|
|
254
374
|
}());
|
|
255
|
-
if (false) {
|
|
256
|
-
/** @type {?} */
|
|
257
|
-
Navigate.prototype.path;
|
|
258
|
-
/** @type {?} */
|
|
259
|
-
Navigate.prototype.queryParams;
|
|
260
|
-
/** @type {?} */
|
|
261
|
-
Navigate.prototype.extras;
|
|
262
|
-
}
|
|
263
375
|
/**
|
|
264
376
|
*
|
|
265
377
|
* Angular Routers internal state events
|
|
266
378
|
*
|
|
267
379
|
*/
|
|
268
380
|
/**
|
|
269
|
-
* An action dispatched when the router
|
|
270
|
-
* @template T
|
|
271
|
-
*/
|
|
272
|
-
var /**
|
|
273
|
-
*
|
|
274
|
-
* Angular Routers internal state events
|
|
275
|
-
*
|
|
381
|
+
* An action dispatched when the router starts the navigation.
|
|
276
382
|
*/
|
|
383
|
+
var RouterRequest = /** @class */ (function () {
|
|
384
|
+
function RouterRequest(routerState, event, trigger) {
|
|
385
|
+
if (trigger === void 0) { trigger = 'none'; }
|
|
386
|
+
this.routerState = routerState;
|
|
387
|
+
this.event = event;
|
|
388
|
+
this.trigger = trigger;
|
|
389
|
+
}
|
|
390
|
+
Object.defineProperty(RouterRequest, "type", {
|
|
391
|
+
get: function () {
|
|
392
|
+
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
393
|
+
return '[Router] RouterRequest';
|
|
394
|
+
},
|
|
395
|
+
enumerable: false,
|
|
396
|
+
configurable: true
|
|
397
|
+
});
|
|
398
|
+
return RouterRequest;
|
|
399
|
+
}());
|
|
277
400
|
/**
|
|
278
401
|
* An action dispatched when the router navigates.
|
|
279
|
-
* @template T
|
|
280
402
|
*/
|
|
281
|
-
RouterNavigation = /** @class */ (function () {
|
|
403
|
+
var RouterNavigation = /** @class */ (function () {
|
|
282
404
|
function RouterNavigation(routerState, event, trigger) {
|
|
283
405
|
if (trigger === void 0) { trigger = 'none'; }
|
|
284
406
|
this.routerState = routerState;
|
|
@@ -286,35 +408,19 @@
|
|
|
286
408
|
this.trigger = trigger;
|
|
287
409
|
}
|
|
288
410
|
Object.defineProperty(RouterNavigation, "type", {
|
|
289
|
-
get:
|
|
290
|
-
* @return {?}
|
|
291
|
-
*/
|
|
292
|
-
function () {
|
|
411
|
+
get: function () {
|
|
293
412
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
294
413
|
return '[Router] RouterNavigation';
|
|
295
414
|
},
|
|
296
|
-
enumerable:
|
|
415
|
+
enumerable: false,
|
|
297
416
|
configurable: true
|
|
298
417
|
});
|
|
299
418
|
return RouterNavigation;
|
|
300
419
|
}());
|
|
301
|
-
if (false) {
|
|
302
|
-
/** @type {?} */
|
|
303
|
-
RouterNavigation.prototype.routerState;
|
|
304
|
-
/** @type {?} */
|
|
305
|
-
RouterNavigation.prototype.event;
|
|
306
|
-
/** @type {?} */
|
|
307
|
-
RouterNavigation.prototype.trigger;
|
|
308
|
-
}
|
|
309
420
|
/**
|
|
310
421
|
* An action dispatched when the router cancel navigation.
|
|
311
|
-
* @template T, V
|
|
312
422
|
*/
|
|
313
|
-
var
|
|
314
|
-
* An action dispatched when the router cancel navigation.
|
|
315
|
-
* @template T, V
|
|
316
|
-
*/
|
|
317
|
-
RouterCancel = /** @class */ (function () {
|
|
423
|
+
var RouterCancel = /** @class */ (function () {
|
|
318
424
|
function RouterCancel(routerState, storeState, event, trigger) {
|
|
319
425
|
if (trigger === void 0) { trigger = 'none'; }
|
|
320
426
|
this.routerState = routerState;
|
|
@@ -323,37 +429,19 @@
|
|
|
323
429
|
this.trigger = trigger;
|
|
324
430
|
}
|
|
325
431
|
Object.defineProperty(RouterCancel, "type", {
|
|
326
|
-
get:
|
|
327
|
-
* @return {?}
|
|
328
|
-
*/
|
|
329
|
-
function () {
|
|
432
|
+
get: function () {
|
|
330
433
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
331
434
|
return '[Router] RouterCancel';
|
|
332
435
|
},
|
|
333
|
-
enumerable:
|
|
436
|
+
enumerable: false,
|
|
334
437
|
configurable: true
|
|
335
438
|
});
|
|
336
439
|
return RouterCancel;
|
|
337
440
|
}());
|
|
338
|
-
if (false) {
|
|
339
|
-
/** @type {?} */
|
|
340
|
-
RouterCancel.prototype.routerState;
|
|
341
|
-
/** @type {?} */
|
|
342
|
-
RouterCancel.prototype.storeState;
|
|
343
|
-
/** @type {?} */
|
|
344
|
-
RouterCancel.prototype.event;
|
|
345
|
-
/** @type {?} */
|
|
346
|
-
RouterCancel.prototype.trigger;
|
|
347
|
-
}
|
|
348
441
|
/**
|
|
349
442
|
* An action dispatched when the router errors.
|
|
350
|
-
* @template T, V
|
|
351
|
-
*/
|
|
352
|
-
var /**
|
|
353
|
-
* An action dispatched when the router errors.
|
|
354
|
-
* @template T, V
|
|
355
443
|
*/
|
|
356
|
-
RouterError = /** @class */ (function () {
|
|
444
|
+
var RouterError = /** @class */ (function () {
|
|
357
445
|
function RouterError(routerState, storeState, event, trigger) {
|
|
358
446
|
if (trigger === void 0) { trigger = 'none'; }
|
|
359
447
|
this.routerState = routerState;
|
|
@@ -362,37 +450,19 @@
|
|
|
362
450
|
this.trigger = trigger;
|
|
363
451
|
}
|
|
364
452
|
Object.defineProperty(RouterError, "type", {
|
|
365
|
-
get:
|
|
366
|
-
* @return {?}
|
|
367
|
-
*/
|
|
368
|
-
function () {
|
|
453
|
+
get: function () {
|
|
369
454
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
370
455
|
return '[Router] RouterError';
|
|
371
456
|
},
|
|
372
|
-
enumerable:
|
|
457
|
+
enumerable: false,
|
|
373
458
|
configurable: true
|
|
374
459
|
});
|
|
375
460
|
return RouterError;
|
|
376
461
|
}());
|
|
377
|
-
if (false) {
|
|
378
|
-
/** @type {?} */
|
|
379
|
-
RouterError.prototype.routerState;
|
|
380
|
-
/** @type {?} */
|
|
381
|
-
RouterError.prototype.storeState;
|
|
382
|
-
/** @type {?} */
|
|
383
|
-
RouterError.prototype.event;
|
|
384
|
-
/** @type {?} */
|
|
385
|
-
RouterError.prototype.trigger;
|
|
386
|
-
}
|
|
387
462
|
/**
|
|
388
463
|
* An action dispatched when the `ResolveEnd` event is triggered.
|
|
389
|
-
* @template T
|
|
390
|
-
*/
|
|
391
|
-
var /**
|
|
392
|
-
* An action dispatched when the `ResolveEnd` event is triggered.
|
|
393
|
-
* @template T
|
|
394
464
|
*/
|
|
395
|
-
RouterDataResolved = /** @class */ (function () {
|
|
465
|
+
var RouterDataResolved = /** @class */ (function () {
|
|
396
466
|
function RouterDataResolved(routerState, event, trigger) {
|
|
397
467
|
if (trigger === void 0) { trigger = 'none'; }
|
|
398
468
|
this.routerState = routerState;
|
|
@@ -400,97 +470,53 @@
|
|
|
400
470
|
this.trigger = trigger;
|
|
401
471
|
}
|
|
402
472
|
Object.defineProperty(RouterDataResolved, "type", {
|
|
403
|
-
get:
|
|
404
|
-
* @return {?}
|
|
405
|
-
*/
|
|
406
|
-
function () {
|
|
473
|
+
get: function () {
|
|
407
474
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
408
475
|
return '[Router] RouterDataResolved';
|
|
409
476
|
},
|
|
410
|
-
enumerable:
|
|
477
|
+
enumerable: false,
|
|
411
478
|
configurable: true
|
|
412
479
|
});
|
|
413
480
|
return RouterDataResolved;
|
|
414
481
|
}());
|
|
415
|
-
if (false) {
|
|
416
|
-
/** @type {?} */
|
|
417
|
-
RouterDataResolved.prototype.routerState;
|
|
418
|
-
/** @type {?} */
|
|
419
|
-
RouterDataResolved.prototype.event;
|
|
420
|
-
/** @type {?} */
|
|
421
|
-
RouterDataResolved.prototype.trigger;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* @fileoverview added by tsickle
|
|
426
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
427
|
-
*/
|
|
428
482
|
/**
|
|
429
|
-
*
|
|
430
|
-
* @template T
|
|
483
|
+
* An action dispatched when the router navigation has been finished successfully.
|
|
431
484
|
*/
|
|
432
|
-
var
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
485
|
+
var RouterNavigated = /** @class */ (function () {
|
|
486
|
+
function RouterNavigated(routerState, event, trigger) {
|
|
487
|
+
if (trigger === void 0) { trigger = 'none'; }
|
|
488
|
+
this.routerState = routerState;
|
|
489
|
+
this.event = event;
|
|
490
|
+
this.trigger = trigger;
|
|
491
|
+
}
|
|
492
|
+
Object.defineProperty(RouterNavigated, "type", {
|
|
493
|
+
get: function () {
|
|
494
|
+
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
495
|
+
return '[Router] RouterNavigated';
|
|
496
|
+
},
|
|
497
|
+
enumerable: false,
|
|
498
|
+
configurable: true
|
|
499
|
+
});
|
|
500
|
+
return RouterNavigated;
|
|
501
|
+
}());
|
|
502
|
+
|
|
503
|
+
var RouterStateSerializer = /** @class */ (function () {
|
|
437
504
|
function RouterStateSerializer() {
|
|
438
505
|
}
|
|
439
506
|
return RouterStateSerializer;
|
|
440
507
|
}());
|
|
441
|
-
if (false) {
|
|
442
|
-
/**
|
|
443
|
-
* @abstract
|
|
444
|
-
* @param {?} routerState
|
|
445
|
-
* @return {?}
|
|
446
|
-
*/
|
|
447
|
-
RouterStateSerializer.prototype.serialize = function (routerState) { };
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* @record
|
|
451
|
-
*/
|
|
452
|
-
function SerializedRouterStateSnapshot() { }
|
|
453
|
-
if (false) {
|
|
454
|
-
/** @type {?} */
|
|
455
|
-
SerializedRouterStateSnapshot.prototype.root;
|
|
456
|
-
/** @type {?} */
|
|
457
|
-
SerializedRouterStateSnapshot.prototype.url;
|
|
458
|
-
}
|
|
459
508
|
var DefaultRouterStateSerializer = /** @class */ (function () {
|
|
460
509
|
function DefaultRouterStateSerializer() {
|
|
461
510
|
}
|
|
462
|
-
|
|
463
|
-
* @param {?} routerState
|
|
464
|
-
* @return {?}
|
|
465
|
-
*/
|
|
466
|
-
DefaultRouterStateSerializer.prototype.serialize = /**
|
|
467
|
-
* @param {?} routerState
|
|
468
|
-
* @return {?}
|
|
469
|
-
*/
|
|
470
|
-
function (routerState) {
|
|
511
|
+
DefaultRouterStateSerializer.prototype.serialize = function (routerState) {
|
|
471
512
|
return {
|
|
472
513
|
root: this.serializeRoute(routerState.root),
|
|
473
514
|
url: routerState.url
|
|
474
515
|
};
|
|
475
516
|
};
|
|
476
|
-
|
|
477
|
-
* @private
|
|
478
|
-
* @param {?} route
|
|
479
|
-
* @return {?}
|
|
480
|
-
*/
|
|
481
|
-
DefaultRouterStateSerializer.prototype.serializeRoute = /**
|
|
482
|
-
* @private
|
|
483
|
-
* @param {?} route
|
|
484
|
-
* @return {?}
|
|
485
|
-
*/
|
|
486
|
-
function (route) {
|
|
517
|
+
DefaultRouterStateSerializer.prototype.serializeRoute = function (route) {
|
|
487
518
|
var _this = this;
|
|
488
|
-
|
|
489
|
-
var children = route.children.map((/**
|
|
490
|
-
* @param {?} c
|
|
491
|
-
* @return {?}
|
|
492
|
-
*/
|
|
493
|
-
function (c) { return _this.serializeRoute(c); }));
|
|
519
|
+
var children = route.children.map(function (c) { return _this.serializeRoute(c); });
|
|
494
520
|
return {
|
|
495
521
|
url: route.url,
|
|
496
522
|
params: route.params,
|
|
@@ -500,11 +526,11 @@
|
|
|
500
526
|
outlet: route.outlet,
|
|
501
527
|
component: null,
|
|
502
528
|
routeConfig: null,
|
|
503
|
-
root:
|
|
529
|
+
root: null,
|
|
504
530
|
parent: null,
|
|
505
531
|
firstChild: children[0],
|
|
506
532
|
children: children,
|
|
507
|
-
pathFromRoot:
|
|
533
|
+
pathFromRoot: null,
|
|
508
534
|
paramMap: route.paramMap,
|
|
509
535
|
queryParamMap: route.queryParamMap,
|
|
510
536
|
toString: route.toString
|
|
@@ -513,25 +539,17 @@
|
|
|
513
539
|
return DefaultRouterStateSerializer;
|
|
514
540
|
}());
|
|
515
541
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
* @template T
|
|
523
|
-
*/
|
|
524
|
-
function RouterStateModel() { }
|
|
525
|
-
if (false) {
|
|
526
|
-
/** @type {?|undefined} */
|
|
527
|
-
RouterStateModel.prototype.state;
|
|
528
|
-
/** @type {?|undefined} */
|
|
529
|
-
RouterStateModel.prototype.navigationId;
|
|
530
|
-
/** @type {?} */
|
|
531
|
-
RouterStateModel.prototype.trigger;
|
|
542
|
+
var USER_OPTIONS = new i0.InjectionToken('USER_OPTIONS', { providedIn: 'root', factory: function () { return undefined; } });
|
|
543
|
+
var NGXS_ROUTER_PLUGIN_OPTIONS = new i0.InjectionToken('NGXS_ROUTER_PLUGIN_OPTIONS', { providedIn: 'root', factory: function () { return ({}); } });
|
|
544
|
+
function createRouterPluginOptions(options) {
|
|
545
|
+
return {
|
|
546
|
+
navigationActionTiming: (options && options.navigationActionTiming) || 1 /* PreActivation */
|
|
547
|
+
};
|
|
532
548
|
}
|
|
533
|
-
|
|
534
|
-
|
|
549
|
+
|
|
550
|
+
var RouterState_1;
|
|
551
|
+
exports.RouterState = RouterState_1 = /** @class */ (function () {
|
|
552
|
+
function RouterState(_store, _router, _serializer, _ngZone, injector) {
|
|
535
553
|
this._store = _store;
|
|
536
554
|
this._router = _router;
|
|
537
555
|
this._serializer = _serializer;
|
|
@@ -549,263 +567,133 @@
|
|
|
549
567
|
* That's the value of the `RouterState` state
|
|
550
568
|
*/
|
|
551
569
|
this._storeState = null;
|
|
552
|
-
this.
|
|
570
|
+
this._lastEvent = null;
|
|
553
571
|
this._subscription = new rxjs.Subscription();
|
|
554
|
-
this.
|
|
555
|
-
|
|
572
|
+
this._options = null;
|
|
573
|
+
// Note: do not use `@Inject` since it fails on lower versions of Angular with Jest
|
|
574
|
+
// integration, it cannot resolve the token provider.
|
|
575
|
+
this._options = injector.get(NGXS_ROUTER_PLUGIN_OPTIONS, null);
|
|
576
|
+
this._setUpStoreListener();
|
|
577
|
+
this._setUpRouterEventsListener();
|
|
556
578
|
}
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* @template T
|
|
560
|
-
* @param {?} state
|
|
561
|
-
* @return {?}
|
|
562
|
-
*/
|
|
563
|
-
RouterState.state = /**
|
|
564
|
-
* @template T
|
|
565
|
-
* @param {?} state
|
|
566
|
-
* @return {?}
|
|
567
|
-
*/
|
|
568
|
-
function (state) {
|
|
579
|
+
RouterState.state = function (state) {
|
|
569
580
|
return state && state.state;
|
|
570
581
|
};
|
|
571
|
-
|
|
572
|
-
* @param {?} state
|
|
573
|
-
* @return {?}
|
|
574
|
-
*/
|
|
575
|
-
RouterState.url = /**
|
|
576
|
-
* @param {?} state
|
|
577
|
-
* @return {?}
|
|
578
|
-
*/
|
|
579
|
-
function (state) {
|
|
582
|
+
RouterState.url = function (state) {
|
|
580
583
|
return state && state.state && state.state.url;
|
|
581
584
|
};
|
|
582
|
-
|
|
583
|
-
* @return {?}
|
|
584
|
-
*/
|
|
585
|
-
RouterState.prototype.ngOnDestroy = /**
|
|
586
|
-
* @return {?}
|
|
587
|
-
*/
|
|
588
|
-
function () {
|
|
585
|
+
RouterState.prototype.ngOnDestroy = function () {
|
|
589
586
|
this._subscription.unsubscribe();
|
|
590
587
|
};
|
|
591
|
-
|
|
592
|
-
* @param {?} _
|
|
593
|
-
* @param {?} action
|
|
594
|
-
* @return {?}
|
|
595
|
-
*/
|
|
596
|
-
RouterState.prototype.navigate = /**
|
|
597
|
-
* @param {?} _
|
|
598
|
-
* @param {?} action
|
|
599
|
-
* @return {?}
|
|
600
|
-
*/
|
|
601
|
-
function (_, action) {
|
|
588
|
+
RouterState.prototype.navigate = function (_, action) {
|
|
602
589
|
var _this = this;
|
|
603
|
-
return this._ngZone.run((
|
|
604
|
-
* @return {?}
|
|
605
|
-
*/
|
|
606
|
-
function () {
|
|
607
|
-
return _this._router.navigate(action.path, __assign({ queryParams: action.queryParams }, action.extras));
|
|
608
|
-
}));
|
|
590
|
+
return this._ngZone.run(function () { return _this._router.navigate(action.path, Object.assign({ queryParams: action.queryParams }, action.extras)); });
|
|
609
591
|
};
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
* @param {?} ctx
|
|
617
|
-
* @param {?} action
|
|
618
|
-
* @return {?}
|
|
619
|
-
*/
|
|
620
|
-
function (ctx, action) {
|
|
621
|
-
ctx.setState(__assign({}, ctx.getState(), { trigger: action.trigger, state: action.routerState, navigationId: action.event.id }));
|
|
592
|
+
RouterState.prototype.angularRouterAction = function (ctx, action) {
|
|
593
|
+
ctx.setState({
|
|
594
|
+
trigger: action.trigger,
|
|
595
|
+
state: action.routerState,
|
|
596
|
+
navigationId: action.event.id
|
|
597
|
+
});
|
|
622
598
|
};
|
|
623
|
-
|
|
624
|
-
* @private
|
|
625
|
-
* @return {?}
|
|
626
|
-
*/
|
|
627
|
-
RouterState.prototype.setUpStoreListener = /**
|
|
628
|
-
* @private
|
|
629
|
-
* @return {?}
|
|
630
|
-
*/
|
|
631
|
-
function () {
|
|
599
|
+
RouterState.prototype._setUpStoreListener = function () {
|
|
632
600
|
var _this = this;
|
|
633
|
-
/** @type {?} */
|
|
634
601
|
var subscription = this._store
|
|
635
602
|
.select(RouterState_1)
|
|
636
|
-
.subscribe((
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
*/
|
|
640
|
-
function (state) {
|
|
641
|
-
_this.navigateIfNeeded(state);
|
|
642
|
-
}));
|
|
603
|
+
.subscribe(function (state) {
|
|
604
|
+
_this._navigateIfNeeded(state);
|
|
605
|
+
});
|
|
643
606
|
this._subscription.add(subscription);
|
|
644
607
|
};
|
|
645
|
-
|
|
646
|
-
* @private
|
|
647
|
-
* @return {?}
|
|
648
|
-
*/
|
|
649
|
-
RouterState.prototype.setUpRouterEventsListener = /**
|
|
650
|
-
* @private
|
|
651
|
-
* @return {?}
|
|
652
|
-
*/
|
|
653
|
-
function () {
|
|
608
|
+
RouterState.prototype._navigateIfNeeded = function (routerState) {
|
|
654
609
|
var _this = this;
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
610
|
+
if (routerState && routerState.trigger === 'devtools') {
|
|
611
|
+
this._storeState = this._store.selectSnapshot(RouterState_1);
|
|
612
|
+
}
|
|
613
|
+
var canSkipNavigation = !this._storeState ||
|
|
614
|
+
!this._storeState.state ||
|
|
615
|
+
!routerState ||
|
|
616
|
+
routerState.trigger === 'router' ||
|
|
617
|
+
this._router.url === this._storeState.state.url ||
|
|
618
|
+
this._lastEvent instanceof i2.NavigationStart;
|
|
619
|
+
if (canSkipNavigation) {
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
this._storeState = this._store.selectSnapshot(RouterState_1);
|
|
623
|
+
this._trigger = 'store';
|
|
624
|
+
this._ngZone.run(function () { return _this._router.navigateByUrl(_this._storeState.state.url); });
|
|
625
|
+
};
|
|
626
|
+
RouterState.prototype._setUpRouterEventsListener = function () {
|
|
627
|
+
var _this = this;
|
|
628
|
+
var dispatchRouterNavigationLate = this._options != null &&
|
|
629
|
+
this._options.navigationActionTiming === 2 /* PostActivation */;
|
|
630
|
+
var lastRoutesRecognized;
|
|
631
|
+
var subscription = this._router.events.subscribe(function (event) {
|
|
632
|
+
_this._lastEvent = event;
|
|
633
|
+
if (event instanceof i2.NavigationStart) {
|
|
634
|
+
_this._navigationStart(event);
|
|
663
635
|
}
|
|
664
|
-
else if (event instanceof
|
|
665
|
-
|
|
636
|
+
else if (event instanceof i2.RoutesRecognized) {
|
|
637
|
+
lastRoutesRecognized = event;
|
|
638
|
+
if (!dispatchRouterNavigationLate && _this._trigger !== 'store') {
|
|
639
|
+
_this._dispatchRouterNavigation(lastRoutesRecognized);
|
|
640
|
+
}
|
|
666
641
|
}
|
|
667
|
-
else if (event instanceof
|
|
668
|
-
_this.
|
|
642
|
+
else if (event instanceof i2.ResolveEnd) {
|
|
643
|
+
_this._dispatchRouterDataResolved(event);
|
|
669
644
|
}
|
|
670
|
-
else if (event instanceof
|
|
671
|
-
_this.
|
|
672
|
-
_this.
|
|
645
|
+
else if (event instanceof i2.NavigationCancel) {
|
|
646
|
+
_this._dispatchRouterCancel(event);
|
|
647
|
+
_this._reset();
|
|
673
648
|
}
|
|
674
|
-
else if (event instanceof
|
|
675
|
-
_this.
|
|
676
|
-
_this.
|
|
649
|
+
else if (event instanceof i2.NavigationError) {
|
|
650
|
+
_this._dispatchRouterError(event);
|
|
651
|
+
_this._reset();
|
|
677
652
|
}
|
|
678
|
-
else if (event instanceof
|
|
679
|
-
_this.
|
|
680
|
-
|
|
653
|
+
else if (event instanceof i2.NavigationEnd) {
|
|
654
|
+
if (_this._trigger !== 'store') {
|
|
655
|
+
if (dispatchRouterNavigationLate) {
|
|
656
|
+
_this._dispatchRouterNavigation(lastRoutesRecognized);
|
|
657
|
+
}
|
|
658
|
+
_this._dispatchRouterNavigated(event);
|
|
659
|
+
}
|
|
660
|
+
_this._reset();
|
|
681
661
|
}
|
|
682
|
-
})
|
|
662
|
+
});
|
|
683
663
|
this._subscription.add(subscription);
|
|
684
664
|
};
|
|
685
|
-
/**
|
|
686
|
-
|
|
687
|
-
* @return {?}
|
|
688
|
-
*/
|
|
689
|
-
RouterState.prototype.navigationStart = /**
|
|
690
|
-
* @private
|
|
691
|
-
* @return {?}
|
|
692
|
-
*/
|
|
693
|
-
function () {
|
|
665
|
+
/** Reacts to `NavigationStart`. */
|
|
666
|
+
RouterState.prototype._navigationStart = function (event) {
|
|
694
667
|
this._routerState = this._serializer.serialize(this._router.routerState.snapshot);
|
|
695
668
|
if (this._trigger !== 'none') {
|
|
696
669
|
this._storeState = this._store.selectSnapshot(RouterState_1);
|
|
670
|
+
this._dispatchRouterAction(new RouterRequest(this._routerState, event, this._trigger));
|
|
697
671
|
}
|
|
698
672
|
};
|
|
699
|
-
/**
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
RouterState.prototype.navigationEnd = /**
|
|
704
|
-
* @private
|
|
705
|
-
* @return {?}
|
|
706
|
-
*/
|
|
707
|
-
function () {
|
|
708
|
-
if (this.shouldDispatchRouterNavigation()) {
|
|
709
|
-
this.dispatchRouterNavigation();
|
|
710
|
-
}
|
|
711
|
-
};
|
|
712
|
-
/**
|
|
713
|
-
* @private
|
|
714
|
-
* @return {?}
|
|
715
|
-
*/
|
|
716
|
-
RouterState.prototype.shouldDispatchRouterNavigation = /**
|
|
717
|
-
* @private
|
|
718
|
-
* @return {?}
|
|
719
|
-
*/
|
|
720
|
-
function () {
|
|
721
|
-
if (!this._storeState)
|
|
722
|
-
return true;
|
|
723
|
-
return this._trigger !== 'store';
|
|
673
|
+
/** Reacts to `ResolveEnd`. */
|
|
674
|
+
RouterState.prototype._dispatchRouterDataResolved = function (event) {
|
|
675
|
+
var routerState = this._serializer.serialize(event.state);
|
|
676
|
+
this._dispatchRouterAction(new RouterDataResolved(routerState, event, this._trigger));
|
|
724
677
|
};
|
|
725
|
-
/**
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
*/
|
|
730
|
-
RouterState.prototype.navigateIfNeeded = /**
|
|
731
|
-
* @private
|
|
732
|
-
* @param {?} state
|
|
733
|
-
* @return {?}
|
|
734
|
-
*/
|
|
735
|
-
function (state) {
|
|
736
|
-
var _this = this;
|
|
737
|
-
if (state && state.trigger === 'devtools') {
|
|
738
|
-
this._storeState = this._store.selectSnapshot(RouterState_1);
|
|
739
|
-
}
|
|
740
|
-
/** @type {?} */
|
|
741
|
-
var canSkipNavigation = !this._storeState ||
|
|
742
|
-
!this._storeState.state ||
|
|
743
|
-
!state ||
|
|
744
|
-
state.trigger === 'router' ||
|
|
745
|
-
this._router.url === this._storeState.state.url;
|
|
746
|
-
if (canSkipNavigation) {
|
|
747
|
-
return;
|
|
748
|
-
}
|
|
749
|
-
this._trigger = 'store';
|
|
750
|
-
this._ngZone.run((/**
|
|
751
|
-
* @return {?}
|
|
752
|
-
*/
|
|
753
|
-
function () {
|
|
754
|
-
_this._router.navigateByUrl((/** @type {?} */ ((/** @type {?} */ (_this._storeState)).state)).url);
|
|
755
|
-
}));
|
|
678
|
+
/** Reacts to `RoutesRecognized` or `NavigationEnd`, depends on the `navigationActionTiming`. */
|
|
679
|
+
RouterState.prototype._dispatchRouterNavigation = function (lastRoutesRecognized) {
|
|
680
|
+
var nextRouterState = this._serializer.serialize(lastRoutesRecognized.state);
|
|
681
|
+
this._dispatchRouterAction(new RouterNavigation(nextRouterState, new i2.RoutesRecognized(lastRoutesRecognized.id, lastRoutesRecognized.url, lastRoutesRecognized.urlAfterRedirects, nextRouterState), this._trigger));
|
|
756
682
|
};
|
|
757
|
-
/**
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
*/
|
|
761
|
-
RouterState.prototype.dispatchRouterNavigation = /**
|
|
762
|
-
* @private
|
|
763
|
-
* @return {?}
|
|
764
|
-
*/
|
|
765
|
-
function () {
|
|
766
|
-
/** @type {?} */
|
|
767
|
-
var nextRouterState = this._serializer.serialize(this._lastRoutesRecognized.state);
|
|
768
|
-
this.dispatchRouterAction(new RouterNavigation(nextRouterState, new router.RoutesRecognized(this._lastRoutesRecognized.id, this._lastRoutesRecognized.url, this._lastRoutesRecognized.urlAfterRedirects, nextRouterState), this._trigger));
|
|
683
|
+
/** Reacts to `NavigationCancel`. */
|
|
684
|
+
RouterState.prototype._dispatchRouterCancel = function (event) {
|
|
685
|
+
this._dispatchRouterAction(new RouterCancel(this._routerState, this._storeState, event, this._trigger));
|
|
769
686
|
};
|
|
770
|
-
/**
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
* @return {?}
|
|
774
|
-
*/
|
|
775
|
-
RouterState.prototype.dispatchRouterCancel = /**
|
|
776
|
-
* @private
|
|
777
|
-
* @param {?} event
|
|
778
|
-
* @return {?}
|
|
779
|
-
*/
|
|
780
|
-
function (event) {
|
|
781
|
-
this.dispatchRouterAction(new RouterCancel((/** @type {?} */ (this._routerState)), this._storeState, event, this._trigger));
|
|
687
|
+
/** Reacts to `NavigationEnd`. */
|
|
688
|
+
RouterState.prototype._dispatchRouterError = function (event) {
|
|
689
|
+
this._dispatchRouterAction(new RouterError(this._routerState, this._storeState, new i2.NavigationError(event.id, event.url, "" + event), this._trigger));
|
|
782
690
|
};
|
|
783
|
-
/**
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
*/
|
|
788
|
-
RouterState.prototype.dispatchRouterError = /**
|
|
789
|
-
* @private
|
|
790
|
-
* @param {?} event
|
|
791
|
-
* @return {?}
|
|
792
|
-
*/
|
|
793
|
-
function (event) {
|
|
794
|
-
this.dispatchRouterAction(new RouterError((/** @type {?} */ (this._routerState)), this._storeState, new router.NavigationError(event.id, event.url, "" + event), this._trigger));
|
|
691
|
+
/** Reacts to `NavigationEnd`. */
|
|
692
|
+
RouterState.prototype._dispatchRouterNavigated = function (event) {
|
|
693
|
+
var routerState = this._serializer.serialize(this._router.routerState.snapshot);
|
|
694
|
+
this._dispatchRouterAction(new RouterNavigated(routerState, event, this._trigger));
|
|
795
695
|
};
|
|
796
|
-
|
|
797
|
-
* @private
|
|
798
|
-
* @template T
|
|
799
|
-
* @param {?} action
|
|
800
|
-
* @return {?}
|
|
801
|
-
*/
|
|
802
|
-
RouterState.prototype.dispatchRouterAction = /**
|
|
803
|
-
* @private
|
|
804
|
-
* @template T
|
|
805
|
-
* @param {?} action
|
|
806
|
-
* @return {?}
|
|
807
|
-
*/
|
|
808
|
-
function (action) {
|
|
696
|
+
RouterState.prototype._dispatchRouterAction = function (action) {
|
|
809
697
|
this._trigger = 'router';
|
|
810
698
|
try {
|
|
811
699
|
this._store.dispatch(action);
|
|
@@ -814,169 +702,101 @@
|
|
|
814
702
|
this._trigger = 'none';
|
|
815
703
|
}
|
|
816
704
|
};
|
|
817
|
-
|
|
818
|
-
* @private
|
|
819
|
-
* @param {?} event
|
|
820
|
-
* @return {?}
|
|
821
|
-
*/
|
|
822
|
-
RouterState.prototype.dispatchRouterDataResolved = /**
|
|
823
|
-
* @private
|
|
824
|
-
* @param {?} event
|
|
825
|
-
* @return {?}
|
|
826
|
-
*/
|
|
827
|
-
function (event) {
|
|
828
|
-
/** @type {?} */
|
|
829
|
-
var routerState = this._serializer.serialize(event.state);
|
|
830
|
-
this.dispatchRouterAction(new RouterDataResolved(routerState, event, this._trigger));
|
|
831
|
-
};
|
|
832
|
-
/**
|
|
833
|
-
* @private
|
|
834
|
-
* @return {?}
|
|
835
|
-
*/
|
|
836
|
-
RouterState.prototype.reset = /**
|
|
837
|
-
* @private
|
|
838
|
-
* @return {?}
|
|
839
|
-
*/
|
|
840
|
-
function () {
|
|
705
|
+
RouterState.prototype._reset = function () {
|
|
841
706
|
this._trigger = 'none';
|
|
842
707
|
this._storeState = null;
|
|
843
708
|
this._routerState = null;
|
|
844
709
|
};
|
|
845
|
-
var RouterState_1;
|
|
846
|
-
RouterState.ctorParameters = function () { return [
|
|
847
|
-
{ type: store.Store },
|
|
848
|
-
{ type: router.Router },
|
|
849
|
-
{ type: RouterStateSerializer },
|
|
850
|
-
{ type: core.NgZone }
|
|
851
|
-
]; };
|
|
852
|
-
RouterState.decorators = [
|
|
853
|
-
{ type: core.Injectable }
|
|
854
|
-
];
|
|
855
|
-
/** @nocollapse */
|
|
856
|
-
RouterState.ctorParameters = function () { return [
|
|
857
|
-
{ type: store.Store },
|
|
858
|
-
{ type: router.Router },
|
|
859
|
-
{ type: RouterStateSerializer },
|
|
860
|
-
{ type: core.NgZone }
|
|
861
|
-
]; };
|
|
862
|
-
__decorate([
|
|
863
|
-
store.Action(Navigate),
|
|
864
|
-
__metadata("design:type", Function),
|
|
865
|
-
__metadata("design:paramtypes", [Object, Navigate]),
|
|
866
|
-
__metadata("design:returntype", void 0)
|
|
867
|
-
], RouterState.prototype, "navigate", null);
|
|
868
|
-
__decorate([
|
|
869
|
-
store.Action([RouterNavigation, RouterError, RouterCancel, RouterDataResolved]),
|
|
870
|
-
__metadata("design:type", Function),
|
|
871
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
872
|
-
__metadata("design:returntype", void 0)
|
|
873
|
-
], RouterState.prototype, "angularRouterAction", null);
|
|
874
|
-
__decorate([
|
|
875
|
-
store.Selector(),
|
|
876
|
-
__metadata("design:type", Function),
|
|
877
|
-
__metadata("design:paramtypes", [Object]),
|
|
878
|
-
__metadata("design:returntype", void 0)
|
|
879
|
-
], RouterState, "state", null);
|
|
880
|
-
__decorate([
|
|
881
|
-
store.Selector(),
|
|
882
|
-
__metadata("design:type", Function),
|
|
883
|
-
__metadata("design:paramtypes", [Object]),
|
|
884
|
-
__metadata("design:returntype", Object)
|
|
885
|
-
], RouterState, "url", null);
|
|
886
|
-
RouterState = RouterState_1 = __decorate([
|
|
887
|
-
store.State({
|
|
888
|
-
name: 'router',
|
|
889
|
-
defaults: {
|
|
890
|
-
state: undefined,
|
|
891
|
-
navigationId: undefined,
|
|
892
|
-
trigger: 'none'
|
|
893
|
-
}
|
|
894
|
-
}),
|
|
895
|
-
__metadata("design:paramtypes", [store.Store,
|
|
896
|
-
router.Router,
|
|
897
|
-
RouterStateSerializer,
|
|
898
|
-
core.NgZone])
|
|
899
|
-
], RouterState);
|
|
900
710
|
return RouterState;
|
|
901
711
|
}());
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
712
|
+
/** @nocollapse */ exports.RouterState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.RouterState, deps: [{ token: i1__namespace.Store }, { token: i2__namespace.Router }, { token: RouterStateSerializer }, { token: i0__namespace.NgZone }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
713
|
+
/** @nocollapse */ exports.RouterState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.RouterState });
|
|
714
|
+
__decorate([
|
|
715
|
+
i1.Action(Navigate),
|
|
716
|
+
__metadata("design:type", Function),
|
|
717
|
+
__metadata("design:paramtypes", [Object, Navigate]),
|
|
718
|
+
__metadata("design:returntype", void 0)
|
|
719
|
+
], exports.RouterState.prototype, "navigate", null);
|
|
720
|
+
__decorate([
|
|
721
|
+
i1.Action([
|
|
722
|
+
RouterRequest,
|
|
723
|
+
RouterNavigation,
|
|
724
|
+
RouterError,
|
|
725
|
+
RouterCancel,
|
|
726
|
+
RouterDataResolved,
|
|
727
|
+
RouterNavigated
|
|
728
|
+
]),
|
|
729
|
+
__metadata("design:type", Function),
|
|
730
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
731
|
+
__metadata("design:returntype", void 0)
|
|
732
|
+
], exports.RouterState.prototype, "angularRouterAction", null);
|
|
733
|
+
__decorate([
|
|
734
|
+
i1.Selector(),
|
|
735
|
+
__metadata("design:type", Function),
|
|
736
|
+
__metadata("design:paramtypes", [Object]),
|
|
737
|
+
__metadata("design:returntype", void 0)
|
|
738
|
+
], exports.RouterState, "state", null);
|
|
739
|
+
__decorate([
|
|
740
|
+
i1.Selector(),
|
|
741
|
+
__metadata("design:type", Function),
|
|
742
|
+
__metadata("design:paramtypes", [Object]),
|
|
743
|
+
__metadata("design:returntype", Object)
|
|
744
|
+
], exports.RouterState, "url", null);
|
|
745
|
+
exports.RouterState = RouterState_1 = __decorate([
|
|
746
|
+
i1.State({
|
|
747
|
+
name: 'router',
|
|
748
|
+
defaults: {
|
|
749
|
+
state: undefined,
|
|
750
|
+
navigationId: undefined,
|
|
751
|
+
trigger: 'none'
|
|
752
|
+
}
|
|
753
|
+
}),
|
|
754
|
+
__metadata("design:paramtypes", [i1.Store,
|
|
755
|
+
i2.Router,
|
|
756
|
+
RouterStateSerializer,
|
|
757
|
+
i0.NgZone,
|
|
758
|
+
i0.Injector])
|
|
759
|
+
], exports.RouterState);
|
|
760
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.RouterState, decorators: [{
|
|
761
|
+
type: i0.Injectable
|
|
762
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.Store }, { type: i2__namespace.Router }, { type: RouterStateSerializer }, { type: i0__namespace.NgZone }, { type: i0__namespace.Injector }]; }, propDecorators: { navigate: [], angularRouterAction: [] } });
|
|
953
763
|
|
|
954
|
-
/**
|
|
955
|
-
* @fileoverview added by tsickle
|
|
956
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
957
|
-
*/
|
|
958
764
|
var NgxsRouterPluginModule = /** @class */ (function () {
|
|
959
765
|
function NgxsRouterPluginModule() {
|
|
960
766
|
}
|
|
961
|
-
|
|
962
|
-
* @return {?}
|
|
963
|
-
*/
|
|
964
|
-
NgxsRouterPluginModule.forRoot = /**
|
|
965
|
-
* @return {?}
|
|
966
|
-
*/
|
|
967
|
-
function () {
|
|
767
|
+
NgxsRouterPluginModule.forRoot = function (options) {
|
|
968
768
|
return {
|
|
969
769
|
ngModule: NgxsRouterPluginModule,
|
|
970
|
-
providers: [
|
|
770
|
+
providers: [
|
|
771
|
+
{ provide: USER_OPTIONS, useValue: options },
|
|
772
|
+
{
|
|
773
|
+
provide: NGXS_ROUTER_PLUGIN_OPTIONS,
|
|
774
|
+
useFactory: createRouterPluginOptions,
|
|
775
|
+
deps: [USER_OPTIONS]
|
|
776
|
+
},
|
|
777
|
+
{ provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }
|
|
778
|
+
]
|
|
971
779
|
};
|
|
972
780
|
};
|
|
973
|
-
NgxsRouterPluginModule.decorators = [
|
|
974
|
-
{ type: core.NgModule, args: [{
|
|
975
|
-
imports: [store.NgxsModule.forFeature([RouterState])]
|
|
976
|
-
},] }
|
|
977
|
-
];
|
|
978
781
|
return NgxsRouterPluginModule;
|
|
979
782
|
}());
|
|
783
|
+
/** @nocollapse */ NgxsRouterPluginModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsRouterPluginModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
784
|
+
/** @nocollapse */ NgxsRouterPluginModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsRouterPluginModule, imports: [i1__namespace.ɵNgxsFeatureModule] });
|
|
785
|
+
/** @nocollapse */ NgxsRouterPluginModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsRouterPluginModule, imports: [[i1.NgxsModule.forFeature([exports.RouterState])]] });
|
|
786
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxsRouterPluginModule, decorators: [{
|
|
787
|
+
type: i0.NgModule,
|
|
788
|
+
args: [{
|
|
789
|
+
imports: [i1.NgxsModule.forFeature([exports.RouterState])]
|
|
790
|
+
}]
|
|
791
|
+
}] });
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* The public api for consumers of @ngxs/router-plugin
|
|
795
|
+
*/
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Generated bundle index. Do not edit.
|
|
799
|
+
*/
|
|
980
800
|
|
|
981
801
|
exports.DefaultRouterStateSerializer = DefaultRouterStateSerializer;
|
|
982
802
|
exports.Navigate = Navigate;
|
|
@@ -984,8 +804,9 @@
|
|
|
984
804
|
exports.RouterCancel = RouterCancel;
|
|
985
805
|
exports.RouterDataResolved = RouterDataResolved;
|
|
986
806
|
exports.RouterError = RouterError;
|
|
807
|
+
exports.RouterNavigated = RouterNavigated;
|
|
987
808
|
exports.RouterNavigation = RouterNavigation;
|
|
988
|
-
exports.
|
|
809
|
+
exports.RouterRequest = RouterRequest;
|
|
989
810
|
exports.RouterStateSerializer = RouterStateSerializer;
|
|
990
811
|
|
|
991
812
|
Object.defineProperty(exports, '__esModule', { value: true });
|