UNPKG

primeng

Version:

[![npm version](https://badge.fury.io/js/primeng.svg)](https://badge.fury.io/js/primeng) [![npm downloads](https://img.shields.io/npm/dm/primeng.svg)](https://www.npmjs.com/package/primeng) [![Actions CI](https://github.com/primefaces/primeng/workflows/No

148 lines (147 loc) 5.79 kB
import { AnimationEvent } from '@angular/animations'; import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, QueryList, TemplateRef } from '@angular/core'; import { SafeUrl } from '@angular/platform-browser'; import { PrimeNGConfig, PrimeTemplate } from 'primeng/api'; import { Nullable } from 'primeng/ts-helpers'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; import * as i2 from "primeng/api"; import * as i3 from "primeng/icons/refresh"; import * as i4 from "primeng/icons/eye"; import * as i5 from "primeng/icons/undo"; import * as i6 from "primeng/icons/searchminus"; import * as i7 from "primeng/icons/searchplus"; import * as i8 from "primeng/icons/times"; export declare class Image implements AfterContentInit { private document; private config; private cd; /** * Style class of the image element. * @group Props */ imageClass: string | undefined; /** * Inline style of the image element. * @group Props */ imageStyle: { [klass: string]: any; } | null | undefined; /** * Class of the element. * @group Props */ styleClass: string | undefined; /** * Inline style of the element. * @group Props */ style: { [klass: string]: any; } | null | undefined; /** * Attribute of the image element. * @group Props */ src: string | SafeUrl | undefined; /** * Attribute of the image element. * @group Props */ alt: string | undefined; /** * Attribute of the image element. * @group Props */ width: string | undefined; /** * Attribute of the image element. * @group Props */ height: string | undefined; /** * Target element to attach the dialog, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). * @group Props */ appendTo: HTMLElement | ElementRef | TemplateRef<any> | string | null | undefined | any; /** * Controls the preview functionality. * @group Props */ preview: boolean; /** * Transition options of the show animation * @group Props */ showTransitionOptions: string; /** * Transition options of the hide animation * @group Props */ hideTransitionOptions: string; /** * Triggered when the preview overlay is shown. * @group Emits */ onShow: EventEmitter<any>; /** * Triggered when the preview overlay is hidden. * @group Emits */ onHide: EventEmitter<any>; /** * This event is triggered if an error occurs while loading an image file. * @param {Event} event - Browser event. * @group Emits */ onImageError: EventEmitter<Event>; mask: ElementRef | undefined; templates: QueryList<PrimeTemplate> | undefined; indicatorTemplate: TemplateRef<any> | undefined; rotateRightIconTemplate: TemplateRef<any> | undefined; rotateLeftIconTemplate: TemplateRef<any> | undefined; zoomOutIconTemplate: TemplateRef<any> | undefined; zoomInIconTemplate: TemplateRef<any> | undefined; closeIconTemplate: TemplateRef<any> | undefined; maskVisible: boolean; previewVisible: boolean; rotate: number; scale: number; previewClick: boolean; container: Nullable<HTMLElement>; wrapper: Nullable<HTMLElement>; get isZoomOutDisabled(): boolean; get isZoomInDisabled(): boolean; private zoomSettings; constructor(document: Document, config: PrimeNGConfig, cd: ChangeDetectorRef); ngAfterContentInit(): void; onImageClick(): void; onMaskClick(): void; onPreviewImageClick(): void; rotateRight(): void; rotateLeft(): void; zoomIn(): void; zoomOut(): void; onAnimationStart(event: AnimationEvent): void; onAnimationEnd(event: AnimationEvent): void; moveOnTop(): void; appendContainer(): void; imagePreviewStyle(): { transform: string; }; containerClass(): { 'p-image p-component': boolean; 'p-image-preview-container': boolean; }; handleToolbarClick(event: MouseEvent): void; closePreview(): void; imageError(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration<Image, never>; static ɵcmp: i0.ɵɵComponentDeclaration<Image, "p-image", never, { "imageClass": { "alias": "imageClass"; "required": false; }; "imageStyle": { "alias": "imageStyle"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; "src": { "alias": "src"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "preview": { "alias": "preview"; "required": false; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; }; }, { "onShow": "onShow"; "onHide": "onHide"; "onImageError": "onImageError"; }, ["templates"], never, false, never>; } export declare class ImageModule { static ɵfac: i0.ɵɵFactoryDeclaration<ImageModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ImageModule, [typeof Image], [typeof i1.CommonModule, typeof i2.SharedModule, typeof i3.RefreshIcon, typeof i4.EyeIcon, typeof i5.UndoIcon, typeof i6.SearchMinusIcon, typeof i7.SearchPlusIcon, typeof i8.TimesIcon], [typeof Image, typeof i2.SharedModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<ImageModule>; }