@nova-ui/bits
Version:
SolarWinds Nova Framework
62 lines (61 loc) • 2.54 kB
TypeScript
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnInit, SimpleChanges } from "@angular/core";
import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
import { IImagesPresetItem } from "./public-api";
import { LoggerService } from "../../services/log-service";
import { UtilService } from "../../services/util.service";
import * as i0 from "@angular/core";
/**
* <example-url>./../examples/index.html#/image</example-url>
*/
export declare class ImageComponent implements OnInit, AfterViewInit, OnChanges {
private logger;
private utilService;
private changeDetector;
private images;
private domSanitizer;
private el;
/**
* Image name from nui image preset or external source
*/
image: any;
/**
* Sets aria-label text or alt for image from external source
*/
description: string;
/**
* Available values are: 'left' and 'right'
*/
float: string;
/**
* Available values are: 'centered', 'small', 'large'
*/
margin: string;
/**
* 'True' will apply 30% opacity to the image
*/
isWatermark: boolean;
/**
* Sets the width of the container parent image
*/
width: string;
/**
* Sets the height of the container parent image
*/
height: string;
/**
* When set to true sets the hardcoded width and height of the svg to 100% to fill the parent container
*/
autoFill: boolean;
imageTemplate: SafeHtml;
imageName: string | null;
hasAlt: boolean;
constructor(logger: LoggerService, utilService: UtilService, changeDetector: ChangeDetectorRef, images: Array<IImagesPresetItem>, domSanitizer: DomSanitizer, el: ElementRef);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit(): void;
getImageTemplate(): SafeHtml;
private getImage;
private isImageSizeValid;
static ɵfac: i0.ɵɵFactoryDeclaration<ImageComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ImageComponent, "nui-image", never, { "image": { "alias": "image"; "required": false; }; "description": { "alias": "description"; "required": false; }; "float": { "alias": "float"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "isWatermark": { "alias": "isWatermark"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "autoFill": { "alias": "autoFill"; "required": false; }; }, {}, never, never, false, never>;
}