/** * @license * Copyright Datorama. All Rights Reserved. * * Use of this source code is governed by an Apache License 2.0 license that can be * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE */ import { HashMap } from '@datorama/akita'; export interface DatoBasicIcon { name: string; data: string; } declare class SvgIconConfig { /** * SVG element contents */ contents: string; /** * Whether the SVG already contains the valid attributes */ appliedAttributes: boolean; constructor(contents: string); } export declare class IconRegistry { protected svgMap: Map; private _XMLSerializer; private get lazyXMLSerializer(); register(svg: HashMap): void; /** get the SVG content by a given key */ getSvg(key: string, options?: { setDimensions: boolean; }): string; getSvgElement(iconName: string): SVGSVGElement; /** * Check if the SVG key present */ hasSvg(key: string): boolean; /** * Creates an SVG element from the given SvgConfig * and apply the default attributes */ private applySagAttributes; private getSvgContents; /** * Creates a DOM element from the given SVG string. */ private svgElementFromString; /** * Sets the default attributes for an SVG element to be used as an icon. * `setDimensions` - set width and height when is true, otherwise leave the original width and height * This is useful for inline svg usage */ private setSvgAttributes; /** * Make sure the SVG key is a kebabCase */ protected validateSvgKey(svgKey: string): void; /** * Return all registered icons */ getAll(): string[]; protected addIcon(name: string, data: string): void; } export declare class SvgRegistry extends IconRegistry { /** * Register SVG */ register(svgMap: HashMap): void; } export {};