import { ExtractPropTypes } from 'vue'; import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils, ITinyVm, ISharedRenderlessParamHooks } from '../../../shared.type'; import { isImage, abort, getFormData, handleClick, onBeforeDestroy, handleUpdate, handlePaste, uploadFiles, post, handleChange, handleKeydown, upload, mounted } from './renderless'; import { IFileUploadVm, IFileUploadConstants, IFileUploadFile, IFileUploadModalVm } from '../../file-upload/src/file-upload'; export declare const uploadProps: { accept: StringConstructor; action: { type: StringConstructor; default: string; }; autoUpload: BooleanConstructor; beforeUpload: FunctionConstructor; pasteUpload: BooleanConstructor; data: ObjectConstructor; disabled: BooleanConstructor; drag: BooleanConstructor; edmToken: { type: ObjectConstructor; default: () => {}; }; fileList: { type: ArrayConstructor; default: () => never[]; }; headers: ObjectConstructor; httpRequest: { type: FunctionConstructor; default: (option: any) => XMLHttpRequest | undefined; }; isFolder: { type: BooleanConstructor; default: boolean; }; limit: NumberConstructor; listType: StringConstructor; multiple: BooleanConstructor; name: { type: StringConstructor; default: string; }; onError: FunctionConstructor; onExceed: FunctionConstructor; onPreview: { type: FunctionConstructor; default: () => void; }; onProgress: FunctionConstructor; onRemove: { type: FunctionConstructor; default: () => void; }; onStart: FunctionConstructor; onSuccess: FunctionConstructor; type: StringConstructor; withCredentials: BooleanConstructor; isHidden: { type: BooleanConstructor; default: boolean; }; scale: { type: (NumberConstructor | StringConstructor)[]; default: number; }; sourceType: { type: StringConstructor; default: string; validator(val: string): boolean; }; displayOnly: { type: BooleanConstructor; default: boolean; }; customClass: (ArrayConstructor | StringConstructor | ObjectConstructor)[]; handleTriggerClick: { type: FunctionConstructor; default: () => void; }; mode: StringConstructor; showTitle: BooleanConstructor; isHwh5: { type: BooleanConstructor; default: boolean; }; }; export type { IFileUploadVm, IFileUploadConstants, IFileUploadFile, ISharedRenderlessParamHooks, IFileUploadModalVm }; export type IUploadStateHeader = { [propName: string]: string; } | undefined; export interface IUploadState { mouseover: boolean; reqs: { uid?: string; }; uploader: IFileUploadVm; accecpt: string; isEdm: boolean; openEdmDownload: boolean; headers: IUploadStateHeader; formData: object; cancelToken: object; updateId: string; updateInput: null | HTMLInputElement; } export interface IUploadApi { state: IUploadState; isImage: typeof isImage; abort: ReturnType; getFormData: ReturnType; handleClick: ReturnType; onBeforeDestroy: ReturnType; handleUpdate: ReturnType; handlePaste: ReturnType; uploadFiles: ReturnType; post: ReturnType; handleChange: ReturnType; handleKeydown: ReturnType; upload: ReturnType; mounted: ReturnType; } export type IUploadProps = ExtractPropTypes; export type IUploadRenderlessParamUtils = ISharedRenderlessParamUtils; export type IUploadRenderlessParams = ISharedRenderlessFunctionParams & { state: IUploadState; props: IUploadProps; api: IUploadApi; }; export interface IUploadRenderlessOtherParams { rawFile: IFileUploadFile; uploaderInner: ITinyVm; uid: string; } export interface IUploadFormData extends FormData { append(name: string, value: boolean | string | number | Blob, fileName?: string): void; } export interface IUploadOptionsOfPost { headers: object; withCredentials: boolean; file: File; data: IUploadFormData | undefined | Record; filename: string; action?: string; onSuccess: (res: object) => void; onProgress?: (event: Event) => void; onError: (error: object) => void; [x: string]: any; } export interface IUploadOptionsOfHwh5 { edmAuth: { edmToken: string; appId: string; }; filePath: string; progress: number; onProgress: (data: object) => void; onSuccess: (res: object) => void; onError: (error: object) => void; }