@topthink/common 1.5.9 → 1.5.10
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 +3 -3
- package/types/components/access.d.ts +1 -1
- package/types/components/app-provider.d.ts +1 -1
- package/types/components/content.d.ts +1 -1
- package/types/components/header.d.ts +1 -1
- package/types/components/link-button.d.ts +1 -2
- package/types/components/user-provider.d.ts +1 -1
- package/types/components/with-request.d.ts +1 -1
- package/types/layout/sider/index.d.ts +1 -1
- package/types/layout/sider/toggle.d.ts +1 -2
- package/types/layout/tab.d.ts +1 -1
- package/types/pages/login.d.ts +1 -1
- package/types/pages/logout.d.ts +1 -2
- package/types/pages/social.d.ts +1 -2
- package/types/utils/create-application.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topthink/common",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prebuild": "rimraf lib types",
|
|
6
6
|
"build": "rollup -c --environment NODE_ENV:production",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"scss"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@topthink/components": "^1.1.
|
|
19
|
+
"@topthink/components": "^1.1.8",
|
|
20
20
|
"classnames": "^2.3.1",
|
|
21
21
|
"history": "^5.0.0",
|
|
22
22
|
"query-string": "^8.1.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"author": "yunwuxin <tzzhangyajun@qq.com> (https://github.com/yunwuxin)",
|
|
53
53
|
"license": "MIT",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "8d8c9e127c692c2ec5319f146b70f06f921fdc06"
|
|
55
55
|
}
|
|
@@ -5,4 +5,4 @@ export interface AccessProps {
|
|
|
5
5
|
fallback?: ReactNode;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export default function Access({ require, children, fallback }: AccessProps): JSX.Element;
|
|
8
|
+
export default function Access({ require, children, fallback }: AccessProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,7 +6,7 @@ interface Props {
|
|
|
6
6
|
appResolver?: AppResolver;
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export default function AppProvider({ appResolver, children }: Props): JSX.Element;
|
|
9
|
+
export default function AppProvider({ appResolver, children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare function useAppState(): AppContextType;
|
|
11
11
|
export declare function useApp(): App;
|
|
12
12
|
export {};
|
|
@@ -9,5 +9,5 @@ interface ContentProps<As extends ElementType = ElementType> {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
bodyAs?: As;
|
|
11
11
|
}
|
|
12
|
-
export default function Content({ title, header, nav, children, extra, showBack, className, bodyAs, fixed }: PropsWithChildren<ContentProps>): JSX.Element;
|
|
12
|
+
export default function Content({ title, header, nav, children, extra, showBack, className, bodyAs, fixed }: PropsWithChildren<ContentProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -4,5 +4,5 @@ interface Props {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
logo?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export default function Header({ children, menus, className, logo }: PropsWithChildren<Props>): JSX.Element;
|
|
7
|
+
export default function Header({ children, menus, className, logo }: PropsWithChildren<Props>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LinkProps } from 'react-router-dom';
|
|
3
2
|
import { ButtonProps } from '@topthink/components';
|
|
4
3
|
interface Props extends ButtonProps, Pick<LinkProps, 'to' | 'replace'> {
|
|
5
4
|
}
|
|
6
|
-
export default function LinkButton({ to, replace, ...props }: Props): JSX.Element;
|
|
5
|
+
export default function LinkButton({ to, replace, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -10,6 +10,6 @@ interface Props {
|
|
|
10
10
|
userResolver: UserResolver;
|
|
11
11
|
onResolved: (user: User) => void;
|
|
12
12
|
}
|
|
13
|
-
declare const UserProvider: ({ userResolver, onResolved }: Props) => JSX.Element;
|
|
13
|
+
declare const UserProvider: ({ userResolver, onResolved }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare function useUser(): UserContextType;
|
|
15
15
|
export default UserProvider;
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
request: RequestConfig;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export default function WithRequest({ request, children }: Props): JSX.Element;
|
|
7
|
+
export default function WithRequest({ request, children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare function useRequestData<T = any>(): T;
|
|
9
9
|
export {};
|
|
@@ -10,5 +10,5 @@ interface Props<As extends ElementType = ElementType> {
|
|
|
10
10
|
routes?: RouteObject[];
|
|
11
11
|
top?: number;
|
|
12
12
|
}
|
|
13
|
-
export default function SiderLayout({ className, title, header, headerAs, footer, footerAs, top, routes }: Props): JSX.Element;
|
|
13
|
+
export default function SiderLayout({ className, title, header, headerAs, footer, footerAs, top, routes }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function Toggle(): JSX.Element;
|
|
1
|
+
export default function Toggle(): import("react/jsx-runtime").JSX.Element;
|
package/types/layout/tab.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ interface Props {
|
|
|
5
5
|
showBack?: boolean;
|
|
6
6
|
extra?: ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export default function TabLayout({ title, header, showBack, extra }: Props): JSX.Element;
|
|
8
|
+
export default function TabLayout({ title, header, showBack, extra }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
package/types/pages/login.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export interface LoginProps {
|
|
|
6
6
|
interface Props extends LoginProps {
|
|
7
7
|
onLogin: (props: LoginProps) => ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export default function Login({ onLogin, onLogined, onAuthorize }: Props): JSX.Element;
|
|
9
|
+
export default function Login({ onLogin, onLogined, onAuthorize }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
package/types/pages/logout.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface LogoutProps {
|
|
3
2
|
onLogout: () => void | Promise<void>;
|
|
4
3
|
}
|
|
5
|
-
export default function Logout({ onLogout }: LogoutProps): JSX.Element;
|
|
4
|
+
export default function Logout({ onLogout }: LogoutProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
package/types/pages/social.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Promisable } from '../utils/types';
|
|
3
2
|
interface LoginProps {
|
|
4
3
|
onLogined: (token?: string) => string;
|
|
5
4
|
onAuthorize?: (token?: any) => Promisable<void | string | undefined>;
|
|
6
5
|
implicit?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export default function Social({ onLogined, onAuthorize, implicit }: LoginProps): JSX.Element;
|
|
7
|
+
export default function Social({ onLogined, onAuthorize, implicit }: LoginProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -19,5 +19,5 @@ interface Options {
|
|
|
19
19
|
extraRoutes?: RouteObject[];
|
|
20
20
|
RootComponent?: Component;
|
|
21
21
|
}
|
|
22
|
-
export default function createApplication(options: Options): () => JSX.Element;
|
|
22
|
+
export default function createApplication(options: Options): () => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|