import { OnInit, ElementRef } from '@angular/core'; import { DomSanitizer, SafeStyle } from '@angular/platform-browser'; import { CfCoreComponent } from '../core/core.component'; import { AvatarService } from '../../services/avatar-service/avatar.service'; import { AvatarModel } from '../../models/avatar/avatar.model'; import { AvatarStylingModel } from '../../models/avatar/avatar-styling.model'; import { TemplateService } from '../../services/template-service/template.service'; /** *

Avatar component based on cf-icon and cf-image componets

*

Example of using:

*
 * <cf-avatar [properties]="myAvatar" [styling]="myAvatarStyles">
 * </cf-avatar>
 * 
*/ export declare class CfAvatarComponent extends CfCoreComponent implements OnInit { /**@hidden */ elementRef: ElementRef; /**@hidden */ avatarService: AvatarService; /**@hidden*/ private _sanitizer; /** * AvatarModel object. *

Example of model:

*
{{'{'}}
     *  type: 'image',
     *  url: 'this.myAvatarUrl',
     *  width: '70px',
     *  height: '70px',
     *  border: '5px solid green',
     *  borderRadius: '50%',
     *  shadow: '-3px -3px 3px 0px rgba(0, 150, 136, 0.3)'
     * {{'}'}}
*

List of all model properties

*

type: string

* Type of avatar. Can be: image, icon, text. Default: image. *

name: string

* The name of the person from the initials of which the avatar will be generated, based on charsNumber *

url: string

* Url for the image *

text: string

* Text to be used as avatar *

iconName: string

* Name of icon to be used for cf-icon *

charsNumber: number

* Number of initials simulators in the avatar. Default: 2. *

color: string

* The color that will be applied to text or icons *

size: any

* The size to be applied as the height and width of the avatar. * Required if you want use your avatar from other sites (Facebook, Google, etc). Default: 70px. *

width: any

* The width of the avatar. Has higher priority then size. Default: 70px. *

height: any

* The height of the avatar. Has higher priority then size. Default: 70px. *

fontSize: string

* Font size for the text (initials or custom text). Default: 30px. *

border: string

* Avatar border. Not specified by default. *

borderRadius: string

* Avatar border radius. Not specified by default. *

background: string

* Avatar background. Not specified by default. *

backgroundImage: string

* Avatar background-image. Not specified by default. *

shadow: string

* Avatar shadow. Not specified by default. *

facebookId: string

* Facebook ID *

googleId: string

* Google ID *

twitterId: string

* Twitter Handle *

vkontakteId: string

* VK ID *

skypeId: string

* Skype ID *

gravatarId: string

* email or md5 email related to gravatar *

githubId: string

* Github ID */ properties: AvatarModel; /** * Object for all styling properties: *

container: StylingModel

* Styling properties for main avatar container *

image: ImageStylingModel

* Styling properties for cf-image *

icon: IconStylingModel

* Styling properties for cf-icon *

name: StylingModel

* Styling properties for name *

text: StylingModel

* Styling properties for text */ styling: AvatarStylingModel; /** * Type of avatar. Can be: image, icon, text. Default: image. */ type: string; /** * The name of the person from the initials of which the avatar will be generated, based on charsNumber */ name: string; /** * Url for the image */ url: string; /** * Text to be used as avatar */ text: string; /** * Name of icon to be used for cf-icon */ iconName: string; /** * Number of initials simulators in the avatar. Default: 2. */ charsNumber: number; /** * The color that will be applied to text or icons */ color: string; /** * The size to be applied as the height and width of the avatar. * Required if you want use your avatar from other sites (Facebook, Google, etc). Default: 50px. */ size: any; /** * The width of the avatar. Has higher priority then size. Default: 50px. */ width: any; /** * The height of the avatar. Has higher priority then size. Default: 50px. */ height: any; /** * Font size for the text (initials or custom text). Default: 30px. */ fontSize: string; /** * Avatar border. Not specified by default. */ border: string; /** * Avatar border radius. Not specified by default. */ borderRadius: string; /** * Avatar background. Not specified by default. */ background: string; /** * Avatar background-image. Not specified by default. */ backgroundImage: string; /** * Avatar box-shadow. Not specified by default. */ shadow: string; /** * Facebook ID */ facebookId: string; /** * Google ID */ googleId: string; /** * Twitter Handle */ twitterId: string; /** * VK ID */ vkontakteId: string; /** * Skype ID */ skypeId: string; /** * email or md5 email related to gravatar */ gravatarId: string; /** * Github ID */ githubId: string; /**@hidden */ constructor(/**@hidden */ elementRef: ElementRef, /**@hidden */ templateService: TemplateService, /**@hidden */ avatarService: AvatarService, /**@hidden*/ _sanitizer: DomSanitizer); /**@hidden * Init all component data */ ngOnInit(): void; /**@hidden */ checkInitials(name: any): string; /**@hidden */ loadAvatar(type: any, id: any): void; /**@hidden */ sanitizeImage(path: string): SafeStyle; }