import { FormAssociatedFile } from "./file.form-associated.js"; /** * Web component for presenting a file picker dialog and perform some action on the selected files. * The component expects a FileAction component as a child which performs the action. * Example: * x.myChangeHandler} * > * Add image * * */ export declare class File extends FormAssociatedFile { /** * Reference to the FileAction that will be performed when files are selected. */ private fileAction; /** * The list of file types that will be shown in the file picker. * Matches syntax for the "accept" attribute of the element. */ accept: string; /** * When true the file picker will allow the selection of multiple files. * By default only one file is allowed. */ multiple: boolean; /** * Callback method for reporting progress of long running FileAction. * The progress value is calculated by the FileAction but should be a number between 0 and 1. */ progressCallback: (progress: number) => Promise; /** * @deprecated */ progressCallbackDepricated: (progress: number) => Promise; private progressCallbackDepricatedChanged; /** * After file(s) are selected this property will contain a string array with the references * to the selected files based on the action (i.e. file name, objectUrl, http url, base64 blob, etc). */ fileReferences: string[]; /** * Slot reference for actions slot. When children are added to the slot it searches for the first * control with the role="fileaction". Additional actions are ignored. */ action: HTMLSlotElement; private actionChanged; /** * Fast Element lifecycle hook */ connectedCallback(): void; /** * Click handler for the button. Sets up the proxy element and triggers the click event * in order to open the system file picker dialog. */ handleClick(): void; /** * Change event handler for inner control. * @remarks * "Change" events are not `composable` so they will not * permeate the shadow DOM boundary. This fn effectively proxies * the change event, emitting a `change` event whenever the internal * control emits a `change` event * @internal */ handleChange(e: Event): void; /** * Determines if a given element is a FileAction web component. * @param el - The element to test. * @returns - True if the element is a FileAction. */ private isFileAction; }