@steroidsjs/core 3.0.0-beta.37 → 3.0.0-beta.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steroidsjs/core",
3
- "version": "3.0.0-beta.37",
3
+ "version": "3.0.0-beta.38",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { IButtonProps } from 'src/ui/form/Button/Button';
3
3
  /**
4
4
  * Modal
@@ -14,7 +14,7 @@ export interface IModalProps {
14
14
  * Компонент, который отрендерится внутри Modal
15
15
  * @example () => <InnerModalComponent />
16
16
  */
17
- component?: any;
17
+ component?: (props: React.ComponentProps<any>) => JSX.Element;
18
18
  /**
19
19
  * Свойства для внутреннего компонента
20
20
  */
@@ -82,13 +82,13 @@ var renderComponent = function (route, activePath, routeProps) {
82
82
  function Router(props) {
83
83
  var components = (0, hooks_1.useComponents)();
84
84
  var _a = (0, hooks_1.useSelector)(function (state) {
85
- var _a, _b;
85
+ var _a, _b, _c;
86
86
  return ({
87
87
  isInitialized: (0, router_2.isRouterInitialized)(state),
88
88
  pathname: (0, get_1["default"])(state, 'router.location.pathname'),
89
89
  route: (0, router_2.getRoute)(state),
90
- routeParams: state.router.params,
91
- activePath: (_b = (_a = state.router) === null || _a === void 0 ? void 0 : _a.location) === null || _b === void 0 ? void 0 : _b.pathname,
90
+ routeParams: (_a = state.router.match) === null || _a === void 0 ? void 0 : _a.params,
91
+ activePath: (_c = (_b = state.router) === null || _b === void 0 ? void 0 : _b.location) === null || _c === void 0 ? void 0 : _c.pathname,
92
92
  activeRouteIds: (0, router_2.getActiveRouteIds)(state)
93
93
  });
94
94
  }), isInitialized = _a.isInitialized, pathname = _a.pathname, route = _a.route, routeParams = _a.routeParams, activePath = _a.activePath, activeRouteIds = _a.activeRouteIds;
@@ -152,8 +152,7 @@ function Router(props) {
152
152
  return activeRoute && activeRoute.role !== exports.ROUTER_ROLE_MODAL;
153
153
  });
154
154
  if (parentRouteId) {
155
- // TODO route params?..
156
- dispatch((0, router_1.goToRoute)(parentRouteId));
155
+ dispatch((0, router_1.goToRoute)(parentRouteId, routeParams));
157
156
  }
158
157
  }
159
158
  });