import { EventEmitter } from '../../stencil-public-runtime'; import { ImageCropperResx } from './types'; /** * Allows cropping an image in-browser with the option to enforce a specific final size. * All computation happens in the browser and the final image is emmited * in an event that has a data-url of the image. */ export declare class DnnImageCropper { /** Sets the desired final image width. */ width?: number; /** Sets the desired final image height. */ height?: number; /** Can be used to customize controls text. * Some values support tokens, see default values for examples. */ resx?: ImageCropperResx; /** Sets the output quality of the cropped image (number between 0 and 1). */ quality: number; /** When set to true, prevents cropping an image smaller than the required size, which would blow pixel and make the final picture look blurry. */ preventUndersized: boolean; /** The name of the control when used in a form. */ name?: string; /** When the image crop changes, emits the dataurl for the new cropped image. */ imageCropChanged: EventEmitter; /** Emits both when a file is initially select and when the crop has changed. * Compared to imageCropChanged, this event emits the file itself, which can be useful for uploading the file to a server including its name. */ imageFileCropChanged: EventEmitter; /** Clears the current image and crop (resets the component). */ clear(): Promise; view?: IComponentInterfaces["View"]; localResx: ImageCropperResx; fileName?: string; focused: boolean; host: HTMLDnnImageCropperElement; internals: ElementInternals; private hasPictureView; private noPictureView; private canvas; private image; private crop; private inputField; private previousTouch?; private imageTooSmallModal; private defaultResx; componentWillLoad(): void; componentDidLoad(): void; resxChanged(): void; formResetCallback(): void; private mergeResx; private setView; private initCrop; private setImage; private handleNewFile; private initializeCropBox; private handleCropMouseDown; private handleImageCropFinished; private emitImage; private generateCroppedImage; private handleNwMouseMove; private handleNeMouseMove; private handleSeMouseMove; private handleSwMouseMove; private handleCornerDrag; private handleCropDrag; private isMouseStillInTarget; render(): any; } interface IComponentInterfaces { View: "noPictureView" | "takingPictureView" | "hasPictureView" | "hasCroppedPictureView"; } export {};