@topthink/components 1.0.58 → 1.0.60
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/es/{editor-widget-ebec8493.js → editor-widget-CQ3zv-Xu.js} +0 -1
- package/es/{image-zoom-912e2b3b.js → image-zoom-OrIPGqh0.js} +0 -1
- package/es/{index-563b11c6.js → index-3GYeZqTw.js} +13 -14
- package/es/index-5gZRXtbb.js +1 -0
- package/es/index-UK__bsMk.js +39 -0
- package/es/index.js +1 -2
- package/es/{steps-afba29a7.js → steps-b_BcYIwk.js} +1 -2
- package/package.json +15 -15
- package/types/components/button.d.ts +9 -9
- package/types/components/card.d.ts +7 -7
- package/types/components/dimmer.d.ts +7 -7
- package/types/components/error.d.ts +5 -5
- package/types/components/form.d.ts +4 -4
- package/types/components/image-zoom.d.ts +4 -4
- package/types/components/lazy/form/index.d.ts +19 -19
- package/types/components/lazy/form/widgets/editor-widget.d.ts +6 -5
- package/types/components/lazy/image-zoom.d.ts +3 -3
- package/types/components/lazy/steps.d.ts +9 -9
- package/types/components/lazy/table/context.d.ts +2 -2
- package/types/components/lazy/table/index.d.ts +45 -45
- package/types/components/lazy/table/search.d.ts +23 -23
- package/types/components/lazy/table/use-selection.d.ts +3 -3
- package/types/components/loader.d.ts +9 -9
- package/types/components/loading-button.d.ts +7 -7
- package/types/components/modal/confirm.d.ts +8 -8
- package/types/components/modal/index.d.ts +32 -32
- package/types/components/modal/message.d.ts +26 -26
- package/types/components/modal/show.d.ts +3 -3
- package/types/components/modal-button.d.ts +17 -17
- package/types/components/modal-form.d.ts +10 -10
- package/types/components/number-format.d.ts +10 -10
- package/types/components/pagination.d.ts +11 -11
- package/types/components/request-button.d.ts +13 -13
- package/types/components/result.d.ts +15 -15
- package/types/components/space.d.ts +9 -9
- package/types/components/statistic.d.ts +7 -7
- package/types/components/steps.d.ts +10 -10
- package/types/components/table.d.ts +4 -4
- package/types/components/tooltip.d.ts +9 -9
- package/types/hooks/use-callback-ref.d.ts +2 -2
- package/types/hooks/use-controllable-state.d.ts +8 -8
- package/types/hooks/use-debounce.d.ts +2 -2
- package/types/hooks/use-overlay-state.d.ts +16 -16
- package/types/hooks/use-request.d.ts +21 -21
- package/types/hooks/use-safe-state.d.ts +4 -4
- package/types/hooks/use-state-with-callback.d.ts +2 -2
- package/types/hooks/use-unmounted-ref.d.ts +3 -3
- package/types/index.d.ts +33 -33
- package/types/request.d.ts +32 -32
- package/types/utils/is-record.d.ts +1 -1
- package/types/utils/message.d.ts +11 -11
- package/types/utils/toast.d.ts +11 -11
- package/types/utils/types.d.ts +7 -7
- package/types/utils/wait-pay-complete.d.ts +11 -11
- package/es/editor-widget-ebec8493.js.map +0 -1
- package/es/form-01bf45e9.js +0 -233
- package/es/form-01bf45e9.js.map +0 -1
- package/es/form-0a372a24.js +0 -2
- package/es/form-0a372a24.js.map +0 -1
- package/es/form-1791ea39.js +0 -236
- package/es/form-1791ea39.js.map +0 -1
- package/es/form-74ef0417.js +0 -2
- package/es/form-74ef0417.js.map +0 -1
- package/es/form-8925a750.js +0 -231
- package/es/form-8925a750.js.map +0 -1
- package/es/form-95db7eac.js +0 -2
- package/es/form-95db7eac.js.map +0 -1
- package/es/form-9c0e638a.js +0 -231
- package/es/form-9c0e638a.js.map +0 -1
- package/es/image-zoom-912e2b3b.js.map +0 -1
- package/es/index-1930b692.js +0 -67
- package/es/index-1930b692.js.map +0 -1
- package/es/index-1d379f3a.js +0 -562
- package/es/index-1d379f3a.js.map +0 -1
- package/es/index-2b97b70d.js +0 -2
- package/es/index-2b97b70d.js.map +0 -1
- package/es/index-303e1845.js +0 -560
- package/es/index-303e1845.js.map +0 -1
- package/es/index-4f51cece.js +0 -1352
- package/es/index-4f51cece.js.map +0 -1
- package/es/index-5142110c.js +0 -67
- package/es/index-5142110c.js.map +0 -1
- package/es/index-563b11c6.js.map +0 -1
- package/es/index-6ae8237d.js +0 -67
- package/es/index-6ae8237d.js.map +0 -1
- package/es/index-7a7c06a9.js +0 -40
- package/es/index-7a7c06a9.js.map +0 -1
- package/es/index-9869b1c6.js +0 -1350
- package/es/index-9869b1c6.js.map +0 -1
- package/es/index-a214613e.js +0 -40
- package/es/index-a214613e.js.map +0 -1
- package/es/index-a48179db.js +0 -1382
- package/es/index-a48179db.js.map +0 -1
- package/es/index-b34ecf90.js +0 -40
- package/es/index-b34ecf90.js.map +0 -1
- package/es/index-d964165a.js +0 -560
- package/es/index-d964165a.js.map +0 -1
- package/es/index-e17dc6f0.js +0 -40
- package/es/index-e17dc6f0.js.map +0 -1
- package/es/index.js.map +0 -1
- package/es/steps-afba29a7.js.map +0 -1
- package/es/steps-c27a3885.js +0 -34
- package/es/steps-c27a3885.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { SpinnerProps } from 'react-bootstrap';
|
|
3
|
-
interface LoaderProps {
|
|
4
|
-
loading?: boolean;
|
|
5
|
-
animation?: SpinnerProps['animation'];
|
|
6
|
-
wrap?: boolean | number;
|
|
7
|
-
}
|
|
8
|
-
export default function Loader({ loading, children, variant, animation, wrap, ...props }: PropsWithChildren<LoaderProps & Omit<SpinnerProps, 'animation'>>): JSX.Element | null;
|
|
9
|
-
export {};
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { SpinnerProps } from 'react-bootstrap';
|
|
3
|
+
interface LoaderProps {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
animation?: SpinnerProps['animation'];
|
|
6
|
+
wrap?: boolean | number;
|
|
7
|
+
}
|
|
8
|
+
export default function Loader({ loading, children, variant, animation, wrap, ...props }: PropsWithChildren<LoaderProps & Omit<SpinnerProps, 'animation'>>): JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ButtonProps } from 'react-bootstrap';
|
|
3
|
-
interface CustomButtonProps extends ButtonProps {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
}
|
|
6
|
-
export default function LoadingButton({ loading, disabled, children, ...props }: CustomButtonProps): JSX.Element;
|
|
7
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from 'react-bootstrap';
|
|
3
|
+
interface CustomButtonProps extends ButtonProps {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function LoadingButton({ loading, disabled, children, ...props }: CustomButtonProps): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
interface ConfirmOptions {
|
|
2
|
-
title?: string;
|
|
3
|
-
message: string;
|
|
4
|
-
okText?: string;
|
|
5
|
-
cancelText?: string;
|
|
6
|
-
}
|
|
7
|
-
export default function confirm(options: ConfirmOptions): Promise<true | void>;
|
|
8
|
-
export {};
|
|
1
|
+
interface ConfirmOptions {
|
|
2
|
+
title?: string;
|
|
3
|
+
message: string;
|
|
4
|
+
okText?: string;
|
|
5
|
+
cancelText?: string;
|
|
6
|
+
}
|
|
7
|
+
export default function confirm(options: ConfirmOptions): Promise<true | void>;
|
|
8
|
+
export {};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { ModalProps as ReactModalProps } from 'react-bootstrap';
|
|
2
|
-
import { ElementType, MouseEvent, ReactNode } from 'react';
|
|
3
|
-
import { ButtonProps } from '../button';
|
|
4
|
-
import show from './show';
|
|
5
|
-
import confirm from './confirm';
|
|
6
|
-
import Message, { MessageProps } from './message';
|
|
7
|
-
export interface ModalProps extends Pick<ReactModalProps, 'style' | 'container' | 'backdrop' | 'centered' | 'size' | 'scrollable' | 'fullscreen' | 'onHide' | 'onShow' | 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited'> {
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
header?: ReactNode;
|
|
10
|
-
footer?: ReactNode | ((args: {
|
|
11
|
-
okButton: ReactNode;
|
|
12
|
-
cancelButton: ReactNode;
|
|
13
|
-
}) => ReactNode);
|
|
14
|
-
okText?: string;
|
|
15
|
-
cancelText?: string;
|
|
16
|
-
closable?: boolean;
|
|
17
|
-
show?: boolean;
|
|
18
|
-
onOk?: (e: MouseEvent) => void;
|
|
19
|
-
onCancel?: (e: MouseEvent) => void;
|
|
20
|
-
okButtonProps?: ButtonProps;
|
|
21
|
-
bodyAs?: ElementType;
|
|
22
|
-
headerAs?: ElementType;
|
|
23
|
-
confirmLoading?: boolean;
|
|
24
|
-
}
|
|
25
|
-
declare const Modal: {
|
|
26
|
-
({ header, children, footer, closable, show, cancelText, okText, onOk, onCancel, onHide, okButtonProps, bodyAs, headerAs, confirmLoading, ...rest }: ModalProps): JSX.Element;
|
|
27
|
-
Message: typeof Message;
|
|
28
|
-
confirm: typeof confirm;
|
|
29
|
-
show: typeof show;
|
|
30
|
-
};
|
|
31
|
-
export default Modal;
|
|
32
|
-
export { MessageProps };
|
|
1
|
+
import { ModalProps as ReactModalProps } from 'react-bootstrap';
|
|
2
|
+
import { ElementType, MouseEvent, ReactNode } from 'react';
|
|
3
|
+
import { ButtonProps } from '../button';
|
|
4
|
+
import show from './show';
|
|
5
|
+
import confirm from './confirm';
|
|
6
|
+
import Message, { MessageProps } from './message';
|
|
7
|
+
export interface ModalProps extends Pick<ReactModalProps, 'style' | 'container' | 'backdrop' | 'centered' | 'size' | 'scrollable' | 'fullscreen' | 'onHide' | 'onShow' | 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited'> {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
header?: ReactNode;
|
|
10
|
+
footer?: ReactNode | ((args: {
|
|
11
|
+
okButton: ReactNode;
|
|
12
|
+
cancelButton: ReactNode;
|
|
13
|
+
}) => ReactNode);
|
|
14
|
+
okText?: string;
|
|
15
|
+
cancelText?: string;
|
|
16
|
+
closable?: boolean;
|
|
17
|
+
show?: boolean;
|
|
18
|
+
onOk?: (e: MouseEvent) => void;
|
|
19
|
+
onCancel?: (e: MouseEvent) => void;
|
|
20
|
+
okButtonProps?: ButtonProps;
|
|
21
|
+
bodyAs?: ElementType;
|
|
22
|
+
headerAs?: ElementType;
|
|
23
|
+
confirmLoading?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const Modal: {
|
|
26
|
+
({ header, children, footer, closable, show, cancelText, okText, onOk, onCancel, onHide, okButtonProps, bodyAs, headerAs, confirmLoading, ...rest }: ModalProps): JSX.Element;
|
|
27
|
+
Message: typeof Message;
|
|
28
|
+
confirm: typeof confirm;
|
|
29
|
+
show: typeof show;
|
|
30
|
+
};
|
|
31
|
+
export default Modal;
|
|
32
|
+
export { MessageProps };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import { ModalProps } from 'react-bootstrap';
|
|
3
|
-
interface MessageContextType {
|
|
4
|
-
container?: ModalProps['container'];
|
|
5
|
-
}
|
|
6
|
-
type MessageWrapProps<T, P = void> = {
|
|
7
|
-
resolve: (value: P | void) => void;
|
|
8
|
-
destroy: () => void;
|
|
9
|
-
message: T;
|
|
10
|
-
};
|
|
11
|
-
export type MessageProps<T, P = void> = {
|
|
12
|
-
resolve: (value: P | void) => void;
|
|
13
|
-
message: T;
|
|
14
|
-
state: {
|
|
15
|
-
show: boolean;
|
|
16
|
-
onHide: () => void;
|
|
17
|
-
onExited: () => void;
|
|
18
|
-
container?: ModalProps['container'];
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare function wrapMessage<T = {}, P = any>(Component: ComponentType<MessageProps<T, P>>): ComponentType<MessageWrapProps<T, P>>;
|
|
22
|
-
export declare function createMessage<T = {}, P = any>(Component: ComponentType<MessageWrapProps<T, P>>): (message: T) => Promise<P | void>;
|
|
23
|
-
export declare const show: (modal: ReactNode) => void;
|
|
24
|
-
export declare const hide: (modal: ReactNode) => void;
|
|
25
|
-
export default function Message(props: MessageContextType): JSX.Element;
|
|
26
|
-
export {};
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { ModalProps } from 'react-bootstrap';
|
|
3
|
+
interface MessageContextType {
|
|
4
|
+
container?: ModalProps['container'];
|
|
5
|
+
}
|
|
6
|
+
type MessageWrapProps<T, P = void> = {
|
|
7
|
+
resolve: (value: P | void) => void;
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
message: T;
|
|
10
|
+
};
|
|
11
|
+
export type MessageProps<T, P = void> = {
|
|
12
|
+
resolve: (value: P | void) => void;
|
|
13
|
+
message: T;
|
|
14
|
+
state: {
|
|
15
|
+
show: boolean;
|
|
16
|
+
onHide: () => void;
|
|
17
|
+
onExited: () => void;
|
|
18
|
+
container?: ModalProps['container'];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare function wrapMessage<T = {}, P = any>(Component: ComponentType<MessageProps<T, P>>): ComponentType<MessageWrapProps<T, P>>;
|
|
22
|
+
export declare function createMessage<T = {}, P = any>(Component: ComponentType<MessageWrapProps<T, P>>): (message: T) => Promise<P | void>;
|
|
23
|
+
export declare const show: (modal: ReactNode) => void;
|
|
24
|
+
export declare const hide: (modal: ReactNode) => void;
|
|
25
|
+
export default function Message(props: MessageContextType): JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MessageProps } from './message';
|
|
2
|
-
import { ComponentType } from 'react';
|
|
3
|
-
export default function show<T, P = any>(Component: ComponentType<MessageProps<any, T>>, options?: P): Promise<void | T>;
|
|
1
|
+
import { MessageProps } from './message';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
|
+
export default function show<T, P = any>(Component: ComponentType<MessageProps<any, T>>, options?: P): Promise<void | T>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ElementType, ForwardRefExoticComponent, PropsWithChildren, PropsWithoutRef, ReactNode, RefAttributes } from 'react';
|
|
2
|
-
import { ModalProps } from './modal';
|
|
3
|
-
import { ButtonProps } from 'react-bootstrap';
|
|
4
|
-
export interface ModalButtonProps extends Omit<ButtonProps, 'as'> {
|
|
5
|
-
text: ReactNode;
|
|
6
|
-
modalProps?: Omit<ModalProps, 'children' | 'confirmLoading' | 'onOk'>;
|
|
7
|
-
onOk?: () => any;
|
|
8
|
-
onShow?: () => void;
|
|
9
|
-
confirmLoading?: boolean;
|
|
10
|
-
as?: ElementType | ButtonProps['as'];
|
|
11
|
-
}
|
|
12
|
-
export interface ModalType {
|
|
13
|
-
close: () => void;
|
|
14
|
-
}
|
|
15
|
-
type ModalButtonType = ForwardRefExoticComponent<PropsWithoutRef<PropsWithChildren<ModalButtonProps>> & RefAttributes<ModalType>>;
|
|
16
|
-
declare const ModalButton: ModalButtonType;
|
|
17
|
-
export default ModalButton;
|
|
1
|
+
import { ElementType, ForwardRefExoticComponent, PropsWithChildren, PropsWithoutRef, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
import { ModalProps } from './modal';
|
|
3
|
+
import { ButtonProps } from 'react-bootstrap';
|
|
4
|
+
export interface ModalButtonProps extends Omit<ButtonProps, 'as'> {
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
modalProps?: Omit<ModalProps, 'children' | 'confirmLoading' | 'onOk'>;
|
|
7
|
+
onOk?: () => any;
|
|
8
|
+
onShow?: () => void;
|
|
9
|
+
confirmLoading?: boolean;
|
|
10
|
+
as?: ElementType | ButtonProps['as'];
|
|
11
|
+
}
|
|
12
|
+
export interface ModalType {
|
|
13
|
+
close: () => void;
|
|
14
|
+
}
|
|
15
|
+
type ModalButtonType = ForwardRefExoticComponent<PropsWithoutRef<PropsWithChildren<ModalButtonProps>> & RefAttributes<ModalType>>;
|
|
16
|
+
declare const ModalButton: ModalButtonType;
|
|
17
|
+
export default ModalButton;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ModalButtonProps } from './modal-button';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { FormProps } from './form';
|
|
4
|
-
export interface ModalFormProps<T = any> extends FormProps<T> {
|
|
5
|
-
text: ReactNode;
|
|
6
|
-
buttonProps?: Omit<ModalButtonProps, 'text' | 'modalProps' | 'confirmLoading' | 'onOk'>;
|
|
7
|
-
modalProps?: ModalButtonProps['modalProps'];
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export default function ModalForm<T = any>({ text, onSuccess, buttonProps, modalProps, children, ...props }: ModalFormProps<T>): JSX.Element;
|
|
1
|
+
import { ModalButtonProps } from './modal-button';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { FormProps } from './form';
|
|
4
|
+
export interface ModalFormProps<T = any> extends FormProps<T> {
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
buttonProps?: Omit<ModalButtonProps, 'text' | 'modalProps' | 'confirmLoading' | 'onOk'>;
|
|
7
|
+
modalProps?: ModalButtonProps['modalProps'];
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export default function ModalForm<T = any>({ text, onSuccess, buttonProps, modalProps, children, ...props }: ModalFormProps<T>): JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface Props {
|
|
3
|
-
value: number;
|
|
4
|
-
currency?: boolean;
|
|
5
|
-
locale?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
options?: Intl.NumberFormatOptions;
|
|
8
|
-
}
|
|
9
|
-
export default function NumberFormat({ className, value, locale, currency, options }: Props): JSX.Element;
|
|
10
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Props {
|
|
3
|
+
value: number;
|
|
4
|
+
currency?: boolean;
|
|
5
|
+
locale?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
options?: Intl.NumberFormatOptions;
|
|
8
|
+
}
|
|
9
|
+
export default function NumberFormat({ className, value, locale, currency, options }: Props): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface PaginationProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
total: number;
|
|
5
|
-
current?: number;
|
|
6
|
-
defaultCurrent?: number;
|
|
7
|
-
pageSize?: number;
|
|
8
|
-
defaultPageSize?: number;
|
|
9
|
-
onChange?: (current: number, pageSize: number) => void;
|
|
10
|
-
}
|
|
11
|
-
export default function Pagination({ total, onChange, defaultCurrent, defaultPageSize, className, ...props }: PaginationProps): JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
total: number;
|
|
5
|
+
current?: number;
|
|
6
|
+
defaultCurrent?: number;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
defaultPageSize?: number;
|
|
9
|
+
onChange?: (current: number, pageSize: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export default function Pagination({ total, onChange, defaultCurrent, defaultPageSize, className, ...props }: PaginationProps): JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { RequestConfig } from '../request';
|
|
2
|
-
import { ElementType } from 'react';
|
|
3
|
-
import { AxiosRequestConfig } from 'axios';
|
|
4
|
-
import { ButtonProps } from './button';
|
|
5
|
-
interface Props extends Omit<ButtonProps, 'as'> {
|
|
6
|
-
url: RequestConfig;
|
|
7
|
-
method?: AxiosRequestConfig['method'];
|
|
8
|
-
confirm?: string;
|
|
9
|
-
onSuccess?: (result: any) => void;
|
|
10
|
-
as?: ElementType | ButtonProps['as'];
|
|
11
|
-
}
|
|
12
|
-
export default function RequestButton({ url, method, confirm, onSuccess, children, disabled, as, ...props }: Props): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
13
|
-
export {};
|
|
1
|
+
import { RequestConfig } from '../request';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { AxiosRequestConfig } from 'axios';
|
|
4
|
+
import { ButtonProps } from './button';
|
|
5
|
+
interface Props extends Omit<ButtonProps, 'as'> {
|
|
6
|
+
url: RequestConfig;
|
|
7
|
+
method?: AxiosRequestConfig['method'];
|
|
8
|
+
confirm?: string;
|
|
9
|
+
onSuccess?: (result: any) => void;
|
|
10
|
+
as?: ElementType | ButtonProps['as'];
|
|
11
|
+
}
|
|
12
|
+
export default function RequestButton({ url, method, confirm, onSuccess, children, disabled, as, ...props }: Props): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
13
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
declare const IconMap: {
|
|
3
|
-
success: JSX.Element;
|
|
4
|
-
error: JSX.Element;
|
|
5
|
-
info: JSX.Element;
|
|
6
|
-
warning: JSX.Element;
|
|
7
|
-
};
|
|
8
|
-
interface ResultProps {
|
|
9
|
-
status?: keyof typeof IconMap;
|
|
10
|
-
icon?: ReactNode;
|
|
11
|
-
title?: string;
|
|
12
|
-
extra?: ReactNode;
|
|
13
|
-
}
|
|
14
|
-
export default function Result({ status, title, icon, extra }: ResultProps): JSX.Element;
|
|
15
|
-
export {};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
declare const IconMap: {
|
|
3
|
+
success: JSX.Element;
|
|
4
|
+
error: JSX.Element;
|
|
5
|
+
info: JSX.Element;
|
|
6
|
+
warning: JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
interface ResultProps {
|
|
9
|
+
status?: keyof typeof IconMap;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
title?: string;
|
|
12
|
+
extra?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export default function Result({ status, title, icon, extra }: ResultProps): JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface SpaceProps {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
size?: 'small' | 'middle' | 'large' | number;
|
|
5
|
-
direction?: 'vertical' | 'horizontal';
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export default function Space({ children, className, size, direction }: SpaceProps): JSX.Element;
|
|
9
|
-
export {};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface SpaceProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
size?: 'small' | 'middle' | 'large' | number;
|
|
5
|
+
direction?: 'vertical' | 'horizontal';
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export default function Space({ children, className, size, direction }: SpaceProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface StatisticProps {
|
|
3
|
-
title: ReactNode;
|
|
4
|
-
content: ReactNode;
|
|
5
|
-
footer?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
export default function Statistic({ title, content, footer }: StatisticProps): JSX.Element;
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface StatisticProps {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
footer?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export default function Statistic({ title, content, footer }: StatisticProps): JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
declare const LazySteps: import("react").LazyExoticComponent<typeof import("./lazy/steps").default>;
|
|
3
|
-
declare const LazyStep: import("react").LazyExoticComponent<typeof import("rc-steps/lib/Step").default>;
|
|
4
|
-
declare function Steps(props: ComponentProps<typeof LazySteps>): JSX.Element;
|
|
5
|
-
declare namespace Steps {
|
|
6
|
-
var Step: (props: import("rc-steps/lib/Step").StepProps & import("react").RefAttributes<import("rc-steps/lib/Step").default>) => JSX.Element;
|
|
7
|
-
}
|
|
8
|
-
export default Steps;
|
|
9
|
-
declare const Step: (props: ComponentProps<typeof LazyStep>) => JSX.Element;
|
|
10
|
-
export { Step };
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
declare const LazySteps: import("react").LazyExoticComponent<typeof import("./lazy/steps").default>;
|
|
3
|
+
declare const LazyStep: import("react").LazyExoticComponent<typeof import("rc-steps/lib/Step").default>;
|
|
4
|
+
declare function Steps(props: ComponentProps<typeof LazySteps>): JSX.Element;
|
|
5
|
+
declare namespace Steps {
|
|
6
|
+
var Step: (props: import("rc-steps/lib/Step").StepProps & import("react").RefAttributes<import("rc-steps/lib/Step").default>) => JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
export default Steps;
|
|
9
|
+
declare const Step: (props: ComponentProps<typeof LazyStep>) => JSX.Element;
|
|
10
|
+
export { Step };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTableType } from './lazy/table';
|
|
2
|
-
declare const Table: CustomTableType;
|
|
3
|
-
export default Table;
|
|
4
|
-
export type { TableProps, Columns, TableType } from './lazy/table';
|
|
1
|
+
import type { CustomTableType } from './lazy/table';
|
|
2
|
+
declare const Table: CustomTableType;
|
|
3
|
+
export default Table;
|
|
4
|
+
export type { TableProps, Columns, TableType } from './lazy/table';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { OverlayTriggerProps } from 'react-bootstrap';
|
|
3
|
-
interface TooltipProps {
|
|
4
|
-
tooltip: string;
|
|
5
|
-
children: OverlayTriggerProps['children'];
|
|
6
|
-
placement?: OverlayTriggerProps['placement'];
|
|
7
|
-
}
|
|
8
|
-
export default function Tooltip({ tooltip, children, placement }: TooltipProps): JSX.Element;
|
|
9
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OverlayTriggerProps } from 'react-bootstrap';
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
tooltip: string;
|
|
5
|
+
children: OverlayTriggerProps['children'];
|
|
6
|
+
placement?: OverlayTriggerProps['placement'];
|
|
7
|
+
}
|
|
8
|
+
export default function Tooltip({ tooltip, children, placement }: TooltipProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DependencyList } from 'react';
|
|
2
|
-
export default function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined, deps?: DependencyList): T;
|
|
1
|
+
import { DependencyList } from 'react';
|
|
2
|
+
export default function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined, deps?: DependencyList): T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
export interface UseControllableStateProps<T> {
|
|
3
|
-
value?: T;
|
|
4
|
-
defaultValue?: T | (() => T);
|
|
5
|
-
onChange?: (value: T) => void;
|
|
6
|
-
shouldUpdate?: (prev: T, next: T) => boolean;
|
|
7
|
-
}
|
|
8
|
-
export default function useControllableState<T>(props: UseControllableStateProps<T>): [T, Dispatch<SetStateAction<T>>];
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export interface UseControllableStateProps<T> {
|
|
3
|
+
value?: T;
|
|
4
|
+
defaultValue?: T | (() => T);
|
|
5
|
+
onChange?: (value: T) => void;
|
|
6
|
+
shouldUpdate?: (prev: T, next: T) => boolean;
|
|
7
|
+
}
|
|
8
|
+
export default function useControllableState<T>(props: UseControllableStateProps<T>): [T, Dispatch<SetStateAction<T>>];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DebouncedFunc } from 'lodash';
|
|
2
|
-
export default function useDebounce<T extends (...args: any) => any>(callback: T, wait: number, options?: {}): DebouncedFunc<T>;
|
|
1
|
+
import { DebouncedFunc } from 'lodash';
|
|
2
|
+
export default function useDebounce<T extends (...args: any) => any>(callback: T, wait: number, options?: {}): DebouncedFunc<T>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
onHide?: () => void;
|
|
3
|
-
onShow?: () => void;
|
|
4
|
-
}
|
|
5
|
-
export default function useOverlayState({ onHide, onShow }?: Options): {
|
|
6
|
-
visible: boolean;
|
|
7
|
-
show: () => void;
|
|
8
|
-
hide: () => void;
|
|
9
|
-
state: {
|
|
10
|
-
show: boolean;
|
|
11
|
-
onHide: () => void;
|
|
12
|
-
onExited: () => void;
|
|
13
|
-
key: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
1
|
+
interface Options {
|
|
2
|
+
onHide?: () => void;
|
|
3
|
+
onShow?: () => void;
|
|
4
|
+
}
|
|
5
|
+
export default function useOverlayState({ onHide, onShow }?: Options): {
|
|
6
|
+
visible: boolean;
|
|
7
|
+
show: () => void;
|
|
8
|
+
hide: () => void;
|
|
9
|
+
state: {
|
|
10
|
+
show: boolean;
|
|
11
|
+
onHide: () => void;
|
|
12
|
+
onExited: () => void;
|
|
13
|
+
key: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { UseAsyncCallbackOptions } from 'react-async-hook';
|
|
2
|
-
import { RequestConfig } from '../request';
|
|
3
|
-
import { DependencyList } from 'react';
|
|
4
|
-
import { AxiosRequestConfig } from 'axios';
|
|
5
|
-
type UseRequestOptions<T> = {
|
|
6
|
-
manual?: boolean;
|
|
7
|
-
refreshDeps?: DependencyList;
|
|
8
|
-
} & UseAsyncCallbackOptions<T>;
|
|
9
|
-
export default function useRequest<T = any>(config: RequestConfig, { manual, refreshDeps, ...options }?: UseRequestOptions<T>): {
|
|
10
|
-
status: import("react-async-hook").AsyncStateStatus;
|
|
11
|
-
loading: boolean;
|
|
12
|
-
result: T | undefined;
|
|
13
|
-
set: (value: import("react-async-hook").AsyncState<T>) => void;
|
|
14
|
-
merge: (value: Partial<import("react-async-hook").AsyncState<T>>) => void;
|
|
15
|
-
reset: () => void;
|
|
16
|
-
currentPromise: Promise<T> | null;
|
|
17
|
-
refresh: () => Promise<void>;
|
|
18
|
-
execute: (params?: AxiosRequestConfig<any> | undefined) => Promise<T>;
|
|
19
|
-
error: Error | undefined;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
1
|
+
import { UseAsyncCallbackOptions } from 'react-async-hook';
|
|
2
|
+
import { RequestConfig } from '../request';
|
|
3
|
+
import { DependencyList } from 'react';
|
|
4
|
+
import { AxiosRequestConfig } from 'axios';
|
|
5
|
+
type UseRequestOptions<T> = {
|
|
6
|
+
manual?: boolean;
|
|
7
|
+
refreshDeps?: DependencyList;
|
|
8
|
+
} & UseAsyncCallbackOptions<T>;
|
|
9
|
+
export default function useRequest<T = any>(config: RequestConfig, { manual, refreshDeps, ...options }?: UseRequestOptions<T>): {
|
|
10
|
+
status: import("react-async-hook").AsyncStateStatus;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
result: T | undefined;
|
|
13
|
+
set: (value: import("react-async-hook").AsyncState<T>) => void;
|
|
14
|
+
merge: (value: Partial<import("react-async-hook").AsyncState<T>>) => void;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
currentPromise: Promise<T> | null;
|
|
17
|
+
refresh: () => Promise<void>;
|
|
18
|
+
execute: (params?: AxiosRequestConfig<any> | undefined) => Promise<T>;
|
|
19
|
+
error: Error | undefined;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
declare function useSafeState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
|
|
3
|
-
declare function useSafeState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
|
|
4
|
-
export default useSafeState;
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
declare function useSafeState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
|
|
3
|
+
declare function useSafeState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
|
|
4
|
+
export default useSafeState;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SetStateAction } from 'react';
|
|
2
|
-
export default function useStateWithCallback<S>(initState: S): [S, (value: SetStateAction<S>, callback: () => void) => void];
|
|
1
|
+
import { SetStateAction } from 'react';
|
|
2
|
+
export default function useStateWithCallback<S>(initState: S): [S, (value: SetStateAction<S>, callback: () => void) => void];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const useUnmountedRef: () => import("react").MutableRefObject<boolean>;
|
|
3
|
-
export default useUnmountedRef;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const useUnmountedRef: () => import("react").MutableRefObject<boolean>;
|
|
3
|
+
export default useUnmountedRef;
|