import { ClassBindings, Dispatcher } from "../../decorators/index"; export declare class SpsFileUploadComponent extends HTMLElement { static readonly displayName = "sps-file-upload"; static readonly props: { description: string; multiple: string; dismissable: string; processing: string; mini: string; downloadLabel: string; acceptExtensions: string; maxSize: string; customRequirement: string; selection: { event: boolean; type: string; }; dismissal: { event: boolean; type: string; }; download: { event: boolean; type: string; }; }; /** * The "term" for what the user should upload. Defaults to "File" or "Files", * but if you set the `acceptExtensions` prop you might set this to something * more specific, such as "Spreadsheet" or "Images". */ description: any; /** * If true, the component will accept multiple files at once. By default, you can * only select one file at a time. */ multiple: boolean; /** Controls whether the component is visible. */ shown: boolean; /** Controls whether the user can hide the component from view. */ dismissable: boolean; /** * Puts the component in "processing" state, where it displays a spinner and * does not allow any files to be selected. */ processing: boolean; /** Specifies that the component should be displayed in the "mini" style. */ mini: boolean; /** If provided, the content area width will be set to 50% of the overall width. */ constrainContentWidth: boolean; /** If provided, a button will be rendered with this text as its label. */ downloadLabel: string; /** * A list of extensions, provided either as an array of strings or a * string containing comma-separates extensions. Only files with the MIME types * associated with those extensions will be able to be selected. The case of * the extensions does not matter; neither does whether you prefix them with a * dot. That is, ".doc", "DOCX", and "jpg" are all valid extensions for this prop. */ acceptExtensions: string[] | string; /** The maximum allowable size in bytes for files selected by the component. */ maxSize: string; /** custom label in requirements place. */ customRequirement: string; /** * Event which emits when a file or files have been selected by the user. The * event detail will be an array of Files. */ selection: Dispatcher; /** * If the `dismissable` prop has been set, this event will fire when the user * opts to hide the component. */ dismissal: Dispatcher; /** * If the `downloadLabel` prop has been provided, this event will fire when the * user clicks the download button that is rendered. */ download: Dispatcher; /** The HTML file input element within the component. */ fileInput: HTMLInputElement; /** * The list of selected files. If the `multiple` prop has not been provided, * it is still an array; it will simply be an array of one when the user selects * a file. */ files: File[]; private accept; private acceptMIMETypes; private acceptExtensionsDescription; private maxSizeBytes; private active; private error; private namesOfUnsupportedFiles; get [ClassBindings](): string[]; constructor(); connectedCallback(): void; attributeChangedCallback(attrName: string, oldValue: any, newValue: any): void; /** * If the `dismissable` prop has been set, this will programmatically * dismiss the component and fire the "dismissal" event. */ dismiss(): void; /** If the `dismissable` prop has been set, this will programmatically show the component. */ show(): void; render(): JSX.Element; private parseAndValidateMaxSize; private processAcceptExtensions; private selectFiles; private handleDragOver; private handleDragEnter; private handleDragLeave; private handleDrop; private handleBrowseLinkClick; private handleDownloadButtonClick; private handleFileInputChange; }