@tramvai/module-child-app 7.39.0 → 7.41.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.
@@ -1,9 +1,10 @@
1
1
  import noop from '@tinkoff/utils/function/noop';
2
2
  import { provide } from '@tramvai/core';
3
3
  import { commandLineListTokens, CHILD_APP_INTERNAL_ROOT_STATE_SUBSCRIPTION_TOKEN, CHILD_APP_PAGE_SERVICE_TOKEN, CHILD_REQUIRED_CONTRACTS, CHILD_APP_COMMON_INITIAL_STATE_TOKEN } from '@tramvai/tokens-child-app';
4
- import { CONTEXT_TOKEN, ACTION_PAGE_RUNNER_TOKEN } from '@tramvai/tokens-common';
4
+ import { CONTEXT_TOKEN, ACTION_PAGE_RUNNER_TOKEN, DEFERRED_ACTIONS_MAP_TOKEN, ACTION_EXECUTION_TOKEN } from '@tramvai/tokens-common';
5
5
  import { Subscription } from '@tramvai/state';
6
6
  import { ROUTER_SPA_ACTIONS_RUN_MODE_TOKEN } from '@tramvai/tokens-router';
7
+ import { resetDeferredAction } from '@tramvai/module-router';
7
8
 
8
9
  const getChildProviders = (appDi) => {
9
10
  const context = appDi.get(CONTEXT_TOKEN);
@@ -48,19 +49,23 @@ const getChildProviders = (appDi) => {
48
49
  provide({
49
50
  provide: commandLineListTokens.spaTransition,
50
51
  multi: true,
51
- useFactory: ({ spaMode, actionRunner, childAppPageService }) => {
52
- if (spaMode !== 'after') {
53
- return async function childAppRunActions() {
54
- await childAppPageService.resolveComponent();
52
+ useFactory: ({ spaMode, actionRunner, childAppPageService, deferredActionsMap, actionExecution, }) => {
53
+ return async function childAppRunActions() {
54
+ await childAppPageService.resolveComponent();
55
+ childAppPageService
56
+ .getActions()
57
+ .forEach((action) => resetDeferredAction(action, deferredActionsMap, actionExecution));
58
+ if (spaMode !== 'after') {
55
59
  return actionRunner.runActions(childAppPageService.getActions());
56
- };
57
- }
58
- return noop;
60
+ }
61
+ };
59
62
  },
60
63
  deps: {
61
64
  actionRunner: ACTION_PAGE_RUNNER_TOKEN,
62
65
  childAppPageService: CHILD_APP_PAGE_SERVICE_TOKEN,
63
66
  spaMode: ROUTER_SPA_ACTIONS_RUN_MODE_TOKEN,
67
+ deferredActionsMap: DEFERRED_ACTIONS_MAP_TOKEN,
68
+ actionExecution: ACTION_EXECUTION_TOKEN,
64
69
  },
65
70
  }),
66
71
  provide({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-child-app",
3
- "version": "7.39.0",
3
+ "version": "7.41.1",
4
4
  "description": "Module for child apps",
5
5
  "browser": {
6
6
  "./lib/server.es.js": "./lib/browser.js",
@@ -36,22 +36,22 @@
36
36
  "@tinkoff/module-loader-client": "0.9.1",
37
37
  "@tinkoff/module-loader-server": "0.10.3",
38
38
  "@tinkoff/url": "0.13.1",
39
- "@tramvai/child-app-core": "7.39.0",
40
- "@tramvai/module-common": "7.39.0",
41
- "@tramvai/module-router": "7.39.0",
39
+ "@tramvai/child-app-core": "7.41.1",
40
+ "@tramvai/module-common": "7.41.1",
41
+ "@tramvai/module-router": "7.41.1",
42
42
  "@tramvai/safe-strings": "0.10.2",
43
- "@tramvai/tokens-child-app": "7.39.0"
43
+ "@tramvai/tokens-child-app": "7.41.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@tinkoff/dippy": "^1.0.0",
47
- "@tinkoff/router": "0.7.149",
47
+ "@tinkoff/router": "0.7.153",
48
48
  "@tinkoff/utils": "^2.1.2",
49
- "@tramvai/core": "7.39.0",
50
- "@tramvai/react": "7.39.0",
51
- "@tramvai/state": "7.39.0",
52
- "@tramvai/tokens-common": "7.39.0",
53
- "@tramvai/tokens-render": "7.39.0",
54
- "@tramvai/tokens-router": "7.39.0",
49
+ "@tramvai/core": "7.41.1",
50
+ "@tramvai/react": "7.41.1",
51
+ "@tramvai/state": "7.41.1",
52
+ "@tramvai/tokens-common": "7.41.1",
53
+ "@tramvai/tokens-render": "7.41.1",
54
+ "@tramvai/tokens-router": "7.41.1",
55
55
  "object-assign": "^4.1.1",
56
56
  "react": ">=16.14.0",
57
57
  "react-dom": ">=16.14.0",
@@ -59,14 +59,14 @@
59
59
  "tslib": "^2.4.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@tramvai/module-http-client": "7.39.0",
63
- "@tramvai/module-react-query": "7.39.0",
64
- "@tramvai/module-render": "7.39.0",
65
- "@tramvai/module-router": "7.39.0",
66
- "@tramvai/module-server": "7.39.0",
67
- "@tramvai/react": "7.39.0",
68
- "@tramvai/react-query": "7.39.0",
69
- "@tramvai/state": "7.39.0"
62
+ "@tramvai/module-http-client": "7.41.1",
63
+ "@tramvai/module-react-query": "7.41.1",
64
+ "@tramvai/module-render": "7.41.1",
65
+ "@tramvai/module-router": "7.41.1",
66
+ "@tramvai/module-server": "7.41.1",
67
+ "@tramvai/react": "7.41.1",
68
+ "@tramvai/react-query": "7.41.1",
69
+ "@tramvai/state": "7.41.1"
70
70
  },
71
71
  "module": "lib/server.es.js"
72
72
  }