diff --git a/src/components/ArticleListContent/index.d.ts b/src/components/ArticleListContent/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb4988a96d3da9a0a233f5dfe61e3ad561ff0592 --- /dev/null +++ b/src/components/ArticleListContent/index.d.ts @@ -0,0 +1,13 @@ +import React from 'react'; + +export interface ApplicationsProps { + data: { + content?: string; + updatedAt?: any; + avatar?: string; + owner?: string; + href?: string; + }; +} + +export default class ArticleListContent extends React.Component {} diff --git a/src/components/Authorized/AuthorizedRoute.d.ts b/src/components/Authorized/AuthorizedRoute.d.ts index fc78000440d3ca375cadee4e581f51532c8c35bb..f94427daddeba278493bd49d1f90ecb47f74dde2 100644 --- a/src/components/Authorized/AuthorizedRoute.d.ts +++ b/src/components/Authorized/AuthorizedRoute.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; import { RouteProps } from 'react-router'; type authorityFN = (currentAuthority?: string) => boolean; diff --git a/src/components/Authorized/index.d.ts b/src/components/Authorized/index.d.ts index b3e2f56c6c3784daa62e908286566c954db1675f..72c98587979899e0f172cf48637c6ab4bb3951e8 100644 --- a/src/components/Authorized/index.d.ts +++ b/src/components/Authorized/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; import AuthorizedRoute, { authority } from './AuthorizedRoute'; export type IReactComponent

= | React.StatelessComponent

