/** * * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc.. * * This source code is licensed under the Apache license. * See LICENSE file in the project root for license information. * */ import React, { Component } from 'react'; import { UploadProps, UploadChangeParam } from './component'; import UploadDragger from './component/Upload'; import { UploadFile, RcFile, ShowUploadListInterface } from './component/interface'; import { ButtonType } from '../button'; export * from './component'; export * from './component/interface'; export declare type DraggerProps = UploadProps & { height?: number; }; export declare type IDraggerProps = DraggerProps; export interface IUploadProps extends UploadProps { btnText?: string | React.ReactNode; btnIcon?: React.ReactNode; btnType?: ButtonType; notice?: string[] | React.ReactNode; errMsg?: string | ((file: IUploadFile) => string); errRetryText?: string; strokeColor?: string; successMsg?: (file: IUploadFile) => React.ReactNode; showUploadList?: boolean | IShowUploadListInterface; extraRender?: () => React.ReactNode; } export interface IShowUploadListInterface extends ShowUploadListInterface { customIcon?: React.ReactNode | ((file: UploadFile) => React.ReactNode); } export declare type IUploadFile = UploadFile & { reUploading?: boolean; }; interface IUploadStates { fileList: IUploadFile[]; } export declare class Upload extends Component { static Dragger: typeof UploadDragger.Dragger; static defaultProps: { btnText: string; btnIcon: JSX.Element; btnType: string; errRetryText: string; notice: never[]; errMsg: string; showUploadList: boolean; }; static getDerivedStateFromProps(nextProps: UploadProps): { fileList: UploadFile[]; } | null; antdRef: any; constructor(props: IUploadProps); onChange: (info: UploadChangeParam>) => void; handleRemove: (file: IUploadFile) => void; handleRetry: (failedFile: IUploadFile, info: UploadChangeParam>) => void; handleDownload: (file: IUploadFile) => void; mergedBeforeUpload: (file: RcFile, fileListArgs: RcFile[]) => true | Promise; reUpload: (file: RcFile) => void; render(): JSX.Element; } export default Upload;