@tinkoff/router 0.4.190 → 0.4.214
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.
|
@@ -13,7 +13,7 @@ class ClientRouter extends AbstractRouter {
|
|
|
13
13
|
this.history.listen(async ({ type, url, navigateState, replace, history }) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const currentUrl = this.getCurrentUrl();
|
|
16
|
-
const { pathname, query } = this.resolveUrl({ url });
|
|
16
|
+
const { pathname, query, hash } = this.resolveUrl({ url });
|
|
17
17
|
const isSameUrlNavigation = (currentUrl ? currentUrl.pathname : window.location.pathname) === pathname;
|
|
18
18
|
const isUpdateCurrentRoute = type === 'updateCurrentRoute' || (!type && isSameUrlNavigation);
|
|
19
19
|
//
|
|
@@ -38,6 +38,7 @@ class ClientRouter extends AbstractRouter {
|
|
|
38
38
|
await this.internalUpdateCurrentRoute({
|
|
39
39
|
params: route === null || route === void 0 ? void 0 : route.params,
|
|
40
40
|
query,
|
|
41
|
+
hash,
|
|
41
42
|
replace,
|
|
42
43
|
navigateState,
|
|
43
44
|
}, { history });
|
package/lib/router/client.es.js
CHANGED
|
@@ -13,7 +13,7 @@ class ClientRouter extends AbstractRouter {
|
|
|
13
13
|
this.history.listen(async ({ type, url, navigateState, replace, history }) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const currentUrl = this.getCurrentUrl();
|
|
16
|
-
const { pathname, query } = this.resolveUrl({ url });
|
|
16
|
+
const { pathname, query, hash } = this.resolveUrl({ url });
|
|
17
17
|
const isSameUrlNavigation = (currentUrl ? currentUrl.pathname : window.location.pathname) === pathname;
|
|
18
18
|
const isUpdateCurrentRoute = type === 'updateCurrentRoute' || (!type && isSameUrlNavigation);
|
|
19
19
|
//
|
|
@@ -38,6 +38,7 @@ class ClientRouter extends AbstractRouter {
|
|
|
38
38
|
await this.internalUpdateCurrentRoute({
|
|
39
39
|
params: route === null || route === void 0 ? void 0 : route.params,
|
|
40
40
|
query,
|
|
41
|
+
hash,
|
|
41
42
|
replace,
|
|
42
43
|
navigateState,
|
|
43
44
|
}, { history });
|
package/lib/router/client.js
CHANGED
|
@@ -17,7 +17,7 @@ class ClientRouter extends abstract.AbstractRouter {
|
|
|
17
17
|
this.history.listen(async ({ type, url, navigateState, replace, history }) => {
|
|
18
18
|
var _a;
|
|
19
19
|
const currentUrl = this.getCurrentUrl();
|
|
20
|
-
const { pathname, query } = this.resolveUrl({ url });
|
|
20
|
+
const { pathname, query, hash } = this.resolveUrl({ url });
|
|
21
21
|
const isSameUrlNavigation = (currentUrl ? currentUrl.pathname : window.location.pathname) === pathname;
|
|
22
22
|
const isUpdateCurrentRoute = type === 'updateCurrentRoute' || (!type && isSameUrlNavigation);
|
|
23
23
|
//
|
|
@@ -42,6 +42,7 @@ class ClientRouter extends abstract.AbstractRouter {
|
|
|
42
42
|
await this.internalUpdateCurrentRoute({
|
|
43
43
|
params: route === null || route === void 0 ? void 0 : route.params,
|
|
44
44
|
query,
|
|
45
|
+
hash,
|
|
45
46
|
replace,
|
|
46
47
|
navigateState,
|
|
47
48
|
}, { history });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinkoff/router",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.214",
|
|
4
4
|
"description": "router",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"use-sync-external-store": "^1.2.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@tramvai/core": "4.41.
|
|
30
|
+
"@tramvai/core": "4.41.79",
|
|
31
31
|
"react": ">=16.14.0",
|
|
32
32
|
"tslib": "^2.4.0"
|
|
33
33
|
},
|