@ngxs/router-plugin 3.7.6-dev.master-fb318b1 → 3.7.6-dev.master-dcdd391
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 +481 -833
- package/bundles/ngxs-router-plugin.umd.js.map +1 -1
- package/esm2015/index.js +2 -6
- package/esm2015/ngxs-router-plugin.js +2 -7
- package/esm2015/src/public_api.js +2 -6
- package/esm2015/src/router.actions.js +1 -129
- package/esm2015/src/router.module.js +12 -14
- package/esm2015/src/router.state.js +46 -232
- package/esm2015/src/serializer.js +4 -44
- package/esm2015/src/symbols.js +3 -33
- package/fesm2015/ngxs-router-plugin.js +42 -433
- package/fesm2015/ngxs-router-plugin.js.map +1 -1
- package/ngxs-router-plugin.d.ts +1 -2
- package/package.json +3 -6
- package/src/router.actions.d.ts +7 -7
- package/src/router.module.d.ts +5 -0
- package/src/router.state.d.ts +3 -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 -10
- package/esm5/src/public_api.js +0 -9
- package/esm5/src/router.actions.js +0 -309
- package/esm5/src/router.module.js +0 -43
- package/esm5/src/router.state.js +0 -496
- package/esm5/src/serializer.js +0 -98
- package/esm5/src/symbols.js +0 -39
- package/fesm5/ngxs-router-plugin.js +0 -946
- package/fesm5/ngxs-router-plugin.js.map +0 -1
- package/ngxs-router-plugin.metadata.json +0 -1
|
@@ -1,265 +1,377 @@
|
|
|
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
|
|
@@ -267,18 +379,8 @@
|
|
|
267
379
|
*/
|
|
268
380
|
/**
|
|
269
381
|
* An action dispatched when the router starts the navigation.
|
|
270
|
-
* @template T
|
|
271
382
|
*/
|
|
272
|
-
var
|
|
273
|
-
*
|
|
274
|
-
* Angular Routers internal state events
|
|
275
|
-
*
|
|
276
|
-
*/
|
|
277
|
-
/**
|
|
278
|
-
* An action dispatched when the router starts the navigation.
|
|
279
|
-
* @template T
|
|
280
|
-
*/
|
|
281
|
-
RouterRequest = /** @class */ (function () {
|
|
383
|
+
var RouterRequest = /** @class */ (function () {
|
|
282
384
|
function RouterRequest(routerState, event, trigger) {
|
|
283
385
|
if (trigger === void 0) { trigger = 'none'; }
|
|
284
386
|
this.routerState = routerState;
|
|
@@ -286,35 +388,19 @@
|
|
|
286
388
|
this.trigger = trigger;
|
|
287
389
|
}
|
|
288
390
|
Object.defineProperty(RouterRequest, "type", {
|
|
289
|
-
get:
|
|
290
|
-
* @return {?}
|
|
291
|
-
*/
|
|
292
|
-
function () {
|
|
391
|
+
get: function () {
|
|
293
392
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
294
393
|
return '[Router] RouterRequest';
|
|
295
394
|
},
|
|
296
|
-
enumerable:
|
|
395
|
+
enumerable: false,
|
|
297
396
|
configurable: true
|
|
298
397
|
});
|
|
299
398
|
return RouterRequest;
|
|
300
399
|
}());
|
|
301
|
-
if (false) {
|
|
302
|
-
/** @type {?} */
|
|
303
|
-
RouterRequest.prototype.routerState;
|
|
304
|
-
/** @type {?} */
|
|
305
|
-
RouterRequest.prototype.event;
|
|
306
|
-
/** @type {?} */
|
|
307
|
-
RouterRequest.prototype.trigger;
|
|
308
|
-
}
|
|
309
400
|
/**
|
|
310
401
|
* An action dispatched when the router navigates.
|
|
311
|
-
* @template T
|
|
312
|
-
*/
|
|
313
|
-
var /**
|
|
314
|
-
* An action dispatched when the router navigates.
|
|
315
|
-
* @template T
|
|
316
402
|
*/
|
|
317
|
-
RouterNavigation = /** @class */ (function () {
|
|
403
|
+
var RouterNavigation = /** @class */ (function () {
|
|
318
404
|
function RouterNavigation(routerState, event, trigger) {
|
|
319
405
|
if (trigger === void 0) { trigger = 'none'; }
|
|
320
406
|
this.routerState = routerState;
|
|
@@ -322,35 +408,19 @@
|
|
|
322
408
|
this.trigger = trigger;
|
|
323
409
|
}
|
|
324
410
|
Object.defineProperty(RouterNavigation, "type", {
|
|
325
|
-
get:
|
|
326
|
-
* @return {?}
|
|
327
|
-
*/
|
|
328
|
-
function () {
|
|
411
|
+
get: function () {
|
|
329
412
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
330
413
|
return '[Router] RouterNavigation';
|
|
331
414
|
},
|
|
332
|
-
enumerable:
|
|
415
|
+
enumerable: false,
|
|
333
416
|
configurable: true
|
|
334
417
|
});
|
|
335
418
|
return RouterNavigation;
|
|
336
419
|
}());
|
|
337
|
-
if (false) {
|
|
338
|
-
/** @type {?} */
|
|
339
|
-
RouterNavigation.prototype.routerState;
|
|
340
|
-
/** @type {?} */
|
|
341
|
-
RouterNavigation.prototype.event;
|
|
342
|
-
/** @type {?} */
|
|
343
|
-
RouterNavigation.prototype.trigger;
|
|
344
|
-
}
|
|
345
420
|
/**
|
|
346
421
|
* An action dispatched when the router cancel navigation.
|
|
347
|
-
* @template T, V
|
|
348
|
-
*/
|
|
349
|
-
var /**
|
|
350
|
-
* An action dispatched when the router cancel navigation.
|
|
351
|
-
* @template T, V
|
|
352
422
|
*/
|
|
353
|
-
RouterCancel = /** @class */ (function () {
|
|
423
|
+
var RouterCancel = /** @class */ (function () {
|
|
354
424
|
function RouterCancel(routerState, storeState, event, trigger) {
|
|
355
425
|
if (trigger === void 0) { trigger = 'none'; }
|
|
356
426
|
this.routerState = routerState;
|
|
@@ -359,37 +429,19 @@
|
|
|
359
429
|
this.trigger = trigger;
|
|
360
430
|
}
|
|
361
431
|
Object.defineProperty(RouterCancel, "type", {
|
|
362
|
-
get:
|
|
363
|
-
* @return {?}
|
|
364
|
-
*/
|
|
365
|
-
function () {
|
|
432
|
+
get: function () {
|
|
366
433
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
367
434
|
return '[Router] RouterCancel';
|
|
368
435
|
},
|
|
369
|
-
enumerable:
|
|
436
|
+
enumerable: false,
|
|
370
437
|
configurable: true
|
|
371
438
|
});
|
|
372
439
|
return RouterCancel;
|
|
373
440
|
}());
|
|
374
|
-
if (false) {
|
|
375
|
-
/** @type {?} */
|
|
376
|
-
RouterCancel.prototype.routerState;
|
|
377
|
-
/** @type {?} */
|
|
378
|
-
RouterCancel.prototype.storeState;
|
|
379
|
-
/** @type {?} */
|
|
380
|
-
RouterCancel.prototype.event;
|
|
381
|
-
/** @type {?} */
|
|
382
|
-
RouterCancel.prototype.trigger;
|
|
383
|
-
}
|
|
384
441
|
/**
|
|
385
442
|
* An action dispatched when the router errors.
|
|
386
|
-
* @template T, V
|
|
387
|
-
*/
|
|
388
|
-
var /**
|
|
389
|
-
* An action dispatched when the router errors.
|
|
390
|
-
* @template T, V
|
|
391
443
|
*/
|
|
392
|
-
RouterError = /** @class */ (function () {
|
|
444
|
+
var RouterError = /** @class */ (function () {
|
|
393
445
|
function RouterError(routerState, storeState, event, trigger) {
|
|
394
446
|
if (trigger === void 0) { trigger = 'none'; }
|
|
395
447
|
this.routerState = routerState;
|
|
@@ -398,37 +450,19 @@
|
|
|
398
450
|
this.trigger = trigger;
|
|
399
451
|
}
|
|
400
452
|
Object.defineProperty(RouterError, "type", {
|
|
401
|
-
get:
|
|
402
|
-
* @return {?}
|
|
403
|
-
*/
|
|
404
|
-
function () {
|
|
453
|
+
get: function () {
|
|
405
454
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
406
455
|
return '[Router] RouterError';
|
|
407
456
|
},
|
|
408
|
-
enumerable:
|
|
457
|
+
enumerable: false,
|
|
409
458
|
configurable: true
|
|
410
459
|
});
|
|
411
460
|
return RouterError;
|
|
412
461
|
}());
|
|
413
|
-
if (false) {
|
|
414
|
-
/** @type {?} */
|
|
415
|
-
RouterError.prototype.routerState;
|
|
416
|
-
/** @type {?} */
|
|
417
|
-
RouterError.prototype.storeState;
|
|
418
|
-
/** @type {?} */
|
|
419
|
-
RouterError.prototype.event;
|
|
420
|
-
/** @type {?} */
|
|
421
|
-
RouterError.prototype.trigger;
|
|
422
|
-
}
|
|
423
462
|
/**
|
|
424
463
|
* An action dispatched when the `ResolveEnd` event is triggered.
|
|
425
|
-
* @template T
|
|
426
464
|
*/
|
|
427
|
-
var
|
|
428
|
-
* An action dispatched when the `ResolveEnd` event is triggered.
|
|
429
|
-
* @template T
|
|
430
|
-
*/
|
|
431
|
-
RouterDataResolved = /** @class */ (function () {
|
|
465
|
+
var RouterDataResolved = /** @class */ (function () {
|
|
432
466
|
function RouterDataResolved(routerState, event, trigger) {
|
|
433
467
|
if (trigger === void 0) { trigger = 'none'; }
|
|
434
468
|
this.routerState = routerState;
|
|
@@ -436,35 +470,19 @@
|
|
|
436
470
|
this.trigger = trigger;
|
|
437
471
|
}
|
|
438
472
|
Object.defineProperty(RouterDataResolved, "type", {
|
|
439
|
-
get:
|
|
440
|
-
* @return {?}
|
|
441
|
-
*/
|
|
442
|
-
function () {
|
|
473
|
+
get: function () {
|
|
443
474
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
444
475
|
return '[Router] RouterDataResolved';
|
|
445
476
|
},
|
|
446
|
-
enumerable:
|
|
477
|
+
enumerable: false,
|
|
447
478
|
configurable: true
|
|
448
479
|
});
|
|
449
480
|
return RouterDataResolved;
|
|
450
481
|
}());
|
|
451
|
-
if (false) {
|
|
452
|
-
/** @type {?} */
|
|
453
|
-
RouterDataResolved.prototype.routerState;
|
|
454
|
-
/** @type {?} */
|
|
455
|
-
RouterDataResolved.prototype.event;
|
|
456
|
-
/** @type {?} */
|
|
457
|
-
RouterDataResolved.prototype.trigger;
|
|
458
|
-
}
|
|
459
482
|
/**
|
|
460
483
|
* An action dispatched when the router navigation has been finished successfully.
|
|
461
|
-
* @template T
|
|
462
|
-
*/
|
|
463
|
-
var /**
|
|
464
|
-
* An action dispatched when the router navigation has been finished successfully.
|
|
465
|
-
* @template T
|
|
466
484
|
*/
|
|
467
|
-
RouterNavigated = /** @class */ (function () {
|
|
485
|
+
var RouterNavigated = /** @class */ (function () {
|
|
468
486
|
function RouterNavigated(routerState, event, trigger) {
|
|
469
487
|
if (trigger === void 0) { trigger = 'none'; }
|
|
470
488
|
this.routerState = routerState;
|
|
@@ -472,97 +490,33 @@
|
|
|
472
490
|
this.trigger = trigger;
|
|
473
491
|
}
|
|
474
492
|
Object.defineProperty(RouterNavigated, "type", {
|
|
475
|
-
get:
|
|
476
|
-
* @return {?}
|
|
477
|
-
*/
|
|
478
|
-
function () {
|
|
493
|
+
get: function () {
|
|
479
494
|
// NOTE: Not necessary to declare the type in this way in your code. See https://github.com/ngxs/store/pull/644#issuecomment-436003138
|
|
480
495
|
return '[Router] RouterNavigated';
|
|
481
496
|
},
|
|
482
|
-
enumerable:
|
|
497
|
+
enumerable: false,
|
|
483
498
|
configurable: true
|
|
484
499
|
});
|
|
485
500
|
return RouterNavigated;
|
|
486
501
|
}());
|
|
487
|
-
if (false) {
|
|
488
|
-
/** @type {?} */
|
|
489
|
-
RouterNavigated.prototype.routerState;
|
|
490
|
-
/** @type {?} */
|
|
491
|
-
RouterNavigated.prototype.event;
|
|
492
|
-
/** @type {?} */
|
|
493
|
-
RouterNavigated.prototype.trigger;
|
|
494
|
-
}
|
|
495
502
|
|
|
496
|
-
/**
|
|
497
|
-
* @fileoverview added by tsickle
|
|
498
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
499
|
-
*/
|
|
500
|
-
/**
|
|
501
|
-
* @abstract
|
|
502
|
-
* @template T
|
|
503
|
-
*/
|
|
504
|
-
var /**
|
|
505
|
-
* @abstract
|
|
506
|
-
* @template T
|
|
507
|
-
*/
|
|
508
|
-
RouterStateSerializer = /** @class */ (function () {
|
|
503
|
+
var RouterStateSerializer = /** @class */ (function () {
|
|
509
504
|
function RouterStateSerializer() {
|
|
510
505
|
}
|
|
511
506
|
return RouterStateSerializer;
|
|
512
507
|
}());
|
|
513
|
-
if (false) {
|
|
514
|
-
/**
|
|
515
|
-
* @abstract
|
|
516
|
-
* @param {?} routerState
|
|
517
|
-
* @return {?}
|
|
518
|
-
*/
|
|
519
|
-
RouterStateSerializer.prototype.serialize = function (routerState) { };
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* @record
|
|
523
|
-
*/
|
|
524
|
-
function SerializedRouterStateSnapshot() { }
|
|
525
|
-
if (false) {
|
|
526
|
-
/** @type {?} */
|
|
527
|
-
SerializedRouterStateSnapshot.prototype.root;
|
|
528
|
-
/** @type {?} */
|
|
529
|
-
SerializedRouterStateSnapshot.prototype.url;
|
|
530
|
-
}
|
|
531
508
|
var DefaultRouterStateSerializer = /** @class */ (function () {
|
|
532
509
|
function DefaultRouterStateSerializer() {
|
|
533
510
|
}
|
|
534
|
-
|
|
535
|
-
* @param {?} routerState
|
|
536
|
-
* @return {?}
|
|
537
|
-
*/
|
|
538
|
-
DefaultRouterStateSerializer.prototype.serialize = /**
|
|
539
|
-
* @param {?} routerState
|
|
540
|
-
* @return {?}
|
|
541
|
-
*/
|
|
542
|
-
function (routerState) {
|
|
511
|
+
DefaultRouterStateSerializer.prototype.serialize = function (routerState) {
|
|
543
512
|
return {
|
|
544
513
|
root: this.serializeRoute(routerState.root),
|
|
545
514
|
url: routerState.url
|
|
546
515
|
};
|
|
547
516
|
};
|
|
548
|
-
|
|
549
|
-
* @private
|
|
550
|
-
* @param {?} route
|
|
551
|
-
* @return {?}
|
|
552
|
-
*/
|
|
553
|
-
DefaultRouterStateSerializer.prototype.serializeRoute = /**
|
|
554
|
-
* @private
|
|
555
|
-
* @param {?} route
|
|
556
|
-
* @return {?}
|
|
557
|
-
*/
|
|
558
|
-
function (route) {
|
|
517
|
+
DefaultRouterStateSerializer.prototype.serializeRoute = function (route) {
|
|
559
518
|
var _this = this;
|
|
560
|
-
|
|
561
|
-
var children = route.children.map((/**
|
|
562
|
-
* @param {?} c
|
|
563
|
-
* @return {?}
|
|
564
|
-
*/
|
|
565
|
-
function (c) { return _this.serializeRoute(c); }));
|
|
519
|
+
var children = route.children.map(function (c) { return _this.serializeRoute(c); });
|
|
566
520
|
return {
|
|
567
521
|
url: route.url,
|
|
568
522
|
params: route.params,
|
|
@@ -572,11 +526,11 @@
|
|
|
572
526
|
outlet: route.outlet,
|
|
573
527
|
component: null,
|
|
574
528
|
routeConfig: null,
|
|
575
|
-
root:
|
|
529
|
+
root: null,
|
|
576
530
|
parent: null,
|
|
577
531
|
firstChild: children[0],
|
|
578
532
|
children: children,
|
|
579
|
-
pathFromRoot:
|
|
533
|
+
pathFromRoot: null,
|
|
580
534
|
paramMap: route.paramMap,
|
|
581
535
|
queryParamMap: route.queryParamMap,
|
|
582
536
|
toString: route.toString
|
|
@@ -585,61 +539,16 @@
|
|
|
585
539
|
return DefaultRouterStateSerializer;
|
|
586
540
|
}());
|
|
587
541
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
591
|
-
*/
|
|
592
|
-
/** @enum {number} */
|
|
593
|
-
var NavigationActionTiming = {
|
|
594
|
-
PreActivation: 1,
|
|
595
|
-
PostActivation: 2,
|
|
596
|
-
};
|
|
597
|
-
/**
|
|
598
|
-
* @record
|
|
599
|
-
*/
|
|
600
|
-
function NgxsRouterPluginOptions() { }
|
|
601
|
-
if (false) {
|
|
602
|
-
/** @type {?|undefined} */
|
|
603
|
-
NgxsRouterPluginOptions.prototype.navigationActionTiming;
|
|
604
|
-
}
|
|
605
|
-
/** @type {?} */
|
|
606
|
-
var USER_OPTIONS = new core.InjectionToken('USER_OPTIONS', { providedIn: 'root', factory: (/**
|
|
607
|
-
* @return {?}
|
|
608
|
-
*/
|
|
609
|
-
function () { return undefined; }) });
|
|
610
|
-
/** @type {?} */
|
|
611
|
-
var NGXS_ROUTER_PLUGIN_OPTIONS = new core.InjectionToken('NGXS_ROUTER_PLUGIN_OPTIONS', { providedIn: 'root', factory: (/**
|
|
612
|
-
* @return {?}
|
|
613
|
-
*/
|
|
614
|
-
function () { return ({}); }) });
|
|
615
|
-
/**
|
|
616
|
-
* @param {?} options
|
|
617
|
-
* @return {?}
|
|
618
|
-
*/
|
|
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 ({}); } });
|
|
619
544
|
function createRouterPluginOptions(options) {
|
|
620
545
|
return {
|
|
621
546
|
navigationActionTiming: (options && options.navigationActionTiming) || 1 /* PreActivation */
|
|
622
547
|
};
|
|
623
548
|
}
|
|
624
549
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
628
|
-
*/
|
|
629
|
-
/**
|
|
630
|
-
* @record
|
|
631
|
-
* @template T
|
|
632
|
-
*/
|
|
633
|
-
function RouterStateModel() { }
|
|
634
|
-
if (false) {
|
|
635
|
-
/** @type {?|undefined} */
|
|
636
|
-
RouterStateModel.prototype.state;
|
|
637
|
-
/** @type {?|undefined} */
|
|
638
|
-
RouterStateModel.prototype.navigationId;
|
|
639
|
-
/** @type {?} */
|
|
640
|
-
RouterStateModel.prototype.trigger;
|
|
641
|
-
}
|
|
642
|
-
var RouterState = /** @class */ (function () {
|
|
550
|
+
var RouterState_1;
|
|
551
|
+
exports.RouterState = RouterState_1 = /** @class */ (function () {
|
|
643
552
|
function RouterState(_store, _router, _serializer, _ngZone, injector) {
|
|
644
553
|
this._store = _store;
|
|
645
554
|
this._router = _router;
|
|
@@ -667,173 +576,81 @@
|
|
|
667
576
|
this._setUpStoreListener();
|
|
668
577
|
this._setUpRouterEventsListener();
|
|
669
578
|
}
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* @template T
|
|
673
|
-
* @param {?} state
|
|
674
|
-
* @return {?}
|
|
675
|
-
*/
|
|
676
|
-
RouterState.state = /**
|
|
677
|
-
* @template T
|
|
678
|
-
* @param {?} state
|
|
679
|
-
* @return {?}
|
|
680
|
-
*/
|
|
681
|
-
function (state) {
|
|
579
|
+
RouterState.state = function (state) {
|
|
682
580
|
return state && state.state;
|
|
683
581
|
};
|
|
684
|
-
|
|
685
|
-
* @param {?} state
|
|
686
|
-
* @return {?}
|
|
687
|
-
*/
|
|
688
|
-
RouterState.url = /**
|
|
689
|
-
* @param {?} state
|
|
690
|
-
* @return {?}
|
|
691
|
-
*/
|
|
692
|
-
function (state) {
|
|
582
|
+
RouterState.url = function (state) {
|
|
693
583
|
return state && state.state && state.state.url;
|
|
694
584
|
};
|
|
695
|
-
|
|
696
|
-
* @return {?}
|
|
697
|
-
*/
|
|
698
|
-
RouterState.prototype.ngOnDestroy = /**
|
|
699
|
-
* @return {?}
|
|
700
|
-
*/
|
|
701
|
-
function () {
|
|
585
|
+
RouterState.prototype.ngOnDestroy = function () {
|
|
702
586
|
this._subscription.unsubscribe();
|
|
703
587
|
};
|
|
704
|
-
|
|
705
|
-
* @param {?} _
|
|
706
|
-
* @param {?} action
|
|
707
|
-
* @return {?}
|
|
708
|
-
*/
|
|
709
|
-
RouterState.prototype.navigate = /**
|
|
710
|
-
* @param {?} _
|
|
711
|
-
* @param {?} action
|
|
712
|
-
* @return {?}
|
|
713
|
-
*/
|
|
714
|
-
function (_, action) {
|
|
588
|
+
RouterState.prototype.navigate = function (_, action) {
|
|
715
589
|
var _this = this;
|
|
716
|
-
return this._ngZone.run((
|
|
717
|
-
* @return {?}
|
|
718
|
-
*/
|
|
719
|
-
function () {
|
|
720
|
-
return _this._router.navigate(action.path, __assign({ queryParams: action.queryParams }, action.extras));
|
|
721
|
-
}));
|
|
590
|
+
return this._ngZone.run(function () { return _this._router.navigate(action.path, Object.assign({ queryParams: action.queryParams }, action.extras)); });
|
|
722
591
|
};
|
|
723
|
-
|
|
724
|
-
* @param {?} ctx
|
|
725
|
-
* @param {?} action
|
|
726
|
-
* @return {?}
|
|
727
|
-
*/
|
|
728
|
-
RouterState.prototype.angularRouterAction = /**
|
|
729
|
-
* @param {?} ctx
|
|
730
|
-
* @param {?} action
|
|
731
|
-
* @return {?}
|
|
732
|
-
*/
|
|
733
|
-
function (ctx, action) {
|
|
592
|
+
RouterState.prototype.angularRouterAction = function (ctx, action) {
|
|
734
593
|
ctx.setState({
|
|
735
594
|
trigger: action.trigger,
|
|
736
595
|
state: action.routerState,
|
|
737
596
|
navigationId: action.event.id
|
|
738
597
|
});
|
|
739
598
|
};
|
|
740
|
-
|
|
741
|
-
* @private
|
|
742
|
-
* @return {?}
|
|
743
|
-
*/
|
|
744
|
-
RouterState.prototype._setUpStoreListener = /**
|
|
745
|
-
* @private
|
|
746
|
-
* @return {?}
|
|
747
|
-
*/
|
|
748
|
-
function () {
|
|
599
|
+
RouterState.prototype._setUpStoreListener = function () {
|
|
749
600
|
var _this = this;
|
|
750
|
-
/** @type {?} */
|
|
751
601
|
var subscription = this._store
|
|
752
602
|
.select(RouterState_1)
|
|
753
|
-
.subscribe((
|
|
754
|
-
* @param {?} state
|
|
755
|
-
* @return {?}
|
|
756
|
-
*/
|
|
757
|
-
function (state) {
|
|
603
|
+
.subscribe(function (state) {
|
|
758
604
|
_this._navigateIfNeeded(state);
|
|
759
|
-
})
|
|
605
|
+
});
|
|
760
606
|
this._subscription.add(subscription);
|
|
761
607
|
};
|
|
762
|
-
|
|
763
|
-
* @private
|
|
764
|
-
* @param {?} routerState
|
|
765
|
-
* @return {?}
|
|
766
|
-
*/
|
|
767
|
-
RouterState.prototype._navigateIfNeeded = /**
|
|
768
|
-
* @private
|
|
769
|
-
* @param {?} routerState
|
|
770
|
-
* @return {?}
|
|
771
|
-
*/
|
|
772
|
-
function (routerState) {
|
|
608
|
+
RouterState.prototype._navigateIfNeeded = function (routerState) {
|
|
773
609
|
var _this = this;
|
|
774
610
|
if (routerState && routerState.trigger === 'devtools') {
|
|
775
611
|
this._storeState = this._store.selectSnapshot(RouterState_1);
|
|
776
612
|
}
|
|
777
|
-
/** @type {?} */
|
|
778
613
|
var canSkipNavigation = !this._storeState ||
|
|
779
614
|
!this._storeState.state ||
|
|
780
615
|
!routerState ||
|
|
781
616
|
routerState.trigger === 'router' ||
|
|
782
617
|
this._router.url === this._storeState.state.url ||
|
|
783
|
-
this._lastEvent instanceof
|
|
618
|
+
this._lastEvent instanceof i2.NavigationStart;
|
|
784
619
|
if (canSkipNavigation) {
|
|
785
620
|
return;
|
|
786
621
|
}
|
|
787
622
|
this._storeState = this._store.selectSnapshot(RouterState_1);
|
|
788
623
|
this._trigger = 'store';
|
|
789
|
-
this._ngZone.run((
|
|
790
|
-
* @return {?}
|
|
791
|
-
*/
|
|
792
|
-
function () { return _this._router.navigateByUrl((/** @type {?} */ ((/** @type {?} */ (_this._storeState)).state)).url); }));
|
|
624
|
+
this._ngZone.run(function () { return _this._router.navigateByUrl(_this._storeState.state.url); });
|
|
793
625
|
};
|
|
794
|
-
|
|
795
|
-
* @private
|
|
796
|
-
* @return {?}
|
|
797
|
-
*/
|
|
798
|
-
RouterState.prototype._setUpRouterEventsListener = /**
|
|
799
|
-
* @private
|
|
800
|
-
* @return {?}
|
|
801
|
-
*/
|
|
802
|
-
function () {
|
|
626
|
+
RouterState.prototype._setUpRouterEventsListener = function () {
|
|
803
627
|
var _this = this;
|
|
804
|
-
/** @type {?} */
|
|
805
628
|
var dispatchRouterNavigationLate = this._options != null &&
|
|
806
629
|
this._options.navigationActionTiming === 2 /* PostActivation */;
|
|
807
|
-
/** @type {?} */
|
|
808
630
|
var lastRoutesRecognized;
|
|
809
|
-
|
|
810
|
-
var subscription = this._router.events.subscribe((/**
|
|
811
|
-
* @param {?} event
|
|
812
|
-
* @return {?}
|
|
813
|
-
*/
|
|
814
|
-
function (event) {
|
|
631
|
+
var subscription = this._router.events.subscribe(function (event) {
|
|
815
632
|
_this._lastEvent = event;
|
|
816
|
-
if (event instanceof
|
|
633
|
+
if (event instanceof i2.NavigationStart) {
|
|
817
634
|
_this._navigationStart(event);
|
|
818
635
|
}
|
|
819
|
-
else if (event instanceof
|
|
636
|
+
else if (event instanceof i2.RoutesRecognized) {
|
|
820
637
|
lastRoutesRecognized = event;
|
|
821
638
|
if (!dispatchRouterNavigationLate && _this._trigger !== 'store') {
|
|
822
639
|
_this._dispatchRouterNavigation(lastRoutesRecognized);
|
|
823
640
|
}
|
|
824
641
|
}
|
|
825
|
-
else if (event instanceof
|
|
642
|
+
else if (event instanceof i2.ResolveEnd) {
|
|
826
643
|
_this._dispatchRouterDataResolved(event);
|
|
827
644
|
}
|
|
828
|
-
else if (event instanceof
|
|
645
|
+
else if (event instanceof i2.NavigationCancel) {
|
|
829
646
|
_this._dispatchRouterCancel(event);
|
|
830
647
|
_this._reset();
|
|
831
648
|
}
|
|
832
|
-
else if (event instanceof
|
|
649
|
+
else if (event instanceof i2.NavigationError) {
|
|
833
650
|
_this._dispatchRouterError(event);
|
|
834
651
|
_this._reset();
|
|
835
652
|
}
|
|
836
|
-
else if (event instanceof
|
|
653
|
+
else if (event instanceof i2.NavigationEnd) {
|
|
837
654
|
if (_this._trigger !== 'store') {
|
|
838
655
|
if (dispatchRouterNavigationLate) {
|
|
839
656
|
_this._dispatchRouterNavigation(lastRoutesRecognized);
|
|
@@ -842,23 +659,11 @@
|
|
|
842
659
|
}
|
|
843
660
|
_this._reset();
|
|
844
661
|
}
|
|
845
|
-
})
|
|
662
|
+
});
|
|
846
663
|
this._subscription.add(subscription);
|
|
847
664
|
};
|
|
848
665
|
/** Reacts to `NavigationStart`. */
|
|
849
|
-
|
|
850
|
-
* Reacts to `NavigationStart`.
|
|
851
|
-
* @private
|
|
852
|
-
* @param {?} event
|
|
853
|
-
* @return {?}
|
|
854
|
-
*/
|
|
855
|
-
RouterState.prototype._navigationStart = /**
|
|
856
|
-
* Reacts to `NavigationStart`.
|
|
857
|
-
* @private
|
|
858
|
-
* @param {?} event
|
|
859
|
-
* @return {?}
|
|
860
|
-
*/
|
|
861
|
-
function (event) {
|
|
666
|
+
RouterState.prototype._navigationStart = function (event) {
|
|
862
667
|
this._routerState = this._serializer.serialize(this._router.routerState.snapshot);
|
|
863
668
|
if (this._trigger !== 'none') {
|
|
864
669
|
this._storeState = this._store.selectSnapshot(RouterState_1);
|
|
@@ -866,104 +671,29 @@
|
|
|
866
671
|
}
|
|
867
672
|
};
|
|
868
673
|
/** Reacts to `ResolveEnd`. */
|
|
869
|
-
|
|
870
|
-
* Reacts to `ResolveEnd`.
|
|
871
|
-
* @private
|
|
872
|
-
* @param {?} event
|
|
873
|
-
* @return {?}
|
|
874
|
-
*/
|
|
875
|
-
RouterState.prototype._dispatchRouterDataResolved = /**
|
|
876
|
-
* Reacts to `ResolveEnd`.
|
|
877
|
-
* @private
|
|
878
|
-
* @param {?} event
|
|
879
|
-
* @return {?}
|
|
880
|
-
*/
|
|
881
|
-
function (event) {
|
|
882
|
-
/** @type {?} */
|
|
674
|
+
RouterState.prototype._dispatchRouterDataResolved = function (event) {
|
|
883
675
|
var routerState = this._serializer.serialize(event.state);
|
|
884
676
|
this._dispatchRouterAction(new RouterDataResolved(routerState, event, this._trigger));
|
|
885
677
|
};
|
|
886
678
|
/** Reacts to `RoutesRecognized` or `NavigationEnd`, depends on the `navigationActionTiming`. */
|
|
887
|
-
|
|
888
|
-
* Reacts to `RoutesRecognized` or `NavigationEnd`, depends on the `navigationActionTiming`.
|
|
889
|
-
* @private
|
|
890
|
-
* @param {?} lastRoutesRecognized
|
|
891
|
-
* @return {?}
|
|
892
|
-
*/
|
|
893
|
-
RouterState.prototype._dispatchRouterNavigation = /**
|
|
894
|
-
* Reacts to `RoutesRecognized` or `NavigationEnd`, depends on the `navigationActionTiming`.
|
|
895
|
-
* @private
|
|
896
|
-
* @param {?} lastRoutesRecognized
|
|
897
|
-
* @return {?}
|
|
898
|
-
*/
|
|
899
|
-
function (lastRoutesRecognized) {
|
|
900
|
-
/** @type {?} */
|
|
679
|
+
RouterState.prototype._dispatchRouterNavigation = function (lastRoutesRecognized) {
|
|
901
680
|
var nextRouterState = this._serializer.serialize(lastRoutesRecognized.state);
|
|
902
|
-
this._dispatchRouterAction(new RouterNavigation(nextRouterState, new
|
|
681
|
+
this._dispatchRouterAction(new RouterNavigation(nextRouterState, new i2.RoutesRecognized(lastRoutesRecognized.id, lastRoutesRecognized.url, lastRoutesRecognized.urlAfterRedirects, nextRouterState), this._trigger));
|
|
903
682
|
};
|
|
904
683
|
/** Reacts to `NavigationCancel`. */
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
* @private
|
|
908
|
-
* @param {?} event
|
|
909
|
-
* @return {?}
|
|
910
|
-
*/
|
|
911
|
-
RouterState.prototype._dispatchRouterCancel = /**
|
|
912
|
-
* Reacts to `NavigationCancel`.
|
|
913
|
-
* @private
|
|
914
|
-
* @param {?} event
|
|
915
|
-
* @return {?}
|
|
916
|
-
*/
|
|
917
|
-
function (event) {
|
|
918
|
-
this._dispatchRouterAction(new RouterCancel((/** @type {?} */ (this._routerState)), this._storeState, event, this._trigger));
|
|
684
|
+
RouterState.prototype._dispatchRouterCancel = function (event) {
|
|
685
|
+
this._dispatchRouterAction(new RouterCancel(this._routerState, this._storeState, event, this._trigger));
|
|
919
686
|
};
|
|
920
687
|
/** Reacts to `NavigationEnd`. */
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
* @private
|
|
924
|
-
* @param {?} event
|
|
925
|
-
* @return {?}
|
|
926
|
-
*/
|
|
927
|
-
RouterState.prototype._dispatchRouterError = /**
|
|
928
|
-
* Reacts to `NavigationEnd`.
|
|
929
|
-
* @private
|
|
930
|
-
* @param {?} event
|
|
931
|
-
* @return {?}
|
|
932
|
-
*/
|
|
933
|
-
function (event) {
|
|
934
|
-
this._dispatchRouterAction(new RouterError((/** @type {?} */ (this._routerState)), this._storeState, new router.NavigationError(event.id, event.url, "" + event), this._trigger));
|
|
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));
|
|
935
690
|
};
|
|
936
691
|
/** Reacts to `NavigationEnd`. */
|
|
937
|
-
|
|
938
|
-
* Reacts to `NavigationEnd`.
|
|
939
|
-
* @private
|
|
940
|
-
* @param {?} event
|
|
941
|
-
* @return {?}
|
|
942
|
-
*/
|
|
943
|
-
RouterState.prototype._dispatchRouterNavigated = /**
|
|
944
|
-
* Reacts to `NavigationEnd`.
|
|
945
|
-
* @private
|
|
946
|
-
* @param {?} event
|
|
947
|
-
* @return {?}
|
|
948
|
-
*/
|
|
949
|
-
function (event) {
|
|
950
|
-
/** @type {?} */
|
|
692
|
+
RouterState.prototype._dispatchRouterNavigated = function (event) {
|
|
951
693
|
var routerState = this._serializer.serialize(this._router.routerState.snapshot);
|
|
952
694
|
this._dispatchRouterAction(new RouterNavigated(routerState, event, this._trigger));
|
|
953
695
|
};
|
|
954
|
-
|
|
955
|
-
* @private
|
|
956
|
-
* @template T
|
|
957
|
-
* @param {?} action
|
|
958
|
-
* @return {?}
|
|
959
|
-
*/
|
|
960
|
-
RouterState.prototype._dispatchRouterAction = /**
|
|
961
|
-
* @private
|
|
962
|
-
* @template T
|
|
963
|
-
* @param {?} action
|
|
964
|
-
* @return {?}
|
|
965
|
-
*/
|
|
966
|
-
function (action) {
|
|
696
|
+
RouterState.prototype._dispatchRouterAction = function (action) {
|
|
967
697
|
this._trigger = 'router';
|
|
968
698
|
try {
|
|
969
699
|
this._store.dispatch(action);
|
|
@@ -972,159 +702,69 @@
|
|
|
972
702
|
this._trigger = 'none';
|
|
973
703
|
}
|
|
974
704
|
};
|
|
975
|
-
|
|
976
|
-
* @private
|
|
977
|
-
* @return {?}
|
|
978
|
-
*/
|
|
979
|
-
RouterState.prototype._reset = /**
|
|
980
|
-
* @private
|
|
981
|
-
* @return {?}
|
|
982
|
-
*/
|
|
983
|
-
function () {
|
|
705
|
+
RouterState.prototype._reset = function () {
|
|
984
706
|
this._trigger = 'none';
|
|
985
707
|
this._storeState = null;
|
|
986
708
|
this._routerState = null;
|
|
987
709
|
};
|
|
988
|
-
var RouterState_1;
|
|
989
|
-
RouterState.ctorParameters = function () { return [
|
|
990
|
-
{ type: store.Store },
|
|
991
|
-
{ type: router.Router },
|
|
992
|
-
{ type: RouterStateSerializer },
|
|
993
|
-
{ type: core.NgZone },
|
|
994
|
-
{ type: core.Injector }
|
|
995
|
-
]; };
|
|
996
|
-
RouterState.decorators = [
|
|
997
|
-
{ type: core.Injectable }
|
|
998
|
-
];
|
|
999
|
-
/** @nocollapse */
|
|
1000
|
-
RouterState.ctorParameters = function () { return [
|
|
1001
|
-
{ type: store.Store },
|
|
1002
|
-
{ type: router.Router },
|
|
1003
|
-
{ type: RouterStateSerializer },
|
|
1004
|
-
{ type: core.NgZone },
|
|
1005
|
-
{ type: core.Injector }
|
|
1006
|
-
]; };
|
|
1007
|
-
__decorate([
|
|
1008
|
-
store.Action(Navigate),
|
|
1009
|
-
__metadata("design:type", Function),
|
|
1010
|
-
__metadata("design:paramtypes", [Object, Navigate]),
|
|
1011
|
-
__metadata("design:returntype", void 0)
|
|
1012
|
-
], RouterState.prototype, "navigate", null);
|
|
1013
|
-
__decorate([
|
|
1014
|
-
store.Action([
|
|
1015
|
-
RouterRequest,
|
|
1016
|
-
RouterNavigation,
|
|
1017
|
-
RouterError,
|
|
1018
|
-
RouterCancel,
|
|
1019
|
-
RouterDataResolved,
|
|
1020
|
-
RouterNavigated
|
|
1021
|
-
]),
|
|
1022
|
-
__metadata("design:type", Function),
|
|
1023
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
1024
|
-
__metadata("design:returntype", void 0)
|
|
1025
|
-
], RouterState.prototype, "angularRouterAction", null);
|
|
1026
|
-
__decorate([
|
|
1027
|
-
store.Selector(),
|
|
1028
|
-
__metadata("design:type", Function),
|
|
1029
|
-
__metadata("design:paramtypes", [Object]),
|
|
1030
|
-
__metadata("design:returntype", void 0)
|
|
1031
|
-
], RouterState, "state", null);
|
|
1032
|
-
__decorate([
|
|
1033
|
-
store.Selector(),
|
|
1034
|
-
__metadata("design:type", Function),
|
|
1035
|
-
__metadata("design:paramtypes", [Object]),
|
|
1036
|
-
__metadata("design:returntype", Object)
|
|
1037
|
-
], RouterState, "url", null);
|
|
1038
|
-
RouterState = RouterState_1 = __decorate([
|
|
1039
|
-
store.State({
|
|
1040
|
-
name: 'router',
|
|
1041
|
-
defaults: {
|
|
1042
|
-
state: undefined,
|
|
1043
|
-
navigationId: undefined,
|
|
1044
|
-
trigger: 'none'
|
|
1045
|
-
}
|
|
1046
|
-
}),
|
|
1047
|
-
__metadata("design:paramtypes", [store.Store,
|
|
1048
|
-
router.Router,
|
|
1049
|
-
RouterStateSerializer,
|
|
1050
|
-
core.NgZone,
|
|
1051
|
-
core.Injector])
|
|
1052
|
-
], RouterState);
|
|
1053
710
|
return RouterState;
|
|
1054
711
|
}());
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
* @type {?}
|
|
1107
|
-
* @private
|
|
1108
|
-
*/
|
|
1109
|
-
RouterState.prototype._ngZone;
|
|
1110
|
-
}
|
|
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: [] } });
|
|
1111
763
|
|
|
1112
|
-
/**
|
|
1113
|
-
* @fileoverview added by tsickle
|
|
1114
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1115
|
-
*/
|
|
1116
764
|
var NgxsRouterPluginModule = /** @class */ (function () {
|
|
1117
765
|
function NgxsRouterPluginModule() {
|
|
1118
766
|
}
|
|
1119
|
-
|
|
1120
|
-
* @param {?=} options
|
|
1121
|
-
* @return {?}
|
|
1122
|
-
*/
|
|
1123
|
-
NgxsRouterPluginModule.forRoot = /**
|
|
1124
|
-
* @param {?=} options
|
|
1125
|
-
* @return {?}
|
|
1126
|
-
*/
|
|
1127
|
-
function (options) {
|
|
767
|
+
NgxsRouterPluginModule.forRoot = function (options) {
|
|
1128
768
|
return {
|
|
1129
769
|
ngModule: NgxsRouterPluginModule,
|
|
1130
770
|
providers: [
|
|
@@ -1138,13 +778,25 @@
|
|
|
1138
778
|
]
|
|
1139
779
|
};
|
|
1140
780
|
};
|
|
1141
|
-
NgxsRouterPluginModule.decorators = [
|
|
1142
|
-
{ type: core.NgModule, args: [{
|
|
1143
|
-
imports: [store.NgxsModule.forFeature([RouterState])]
|
|
1144
|
-
},] }
|
|
1145
|
-
];
|
|
1146
781
|
return NgxsRouterPluginModule;
|
|
1147
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
|
+
*/
|
|
1148
800
|
|
|
1149
801
|
exports.DefaultRouterStateSerializer = DefaultRouterStateSerializer;
|
|
1150
802
|
exports.Navigate = Navigate;
|
|
@@ -1155,11 +807,7 @@
|
|
|
1155
807
|
exports.RouterNavigated = RouterNavigated;
|
|
1156
808
|
exports.RouterNavigation = RouterNavigation;
|
|
1157
809
|
exports.RouterRequest = RouterRequest;
|
|
1158
|
-
exports.RouterState = RouterState;
|
|
1159
810
|
exports.RouterStateSerializer = RouterStateSerializer;
|
|
1160
|
-
exports.ɵb = USER_OPTIONS;
|
|
1161
|
-
exports.ɵc = NGXS_ROUTER_PLUGIN_OPTIONS;
|
|
1162
|
-
exports.ɵd = createRouterPluginOptions;
|
|
1163
811
|
|
|
1164
812
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1165
813
|
|