import * as i0 from '@angular/core'; import { ElementRef, Signal, TemplateRef, PipeTransform } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from 'ngx-tethys/icon'; import { SafeHtml } from '@angular/platform-browser'; declare const DEFAULT_SIZE = 36; declare const thyAvatarSizeMap: { xxs: number; xs: number; sm: number; md: number; lg: number; }; /** https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading */ type ThyAvatarLoading = 'eager' | 'lazy'; /** https://wicg.github.io/priority-hints/#idl-index */ type ThyAvatarFetchPriority = 'high' | 'low' | 'auto'; /** * 头像组件 * @name thy-avatar * @order 10 */ declare class ThyAvatar { private thyAvatarService; elementRef: ElementRef; /** * 移除按钮的事件,当 thyRemovable 为 true 时起作用 */ readonly thyRemove: i0.OutputEmitterRef; /** * 头像 img 加载 error 时触发 */ readonly thyError: i0.OutputEmitterRef; /** * 是否展示人员名称 */ readonly thyShowName: i0.InputSignalWithTransform; /** * 头像路径地址, 默认为全路径,如果不是全路径,可以通过自定义服务 ThyAvatarService,重写 srcTransform 方法实现转换 */ readonly thySrc: i0.InputSignal; readonly src: Signal; /** * 人员名称(可设置自定义名称,需通过自定义服务 ThyAvatarService,重写 nameTransform 方法去实现转换) */ readonly thyName: i0.InputSignal; readonly avatarName: Signal; readonly avatarNameSafeHtml: Signal; /** * 头像大小 * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px) * @default md */ readonly thySize: i0.ModelSignal; readonly size: Signal; /** * 是否展示移除按钮 */ readonly thyRemovable: i0.InputSignalWithTransform; /** * 图片自定义类 */ readonly thyImgClass: i0.InputSignal; /** * 是否禁用 */ readonly thyDisabled: i0.InputSignalWithTransform; /** * 图片加载策略 * @type eager(立即加载) | lazy(延迟加载) */ readonly thyLoading: i0.InputSignal; /** * 图片加载优先级 * @type auto(默认) | high(高) | low(低) */ readonly thyFetchPriority: i0.InputSignal; private isAvatarImgError; private hostRenderer; constructor(); private findClosestSize; remove($event: Event): void; avatarImgError($event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const THY_AVATAR_ITEM_SPACE = 4; declare const THY_OVERLAP_AVATAR_ITEM_SPACE = -8; declare const enum ThyAvatarListMode { overlap = "overlap", default = "default" } /** * 头像列表组件 * @name thy-avatar-list * @order 20 */ declare class ThyAvatarList { avatarItems: ThyAvatar[]; /** * 展示方式 * @type overlap | default */ readonly thyMode: i0.InputSignal; readonly isOverlapMode: Signal; /** * 头像大小 * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px) * @default 36 */ readonly thyAvatarSize: i0.InputSignal; /** * append 自定义操作 */ readonly append: Signal | undefined>; /** * @private */ readonly avatarComponents: Signal; constructor(); private updateAvatarItems; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @private */ declare class AvatarShortNamePipe implements PipeTransform { transform(name: string | null | undefined): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } /** * @private */ declare class AvatarBgColorPipe implements PipeTransform { transform(name: string): { 'background-color': string; } | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } /** * @private */ declare class AvatarSrcPipe implements PipeTransform { private thyAvatarService; transform(src: string, size: number): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare const AvatarPipes: (typeof AvatarShortNamePipe | typeof AvatarBgColorPipe | typeof AvatarSrcPipe)[]; declare class ThyAvatarModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare abstract class ThyAvatarService { ignoreAvatarSrcPaths: string[]; abstract srcTransform(src: string, size: number): string; abstract nameTransform(name: string): string | SafeHtml; } declare class ThyDefaultAvatarService extends ThyAvatarService { srcTransform(src: string, size: number): string; nameTransform(name: string): string | SafeHtml; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { AvatarBgColorPipe, AvatarPipes, AvatarShortNamePipe, AvatarSrcPipe, DEFAULT_SIZE, THY_AVATAR_ITEM_SPACE, THY_OVERLAP_AVATAR_ITEM_SPACE, ThyAvatar, ThyAvatarList, ThyAvatarListMode, ThyAvatarModule, ThyAvatarService, ThyDefaultAvatarService, thyAvatarSizeMap }; export type { ThyAvatarFetchPriority, ThyAvatarLoading };