/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { UploadAsyncProps } from './UploadAsyncProps'; import { UploadFileRestrictions } from './UploadFileRestrictions'; import { UploadFileInfo } from './UploadFileInfo'; import { UploadOnAddEvent } from './UploadOnAddEvent'; import { UploadOnRemoveEvent } from './UploadOnRemoveEvent'; import { UploadOnStatusChangeEvent } from './UploadOnStatusChangeEvent'; import { UploadOnProgressEvent } from './UploadOnProgressEvent'; import { UploadOnBeforeUploadEvent } from './UploadOnBeforeUploadEvent'; import { UploadOnBeforeRemoveEvent } from './UploadOnBeforeRemoveEvent'; import { UploadOnCancelEvent } from './UploadOnCancelEvent'; import { UploadActionsLayout } from './UploadActionsLayout'; /** * Represents the props of the [Kendo Ui for Vue Upload component]({% slug overview_upload %}). */ export interface UploadProps extends UploadAsyncProps { /** * Sets a class of the Upload DOM element. */ className?: string; /** * Enables the selection of multiple files * ([see example]({% slug fileprocessing_upload %}#toc-upload-of-single-or-multiple-files)). * If set to `false`, only one file can be selected at a time. */ multiple?: boolean; /** * Disables the Upload ([see example]({% slug disabledstate_upload %})). Defaults to `false`. */ disabled?: boolean; /** * Toggles the visibility of the file list. */ showFileList?: boolean; /** * When the `autoUpload` option is set to `false`, * `showActionButtons` toggles the visibility of the action buttons which are rendered. */ showActionButtons?: boolean; /** * Specifies the possible layouts of the action buttons * ([see example]({% slug actionbuttons_upload %})). Defaults to `end`. */ actionsLayout?: UploadActionsLayout; /** * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) * of the Upload. */ tabIndex?: number | string; /** * Specifies the id of the component. */ id?: string; /** * Identifies the element(s) which will describe the component, similar * to HTML aria-describedby attribute For example these elements * could contain error or hint message. */ ariaDescribedBy?: string; /** * Identifies the element(s) which will label the component. */ ariaLabelledBy?: string; /** * Sets the `accept` attribute of the `input` element of the Upload. */ accept?: string; /** * Sets the restrictions for the selected files ([see example]({% slug filerestrictions_upload %})). */ restrictions?: UploadFileRestrictions; /** * Sets the custom restrictions for the selected files ([see example]({% slug filerestrictions_upload %})). */ validateFile?: (file: UploadFileInfo) => void; /** * The list of files which are displayed when the Upload is in controlled mode * ([see example]({% slug controleduncontroled_upload %})). */ files?: Array; /** * The initial list of files which are displayed when the Upload is in * uncontrolled mode ([see example]({% slug controleduncontroled_upload %})). */ defaultFiles?: Array; /** * The component that will be rendered as a list item inside the Upload. */ list?: any; /** * Fires when new files are selected for upload. */ onAdd?: (event: UploadOnAddEvent) => void; /** * Fires when files are removed. Optionally, if a request is made, can contain a server response. */ onRemove?: (event: UploadOnRemoveEvent) => void; /** * Fires when the status of the files is changed. Optionally, if a request is made, can contain a server response. */ onStatuschange?: (event: UploadOnStatusChangeEvent) => void; /** * Fires when the progress of the file upload is changed. */ onProgress?: (event: UploadOnProgressEvent) => void; /** * Fires before a request for a file upload is made. Can be used to add extra data to the request. */ onBeforeupload?: (event: UploadOnBeforeUploadEvent) => void; /** * Fires before a request for a file removal is made. Can be used to add extra data to the request. */ onBeforeremove?: (event: UploadOnBeforeRemoveEvent) => void; /** * Fires when user clicks on the **Remove** button while the file upload is in progress. * Can be used when the `saveUrl` option is set to a function that cancels custom requests. */ onCancel?: (event: UploadOnCancelEvent) => void; }