import { LitElement } from 'lit'; import './fileUploaderListContainer'; import '../button'; import '../loaders'; import '../inlineConfirm'; import '../notification'; declare const FileUploader_base: (new (...args: any[]) => import("../../../common/mixins/form-input").FormMixinInterface) & typeof LitElement; /** * File Uploader * @fires selected-files - Emits the uploaded files.`detail:{ validFiles: Array, invalidFiles: Array }` * @slot upload-status - Slot for upload status/notification. * @attr {string} [name=''] - The name of the input, used for form submission. */ export declare class FileUploader extends FileUploader_base { static styles: import("lit").CSSResult; /** @internal */ value: FormData; /** * Set the file types that the component accepts. By default, it accepts all file types. * @example * ['image/jpeg', 'image/png'] * ['image/*'] * ['audio/*'] * ['application/pdf', 'text/plain'] */ accessor accept: string[]; /** * Accept multiple files. */ accessor multiple: boolean; /** * Customizable text strings. */ accessor textStrings: { dragAndDropText: string; separatorText: string; buttonText: string; maxFileSizeText: string; supportedFileTypeText: string; fileTypeDisplyText: string; invalidFileListLabel: string; validFileListLabel: string; clearListText: string; fileTypeErrorText: string; fileSizeErrorText: string; customFileErrorText: string; inlineConfirmAnchorText: string; inlineConfirmConfirmText: string; inlineConfirmCancelText: string; validationNotificationTitle: string; validationNotificationMessage: string; }; /** * Set the maximum file size in bytes. * @example * 1048576 // 1MB * 5242880 // 5MB * 10485760 // 10MB * 1073741824 // 1GB */ accessor maxFileSize: number; /** * Disable the file uploader. */ accessor disabled: boolean; /** * Valid files. This property is used to set the initial or updated state of the valid files. */ accessor validFiles: { id: string; file: File; status: 'new' | 'uploading' | 'uploaded' | 'error'; }[]; /** * Invalid files. This property is used to set the initial state of the invalid files. */ accessor invalidFiles: { id: string; file: File; status: 'sizeError' | 'typeError' | 'unknownError'; customErrorMsg?: string; }[]; /** * Internal text strings. * @internal */ accessor _textStrings: { dragAndDropText: string; separatorText: string; buttonText: string; maxFileSizeText: string; supportedFileTypeText: string; fileTypeDisplyText: string; invalidFileListLabel: string; validFileListLabel: string; clearListText: string; fileTypeErrorText: string; fileSizeErrorText: string; customFileErrorText: string; inlineConfirmAnchorText: string; inlineConfirmConfirmText: string; inlineConfirmCancelText: string; validationNotificationTitle: string; validationNotificationMessage: string; }; /** * Internal dragging state. * @internal */ accessor _dragging: boolean; /** * Internal invalid files. * @internal */ accessor _invalidFiles: Object[]; /** * Internal valid files. * @internal */ accessor _validFiles: Object[]; /** * Internal notification message flag. * @internal */ accessor _showValidationNotification: boolean; /** * Queries the DOM element. * @ignore */ accessor _inputEl: HTMLInputElement; willUpdate(changedProps: any): void; render(): import("lit-html").TemplateResult<1>; handleDragOver(event: DragEvent): void; handleDrop(event: DragEvent): void; private _triggerFileSelect; handleFileChange(event: Event): void; private _getFilesSize; private _clearInvalidFiles; private _validateFiles; private _validate; private _setFormValue; private _displayActions; private _deleteFile; private _emitFileUploadEvent; } declare global { interface HTMLElementTagNameMap { 'kyn-file-uploader': FileUploader; } } export {}; //# sourceMappingURL=fileUploader.d.ts.map