import { BooleanInput } from '@angular/cdk/coercion'; import { AfterViewChecked, ElementRef, ErrorHandler, InjectionToken, OnDestroy, OnInit } from '@angular/core'; import { DashIconRegistry } from '../utils/dash-registry'; import * as i0 from "@angular/core"; /** * Injection token used to provide the current location to `DashIcon`. * Used to handle server-side rendering and to stub out during unit tests. * @docs-private */ export declare const DASH_ICON_LOCATION: InjectionToken; /** * Stubbed out location for `DashIcon`. * @docs-private */ export interface DashIconLocation { getPathname: () => string; } export declare function DASH_ICON_LOCATION_FACTORY(): DashIconLocation; export declare class DashIcon implements OnInit, AfterViewChecked, OnDestroy { private _iconRegistry; private _location; private readonly _errorHandler; _elementRef: ElementRef; /** * Whether the icon should be inlined, automatically sizing the icon to match the font size of * the element the icon is contained in. */ get inline(): boolean; set inline(inline: BooleanInput); private _inline; /** Name of the icon in the SVG icon set. */ get svgIcon(): string; set svgIcon(value: string); private _svgIcon; _svgName: string | null; _svgNamespace: string | null; /** Keeps track of the current page path. */ private _previousPath?; /** Keeps track of the elements and attributes that we've prefixed with the current path. */ private _elementsWithExternalReferences?; /** Subscription to the current in-progress SVG icon request. */ private _currentIconFetch; constructor(elementRef: ElementRef, _iconRegistry: DashIconRegistry, ariaHidden: string, _location: DashIconLocation, _errorHandler: ErrorHandler, _elementRef: ElementRef); /** * Splits an svgIcon binding value into its icon set and icon name components. * Returns a 2-element array of [(icon set), (icon name)]. * The separator for the two fields is ':'. If there is no separator, an empty * string is returned for the icon set and the entire value is returned for * the icon name. If the argument is falsy, returns an array of two empty strings. * Throws an error if the name contains two or more ':' separators. * Examples: * `'social:cake' -> ['social', 'cake'] * 'penguin' -> ['', 'penguin'] * null -> ['', ''] * 'a:b:c' -> (throws Error)` */ private _splitIconName; ngOnInit(): void; ngAfterViewChecked(): void; private _setSvgElement; private _clearSvgElement; /** * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI` * reference. This is required because WebKit browsers require references to be prefixed with * the current path, if the page has a `base` tag. */ private _prependPathToReferences; /** * Caches the children of an SVG element that have `url()` * references that we need to prefix with the current path. */ private _cacheChildrenWithExternalReferences; /** Sets a new SVG icon with a particular name. */ private _updateSvgIcon; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }