@etsoo/react 1.5.91 → 1.5.92
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.d.ts +0 -1
- package/lib/index.js +0 -1
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/lib/components/HRouter.d.ts +0 -8
- package/lib/components/HRouter.js +0 -15
- package/src/components/HRouter.tsx +0 -26
package/lib/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export * from './components/DnDList';
|
|
|
6
6
|
export * from './components/GridColumn';
|
|
7
7
|
export * from './components/GridLoader';
|
|
8
8
|
export * from './components/GridMethodRef';
|
|
9
|
-
export * from './components/HRouter';
|
|
10
9
|
export * from './components/ListItemReact';
|
|
11
10
|
export * from './components/ScrollerGrid';
|
|
12
11
|
export * from './components/ScrollerList';
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,6 @@ export * from './components/DnDList';
|
|
|
8
8
|
export * from './components/GridColumn';
|
|
9
9
|
export * from './components/GridLoader';
|
|
10
10
|
export * from './components/GridMethodRef';
|
|
11
|
-
export * from './components/HRouter';
|
|
12
11
|
export * from './components/ListItemReact';
|
|
13
12
|
export * from './components/ScrollerGrid';
|
|
14
13
|
export * from './components/ScrollerList';
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from './components/DnDList';
|
|
|
9
9
|
export * from './components/GridColumn';
|
|
10
10
|
export * from './components/GridLoader';
|
|
11
11
|
export * from './components/GridMethodRef';
|
|
12
|
-
export * from './components/HRouter';
|
|
13
12
|
export * from './components/ListItemReact';
|
|
14
13
|
export * from './components/ScrollerGrid';
|
|
15
14
|
export * from './components/ScrollerList';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HistoryRouterProps } from 'react-router-dom';
|
|
3
|
-
/**
|
|
4
|
-
* Open to use HistoryRouter of react-router-dom
|
|
5
|
-
* @param History router properties
|
|
6
|
-
* @returns Component
|
|
7
|
-
*/
|
|
8
|
-
export declare function HRouter({ basename, children, history }: HistoryRouterProps): JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Router } from 'react-router-dom';
|
|
3
|
-
/**
|
|
4
|
-
* Open to use HistoryRouter of react-router-dom
|
|
5
|
-
* @param History router properties
|
|
6
|
-
* @returns Component
|
|
7
|
-
*/
|
|
8
|
-
export function HRouter({ basename, children, history }) {
|
|
9
|
-
const [state, setState] = React.useState({
|
|
10
|
-
action: history.action,
|
|
11
|
-
location: history.location
|
|
12
|
-
});
|
|
13
|
-
React.useLayoutEffect(() => history.listen(setState), [history]);
|
|
14
|
-
return (React.createElement(Router, { basename: basename, children: children, location: state.location, navigationType: state.action, navigator: history }));
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { HistoryRouterProps, Router } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Open to use HistoryRouter of react-router-dom
|
|
6
|
-
* @param History router properties
|
|
7
|
-
* @returns Component
|
|
8
|
-
*/
|
|
9
|
-
export function HRouter({ basename, children, history }: HistoryRouterProps) {
|
|
10
|
-
const [state, setState] = React.useState({
|
|
11
|
-
action: history.action,
|
|
12
|
-
location: history.location
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
React.useLayoutEffect(() => history.listen(setState), [history]);
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Router
|
|
19
|
-
basename={basename}
|
|
20
|
-
children={children}
|
|
21
|
-
location={state.location}
|
|
22
|
-
navigationType={state.action}
|
|
23
|
-
navigator={history}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|