devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
687 lines (493 loc) • 20.3 kB
TypeScript
/*!
* devextreme-angular
* Version: 20.2.5
* Build date: Fri Jan 15 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
import { TransferState } from '@angular/platform-browser';
import { ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges } from '@angular/core';
import DxFileUploader from 'devextreme/ui/file_uploader';
import { ControlValueAccessor } from '@angular/forms';
import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core';
/**
* The FileUploader UI component enables an end user to upload files to the server. An end user can select files in the file explorer or drag and drop files to the FileUploader area on the page.
*/
export declare class DxFileUploaderComponent extends DxComponent implements OnDestroy, ControlValueAccessor, OnChanges, DoCheck {
private _watcherHelper;
private _idh;
instance: DxFileUploader;
/**
* A function that cancels the file upload.
*/
abortUpload: Function;
/**
* Specifies a file type or several types accepted by the UI component.
*/
accept: string;
/**
* Specifies the shortcut key that sets focus on the UI component.
*/
accessKey: string;
/**
* Specifies whether or not the UI component changes its state when interacting with a user.
*/
activeStateEnabled: boolean;
/**
* Specifies if an end user can remove a file from the selection and interrupt uploading.
*/
allowCanceling: boolean;
/**
* Restricts file extensions that can be uploaded to the server.
*/
allowedFileExtensions: Array<string>;
/**
* Specifies the chunk size in bytes. Applies only if uploadMode is 'instantly' or 'useButtons'. Requires a server that can process file chunks.
*/
chunkSize: number;
/**
* Specifies the HTML element which invokes the file upload dialog.
*/
dialogTrigger: Element | JQuery | string;
/**
* Specifies whether the UI component responds to user interaction.
*/
disabled: boolean;
/**
* Specifies the HTML element in which users can drag and drop files for upload.
*/
dropZone: Element | JQuery | string;
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
elementAttr: any;
/**
* Specifies whether the UI component can be focused using keyboard navigation.
*/
focusStateEnabled: boolean;
/**
* Specifies the UI component's height.
*/
height: number | Function | string;
/**
* Specifies text for a hint that appears when a user pauses on the UI component.
*/
hint: string;
/**
* Specifies whether the UI component changes its state when a user pauses on it.
*/
hoverStateEnabled: boolean;
/**
* Specifies the attributes to be passed on to the underlying `` element of the `file` type.
*/
inputAttr: any;
/**
* The text displayed when the extension of the file being uploaded is not an allowed file extension.
*/
invalidFileExtensionMessage: string;
/**
* The text displayed when the size of the file being uploaded is greater than the maxFileSize.
*/
invalidMaxFileSizeMessage: string;
/**
* The text displayed when the size of the file being uploaded is less than the minFileSize.
*/
invalidMinFileSizeMessage: string;
/**
* Specifies or indicates whether the editor's value is valid.
*/
isValid: boolean;
/**
* Specifies the text displayed on the area to which an end-user can drop a file.
*/
labelText: string;
/**
* Specifies the maximum file size (in bytes) allowed for uploading. Applies only if uploadMode is 'instantly' or 'useButtons'.
*/
maxFileSize: number;
/**
* Specifies the minimum file size (in bytes) allowed for uploading. Applies only if uploadMode is 'instantly' or 'useButtons'.
*/
minFileSize: number;
/**
* Specifies whether the UI component enables an end-user to select a single file or multiple files.
*/
multiple: boolean;
/**
* Specifies the value passed to the name attribute of the underlying input element. Required to access uploaded files on the server.
*/
name: string;
/**
* Gets the current progress in percentages.
*/
progress: number;
/**
* Specifies whether the editor is read-only.
*/
readOnly: boolean;
/**
* The message displayed by the UI component when it is ready to upload the specified files.
*/
readyToUploadMessage: string;
/**
* Switches the UI component to a right-to-left representation.
*/
rtlEnabled: boolean;
/**
* The text displayed on the button that opens the file browser.
*/
selectButtonText: string;
/**
* Specifies whether or not the UI component displays the list of selected files.
*/
showFileList: boolean;
/**
* Specifies the number of the element when the Tab key is used for navigating.
*/
tabIndex: number;
/**
* The message displayed by the UI component when the file upload is cancelled.
*/
uploadAbortedMessage: string;
/**
* The text displayed on the button that starts uploading.
*/
uploadButtonText: string;
/**
* A function that uploads a file in chunks.
*/
uploadChunk: Function;
/**
* Specifies custom data for the upload request.
*/
uploadCustomData: any;
/**
* The message displayed by the UI component when uploading is finished.
*/
uploadedMessage: string;
/**
* The message displayed by the UI component on uploading failure.
*/
uploadFailedMessage: string;
/**
* A function that uploads a file.
*/
uploadFile: Function;
/**
* Specifies headers for the upload request.
*/
uploadHeaders: any;
/**
* Specifies the method for the upload request.
*/
uploadMethod: string;
/**
* Specifies how the UI component uploads files.
*/
uploadMode: string;
/**
* Specifies a target Url for the upload request.
*/
uploadUrl: string;
/**
* Information on the broken validation rule. Contains the first item from the validationErrors array.
*/
validationError: any;
/**
* An array of the validation rules that failed.
*/
validationErrors: Array<any>;
/**
* Indicates or specifies the current validation status.
*/
validationStatus: string;
/**
* Specifies a File instance representing the selected file. Read-only when uploadMode is 'useForm'.
*/
value: Array<any>;
/**
* Specifies whether the UI component is visible.
*/
visible: boolean;
/**
* Specifies the UI component's width.
*/
width: number | Function | string;
/**
* A function that allows you to customize the request before it is sent to the server.
*/
onBeforeSend: EventEmitter<any>;
/**
* A function that is executed when the UI component's content is ready and each time the content is changed.
*/
onContentReady: EventEmitter<any>;
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing: EventEmitter<any>;
/**
* A function that is executed when the mouse enters a drop zone while dragging a file.
*/
onDropZoneEnter: EventEmitter<any>;
/**
* A function that is executed when the mouse leaves a drop zone as it drags a file.
*/
onDropZoneLeave: EventEmitter<any>;
/**
* A function that is executed when all files are successfully uploaded.
*/
onFilesUploaded: EventEmitter<any>;
/**
* A function used in JavaScript frameworks to save the UI component instance.
*/
onInitialized: EventEmitter<any>;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged: EventEmitter<any>;
/**
* A function that is executed when a file segment is uploaded.
*/
onProgress: EventEmitter<any>;
/**
* A function that is executed when the file upload is aborted.
*/
onUploadAborted: EventEmitter<any>;
/**
* A function that is executed when a file is successfully uploaded.
*/
onUploaded: EventEmitter<any>;
/**
* A function that is executed when an error occurs during the file upload.
*/
onUploadError: EventEmitter<any>;
/**
* A function that is executed when the file upload is started.
*/
onUploadStarted: EventEmitter<any>;
/**
* A function that is executed when one or several files are added to or removed from the selection.
*/
onValueChanged: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
abortUploadChange: EventEmitter<Function>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
acceptChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
accessKeyChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
activeStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
allowCancelingChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
allowedFileExtensionsChange: EventEmitter<Array<string>>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
chunkSizeChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
dialogTriggerChange: EventEmitter<Element | JQuery | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
disabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
dropZoneChange: EventEmitter<Element | JQuery | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
elementAttrChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
focusStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
heightChange: EventEmitter<number | Function | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hintChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hoverStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
inputAttrChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
invalidFileExtensionMessageChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
invalidMaxFileSizeMessageChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
invalidMinFileSizeMessageChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
isValidChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
labelTextChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
maxFileSizeChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
minFileSizeChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
multipleChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
nameChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
progressChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
readOnlyChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
readyToUploadMessageChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
rtlEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
selectButtonTextChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
showFileListChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
tabIndexChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadAbortedMessageChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadButtonTextChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadChunkChange: EventEmitter<Function>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadCustomDataChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadedMessageChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadFailedMessageChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadFileChange: EventEmitter<Function>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadHeadersChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadMethodChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadModeChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
uploadUrlChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
validationErrorChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
validationErrorsChange: EventEmitter<Array<any>>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
validationStatusChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
valueChange: EventEmitter<Array<any>>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
visibleChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
widthChange: EventEmitter<number | Function | string>;
/**
*
*/
onBlur: EventEmitter<any>;
change(_: any): void;
touched: (_: any) => void;
constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
protected _createInstance(element: any, options: any): DxFileUploader;
writeValue(value: any): void;
setDisabledState(isDisabled: boolean): void;
registerOnChange(fn: (_: any) => void): void;
registerOnTouched(fn: () => void): void;
_createWidget(element: any): void;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
setupChanges(prop: string, changes: SimpleChanges): void;
ngDoCheck(): void;
_setOption(name: string, value: any): void;
}
export declare class DxFileUploaderModule {
}