diff --git a/src/components/AvatarList/AvatarItem.d.ts b/src/components/AvatarList/AvatarItem.d.ts index 5681de77c2b3634ee8a54487fe15d07044fa8ca4..0e809ab458db93321d68388f227e46cd6a34e411 100644 --- a/src/components/AvatarList/AvatarItem.d.ts +++ b/src/components/AvatarList/AvatarItem.d.ts @@ -1,10 +1,15 @@ -import * as React from 'react'; -export interface IAvatarItemProps { +import React from 'react'; + +export declare type SizeType = number | 'small' | 'default' | 'large'; + +export interface AvatarItemProps { tips: React.ReactNode; src: string; + size?: SizeType; style?: React.CSSProperties; + onClick?: () => void; } -export default class AvatarItem extends React.Component { - constructor(props: IAvatarItemProps); +export default class AvatarItem extends React.Component { + constructor(props: AvatarItemProps); } diff --git a/src/components/AvatarList/index.d.ts b/src/components/AvatarList/index.d.ts index f49ca010d9fe19febd4eaed391278012109dd444..e454a8be4e4d0f6bd9d77fa66fd9c8c7447964aa 100644 --- a/src/components/AvatarList/index.d.ts +++ b/src/components/AvatarList/index.d.ts @@ -1,14 +1,14 @@ -import * as React from 'react'; -import AvatarItem from './AvatarItem'; +import React from 'react'; +import AvatarItem, { AvatarItemProps, SizeType } from './AvatarItem'; -export interface IAvatarListProps { - size?: 'large' | 'small' | 'mini' | 'default'; +export interface AvatarListProps { + Item?: React.ReactElement; + size?: SizeType; maxLength?: number; excessItemsStyle?: React.CSSProperties; style?: React.CSSProperties; - children: React.ReactElement | Array>; + children: React.ReactElement | Array>; } - -export default class AvatarList extends React.Component { +export default class AvatarList extends React.Component { public static Item: typeof AvatarItem; } diff --git a/src/components/Charts/Bar/index.d.ts b/src/components/Charts/Bar/index.d.ts index 4899082509dacb84701bb2e02fbe69ba1d06e149..67bb1dd0cd4a4f39880bf67f62534d2e1883d732 100644 --- a/src/components/Charts/Bar/index.d.ts +++ b/src/components/Charts/Bar/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IBarProps { title: React.ReactNode; color?: string; diff --git a/src/components/Charts/ChartCard/index.d.ts b/src/components/Charts/ChartCard/index.d.ts index 0437c0c857d7f1c63c506c5eb238583a251714d0..5153f5e062589a1b650cd63a79577aaa3dfdd8ea 100644 --- a/src/components/Charts/ChartCard/index.d.ts +++ b/src/components/Charts/ChartCard/index.d.ts @@ -1,5 +1,5 @@ import { CardProps } from 'antd/lib/card'; -import * as React from 'react'; +import React from 'react'; export interface IChartCardProps extends CardProps { title: React.ReactNode; diff --git a/src/components/Charts/Field/index.d.ts b/src/components/Charts/Field/index.d.ts index 975fb667d8db178c1154162f4803e20f1c72a8e4..80b1bf1d7198e5710a8b06435eadd72d327ab895 100644 --- a/src/components/Charts/Field/index.d.ts +++ b/src/components/Charts/Field/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IFieldProps { label: React.ReactNode; value: React.ReactNode; diff --git a/src/components/Charts/Gauge/index.d.ts b/src/components/Charts/Gauge/index.d.ts index 66e3c003a957581d88a06e63b32a7a3e76c5cd3a..fe5500918c7173834922d68f2a1f5306f43fe7da 100644 --- a/src/components/Charts/Gauge/index.d.ts +++ b/src/components/Charts/Gauge/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IGaugeProps { title: React.ReactNode; color?: string; diff --git a/src/components/Charts/MiniArea/index.d.ts b/src/components/Charts/MiniArea/index.d.ts index b223b68ca097e01f1c76e4e2cb4e95e9db4dc39b..8b4e71cab78e8ecdaf1f49559957660e9fc77547 100644 --- a/src/components/Charts/MiniArea/index.d.ts +++ b/src/components/Charts/MiniArea/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; // g2已经更新到3.0 // 不带的写了 diff --git a/src/components/Charts/MiniBar/index.d.ts b/src/components/Charts/MiniBar/index.d.ts index 0c4bd6cce558f4b948691c553c65d76c8c34fc6b..b2685339eab30833120979e1356c3913654c8305 100644 --- a/src/components/Charts/MiniBar/index.d.ts +++ b/src/components/Charts/MiniBar/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IMiniBarProps { color?: string; height: number; diff --git a/src/components/Charts/MiniProgress/index.d.ts b/src/components/Charts/MiniProgress/index.d.ts index aaeb7261d7ea06dfad935faf7c00238035ea921d..0ef158e893bdbdfc16ddfb9fea3587e139d29627 100644 --- a/src/components/Charts/MiniProgress/index.d.ts +++ b/src/components/Charts/MiniProgress/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IMiniProgressProps { target: number; color?: string; diff --git a/src/components/Charts/Pie/index.d.ts b/src/components/Charts/Pie/index.d.ts index 66c93eeb5d856928697335530c090c68492e81a5..63aecfa3d699f2148ca776b50f11f22387466ec3 100644 --- a/src/components/Charts/Pie/index.d.ts +++ b/src/components/Charts/Pie/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IPieProps { animate?: boolean; color?: string; diff --git a/src/components/Charts/Radar/index.d.ts b/src/components/Charts/Radar/index.d.ts index 963ac8c37c112c360cd399b039d790e53b83a2a3..6a7dd42afe22ba23cbf0050f7334e3d2e383850a 100644 --- a/src/components/Charts/Radar/index.d.ts +++ b/src/components/Charts/Radar/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IRadarProps { title?: React.ReactNode; height: number; diff --git a/src/components/Charts/TagCloud/index.d.ts b/src/components/Charts/TagCloud/index.d.ts index 462650c4dbb7532670d200141f7cbebc52525808..ac25269dfe1c414148bbcdcada429b978c3011a4 100644 --- a/src/components/Charts/TagCloud/index.d.ts +++ b/src/components/Charts/TagCloud/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface ITagCloudProps { data: Array<{ name: string; diff --git a/src/components/Charts/TimelineChart/index.d.ts b/src/components/Charts/TimelineChart/index.d.ts index 40b94325a9833e9479846b323387e6515160fb7e..0f547e7736c807790f4b4581262b83c27266a1e0 100644 --- a/src/components/Charts/TimelineChart/index.d.ts +++ b/src/components/Charts/TimelineChart/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface ITimelineChartProps { data: Array<{ x: number; diff --git a/src/components/Charts/WaterWave/index.d.ts b/src/components/Charts/WaterWave/index.d.ts index 8f5588d29f29baa7a5409eded24fb2cbe82e1c53..e30a7e48f7478618e716757b095929c889797db7 100644 --- a/src/components/Charts/WaterWave/index.d.ts +++ b/src/components/Charts/WaterWave/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface IWaterWaveProps { title: React.ReactNode; color?: string; diff --git a/src/components/CountDown/index.d.ts b/src/components/CountDown/index.d.ts index d39a2e951830d5cddca08c8becbdb500847448b3..af658e3f6c4b0af3dfd7e374bc3d247c9577a5c4 100644 --- a/src/components/CountDown/index.d.ts +++ b/src/components/CountDown/index.d.ts @@ -1,4 +1,4 @@ -import * as React from 'react'; +import React from 'react'; export interface ICountDownProps { format?: (time: number) => void; target: Date | number; diff --git a/src/components/DescriptionList/Description.d.ts b/src/components/DescriptionList/Description.d.ts index 2a17be374accc8e2a1ffa9812327398a6c3f7173..41c0497075fe1178108e9903b4eb0d56c9e93fcc 100644 --- a/src/components/DescriptionList/Description.d.ts +++ b/src/components/DescriptionList/Description.d.ts @@ -1,9 +1,11 @@ -import * as React from 'react'; +import React from 'react'; +import { ColProps } from 'antd/es/col'; -export default class Description extends React.Component< - { - term: React.ReactNode; - style?: React.CSSProperties; - }, - any -> {} +export interface DescriptionProps extends ColProps { + column?: number; + key?: string | number; + style?: React.CSSProperties; + term?: React.ReactNode; +} + +export default class Description extends React.Component {} diff --git a/src/components/DescriptionList/index.d.ts b/src/components/DescriptionList/index.d.ts index 96ccfa7da3a21d790e3348a65603488303780669..c0bb071c5a33fe6d593b1722ffe707667c65cc60 100644 --- a/src/components/DescriptionList/index.d.ts +++ b/src/components/DescriptionList/index.d.ts @@ -1,15 +1,17 @@ -import * as React from 'react'; -import Description from './Description'; +import React from 'react'; +import Description, { DescriptionProps } from './Description'; -export interface IDescriptionListProps { - layout?: 'horizontal' | 'vertical'; +export interface DescriptionListProps { + className?: string; col?: number; - title: React.ReactNode; + description?: DescriptionProps[]; gutter?: number; + layout?: 'horizontal' | 'vertical'; size?: 'large' | 'small'; style?: React.CSSProperties; + title?: React.ReactNode; } -export default class DescriptionList extends React.Component { +export default class DescriptionList extends React.Component { public static Description: typeof Description; } diff --git a/src/components/EditableItem/index.d.ts b/src/components/EditableItem/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fc69b2748fe5f406a56d6ece4d635e4e52d03e97 --- /dev/null +++ b/src/components/EditableItem/index.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; + +export interface EditableItemProps { + onChange?: (value?: string | string[] | number) => void; +} + +export default class EditableItem extends React.Component {} diff --git a/src/components/EditableLinkGroup/index.d.ts b/src/components/EditableLinkGroup/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..07a42abecd33f6ec3ad3f3785a902cd79e36deb3 --- /dev/null +++ b/src/components/EditableLinkGroup/index.d.ts @@ -0,0 +1,9 @@ +import React from 'react'; + +export interface EditableLinkGroupProps { + links: any[]; + onAdd: () => void; + linkElement: string; +} + +export default class EditableLinkGroup extends React.Component {} diff --git a/src/components/Ellipsis/index.d.ts b/src/components/Ellipsis/index.d.ts index 37d508d77335048de87287fc52fb9f457e89dc33..075fa789a40ec7904dd39e9c293206bf86ac0db8 100644 --- a/src/components/Ellipsis/index.d.ts +++ b/src/components/Ellipsis/index.d.ts @@ -1,13 +1,13 @@ -import * as React from 'react'; +import React from 'react'; import { TooltipProps } from 'antd/lib/tooltip'; -export interface IEllipsisTooltipProps extends TooltipProps { +export interface EllipsisTooltipProps extends TooltipProps { title?: undefined; overlayStyle?: undefined; } -export interface IEllipsisProps { - tooltip?: boolean | IEllipsisTooltipProps; +export interface EllipsisProps { + tooltip?: boolean | EllipsisTooltipProps; length?: number; lines?: number; style?: React.CSSProperties; @@ -18,4 +18,4 @@ export interface IEllipsisProps { export function getStrFullLength(str: string): number; export function cutStrByFullLength(str: string, maxLength: number): string; -export default class Ellipsis extends React.Component {} +export default class Ellipsis extends React.Component {} diff --git a/src/components/Exception/index.d.ts b/src/components/Exception/index.d.ts index a74abb1fa6334cb2b8ef987aab5a1b5dc1f0d531..b8cb65dd92d4a896e745821ddb8dc6aea2cc08da 100644 --- a/src/components/Exception/index.d.ts +++ b/src/components/Exception/index.d.ts @@ -1,15 +1,23 @@ -import * as React from 'react'; -export interface IExceptionProps { +import React from 'react'; +import * as H from 'history'; + +export interface ExceptionProps< + L = { + to: H.LocationDescriptor; + href?: H.LocationDescriptor; + replace?: boolean; + innerRef?: (node: HTMLAnchorElement | null) => void; + } +> { type?: '403' | '404' | '500'; title?: React.ReactNode; desc?: React.ReactNode; img?: string; actions?: React.ReactNode; - linkElement?: string | React.ComponentType; + linkElement?: string | React.ComponentType; style?: React.CSSProperties; className?: string; backText?: React.ReactNode; redirect?: string; } - -export default class Exception extends React.Component {} +export default class Exception extends React.Component {} diff --git a/src/components/FooterToolbar/index.d.ts b/src/components/FooterToolbar/index.d.ts index 9c6ac5b4cad95ade8f24a1b02e6de72f4770bfeb..9ec202c1c5b3d986fc5f11ea94560ea2cdb90501 100644 --- a/src/components/FooterToolbar/index.d.ts +++ b/src/components/FooterToolbar/index.d.ts @@ -1,7 +1,8 @@ -import * as React from 'react'; -export interface IFooterToolbarProps { +import React from 'react'; +export interface FooterToolbarProps { extra: React.ReactNode; style?: React.CSSProperties; + className?: string; } -export default class FooterToolbar extends React.Component {} +export default class FooterToolbar extends React.Component {} diff --git a/src/components/GlobalFooter/index.d.ts b/src/components/GlobalFooter/index.d.ts index 3fa5c423eba263aa4c9d39eb49f395781c5e8f43..efde77dbd4bfd58ed27da72a56e6328b3eefdee5 100644 --- a/src/components/GlobalFooter/index.d.ts +++ b/src/components/GlobalFooter/index.d.ts @@ -1,5 +1,5 @@ -import * as React from 'react'; -export interface IGlobalFooterProps { +import React from 'react'; +export interface GlobalFooterProps { links?: Array<{ key?: string; title: React.ReactNode; @@ -8,6 +8,7 @@ export interface IGlobalFooterProps { }>; copyright?: React.ReactNode; style?: React.CSSProperties; + className?: string; } -export default class GlobalFooter extends React.Component {} +export default class GlobalFooter extends React.Component {} diff --git a/src/components/GlobalHeader/RightContent.d.ts b/src/components/GlobalHeader/RightContent.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..275d9996a06d881735b6bcc70af5887ca2769f67 --- /dev/null +++ b/src/components/GlobalHeader/RightContent.d.ts @@ -0,0 +1,26 @@ +import React from 'react'; +import { DropDownProps } from 'antd/lib/dropdown'; +import { ClickParam } from 'antd/es/menu'; +import { SiderTheme } from 'antd/es/Layout/Sider'; + +export interface GlobalHeaderRightProps { + notices?: any[]; + dispatch?: (args: any) => void; + currentUser?: { + avatar?: string; + name?: string; + title?: string; + group?: string; + signature?: string; + geographic?: any; + tags?: any[]; + unreadCount: number; + }; + fetchingNotices?: boolean; + onNoticeVisibleChange?: (visible: boolean) => void; + onMenuClick?: (param: ClickParam) => void; + onNoticeClear?: (tabName: string) => void; + theme?: SiderTheme; +} + +export default class GlobalHeaderRight extends React.Component {} diff --git a/src/components/GlobalHeader/index.d.ts b/src/components/GlobalHeader/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7d2fcf6e3c7ada8f269842152a955eaf510213bb --- /dev/null +++ b/src/components/GlobalHeader/index.d.ts @@ -0,0 +1,13 @@ +import React from 'react'; + +export interface GlobalHeaderProps { + collapsed?: boolean; + onCollapse?: (collapsed: boolean) => void; + isMobile?: boolean; + logo?: string; + onNoticeClear?: (type: string) => void; + onMenuClick?: ({ key: string }) => void; + onNoticeVisibleChange?: (b: boolean) => void; +} + +export default class GlobalHeader extends React.Component {} diff --git a/src/components/HeaderDropdown/index.d.ts b/src/components/HeaderDropdown/index.d.ts index 43fa9abae9fb6adebff9ecebc5ae31097c35bbf9..a1fd50aa0f0deb8db3effed9e65e5e9c6a066286 100644 --- a/src/components/HeaderDropdown/index.d.ts +++ b/src/components/HeaderDropdown/index.d.ts @@ -1,8 +1,12 @@ -import * as React from 'react'; +import React from 'react'; import { DropDownProps } from 'antd/lib/dropdown'; -export interface IHeaderDropdownProps extends DropDownProps { +declare type OverlayFunc = () => React.ReactNode; + +export interface HeaderDropdownProps extends DropDownProps { overlayClassName?: string; + overlay: React.ReactNode | OverlayFunc; + placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomCenter'; } -export default class HeaderDropdown extends React.Component {} +export default class HeaderDropdown extends React.Component {} diff --git a/src/components/HeaderSearch/index.d.ts b/src/components/HeaderSearch/index.d.ts index d78fde471ccd522d821f77b790647f5620efdb7e..fcf7c11d2205b5a75ca6c797c8e936be00ddb2b7 100644 --- a/src/components/HeaderSearch/index.d.ts +++ b/src/components/HeaderSearch/index.d.ts @@ -1,5 +1,5 @@ -import * as React from 'react'; -export interface IHeaderSearchProps { +import React from 'react'; +export interface HeaderSearchProps { placeholder?: string; dataSource?: string[]; defaultOpen?: boolean; @@ -12,4 +12,4 @@ export interface IHeaderSearchProps { className?: string; } -export default class HeaderSearch extends React.Component {} +export default class HeaderSearch extends React.Component {} diff --git a/src/components/Login/LoginItem.d.ts b/src/components/Login/LoginItem.d.ts index bcfb73b86b75ee39f3f7b609e426ea4f1f6f2ce1..563e94e0489802e9f70b9e407776817f2d20bb25 100644 --- a/src/components/Login/LoginItem.d.ts +++ b/src/components/Login/LoginItem.d.ts @@ -1,11 +1,28 @@ -import * as React from 'react'; -export interface ILoginItemProps { +import React from 'react'; +import { WrappedFormUtils } from 'antd/es/form/Form'; +import ItemMap from './map'; +import { Omit } from 'antd/es/_util/type'; + +export type WrappedLoginItemProps = Omit; +export type LoginItemType = { [K in keyof typeof ItemMap]: React.FC }; + +export interface LoginItemProps { name?: string; rules?: any[]; style?: React.CSSProperties; - onGetCaptcha?: () => void; + onGetCaptcha?: (event?: MouseEvent) => void; placeholder?: string; buttonText?: React.ReactNode; + onPressEnter?: (e: any) => void; + countDown?: number; + getCaptchaButtonText?: string; + getCaptchaSecondText?: string; + updateActive: (activeItem: any) => void; + form: WrappedFormUtils; + type: string; + defaultValue?: string; + customprops?: any; + onChange?: (e: any) => void; } -export default class LoginItem extends React.Component {} +export default class LoginItem extends React.Component {} diff --git a/src/components/Login/LoginTab.d.ts b/src/components/Login/LoginTab.d.ts index db651f7b40c6194d1cd0cb8430736fc4d369e34d..c3f13ecb45cbe659d62d60f8bd3864681a336720 100644 --- a/src/components/Login/LoginTab.d.ts +++ b/src/components/Login/LoginTab.d.ts @@ -1,7 +1,11 @@ -import * as React from 'react'; +import React from 'react'; -export interface ILoginTabProps { +export interface LoginTabProps { key?: string; tab?: React.ReactNode; + tabUtil: { + addTab: (id: any) => void; + removeTab: (id: any) => void; + }; } -export default class LoginTab extends React.Component {} +export default class LoginTab extends React.Component {} diff --git a/src/components/Login/index.d.ts b/src/components/Login/index.d.ts index 6a6f67fe6b1f250bd3708d0120bea1a22026b81b..f80d19b008afa2e867012548d66ded57412726e5 100644 --- a/src/components/Login/index.d.ts +++ b/src/components/Login/index.d.ts @@ -1,20 +1,25 @@ import Button from 'antd/lib/button'; -import * as React from 'react'; -import LoginItem from './LoginItem'; +import React from 'react'; +import LoginItem, { LoginItemProps, LoginItemType } from './LoginItem'; import LoginTab from './LoginTab'; +import { WrappedFormUtils } from 'antd/es/form/Form'; +import LoginSubmit from './LoginSubmit'; -export interface ILoginProps { +export interface LoginProps { defaultActiveKey?: string; onTabChange?: (key: string) => void; style?: React.CSSProperties; onSubmit?: (error: any, values: any) => void; + className?: string; } -export default class Login extends React.Component { +interface Login extends WrappedFormUtils {} +declare class Login extends React.Component { public static Tab: typeof LoginTab; - public static UserName: typeof LoginItem; - public static Password: typeof LoginItem; - public static Mobile: typeof LoginItem; - public static Captcha: typeof LoginItem; - public static Submit: typeof Button; + public static UserName: React.FC; + public static Password: React.FC; + public static Mobile: React.FC; + public static Captcha: React.FC; + public static Submit: typeof LoginSubmit; } +export default Login; diff --git a/src/components/NoticeIcon/NoticeIconTab.d.ts b/src/components/NoticeIcon/NoticeIconTab.d.ts index 869dbbf08af2278a6bcb9a763bd91101089ce54f..2f7781de2b1556200a6bd13f393565c9252519a6 100644 --- a/src/components/NoticeIcon/NoticeIconTab.d.ts +++ b/src/components/NoticeIcon/NoticeIconTab.d.ts @@ -1,7 +1,7 @@ import { SkeletonProps } from 'antd/lib/skeleton'; -import * as React from 'react'; +import React from 'react'; -export interface INoticeIconData { +export interface NoticeIconData { avatar?: string | React.ReactNode; title?: React.ReactNode; description?: React.ReactNode; @@ -10,16 +10,21 @@ export interface INoticeIconData { style?: React.CSSProperties; } -export interface INoticeIconTabProps { +export interface NoticeIconTabProps { count?: number; emptyText?: React.ReactNode; emptyImage?: string; - list?: INoticeIconData[]; + list?: NoticeIconData[]; name?: string; showClear?: boolean; showViewMore?: boolean; style?: React.CSSProperties; title?: string; + data?: any[]; + onClick: (item: any) => void; + onClear: (item: any) => void; + locale: any; + onViewMore: (e: any) => void; } -export default class NoticeIconTab extends React.Component {} +export default class NoticeIconTab extends React.Component {} diff --git a/src/components/NoticeIcon/index.d.ts b/src/components/NoticeIcon/index.d.ts index d32586d6876b453a5184f222001b9e9a7968f8bb..18b3c43327cc409bae1e2f83759440e528676924 100644 --- a/src/components/NoticeIcon/index.d.ts +++ b/src/components/NoticeIcon/index.d.ts @@ -1,14 +1,14 @@ -import * as React from 'react'; -import NoticeIconTab, { INoticeIconData } from './NoticeIconTab'; +import React from 'react'; +import NoticeIconTab, { NoticeIconData } from './NoticeIconTab'; -export interface INoticeIconProps { +export interface NoticeIconProps { count?: number; bell?: React.ReactNode; className?: string; loading?: boolean; onClear?: (tabName: string) => void; - onItemClick?: (item: INoticeIconData, tabProps: INoticeIconProps) => void; - onViewMore?: (tabProps: INoticeIconProps) => void; + onItemClick?: (item: NoticeIconData, tabProps: NoticeIconProps) => void; + onViewMore?: (tabProps: NoticeIconProps, e: MouseEvent) => void; onTabChange?: (tabTile: string) => void; style?: React.CSSProperties; onPopupVisibleChange?: (visible: boolean) => void; @@ -22,6 +22,6 @@ export interface INoticeIconProps { clearClose?: boolean; } -export default class NoticeIcon extends React.Component { +export default class NoticeIcon extends React.Component { public static Tab: typeof NoticeIconTab; } diff --git a/src/components/NumberInfo/index.d.ts b/src/components/NumberInfo/index.d.ts index ca93ba5d3df702af793cc15f70c7416d2610d366..6636db9152ea418948be92f2835d56e12434b781 100644 --- a/src/components/NumberInfo/index.d.ts +++ b/src/components/NumberInfo/index.d.ts @@ -1,5 +1,5 @@ -import * as React from 'react'; -export interface INumberInfoProps { +import React from 'react'; +export interface NumberInfoProps { title?: React.ReactNode | string; subTitle?: React.ReactNode | string; total?: React.ReactNode | string; @@ -7,7 +7,8 @@ export interface INumberInfoProps { theme?: string; gap?: number; subTotal?: number; + suffix?: string; style?: React.CSSProperties; } -export default class NumberInfo extends React.Component {} +export default class NumberInfo extends React.Component {} diff --git a/src/components/PageHeader/breadcrumb.d.ts b/src/components/PageHeader/breadcrumb.d.ts index cfed402113aaffc2000b99712c13add232fd0b16..69a95dc1152ec0766d2c23f2ccf6089221dfef0b 100644 --- a/src/components/PageHeader/breadcrumb.d.ts +++ b/src/components/PageHeader/breadcrumb.d.ts @@ -1,6 +1,6 @@ -import * as React from 'react'; -import { IPageHeaderProps } from './index'; +import React from 'react'; +import { PageHeaderProps } from './index'; -export default class BreadcrumbView extends React.Component {} +export default class BreadcrumbView extends React.Component {} export function getBreadcrumb(breadcrumbNameMap: object, url: string): object; diff --git a/src/components/PageHeader/index.d.ts b/src/components/PageHeader/index.d.ts index e3e1f3212943b7d470b5fd90f88c7e3b21bff7dc..fb927e746cd2eec18fdcb56e18d39d0c74245fd3 100644 --- a/src/components/PageHeader/index.d.ts +++ b/src/components/PageHeader/index.d.ts @@ -1,28 +1,31 @@ -/// -import * as React from 'react'; +import React from 'react'; import { Location } from 'history'; -export interface IPageHeaderProps { - title?: React.ReactNode | string; + +export interface PageHeaderProps { + title?: React.ReactNode | string | number; logo?: React.ReactNode | string; action?: React.ReactNode | string; content?: React.ReactNode; extraContent?: React.ReactNode; routes?: any[]; params?: any; - breadcrumbList?: Array<{ title: React.ReactNode; href?: string }>; + breadcrumbList?: Array<{ title: string | number; href?: string }>; tabList?: Array<{ key: string; tab: React.ReactNode }>; tabActiveKey?: string; tabDefaultActiveKey?: string; onTabChange?: (key: string) => void; tabBarExtraContent?: React.ReactNode; - linkElement?: React.ReactNode; + linkElement?: React.ReactNode | string; style?: React.CSSProperties; home?: React.ReactNode; wide?: boolean; hiddenBreadcrumb?: boolean; + className?: string; + loading?: boolean; + breadcrumbSeparator?: React.ReactNode; location?: Location; itemRender: (menuItem: any) => React.ReactNode; breadcrumbNameMap?: any; } -export default class PageHeader extends React.Component {} +export default class PageHeader extends React.Component {} diff --git a/src/components/PageHeaderWrapper/GridContent.d.ts b/src/components/PageHeaderWrapper/GridContent.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a3d3a308f2aa5cd3688e8de8092d54cc3094572e --- /dev/null +++ b/src/components/PageHeaderWrapper/GridContent.d.ts @@ -0,0 +1,8 @@ +import React from 'react'; + +export interface GridContentProps { + contentWidth: string; + children: React.ReactNode; +} + +export default class GridContent extends React.Component {} diff --git a/src/components/PageHeaderWrapper/index.d.ts b/src/components/PageHeaderWrapper/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..21c8759b1563cecad6ee36e1d39a54247984489a --- /dev/null +++ b/src/components/PageHeaderWrapper/index.d.ts @@ -0,0 +1,12 @@ +import React from 'react'; +export interface ResultProps { + actions?: React.ReactNode; + className?: string; + description?: React.ReactNode; + extra?: React.ReactNode; + style?: React.CSSProperties; + title?: React.ReactNode; + type: 'success' | 'error'; +} + +export default class Result extends React.Component {} diff --git a/src/components/Result/index.d.ts b/src/components/Result/index.d.ts index 0c34c254014f49c0d7322acc1dab47cbd2fd52b4..21c8759b1563cecad6ee36e1d39a54247984489a 100644 --- a/src/components/Result/index.d.ts +++ b/src/components/Result/index.d.ts @@ -1,11 +1,12 @@ -import * as React from 'react'; -export interface IResultProps { - type: 'success' | 'error'; - title: React.ReactNode; +import React from 'react'; +export interface ResultProps { + actions?: React.ReactNode; + className?: string; description?: React.ReactNode; extra?: React.ReactNode; - actions?: React.ReactNode; style?: React.CSSProperties; + title?: React.ReactNode; + type: 'success' | 'error'; } -export default class Result extends React.Component {} +export default class Result extends React.Component {} diff --git a/src/components/SelectLang/index.d.ts b/src/components/SelectLang/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2c53fa32b8c1fe1934d70835d09992ea8475d87 --- /dev/null +++ b/src/components/SelectLang/index.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; + +export interface SelectLangProps { + className?: string; +} + +export default class SelectLang extends React.Component {} diff --git a/src/components/SettingDrawer/BlockCheckbox.d.ts b/src/components/SettingDrawer/BlockCheckbox.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1012294ec0d129e79c936ed8c9cdce681eaad980 --- /dev/null +++ b/src/components/SettingDrawer/BlockCheckbox.d.ts @@ -0,0 +1,9 @@ +import React from 'react'; + +export interface BlockChecboxProps { + value: string; + onChange: (key: string) => void; + list: any[]; +} + +export default class BlockChecbox extends React.Component {} diff --git a/src/components/SettingDrawer/ThemeColor.d.ts b/src/components/SettingDrawer/ThemeColor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..17bc3e8dec81b3695fa21a459d826b9e5f220937 --- /dev/null +++ b/src/components/SettingDrawer/ThemeColor.d.ts @@ -0,0 +1,10 @@ +import React from 'react'; + +export interface TagProps { + color: string; + check: boolean; + className?: string; + onClick?: () => void; +} + +export default class ThemeColor extends React.Component {} diff --git a/src/components/SettingDrawer/index.d.ts b/src/components/SettingDrawer/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..22273089eb54c481a581cd0e53635b05fbae8234 --- /dev/null +++ b/src/components/SettingDrawer/index.d.ts @@ -0,0 +1,24 @@ +import React from 'react'; +import { SiderTheme } from 'antd/es/Layout/Sider'; + +export interface SettingModelState { + navTheme: string | SiderTheme; + primaryColor: string; + layout: string; + contentWidth: string; + fixedHeader: boolean; + autoHideHeader: boolean; + fixSiderbar: boolean; + menu: { disableLocal: boolean }; + title: string; + pwa: boolean; + iconfontUrl: string; + colorWeak: boolean; +} + +export interface SettingDrawerProps { + setting?: SettingModelState; + dispatch?: (args: any) => void; +} + +export default class SettingDrawer extends React.Component {} diff --git a/src/components/SiderMenu/BaseMenu.d.ts b/src/components/SiderMenu/BaseMenu.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..79fcf46742854c3702383840629d5faab838c98a --- /dev/null +++ b/src/components/SiderMenu/BaseMenu.d.ts @@ -0,0 +1,23 @@ +import React from 'react'; +import * as H from 'history'; +import { SiderTheme, CollapseType } from 'antd/es/Layout/Sider'; + +import { MenuMode } from 'antd/es/menu'; + +export interface BaseMenuProps { + flatMenuKeys?: any[]; + location?: H.Location; + onCollapse?: (collapsed: boolean, type?: CollapseType) => void; + isMobile?: boolean; + openKeys?: any; + theme?: SiderTheme; + mode?: MenuMode; + className?: string; + collapsed?: boolean; + handleOpenChange?: (openKeys: any[]) => void; + menuData?: any[]; + style?: React.CSSProperties; + onOpenChange?: (openKeys: string[]) => void; +} + +export default class BaseMenu extends React.Component {} diff --git a/src/components/SiderMenu/SiderMenu.d.ts b/src/components/SiderMenu/SiderMenu.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c18162a8df526f009d9575742eb24748d5e66afb --- /dev/null +++ b/src/components/SiderMenu/SiderMenu.d.ts @@ -0,0 +1,11 @@ +import React from 'react'; +import * as H from 'history'; +import { BaseMenuProps } from './BaseMenu'; +import { SiderTheme } from 'antd/es/Layout/Sider'; + +export interface SiderMenuProps extends BaseMenuProps { + logo?: string; + fixSiderbar?: boolean; +} + +export default class SiderMenu extends React.Component {} diff --git a/src/components/SiderMenu/index.d.ts b/src/components/SiderMenu/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..383df9e11d934270685cadc6d6b38d3f2449f9bc --- /dev/null +++ b/src/components/SiderMenu/index.d.ts @@ -0,0 +1,13 @@ +import React from 'react'; +import { SiderTheme } from 'antd/es/Layout/Sider'; + +export interface SiderMenuProps { + isMobile: boolean; + menuData: any[]; + collapsed: boolean; + logo?: string; + theme?: SiderTheme; + onCollapse: (payload: boolean) => void; +} + +export default class SiderMenuWrapper extends React.Component {} diff --git a/src/components/StandardFormRow/index.d.ts b/src/components/StandardFormRow/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..de06c9b8292f54373292089364281688eb8a95bc --- /dev/null +++ b/src/components/StandardFormRow/index.d.ts @@ -0,0 +1,11 @@ +import React from 'react'; + +export interface StandardFormRowProps { + title: string; + last?: boolean; + block?: boolean; + grid?: boolean; + style?: React.CSSProperties; +} + +export default class StandardFormRow extends React.Component {} diff --git a/src/components/StandardTable/index.d.ts b/src/components/StandardTable/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d9addeffae1b59d9a7ea2bbc1924e6c9543e94f5 --- /dev/null +++ b/src/components/StandardTable/index.d.ts @@ -0,0 +1,19 @@ +import React from 'react'; +import { PaginationConfig, SorterResult, TableCurrentDataSource } from 'antd/lib/table'; + +export interface StandardTableProps { + columns: any; + onSelectRow: (row: any) => void; + data: any; + rowKey?: string; + selectedRows: any[]; + onChange?: ( + pagination: PaginationConfig, + filters: Record, + sorter: SorterResult, + extra?: TableCurrentDataSource + ) => void; + loading?: boolean; +} + +export default class StandardTable extends React.Component {} diff --git a/src/components/TagSelect/TagSelectOption.d.ts b/src/components/TagSelect/TagSelectOption.d.ts index 366b297a7d3ff01c2a07a5c219b1b04558b8f8ab..3343d744ce1f5ae5e4ad252146e6c891447292ee 100644 --- a/src/components/TagSelect/TagSelectOption.d.ts +++ b/src/components/TagSelect/TagSelectOption.d.ts @@ -1,8 +1,12 @@ -import * as React from 'react'; +import React from 'react'; -export interface ITagSelectOptionProps { - value: string | number; +export interface TagSelectOptionProps { + value?: string | number; style?: React.CSSProperties; + checked?: boolean; + onChange?: (value: string | number, state: boolean) => void; } -export default class TagSelectOption extends React.Component {} +export default class TagSelectOption extends React.Component { + public static isTagSelectOption?: boolean; +} diff --git a/src/components/TagSelect/index.d.ts b/src/components/TagSelect/index.d.ts index 9de30263f1795b5cb323085b9eb3109d720c14cb..c225a86fe676fafbca8c4ff2f2ab9ebb06651994 100644 --- a/src/components/TagSelect/index.d.ts +++ b/src/components/TagSelect/index.d.ts @@ -1,16 +1,23 @@ -import * as React from 'react'; -import TagSelectOption from './TagSelectOption'; +import React from 'react'; +import TagSelectOption, { TagSelectOptionProps } from './TagSelectOption'; -export interface ITagSelectProps { +export interface TagSelectProps { onChange?: (value: string[]) => void; expandable?: boolean; value?: string[] | number[]; style?: React.CSSProperties; hideCheckAll?: boolean; - actionsText?: { expandText?: string; collapseText?: string; selectAllText?: string }; + actionsText?: { + expandText?: React.ReactNode; + collapseText?: React.ReactNode; + selectAllText?: React.ReactNode; + }; + className: string; + Option: TagSelectOptionProps; + children: React.ReactElement | Array>; } -export default class TagSelect extends React.Component { +export default class TagSelect extends React.Component { public static Option: typeof TagSelectOption; private children: | React.ReactElement diff --git a/src/components/TopNavHeader/index.d.ts b/src/components/TopNavHeader/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2d6631be39d999010264de2771e960f887eb4966 --- /dev/null +++ b/src/components/TopNavHeader/index.d.ts @@ -0,0 +1,25 @@ +import React from 'react'; +import { SiderTheme, CollapseType } from 'antd/es/Layout/Sider'; +import { MenuMode } from 'antd/es/menu'; + +export interface TopNavHeaderProps { + theme: SiderTheme; + contentWidth?: string; + menuData?: any[]; + logo?: string; + mode?: MenuMode; + flatMenuKeys?: any[]; + onCollapse?: (collapsed: boolean, type?: CollapseType) => void; + isMobile?: boolean; + openKeys?: any; + className?: string; + collapsed?: boolean; + handleOpenChange?: (openKeys: any[]) => void; + style?: React.CSSProperties; + onOpenChange?: (openKeys: string[]) => void; + onNoticeClear?: (type: string) => void; + onMenuClick?: ({ key: string }) => void; + onNoticeVisibleChange?: (b: boolean) => void; +} + +export default class TopNavHeader extends React.Component {} diff --git a/src/components/Trend/index.d.ts b/src/components/Trend/index.d.ts index 7dc02010301cb3194c41d91b6bf01ac1dbdce1b8..a7775ae9b53ea3e5390f31a7df113ce4b6c3a5e6 100644 --- a/src/components/Trend/index.d.ts +++ b/src/components/Trend/index.d.ts @@ -1,10 +1,11 @@ -import * as React from 'react'; +import React from 'react'; export interface ITrendProps { colorful?: boolean; flag: 'up' | 'down'; style?: React.CSSProperties; reverseColor?: boolean; + className?: string; } export default class Trend extends React.Component {}