UNPKG

ontimize-web-ngx

Version:
59 lines (58 loc) 3.28 kB
import { ElementRef, EventEmitter, Injector, OnInit } from '@angular/core'; import { UntypedFormControl, ValidationErrors, ValidatorFn } from '@angular/forms'; import { IFileService } from '../../../interfaces/file-service.interface'; import { FormValueOptions } from '../../../types/form-value-options.type'; import { OFormComponent } from '../../form/o-form.component'; import { OFormDataComponent } from '../../o-form-data-component.class'; import { OFileItem } from './o-file-item.class'; import { OFileUploader } from './o-file-uploader.class'; import * as i0 from "@angular/core"; export declare const DEFAULT_INPUTS_O_FILE_INPUT: string[]; export declare const DEFAULT_OUTPUTS_O_FILE_INPUT: string[]; export declare class OFileInputComponent extends OFormDataComponent implements OnInit { arraySeparatorRegExp: RegExp; uploader: OFileUploader; fileService: IFileService; inputFile: ElementRef; autoBinding: boolean; autoRegistering: boolean; showInfo: boolean; multiple: boolean; splitUpload: boolean; acceptFileType: string; maxFileSize: number; maxFiles: number; onBeforeUpload: EventEmitter<any>; onBeforeUploadFile: EventEmitter<any>; onProgress: EventEmitter<any>; onProgressFile: EventEmitter<any>; onCancel: EventEmitter<any>; onCancelFile: EventEmitter<any>; onUpload: EventEmitter<any>; onUploadFile: EventEmitter<any>; onComplete: EventEmitter<any>; onCompleteFile: EventEmitter<any>; onError: EventEmitter<any>; onErrorFile: EventEmitter<any>; protected service: string; protected entity: string; protected serviceType: string; constructor(form: OFormComponent, elRef: ElementRef, injector: Injector); ngOnInit(): void; initialize(): void; configureService(): void; resolveValidators(): ValidatorFn[]; fileSelected(event: Event): void; clearValue(options?: FormValueOptions, setDirty?: boolean): void; onClickUpload(e: Event): void; upload(): void; get files(): OFileItem[]; get additionalData(): any; set additionalData(data: any); innerOnChange(event: any): void; protected filetypeValidator(control: UntypedFormControl): ValidationErrors; protected maxFileSizeValidator(control: UntypedFormControl): ValidationErrors; protected maxFilesValidator(control: UntypedFormControl): ValidationErrors; static ɵfac: i0.ɵɵFactoryDeclaration<OFileInputComponent, [{ optional: true; }, null, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<OFileInputComponent, "o-file-input", never, { "acceptFileType": "accept-file-type"; "maxFileSize": "max-file-size"; "multiple": "multiple"; "maxFiles": "max-files"; "showInfo": "show-info"; "splitUpload": "split-upload"; "additionalData": "additional-data"; "service": "service"; "entity": "entity"; "serviceType": "service-type"; }, { "onBeforeUpload": "onBeforeUpload"; "onBeforeUploadFile": "onBeforeUploadFile"; "onProgress": "onProgress"; "onProgressFile": "onProgressFile"; "onCancel": "onCancel"; "onCancelFile": "onCancelFile"; "onUpload": "onUpload"; "onUploadFile": "onUploadFile"; "onComplete": "onComplete"; "onCompleteFile": "onCompleteFile"; "onError": "onError"; "onErrorFile": "onErrorFile"; }, never, never, false, never>; }