@progress/kendo-angular-upload
Version:
Kendo UI Angular Upload Component
162 lines (161 loc) • 5.11 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { ChangeDetectorRef, ElementRef, EventEmitter, Injector, NgZone } from "@angular/core";
import { RemoveEvent, SelectEvent } from "../events";
import { FileTemplateDirective } from "../templates/file-template.directive";
import { FileInfoTemplateDirective } from "../templates/file-info-template.directive";
import { FileMap, FileRestrictions } from "../types";
import { UploadService } from "../upload.service";
import { FormControl } from "@angular/forms";
import { NavigationService } from "../navigation.service";
import * as i0 from "@angular/core";
/**
* @hidden
*/
export declare abstract class UploadFileSelectBase {
protected uploadService: UploadService;
protected navigation: NavigationService;
protected cdr: ChangeDetectorRef;
protected injector: Injector;
protected zone: NgZone;
/**
* @hidden
*/
fileTemplate: FileTemplateDirective;
/**
* @hidden
*/
fileInfoTemplate: FileInfoTemplateDirective;
/**
* @hidden
*/
fileSelectButton: ElementRef;
/**
* Sets the `accept` attribute of the internal `input` element of the component.
*/
accept: string;
/**
* Disables the component.
*
* @default false
*/
disabled: boolean;
/**
* Enables the selection of multiple files
* If set to `false`, only one file can be selected at a time.
* @default true
*/
multiple: boolean;
/**
* Toggles the visibility of the file list.
* @default true
*/
showFileList: boolean;
/**
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
* @default 0
*/
tabindex: number;
/**
* Sets the restrictions for selected files.
*/
set restrictions(restrictions: FileRestrictions);
get restrictions(): FileRestrictions;
/**
* Specifies the id of the external drop zone to associate with the component.
*/
zoneId: string;
/**
* @hidden
*/
focusableId: string;
/**
* @hidden
*/
hostDefaultClasses: boolean;
/**
* @hidden
*/
get hostDisabledClass(): boolean;
/**
* Fires when the user navigates outside the component.
*/
onBlur: EventEmitter<any>;
/**
* Fires when the component is focused.
*/
onFocus: EventEmitter<any>;
/**
* Fires when files are selected. If prevented, the selected files will not be added to the list.
*/
select: EventEmitter<SelectEvent>;
/**
* Fires when a file is about to be removed. If prevented, the file will remain in the list.
*/
remove: EventEmitter<RemoveEvent>;
/**
* @hidden
*/
_restrictions: FileRestrictions;
/**
* @hidden
*/
fileList: FileMap;
constructor(uploadService: UploadService, navigation: NavigationService, cdr: ChangeDetectorRef, injector: Injector, zone: NgZone);
/**
* @hidden
*/
get formControl(): FormControl;
/**
* @hidden
*/
get isControlRequired(): boolean;
/**
* @hidden
*/
get hasFileList(): boolean;
/**
* @hidden
*/
writeValue(newValue: any, validation: Function, callback: string): void;
protected onTouchedCallback: Function;
protected onChangeCallback: Function;
/**
* @hidden
*/
registerOnChange(fn: any): void;
/**
* @hidden
*/
registerOnTouched(fn: any): void;
/**
* @hidden
*/
setDisabledState(isDisabled: boolean): void;
/**
* @hidden
*/
onFileSelectButtonFocus(): void;
/**
* Focuses the component's `Select files` button.
*/
focus(): void;
/**
* @hidden
* @deprecated
*/
focusComponent(): void;
/**
* Blurs the component if it was previously focused.
*/
blur(): void;
/**
* @hidden
* @deprecated
*/
blurComponent(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<UploadFileSelectBase, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<UploadFileSelectBase, never, never, { "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "showFileList": { "alias": "showFileList"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "restrictions": { "alias": "restrictions"; "required": false; }; "zoneId": { "alias": "zoneId"; "required": false; }; "focusableId": { "alias": "focusableId"; "required": false; }; }, { "onBlur": "blur"; "onFocus": "focus"; "select": "select"; "remove": "remove"; }, ["fileTemplate", "fileInfoTemplate"], never, false, never>;
}