import { Observable } from 'rxjs'; import { SafeResourceUrl, SafeHtml } from '@angular/platform-browser'; import * as _angular_core from '@angular/core'; import * as i2 from '@angular/common'; import * as i3 from '@angular/forms'; declare function setPrintErrorWhenIconNotFound(value: boolean): void; declare function getWhetherPrintErrorWhenIconNotFound(): boolean; type IconMode = 'font' | 'svg'; type SvgResourceUrl = SafeResourceUrl | string; type SvgHtml = SafeHtml | string; /** * @order 20 */ declare class ThyIconRegistry { private sanitizer; private httpClient; private document; private defaultFontSetClass; private internalIconMode; private svgIconConfigs; private svgIconSetConfigs; private inProgressUrlFetches; get iconMode(): IconMode; private getIconNameNotFoundError; private getIconFailedToSanitizeLiteralError; private internalAddSvgIconSet; private cloneSvg; private fetchUrl; private toSvgElement; private extractSvgIconFromIconSet; private extractIconWithNameFromIconSetConfigs; private svgElementFromString; private setSvgAttributes; private createSvgElementForSingleIcon; private loadSvgIconFromConfig; private loadSvgIconSetFromConfig; private getSvgFromConfig; private getSvgFromIconSetConfigs; private internalAddSvgIconConfig; buildIconKey(namespace: string, name: string): string; splitIconName(iconName: string): [string, string]; addSvgIconSetInNamespace(namespace: string, url: SvgResourceUrl): this; /** * 添加SVG图标集,添加到默认命名空间 */ addSvgIconSet(url: SvgResourceUrl): this; addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml): this; addSvgIconSetLiteral(literal: SafeHtml): this; /** * @description.en-us Registers an icon by URL in the specified namespace. * @description 添加单个SVG图标到指定的命名空间 * @param namespace Namespace in which the icon should be registered. * @param iconName Name under which the icon should be registered. * @param url */ addSvgIconInNamespace(namespace: string, iconName: string, url: SvgResourceUrl): this; /** * @description.en-us Registers an icon by URL in the default namespace. * @description 添加单个SVG图标 * @param iconName Name under which the icon should be registered. * @param url */ addSvgIcon(iconName: string, url: SvgResourceUrl): this; /** * @description.en-us Registers an icon using an HTML string in the default namespace. * @description 添加单个SVG图标字符串,直接传入 SVG HTML 字符串 * @param iconName Name under which the icon should be registered. * @param literal SVG source of the icon. */ addSvgIconLiteral(iconName: string, literal: SvgHtml): this; /** * @description.en-us Registers an icon using an HTML string in the specified namespace. * @description 添加单个SVG图标字符串到指定的命名空间,直接传入 SVG HTML 字符串 * @param namespace Namespace in which the icon should be registered. * @param iconName Name under which the icon should be registered. * @param literal SVG source of the icon. */ addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SvgHtml): this; getDefaultFontSetClass(): string; getFontSetClassByAlias(fontSet: string): string; /** * 获取某个图标 */ getSvgIcon(name: string, namespace?: string): Observable; setIconMode(mode: IconMode): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * 图标组件 * @name thy-icon,[thy-icon] * @order 10 */ declare class ThyIcon { private render; private elementRef; private iconRegistry; private sanitizer; /** * 图标的外观 * @type outline | fill | twotone * @default outline */ readonly thyAppearance: _angular_core.InputSignal<"fill" | "outline" | "twotone" | undefined>; /** * 图标的类型(已废弃,将在 v23 彻底删除),请使用 thyAppearance * @deprecated please use thyAppearance, will be removed in v23 * @type outline | fill | twotone */ readonly thyIconType: _angular_core.InputSignal<"fill" | "outline" | "twotone" | undefined>; readonly thyTwotoneColor: _angular_core.InputSignal; /** * 图标的名字 * @description 与已废弃的 `thyIconName` 二选一,至少提供一个,否则不会渲染图标 */ readonly thyName: _angular_core.InputSignal; /** * 图标的名字(已废弃,将在 v23 彻底删除),请使用 thyName * @deprecated please use thyName, will be removed in v23 */ readonly thyIconName: _angular_core.InputSignal; /** * 图标的旋转角度 * @default 0 */ readonly thyRotate: _angular_core.InputSignalWithTransform; /** * 图标的旋转角度(已废弃,将在 v23 彻底删除),请使用 thyRotate * @deprecated please use thyRotate, will be removed in v23 * @default 0 */ readonly thyIconRotate: _angular_core.InputSignalWithTransform; readonly thySet: _angular_core.InputSignal; /** * 图标集(已废弃,将在 v23 彻底删除),请使用 thySet * @deprecated please use thySet, will be removed in v23 */ readonly thyIconSet: _angular_core.InputSignal; /** * 图标打底色,镂空的图标,会透过颜色来 */ readonly thyLegging: _angular_core.InputSignalWithTransform; /** * 图标打底色(已废弃,将在 v23 彻底删除),镂空的图标,会透过颜色来,请使用 thyLegging * @deprecated please use thyLegging, will be removed in v23 */ readonly thyIconLegging: _angular_core.InputSignalWithTransform; readonly thyLinearGradient: _angular_core.InputSignalWithTransform; /** * 是否支持 Safari SVG LinearGradient(已废弃,将在 v23 彻底删除),请使用 thyLinearGradient * @deprecated please use thyLinearGradient, will be removed in v23 */ readonly thyIconLinearGradient: _angular_core.InputSignalWithTransform; readonly appearance: _angular_core.Signal<"fill" | "outline" | "twotone">; readonly name: _angular_core.Signal; readonly rotate: _angular_core.Signal; readonly set: _angular_core.Signal; readonly legging: _angular_core.Signal; readonly linearGradient: _angular_core.Signal; private hostRenderer; constructor(); private updateClasses; private setStyleRotate; private setImageElement; private setSvgElement; private clearSvgElement; private buildIconNameByType; /** * Support Safari SVG LinearGradient. * @param svg */ private setBaseUrl; private clearTitleElement; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class ThyIconModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { ThyIcon, ThyIconModule, ThyIconRegistry, getWhetherPrintErrorWhenIconNotFound, setPrintErrorWhenIconNotFound };