@tanstack/react-router 0.0.1-beta.30 → 0.0.1-beta.32
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/build/cjs/index.js +3 -2
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +3 -2
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +50 -50
- package/build/types/index.d.ts +2 -3
- package/build/umd/index.development.js +26 -27
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +2 -2
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/index.tsx +7 -7
package/build/stats-react.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"name": "index.production.js",
|
|
8
8
|
"children": [
|
|
9
9
|
{
|
|
10
|
-
"uid": "
|
|
10
|
+
"uid": "7bea-73",
|
|
11
11
|
"name": "\u0000rollupPluginBabelHelpers.js"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"children": [
|
|
16
16
|
{
|
|
17
17
|
"name": "@babel+runtime@7.20.6/node_modules/@babel/runtime/helpers/esm/extends.js",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "7bea-75"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "history@5.3.0/node_modules/history/index.js",
|
|
22
|
-
"uid": "
|
|
22
|
+
"uid": "7bea-77"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
26
|
-
"uid": "
|
|
26
|
+
"uid": "7bea-79"
|
|
27
27
|
}
|
|
28
28
|
]
|
|
29
29
|
},
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"children": [
|
|
33
33
|
{
|
|
34
34
|
"name": "router-core/build/esm/index.js",
|
|
35
|
-
"uid": "
|
|
35
|
+
"uid": "7bea-81"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"name": "react-router/src/index.tsx",
|
|
39
|
-
"uid": "
|
|
39
|
+
"uid": "7bea-83"
|
|
40
40
|
}
|
|
41
41
|
]
|
|
42
42
|
}
|
|
@@ -46,155 +46,155 @@
|
|
|
46
46
|
"isRoot": true
|
|
47
47
|
},
|
|
48
48
|
"nodeParts": {
|
|
49
|
-
"
|
|
49
|
+
"7bea-73": {
|
|
50
50
|
"renderedLength": 793,
|
|
51
51
|
"gzipLength": 363,
|
|
52
52
|
"brotliLength": 0,
|
|
53
|
-
"mainUid": "
|
|
53
|
+
"mainUid": "7bea-72"
|
|
54
54
|
},
|
|
55
|
-
"
|
|
55
|
+
"7bea-75": {
|
|
56
56
|
"renderedLength": 435,
|
|
57
57
|
"gzipLength": 241,
|
|
58
58
|
"brotliLength": 0,
|
|
59
|
-
"mainUid": "
|
|
59
|
+
"mainUid": "7bea-74"
|
|
60
60
|
},
|
|
61
|
-
"
|
|
61
|
+
"7bea-77": {
|
|
62
62
|
"renderedLength": 20630,
|
|
63
63
|
"gzipLength": 3800,
|
|
64
64
|
"brotliLength": 0,
|
|
65
|
-
"mainUid": "
|
|
65
|
+
"mainUid": "7bea-76"
|
|
66
66
|
},
|
|
67
|
-
"
|
|
67
|
+
"7bea-79": {
|
|
68
68
|
"renderedLength": 181,
|
|
69
69
|
"gzipLength": 129,
|
|
70
70
|
"brotliLength": 0,
|
|
71
|
-
"mainUid": "
|
|
71
|
+
"mainUid": "7bea-78"
|
|
72
72
|
},
|
|
73
|
-
"
|
|
74
|
-
"renderedLength":
|
|
75
|
-
"gzipLength":
|
|
73
|
+
"7bea-81": {
|
|
74
|
+
"renderedLength": 54705,
|
|
75
|
+
"gzipLength": 12303,
|
|
76
76
|
"brotliLength": 0,
|
|
77
|
-
"mainUid": "
|
|
77
|
+
"mainUid": "7bea-80"
|
|
78
78
|
},
|
|
79
|
-
"
|
|
80
|
-
"renderedLength":
|
|
81
|
-
"gzipLength":
|
|
79
|
+
"7bea-83": {
|
|
80
|
+
"renderedLength": 14166,
|
|
81
|
+
"gzipLength": 3535,
|
|
82
82
|
"brotliLength": 0,
|
|
83
|
-
"mainUid": "
|
|
83
|
+
"mainUid": "7bea-82"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"nodeMetas": {
|
|
87
|
-
"
|
|
87
|
+
"7bea-72": {
|
|
88
88
|
"id": "\u0000rollupPluginBabelHelpers.js",
|
|
89
89
|
"moduleParts": {
|
|
90
|
-
"index.production.js": "
|
|
90
|
+
"index.production.js": "7bea-73"
|
|
91
91
|
},
|
|
92
92
|
"imported": [],
|
|
93
93
|
"importedBy": [
|
|
94
94
|
{
|
|
95
|
-
"uid": "
|
|
95
|
+
"uid": "7bea-82"
|
|
96
96
|
}
|
|
97
97
|
]
|
|
98
98
|
},
|
|
99
|
-
"
|
|
99
|
+
"7bea-74": {
|
|
100
100
|
"id": "/node_modules/.pnpm/@babel+runtime@7.20.6/node_modules/@babel/runtime/helpers/esm/extends.js",
|
|
101
101
|
"moduleParts": {
|
|
102
|
-
"index.production.js": "
|
|
102
|
+
"index.production.js": "7bea-75"
|
|
103
103
|
},
|
|
104
104
|
"imported": [],
|
|
105
105
|
"importedBy": [
|
|
106
106
|
{
|
|
107
|
-
"uid": "
|
|
107
|
+
"uid": "7bea-76"
|
|
108
108
|
}
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
|
-
"
|
|
111
|
+
"7bea-76": {
|
|
112
112
|
"id": "/node_modules/.pnpm/history@5.3.0/node_modules/history/index.js",
|
|
113
113
|
"moduleParts": {
|
|
114
|
-
"index.production.js": "
|
|
114
|
+
"index.production.js": "7bea-77"
|
|
115
115
|
},
|
|
116
116
|
"imported": [
|
|
117
117
|
{
|
|
118
|
-
"uid": "
|
|
118
|
+
"uid": "7bea-74"
|
|
119
119
|
}
|
|
120
120
|
],
|
|
121
121
|
"importedBy": [
|
|
122
122
|
{
|
|
123
|
-
"uid": "
|
|
123
|
+
"uid": "7bea-80"
|
|
124
124
|
}
|
|
125
125
|
]
|
|
126
126
|
},
|
|
127
|
-
"
|
|
127
|
+
"7bea-78": {
|
|
128
128
|
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
129
129
|
"moduleParts": {
|
|
130
|
-
"index.production.js": "
|
|
130
|
+
"index.production.js": "7bea-79"
|
|
131
131
|
},
|
|
132
132
|
"imported": [],
|
|
133
133
|
"importedBy": [
|
|
134
134
|
{
|
|
135
|
-
"uid": "
|
|
135
|
+
"uid": "7bea-80"
|
|
136
136
|
}
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
"
|
|
139
|
+
"7bea-80": {
|
|
140
140
|
"id": "/packages/router-core/build/esm/index.js",
|
|
141
141
|
"moduleParts": {
|
|
142
|
-
"index.production.js": "
|
|
142
|
+
"index.production.js": "7bea-81"
|
|
143
143
|
},
|
|
144
144
|
"imported": [
|
|
145
145
|
{
|
|
146
|
-
"uid": "
|
|
146
|
+
"uid": "7bea-76"
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
|
-
"uid": "
|
|
149
|
+
"uid": "7bea-78"
|
|
150
150
|
}
|
|
151
151
|
],
|
|
152
152
|
"importedBy": [
|
|
153
153
|
{
|
|
154
|
-
"uid": "
|
|
154
|
+
"uid": "7bea-82"
|
|
155
155
|
}
|
|
156
156
|
]
|
|
157
157
|
},
|
|
158
|
-
"
|
|
158
|
+
"7bea-82": {
|
|
159
159
|
"id": "/packages/react-router/src/index.tsx",
|
|
160
160
|
"moduleParts": {
|
|
161
|
-
"index.production.js": "
|
|
161
|
+
"index.production.js": "7bea-83"
|
|
162
162
|
},
|
|
163
163
|
"imported": [
|
|
164
164
|
{
|
|
165
|
-
"uid": "
|
|
165
|
+
"uid": "7bea-72"
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
|
-
"uid": "
|
|
168
|
+
"uid": "7bea-84"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
"uid": "
|
|
171
|
+
"uid": "7bea-85"
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
|
-
"uid": "
|
|
174
|
+
"uid": "7bea-80"
|
|
175
175
|
}
|
|
176
176
|
],
|
|
177
177
|
"importedBy": [],
|
|
178
178
|
"isEntry": true
|
|
179
179
|
},
|
|
180
|
-
"
|
|
180
|
+
"7bea-84": {
|
|
181
181
|
"id": "react",
|
|
182
182
|
"moduleParts": {},
|
|
183
183
|
"imported": [],
|
|
184
184
|
"importedBy": [
|
|
185
185
|
{
|
|
186
|
-
"uid": "
|
|
186
|
+
"uid": "7bea-82"
|
|
187
187
|
}
|
|
188
188
|
],
|
|
189
189
|
"isExternal": true
|
|
190
190
|
},
|
|
191
|
-
"
|
|
191
|
+
"7bea-85": {
|
|
192
192
|
"id": "use-sync-external-store/shim",
|
|
193
193
|
"moduleParts": {},
|
|
194
194
|
"imported": [],
|
|
195
195
|
"importedBy": [
|
|
196
196
|
{
|
|
197
|
-
"uid": "
|
|
197
|
+
"uid": "7bea-82"
|
|
198
198
|
}
|
|
199
199
|
],
|
|
200
200
|
"isExternal": true
|
package/build/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
|
-
import { AnyRouteConfig, RouteConfig, AnyAllRouteInfo, AllRouteInfo, RouterState, RouteMatch,
|
|
12
|
+
import { AnyRouteConfig, RouteConfig, AnyAllRouteInfo, AllRouteInfo, RouterState, RouteMatch, DefaultAllRouteInfo, AnyRouteInfo, RouteInfo, ResolveRelativePath, NoInfer, CheckId, ToIdOption, ValidFromPath, LinkOptions, ToOptions, MatchRouteOptions, RouteInfoByPath, RegisteredAllRouteInfo, RegisteredRouter, RouterOptions, Router, Route } from '@tanstack/router-core';
|
|
13
13
|
export * from '@tanstack/router-core';
|
|
14
14
|
|
|
15
15
|
type SyncRouteComponent<TProps = {}> = (props: TProps) => JSX.Element | React.ReactNode;
|
|
@@ -47,7 +47,6 @@ declare module '@tanstack/router-core' {
|
|
|
47
47
|
interface Router<TRouteConfig extends AnyRouteConfig = RouteConfig, TAllRouteInfo extends AnyAllRouteInfo = AllRouteInfo<TRouteConfig>> {
|
|
48
48
|
useState: () => RouterState;
|
|
49
49
|
useRoute: <TId extends keyof TAllRouteInfo['routeInfoById']>(routeId: TId) => Route<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TId]>;
|
|
50
|
-
useNearestMatch: () => RouteMatch<TAllRouteInfo, RouteInfo>;
|
|
51
50
|
useMatch: <TId extends keyof TAllRouteInfo['routeInfoById'], TStrict extends boolean = true>(routeId: TId, opts?: {
|
|
52
51
|
strict?: TStrict;
|
|
53
52
|
}) => TStrict extends true ? RouteMatch<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TId]> : RouteMatch<TAllRouteInfo, TAllRouteInfo['routeInfoById'][TId]> | undefined;
|
|
@@ -102,4 +101,4 @@ declare function DefaultErrorBoundary({ error }: {
|
|
|
102
101
|
declare function usePrompt(message: string, when: boolean | any): void;
|
|
103
102
|
declare function Prompt({ message, when, children }: PromptProps): React.ReactNode;
|
|
104
103
|
|
|
105
|
-
export { DefaultErrorBoundary, Link, MatchRoute, MatchesProvider, MatchesProviderProps, Outlet, Prompt, PromptProps, RouteComponent, RouterProps, RouterProvider, SyncRouteComponent, createReactRouter, lazy, linkProps, matchesContext, routerContext, useMatch, useMatches, useNearestMatch, usePrompt, useRoute, useRouter, useSearch };
|
|
104
|
+
export { DefaultErrorBoundary, Link, LinkPropsOptions, MakeLinkOptions, MakeLinkPropsOptions, MakeMatchRouteOptions, MatchRoute, MatchesProvider, MatchesProviderProps, Outlet, Prompt, PromptProps, RouteComponent, RouterProps, RouterProvider, SyncRouteComponent, createReactRouter, lazy, linkProps, matchesContext, routerContext, useMatch, useMatches, useNearestMatch, usePrompt, useRoute, useRouter, useSearch };
|
|
@@ -1401,7 +1401,7 @@
|
|
|
1401
1401
|
validate: () => {
|
|
1402
1402
|
var _routeMatch$parentMat, _routeMatch$parentMat2;
|
|
1403
1403
|
// Validate the search params and stabilize them
|
|
1404
|
-
const parentSearch = (_routeMatch$parentMat = (_routeMatch$parentMat2 = routeMatch.parentMatch) == null ? void 0 : _routeMatch$parentMat2.search) != null ? _routeMatch$parentMat : router.
|
|
1404
|
+
const parentSearch = (_routeMatch$parentMat = (_routeMatch$parentMat2 = routeMatch.parentMatch) == null ? void 0 : _routeMatch$parentMat2.search) != null ? _routeMatch$parentMat : router.__location.search;
|
|
1405
1405
|
try {
|
|
1406
1406
|
var _validator;
|
|
1407
1407
|
const prevSearch = routeMatch.routeSearch;
|
|
@@ -1639,7 +1639,7 @@
|
|
|
1639
1639
|
basepath: '',
|
|
1640
1640
|
routeTree: undefined,
|
|
1641
1641
|
routesById: {},
|
|
1642
|
-
|
|
1642
|
+
__location: undefined,
|
|
1643
1643
|
//
|
|
1644
1644
|
resolveNavigation: () => {},
|
|
1645
1645
|
matchCache: {},
|
|
@@ -1672,7 +1672,7 @@
|
|
|
1672
1672
|
},
|
|
1673
1673
|
dehydrate: () => {
|
|
1674
1674
|
return {
|
|
1675
|
-
location: router.
|
|
1675
|
+
location: router.__location,
|
|
1676
1676
|
state: _extends({}, pick(router.state, ['status', 'location', 'lastUpdated', 'location']), {
|
|
1677
1677
|
matches: router.state.matches.map(match => pick(match, ['matchId', 'status', 'routeLoaderData', 'loaderData', 'isInvalid', 'invalidAt']))
|
|
1678
1678
|
}),
|
|
@@ -1681,13 +1681,13 @@
|
|
|
1681
1681
|
},
|
|
1682
1682
|
hydrate: dehydratedState => {
|
|
1683
1683
|
// Update the location
|
|
1684
|
-
router.
|
|
1684
|
+
router.__location = dehydratedState.location;
|
|
1685
1685
|
|
|
1686
1686
|
// Update the context
|
|
1687
1687
|
router.options.context = dehydratedState.context;
|
|
1688
1688
|
|
|
1689
1689
|
// Match the routes
|
|
1690
|
-
const matches = router.matchRoutes(router.
|
|
1690
|
+
const matches = router.matchRoutes(router.__location.pathname, {
|
|
1691
1691
|
strictParseParams: true
|
|
1692
1692
|
});
|
|
1693
1693
|
matches.forEach((match, index) => {
|
|
@@ -1709,14 +1709,14 @@
|
|
|
1709
1709
|
|
|
1710
1710
|
// If the current location isn't updated, trigger a navigation
|
|
1711
1711
|
// to the current location. Otherwise, load the current location.
|
|
1712
|
-
if (next.href !== router.
|
|
1712
|
+
if (next.href !== router.__location.href) {
|
|
1713
1713
|
router.__.commitLocation(next, true);
|
|
1714
1714
|
}
|
|
1715
1715
|
if (!router.state.matches.length) {
|
|
1716
1716
|
router.load();
|
|
1717
1717
|
}
|
|
1718
1718
|
const unsub = router.history.listen(event => {
|
|
1719
|
-
router.load(router.__.parseLocation(event.location, router.
|
|
1719
|
+
router.load(router.__.parseLocation(event.location, router.__location));
|
|
1720
1720
|
});
|
|
1721
1721
|
|
|
1722
1722
|
// addEventListener does not exist in React Native, but window does
|
|
@@ -1740,12 +1740,12 @@
|
|
|
1740
1740
|
},
|
|
1741
1741
|
update: opts => {
|
|
1742
1742
|
const newHistory = (opts == null ? void 0 : opts.history) !== router.history;
|
|
1743
|
-
if (!router.
|
|
1743
|
+
if (!router.__location || newHistory) {
|
|
1744
1744
|
if (opts != null && opts.history) {
|
|
1745
1745
|
router.history = opts.history;
|
|
1746
1746
|
}
|
|
1747
|
-
router.
|
|
1748
|
-
router.state.location = router.
|
|
1747
|
+
router.__location = router.__.parseLocation(router.history.location);
|
|
1748
|
+
router.state.location = router.__location;
|
|
1749
1749
|
}
|
|
1750
1750
|
Object.assign(router.options, opts);
|
|
1751
1751
|
const {
|
|
@@ -1770,28 +1770,28 @@
|
|
|
1770
1770
|
router.startedLoadingAt = id;
|
|
1771
1771
|
if (next) {
|
|
1772
1772
|
// Ingest the new location
|
|
1773
|
-
router.
|
|
1773
|
+
router.__location = next;
|
|
1774
1774
|
}
|
|
1775
1775
|
|
|
1776
1776
|
// Cancel any pending matches
|
|
1777
1777
|
router.cancelMatches();
|
|
1778
1778
|
|
|
1779
1779
|
// Match the routes
|
|
1780
|
-
const matches = router.matchRoutes(router.
|
|
1780
|
+
const matches = router.matchRoutes(router.__location.pathname, {
|
|
1781
1781
|
strictParseParams: true
|
|
1782
1782
|
});
|
|
1783
1783
|
if (typeof document !== 'undefined') {
|
|
1784
1784
|
router.state = _extends({}, router.state, {
|
|
1785
1785
|
pending: {
|
|
1786
1786
|
matches: matches,
|
|
1787
|
-
location: router.
|
|
1787
|
+
location: router.__location
|
|
1788
1788
|
},
|
|
1789
1789
|
status: 'loading'
|
|
1790
1790
|
});
|
|
1791
1791
|
} else {
|
|
1792
1792
|
router.state = _extends({}, router.state, {
|
|
1793
1793
|
matches: matches,
|
|
1794
|
-
location: router.
|
|
1794
|
+
location: router.__location,
|
|
1795
1795
|
status: 'loading'
|
|
1796
1796
|
});
|
|
1797
1797
|
}
|
|
@@ -1875,7 +1875,7 @@
|
|
|
1875
1875
|
}
|
|
1876
1876
|
});
|
|
1877
1877
|
router.state = _extends({}, router.state, {
|
|
1878
|
-
location: router.
|
|
1878
|
+
location: router.__location,
|
|
1879
1879
|
matches,
|
|
1880
1880
|
pending: undefined,
|
|
1881
1881
|
status: 'idle'
|
|
@@ -1904,7 +1904,7 @@
|
|
|
1904
1904
|
},
|
|
1905
1905
|
loadRoute: async function loadRoute(navigateOpts) {
|
|
1906
1906
|
if (navigateOpts === void 0) {
|
|
1907
|
-
navigateOpts = router.
|
|
1907
|
+
navigateOpts = router.__location;
|
|
1908
1908
|
}
|
|
1909
1909
|
const next = router.buildNext(navigateOpts);
|
|
1910
1910
|
const matches = router.matchRoutes(next.pathname, {
|
|
@@ -1916,7 +1916,7 @@
|
|
|
1916
1916
|
preloadRoute: async function preloadRoute(navigateOpts, loaderOpts) {
|
|
1917
1917
|
var _ref3, _ref4, _loaderOpts$maxAge, _ref5, _ref6, _loaderOpts$gcMaxAge;
|
|
1918
1918
|
if (navigateOpts === void 0) {
|
|
1919
|
-
navigateOpts = router.
|
|
1919
|
+
navigateOpts = router.__location;
|
|
1920
1920
|
}
|
|
1921
1921
|
const next = router.buildNext(navigateOpts);
|
|
1922
1922
|
const matches = router.matchRoutes(next.pathname, {
|
|
@@ -2296,11 +2296,9 @@
|
|
|
2296
2296
|
if (dest === void 0) {
|
|
2297
2297
|
dest = {};
|
|
2298
2298
|
}
|
|
2299
|
-
|
|
2300
|
-
// ...router.location,
|
|
2301
|
-
const fromPathname = dest.fromCurrent ? router.location.pathname : (_dest$from = dest.from) != null ? _dest$from : router.location.pathname;
|
|
2299
|
+
const fromPathname = dest.fromCurrent ? router.__location.pathname : (_dest$from = dest.from) != null ? _dest$from : router.__location.pathname;
|
|
2302
2300
|
let pathname = resolvePath((_router$basepath = router.basepath) != null ? _router$basepath : '/', fromPathname, "" + ((_dest$to = dest.to) != null ? _dest$to : '.'));
|
|
2303
|
-
const fromMatches = router.matchRoutes(router.
|
|
2301
|
+
const fromMatches = router.matchRoutes(router.__location.pathname, {
|
|
2304
2302
|
strictParseParams: true
|
|
2305
2303
|
});
|
|
2306
2304
|
const toMatches = router.matchRoutes(pathname);
|
|
@@ -2314,7 +2312,7 @@
|
|
|
2314
2312
|
pathname = interpolatePath(pathname, nextParams != null ? nextParams : {});
|
|
2315
2313
|
|
|
2316
2314
|
// Pre filters first
|
|
2317
|
-
const preFilteredSearch = (_dest$__preSearchFilt = dest.__preSearchFilters) != null && _dest$__preSearchFilt.length ? dest.__preSearchFilters.reduce((prev, next) => next(prev), router.
|
|
2315
|
+
const preFilteredSearch = (_dest$__preSearchFilt = dest.__preSearchFilters) != null && _dest$__preSearchFilt.length ? dest.__preSearchFilters.reduce((prev, next) => next(prev), router.__location.search) : router.__location.search;
|
|
2318
2316
|
|
|
2319
2317
|
// Then the link/navigate function
|
|
2320
2318
|
const destSearch = dest.search === true ? preFilteredSearch // Preserve resolvedFrom true
|
|
@@ -2324,15 +2322,15 @@
|
|
|
2324
2322
|
|
|
2325
2323
|
// Then post filters
|
|
2326
2324
|
const postFilteredSearch = (_dest$__postSearchFil = dest.__postSearchFilters) != null && _dest$__postSearchFil.length ? dest.__postSearchFilters.reduce((prev, next) => next(prev), destSearch) : destSearch;
|
|
2327
|
-
const search = replaceEqualDeep(router.
|
|
2325
|
+
const search = replaceEqualDeep(router.__location.search, postFilteredSearch);
|
|
2328
2326
|
const searchStr = router.options.stringifySearch(search);
|
|
2329
|
-
let hash = dest.hash === true ? router.
|
|
2327
|
+
let hash = dest.hash === true ? router.__location.hash : functionalUpdate(dest.hash, router.__location.hash);
|
|
2330
2328
|
hash = hash ? "#" + hash : '';
|
|
2331
2329
|
return {
|
|
2332
2330
|
pathname,
|
|
2333
2331
|
search,
|
|
2334
2332
|
searchStr,
|
|
2335
|
-
state: router.
|
|
2333
|
+
state: router.__location.state,
|
|
2336
2334
|
hash,
|
|
2337
2335
|
href: "" + pathname + searchStr + hash,
|
|
2338
2336
|
key: dest.key
|
|
@@ -2493,8 +2491,9 @@
|
|
|
2493
2491
|
});else handleClick(e);
|
|
2494
2492
|
};
|
|
2495
2493
|
const composeHandlers = handlers => e => {
|
|
2496
|
-
e.persist();
|
|
2494
|
+
if (e.persist) e.persist();
|
|
2497
2495
|
handlers.forEach(handler => {
|
|
2496
|
+
if (e.defaultPrevented) return;
|
|
2498
2497
|
if (handler) handler(e);
|
|
2499
2498
|
});
|
|
2500
2499
|
};
|
|
@@ -2762,7 +2761,7 @@
|
|
|
2762
2761
|
unblock();
|
|
2763
2762
|
transition.retry();
|
|
2764
2763
|
} else {
|
|
2765
|
-
router.location.pathname = window.location.pathname;
|
|
2764
|
+
router.state.location.pathname = window.location.pathname;
|
|
2766
2765
|
}
|
|
2767
2766
|
});
|
|
2768
2767
|
return unblock;
|