UNPKG

raonkupload-angular

Version:

Angular component for RAON K Upload.

115 lines (114 loc) 4.21 kB
/** * @license Copyright (c) 2003-2022, RAONWIZ DevTeam. All rights reserved. */ import { NgZone, EventEmitter, ElementRef, AfterViewInit, OnDestroy } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { RaonkUpload } from './raonkupload'; export declare class RaonkUploadComponent implements AfterViewInit, OnDestroy, ControlValueAccessor { private elementRef; private ngZone; /** * The id of the component */ id: string; /** * The configuration of the component. */ config?: RaonkUpload.Config; /** * The component type */ componentType: string; /** * RAON K Upload script url address. Script will be loaded only if RAONKUPLOAD namespace is missing. */ componentUrl: string; /** * Tag name of the component. * * The default tag is `div`. */ tagName: string; /** * The runtimes of the component interface. */ runtimes: RaonkUpload.Runtimes; /** * Keeps track of the component's data. * * It's also decorated as an input which is useful when not using the ngModel. * * See https://angular.io/api/forms/NgModel to learn more. */ set data(data: string); get data(): string; /** * When set to `true`, the editor becomes view mode. */ set viewMode(isViewMode: boolean); get viewMode(): boolean; /** * Fired when the component namespace * is loaded. It only triggers once, no matter how many components are initialised. */ namespaceLoaded: EventEmitter<RaonkUpload.EventInfo>; change: EventEmitter<RaonkUpload.EventInfo>; /** * event. */ creationComplete: EventEmitter<RaonkUpload.EventInfo>; beforeAddFile: EventEmitter<RaonkUpload.EventInfo>; afterAddFile: EventEmitter<RaonkUpload.EventInfo>; afterAddAllFile: EventEmitter<RaonkUpload.EventInfo>; beforeDeleteFile: EventEmitter<RaonkUpload.EventInfo>; afterDeleteFile: EventEmitter<RaonkUpload.EventInfo>; deleteAllFile: EventEmitter<RaonkUpload.EventInfo>; beforeUpload: EventEmitter<RaonkUpload.EventInfo>; uploadComplete: EventEmitter<RaonkUpload.EventInfo>; beforeDownloadFile: EventEmitter<RaonkUpload.EventInfo>; beforeOpenFile: EventEmitter<RaonkUpload.EventInfo>; downloadCompleteFile: EventEmitter<RaonkUpload.EventInfo>; downloadCompleteAllFile: EventEmitter<RaonkUpload.EventInfo>; onError: EventEmitter<RaonkUpload.EventInfo>; uploadingCancel: EventEmitter<RaonkUpload.EventInfo>; downloadCancel: EventEmitter<RaonkUpload.EventInfo>; selectItem: EventEmitter<RaonkUpload.EventInfo>; customAction: EventEmitter<RaonkUpload.EventInfo>; alert: EventEmitter<RaonkUpload.EventInfo>; /** * A callback executed when the content of the component changes. Part of the * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface. * * Note: Unset unless the component uses the `ngModel`. */ onChange?: (data: string) => void; /** * A callback executed when the component has been blurred. Part of the * `ControlValueAccessor` (https://angular.io/api/forms/ControlValueAccessor) interface. * * Note: Unset unless the component uses the `ngModel`. */ onTouched?: () => void; /** * The instance of the component created. */ instance: any; /** * If the component is view-mode before the component instance is created, it remembers that state, * so the component can become view-mode once it is ready. */ private _viewMode; private _data; private _destroyed; constructor(elementRef: ElementRef, ngZone: NgZone); ngAfterViewInit(): void; ngOnDestroy(): void; writeValue(value: string): void; registerOnChange(callback: (data: string) => void): void; registerOnTouched(callback: () => void): void; private getComponentUniqueName; private createComponent; private subscribe; private capitalize; private propagateChange; }