@alauda-fe/common
Version:
Alauda frontend team common codes.
33 lines (32 loc) • 1.6 kB
TypeScript
import { NotificationService } from '@alauda/ui';
import { ElementRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { ValueOf } from '../../core/public-api';
import { TranslateService } from '../../translate/public-api';
import * as i0 from "@angular/core";
export declare const FileResultType: {
readonly ARRAY_BUFFER: "ArrayBuffer";
readonly BINARY_STRING: "BinaryString";
readonly DATA_URL: "DataURL";
readonly TEXT: "Text";
};
export type FileResultType = ValueOf<typeof FileResultType>;
export type FileResult = string | ArrayBuffer;
export declare class UploadFileComponent implements ControlValueAccessor {
private readonly notification;
private readonly translate;
disabled: boolean;
accept: string;
multiple: boolean;
resultType: FileResultType;
fileInput: ElementRef<HTMLInputElement>;
valueChange: (ev: FileResult | FileResult[]) => void;
constructor(notification: NotificationService, translate: TranslateService);
onClick(): void;
onChange(e: Event): Promise<void>;
writeValue(): void;
registerOnChange(fn: any): void;
registerOnTouched(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<UploadFileComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<UploadFileComponent, "acl-upload-file", never, { "disabled": { "alias": "disabled"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "resultType": { "alias": "resultType"; "required": false; }; }, {}, never, ["*"], true, never>;
}