@tramvai/module-router 1.55.3 → 1.57.1
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/lib/index.browser.js +4 -1
- package/lib/index.es.js +5 -3
- package/lib/index.js +3 -1
- package/lib/modules/hooks/runActions.d.ts +3 -2
- package/lib/services/page.d.ts +1 -1
- package/package.json +14 -14
package/lib/index.browser.js
CHANGED
|
@@ -421,7 +421,7 @@ const stopRunAtError = (error) => {
|
|
|
421
421
|
return true;
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
|
-
const runActionsFactory = ({ router, actionRegistry, actionPageRunner, }) => {
|
|
424
|
+
const runActionsFactory = ({ store, router, actionRegistry, actionPageRunner, }) => {
|
|
425
425
|
return function runActions() {
|
|
426
426
|
const route = router.getCurrentRoute();
|
|
427
427
|
const { config: { bundle, pageComponent } = {} } = route;
|
|
@@ -490,6 +490,7 @@ const providers = [
|
|
|
490
490
|
multi: true,
|
|
491
491
|
useFactory: runActionsFactory,
|
|
492
492
|
deps: {
|
|
493
|
+
store: STORE_TOKEN,
|
|
493
494
|
router: ROUTER_TOKEN,
|
|
494
495
|
actionRegistry: ACTION_REGISTRY_TOKEN,
|
|
495
496
|
actionPageRunner: ACTION_PAGE_RUNNER_TOKEN,
|
|
@@ -556,6 +557,7 @@ const spaHooks = [
|
|
|
556
557
|
return noop;
|
|
557
558
|
},
|
|
558
559
|
deps: {
|
|
560
|
+
store: STORE_TOKEN,
|
|
559
561
|
router: ROUTER_TOKEN,
|
|
560
562
|
actionRegistry: ACTION_REGISTRY_TOKEN,
|
|
561
563
|
actionPageRunner: ACTION_PAGE_RUNNER_TOKEN,
|
|
@@ -577,6 +579,7 @@ const spaHooks = [
|
|
|
577
579
|
return noop;
|
|
578
580
|
},
|
|
579
581
|
deps: {
|
|
582
|
+
store: STORE_TOKEN,
|
|
580
583
|
router: ROUTER_TOKEN,
|
|
581
584
|
actionRegistry: ACTION_REGISTRY_TOKEN,
|
|
582
585
|
actionPageRunner: ACTION_PAGE_RUNNER_TOKEN,
|
package/lib/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import { provide, commandLineListTokens, Module } from '@tramvai/core';
|
|
3
|
-
import { Provider, setLogger, Router } from '@tinkoff/router';
|
|
3
|
+
import { Provider, setLogger, isWildcard, isHistoryFallback, Router } from '@tinkoff/router';
|
|
4
4
|
export { Link, Provider, useNavigate, useRoute, useRouter, useUrl } from '@tinkoff/router';
|
|
5
|
-
import { LOGGER_TOKEN, BUNDLE_MANAGER_TOKEN, ACTION_REGISTRY_TOKEN, RESPONSE_MANAGER_TOKEN, CONTEXT_TOKEN, COMPONENT_REGISTRY_TOKEN, COMBINE_REDUCERS, REQUEST_MANAGER_TOKEN, ACTION_PAGE_RUNNER_TOKEN } from '@tramvai/tokens-common';
|
|
5
|
+
import { LOGGER_TOKEN, BUNDLE_MANAGER_TOKEN, ACTION_REGISTRY_TOKEN, RESPONSE_MANAGER_TOKEN, CONTEXT_TOKEN, COMPONENT_REGISTRY_TOKEN, COMBINE_REDUCERS, REQUEST_MANAGER_TOKEN, STORE_TOKEN, ACTION_PAGE_RUNNER_TOKEN } from '@tramvai/tokens-common';
|
|
6
6
|
import { ROUTER_GUARD_TOKEN, ROUTE_TRANSFORM_TOKEN, ROUTER_TOKEN, ROUTES_TOKEN, ROUTE_RESOLVE_TOKEN, ROUTER_SPA_ACTIONS_RUN_MODE_TOKEN, PAGE_SERVICE_TOKEN } from '@tramvai/tokens-router';
|
|
7
7
|
export * from '@tramvai/tokens-router';
|
|
8
8
|
import flatten from '@tinkoff/utils/array/flatten';
|
|
@@ -455,7 +455,7 @@ const stopRunAtError = (error) => {
|
|
|
455
455
|
return true;
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
|
-
const runActionsFactory = ({ router, actionRegistry, actionPageRunner, }) => {
|
|
458
|
+
const runActionsFactory = ({ store, router, actionRegistry, actionPageRunner, }) => {
|
|
459
459
|
return function runActions() {
|
|
460
460
|
const route = router.getCurrentRoute();
|
|
461
461
|
const { config: { bundle, pageComponent } = {} } = route;
|
|
@@ -536,6 +536,7 @@ const bundleInfo = ({ routes, routeTransform, }) => {
|
|
|
536
536
|
.concat((_b = (await loadAdditional())) !== null && _b !== void 0 ? _b : [])
|
|
537
537
|
.map(routeTransform)
|
|
538
538
|
.map(prop('path'))
|
|
539
|
+
.filter((path) => !isWildcard(path) && !isHistoryFallback(path))
|
|
539
540
|
.sort());
|
|
540
541
|
},
|
|
541
542
|
deps: {
|
|
@@ -620,6 +621,7 @@ NoSpaRouterModule = NoSpaRouterModule_1 = __decorate([
|
|
|
620
621
|
multi: true,
|
|
621
622
|
useFactory: runActionsFactory,
|
|
622
623
|
deps: {
|
|
624
|
+
store: STORE_TOKEN,
|
|
623
625
|
router: ROUTER_TOKEN,
|
|
624
626
|
actionRegistry: ACTION_REGISTRY_TOKEN,
|
|
625
627
|
actionPageRunner: ACTION_PAGE_RUNNER_TOKEN,
|
package/lib/index.js
CHANGED
|
@@ -467,7 +467,7 @@ const stopRunAtError = (error) => {
|
|
|
467
467
|
return true;
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
|
-
const runActionsFactory = ({ router, actionRegistry, actionPageRunner, }) => {
|
|
470
|
+
const runActionsFactory = ({ store, router, actionRegistry, actionPageRunner, }) => {
|
|
471
471
|
return function runActions() {
|
|
472
472
|
const route = router.getCurrentRoute();
|
|
473
473
|
const { config: { bundle, pageComponent } = {} } = route;
|
|
@@ -548,6 +548,7 @@ const bundleInfo = ({ routes, routeTransform, }) => {
|
|
|
548
548
|
.concat((_b = (await loadAdditional())) !== null && _b !== void 0 ? _b : [])
|
|
549
549
|
.map(routeTransform)
|
|
550
550
|
.map(prop__default["default"]('path'))
|
|
551
|
+
.filter((path) => !router.isWildcard(path) && !router.isHistoryFallback(path))
|
|
551
552
|
.sort());
|
|
552
553
|
},
|
|
553
554
|
deps: {
|
|
@@ -632,6 +633,7 @@ exports.NoSpaRouterModule = NoSpaRouterModule_1 = tslib.__decorate([
|
|
|
632
633
|
multi: true,
|
|
633
634
|
useFactory: runActionsFactory,
|
|
634
635
|
deps: {
|
|
636
|
+
store: tokensCommon.STORE_TOKEN,
|
|
635
637
|
router: tokensRouter.ROUTER_TOKEN,
|
|
636
638
|
actionRegistry: tokensCommon.ACTION_REGISTRY_TOKEN,
|
|
637
639
|
actionPageRunner: tokensCommon.ACTION_PAGE_RUNNER_TOKEN,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ACTION_REGISTRY_TOKEN, ACTION_PAGE_RUNNER_TOKEN } from '@tramvai/tokens-common';
|
|
1
|
+
import type { ACTION_REGISTRY_TOKEN, ACTION_PAGE_RUNNER_TOKEN, STORE_TOKEN } from '@tramvai/tokens-common';
|
|
2
2
|
import type { ROUTER_TOKEN } from '@tramvai/tokens-router';
|
|
3
|
-
export declare const runActionsFactory: ({ router, actionRegistry, actionPageRunner, }: {
|
|
3
|
+
export declare const runActionsFactory: ({ store, router, actionRegistry, actionPageRunner, }: {
|
|
4
|
+
store: typeof STORE_TOKEN;
|
|
4
5
|
router: typeof ROUTER_TOKEN;
|
|
5
6
|
actionRegistry: typeof ACTION_REGISTRY_TOKEN;
|
|
6
7
|
actionPageRunner: typeof ACTION_PAGE_RUNNER_TOKEN;
|
package/lib/services/page.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class PageService implements PageServiceInterface {
|
|
|
21
21
|
go(to: number, options?: HistoryOptions): Promise<void>;
|
|
22
22
|
addComponent(name: string, component: any): void;
|
|
23
23
|
getComponent(name: string): any;
|
|
24
|
-
resolveComponentFromConfig(property: 'page' | 'layout' | 'header' | 'footer'): any;
|
|
24
|
+
resolveComponentFromConfig(property: 'page' | 'layout' | 'header' | 'footer' | 'errorBoundary'): any;
|
|
25
25
|
private getComponentsGroupName;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-router",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"@tinkoff/errors": "0.2.18",
|
|
26
26
|
"@tinkoff/router": "0.1.68",
|
|
27
27
|
"@tinkoff/url": "0.7.37",
|
|
28
|
-
"@tramvai/tokens-render": "1.
|
|
29
|
-
"@tramvai/tokens-router": "1.
|
|
30
|
-
"@tramvai/tokens-server": "1.
|
|
31
|
-
"@tramvai/experiments": "1.
|
|
28
|
+
"@tramvai/tokens-render": "1.57.1",
|
|
29
|
+
"@tramvai/tokens-router": "1.57.1",
|
|
30
|
+
"@tramvai/tokens-server": "1.57.1",
|
|
31
|
+
"@tramvai/experiments": "1.57.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@tinkoff/utils": "^2.1.2",
|
|
35
|
-
"@tramvai/cli": "1.
|
|
36
|
-
"@tramvai/core": "1.
|
|
37
|
-
"@tramvai/module-log": "1.
|
|
38
|
-
"@tramvai/module-server": "1.
|
|
39
|
-
"@tramvai/papi": "1.
|
|
40
|
-
"@tramvai/state": "1.
|
|
41
|
-
"@tramvai/test-helpers": "1.
|
|
42
|
-
"@tramvai/test-mocks": "1.
|
|
43
|
-
"@tramvai/tokens-common": "1.
|
|
35
|
+
"@tramvai/cli": "1.57.1",
|
|
36
|
+
"@tramvai/core": "1.57.1",
|
|
37
|
+
"@tramvai/module-log": "1.57.1",
|
|
38
|
+
"@tramvai/module-server": "1.57.1",
|
|
39
|
+
"@tramvai/papi": "1.57.1",
|
|
40
|
+
"@tramvai/state": "1.57.1",
|
|
41
|
+
"@tramvai/test-helpers": "1.57.1",
|
|
42
|
+
"@tramvai/test-mocks": "1.57.1",
|
|
43
|
+
"@tramvai/tokens-common": "1.57.1",
|
|
44
44
|
"@tinkoff/dippy": "0.7.38",
|
|
45
45
|
"react": "*",
|
|
46
46
|
"tslib": "^2.0.3"
|