@angular/material 10.2.6 → 10.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/material-core.umd.js +2 -2
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +2 -2
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +1 -1
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +50 -36
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +2 -2
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +5 -3
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +1 -1
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/core/index.metadata.json +1 -1
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/dialog/dialog-animations.js +2 -2
- package/esm2015/icon/icon.js +46 -36
- package/esm2015/list/testing/list-item-harness-base.js +6 -4
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/dialog.js +1 -1
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/icon.js +45 -35
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/list/testing.js +5 -3
- package/fesm2015/list/testing.js.map +1 -1
- package/icon/icon.d.ts +7 -4
- package/icon/index.metadata.json +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
package/fesm2015/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../../../../src/material/icon/icon-registry.ts","../../../../../../src/material/icon/icon.ts","../../../../../../src/material/icon/icon-module.ts","../../../../../../src/material/icon/public-api.ts","../../../../../../src/material/icon/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\n OnDestroy,\n} from '@angular/core';\nimport {DomSanitizer, SafeResourceUrl, SafeHtml} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\n\n\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nexport function getMatIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n\n\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error('Could not find HttpClient provider for use with Angular Material icons. ' +\n 'Please include the HttpClientModule from @angular/common/http in your ' +\n 'app imports.');\n}\n\n\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error {\n return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n\n/** Options that can be used to configure how an icon or the icons in an icon set are presented. */\nexport interface IconOptions {\n /** View box to set on the icon. */\n viewBox?: string;\n\n /** Whether or not to fetch the icon or icon set using HTTP credentials. */\n withCredentials?: boolean;\n}\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n svgElement: SVGElement | null;\n\n constructor(\n public url: SafeResourceUrl,\n public svgText: string | null,\n public options?: IconOptions) {}\n}\n\n/** Icon configuration whose content has already been loaded. */\ntype LoadedSvgIconConfig = SvgIconConfig & {svgText: string};\n\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\n@Injectable({providedIn: 'root'})\nexport class MatIconRegistry implements OnDestroy {\n private _document: Document;\n\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n private _svgIconConfigs = new Map<string, SvgIconConfig>();\n\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n private _iconSetConfigs = new Map<string, SvgIconConfig[]>();\n\n /** Cache for icons loaded by direct URLs. */\n private _cachedIconsByUrl = new Map<string, SVGElement>();\n\n /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n private _inProgressUrlFetches = new Map<string, Observable<string>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /**\n * The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = 'material-icons';\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n private readonly _errorHandler: ErrorHandler) {\n this._document = document;\n }\n\n /**\n * Registers an icon by URL in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIcon(iconName: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconInNamespace('', iconName, url, options);\n }\n\n /**\n * Registers an icon using an HTML string in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteral(iconName: string, literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\n }\n\n /**\n * Registers an icon by URL in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIconInNamespace(namespace: string, iconName: string, url: SafeResourceUrl,\n options?: IconOptions): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon using an HTML string in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SafeHtml,\n options?: IconOptions): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n // TODO: add an ngDevMode check\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n return this._addSvgIconConfig(namespace, iconName,\n new SvgIconConfig('', cleanLiteral, options));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconSetInNamespace('', url, options);\n }\n\n /**\n * Registers an icon set using an HTML string in the default namespace.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteral(literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconSetLiteralInNamespace('', literal, options);\n }\n\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param url\n */\n addSvgIconSetInNamespace(namespace: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon set using an HTML string in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml,\n options?: IconOptions): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', cleanLiteral, options));\n }\n\n /**\n * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the `<mat-icon>` element.\n *\n * @param alias Alias for the font.\n * @param className Class name override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, className: string = alias): this {\n this._fontCssClassesByAlias.set(alias, className);\n return this;\n }\n\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n */\n classNameForFontAlias(alias: string): string {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n\n /**\n * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n *\n * @param className\n */\n setDefaultFontSetClass(className: string): this {\n this._defaultFontSetClass = className;\n return this;\n }\n\n /**\n * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n getDefaultFontSetClass(): string {\n return this._defaultFontSetClass;\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param safeUrl URL from which to fetch the SVG icon.\n */\n getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement> {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n const cachedIcon = this._cachedIconsByUrl.get(url);\n\n if (cachedIcon) {\n return observableOf(cloneSvg(cachedIcon));\n }\n\n return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl, null)).pipe(\n tap(svg => this._cachedIconsByUrl.set(url!, svg)),\n map(svg => cloneSvg(svg)),\n );\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param name Name of the icon to be retrieved.\n * @param namespace Namespace in which to look for the icon.\n */\n getNamedSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = iconKey(namespace, name);\n const config = this._svgIconConfigs.get(key);\n\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this._iconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return observableThrow(getMatIconNameNotFoundError(key));\n }\n\n ngOnDestroy() {\n this._svgIconConfigs.clear();\n this._iconSetConfigs.clear();\n this._cachedIconsByUrl.clear();\n }\n\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n */\n private _getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgText) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(this._svgElementFromConfig(config as LoadedSvgIconConfig)));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(map(svg => cloneSvg(svg)));\n }\n }\n\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n */\n private _getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]):\n Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return observableOf(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<string | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgText)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse) => {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n return observableOf(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n // TODO: add an ngDevMode check\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }));\n }\n\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractIconWithNameFromAnySet(iconName: string, iconSetConfigs: SvgIconConfig[]):\n SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n\n // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of\n // the parsing by doing a quick check using `indexOf` to see if there's any chance for the\n // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least\n // some of the parsing.\n if (config.svgText && config.svgText.indexOf(iconName) > -1) {\n const svg = this._svgElementFromConfig(config as LoadedSvgIconConfig);\n const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this._fetchIcon(config).pipe(\n tap(svgText => config.svgText = svgText),\n map(() => this._svgElementFromConfig(config as LoadedSvgIconConfig))\n );\n }\n\n /**\n * Loads the content of the icon set URL specified in the\n * SvgIconConfig and attaches it to the config.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<string | null> {\n if (config.svgText) {\n return observableOf(null);\n }\n\n return this._fetchIcon(config).pipe(tap(svgText => config.svgText = svgText));\n }\n\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractSvgIconFromSet(iconSet: SVGElement, iconName: string,\n options?: IconOptions): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(iconElement as SVGElement, options);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconElement), options);\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this._svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this._setSvgAttributes(svg, options);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: string): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n // TODO: add an ngDevMode check\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n /**\n * Converts an element into an SVG node by cloning all of its children.\n */\n private _toSvgElement(element: Element): SVGElement {\n const svg = this._svgElementFromString('<svg></svg>');\n const attributes = element.attributes;\n\n // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n for (let i = 0; i < attributes.length; i++) {\n const {name, value} = attributes[i];\n\n if (name !== 'id') {\n svg.setAttribute(name, value);\n }\n }\n\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n */\n private _setSvgAttributes(svg: SVGElement, options?: IconOptions): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n\n if (options && options.viewBox) {\n svg.setAttribute('viewBox', options.viewBox);\n }\n\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given icon. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchIcon(iconConfig: SvgIconConfig): Observable<string> {\n const {url: safeUrl, options} = iconConfig;\n const withCredentials = options?.withCredentials ?? false;\n\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n // TODO: add an ngDevMode check\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n // TODO: add an ngDevMode check\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this._inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n }\n\n const req = this._httpClient.get(url, {responseType: 'text', withCredentials}).pipe(\n finalize(() => this._inProgressUrlFetches.delete(url)),\n share(),\n );\n\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n\n /**\n * Registers an icon config by name in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param iconName Name under which to register the config.\n * @param config Config to be registered.\n */\n private _addSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n return this;\n }\n\n /**\n * Registers an icon set config in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param config Config to be registered.\n */\n private _addSvgIconSetConfig(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this._iconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n\n /** Parses a config's text into an SVG element. */\n private _svgElementFromConfig(config: LoadedSvgIconConfig): SVGElement {\n if (!config.svgElement) {\n const svg = this._svgElementFromString(config.svgText);\n this._setSvgAttributes(svg, config.options);\n config.svgElement = svg;\n }\n\n return config.svgElement;\n }\n}\n\n/** @docs-private */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(\n parentRegistry: MatIconRegistry,\n httpClient: HttpClient,\n sanitizer: DomSanitizer,\n errorHandler: ErrorHandler,\n document?: any) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);\n}\n\n/** @docs-private */\nexport const ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [\n [new Optional(), new SkipSelf(), MatIconRegistry],\n [new Optional(), HttpClient],\n DomSanitizer,\n ErrorHandler,\n [new Optional(), DOCUMENT as InjectionToken<any>],\n ],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n}\n\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace: string, name: string) {\n return namespace + ':' + name;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ErrorHandler,\n inject,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nclass MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatIconMixinBase: CanColorCtor & typeof MatIconBase = mixinColor(MatIconBase);\n\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_ICON_LOCATION = new InjectionToken<MatIconLocation>('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY\n});\n\n/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_ICON_LOCATION_FACTORY(): MatIconLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => _location ? (_location.pathname + _location.search) : ''\n };\n}\n\n\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke'\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the `<mat-icon>`\n * component. By default the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\n@Component({\n template: '<ng-content></ng-content>',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styleUrls: ['icon.css'],\n inputs: ['color'],\n host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[attr.data-mat-icon-type]': '_usingFontIcon() ? \"font\" : \"svg\"',\n '[attr.data-mat-icon-name]': '_svgName || fontIcon',\n '[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',\n '[class.mat-icon-inline]': 'inline',\n '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, AfterViewChecked,\n CanColor, OnDestroy {\n\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n @Input()\n get inline(): boolean {\n return this._inline;\n }\n set inline(inline: boolean) {\n this._inline = coerceBooleanProperty(inline);\n }\n private _inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input() svgIcon: string;\n\n /** Font set that the icon is a part of. */\n @Input()\n get fontSet(): string { return this._fontSet; }\n set fontSet(value: string) {\n this._fontSet = this._cleanupFontValue(value);\n }\n private _fontSet: string;\n\n /** Name of an icon within a font set. */\n @Input()\n get fontIcon(): string { return this._fontIcon; }\n set fontIcon(value: string) {\n this._fontIcon = this._cleanupFontValue(value);\n }\n private _fontIcon: string;\n\n private _previousFontSetClass: string;\n private _previousFontIconClass: string;\n\n _svgName: string | null;\n _svgNamespace: string | null;\n\n /** Keeps track of the current page path. */\n private _previousPath?: string;\n\n /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n private _elementsWithExternalReferences?: Map<Element, {name: string, value: string}[]>;\n\n /** Subscription to the current in-progress SVG icon request. */\n private _currentIconFetch = Subscription.EMPTY;\n\n constructor(\n elementRef: ElementRef<HTMLElement>, private _iconRegistry: MatIconRegistry,\n @Attribute('aria-hidden') ariaHidden: string,\n @Inject(MAT_ICON_LOCATION) private _location: MatIconLocation,\n private readonly _errorHandler: ErrorHandler) {\n super(elementRef);\n\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n private _splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1: return ['', parts[0]]; // Use default namespace.\n case 2: return <[string, string]>parts;\n default: throw Error(`Invalid icon name: \"${iconName}\"`); // TODO: add an ngDevMode check\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.\n const svgIconChanges = changes['svgIcon'];\n\n this._svgNamespace = null;\n this._svgName = null;\n\n if (svgIconChanges) {\n this._currentIconFetch.unsubscribe();\n\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n\n if (namespace) {\n this._svgNamespace = namespace;\n }\n\n if (iconName) {\n this._svgName = iconName;\n }\n\n this._currentIconFetch = this._iconRegistry.getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(svg => this._setSvgElement(svg), (err: Error) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n });\n } else if (svgIconChanges.previousValue) {\n this._clearSvgElement();\n }\n }\n\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n\n if (cachedElements && cachedElements.size) {\n const newPath = this._location.getPathname();\n\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n\n ngOnDestroy() {\n this._currentIconFetch.unsubscribe();\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n\n _usingFontIcon(): boolean {\n return !this.svgIcon;\n }\n\n private _setSvgElement(svg: SVGElement) {\n this._clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n this._elementRef.nativeElement.appendChild(svg);\n }\n\n private _clearSvgElement() {\n const layoutElement: HTMLElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClass = this.fontSet ?\n this._iconRegistry.classNameForFontAlias(this.fontSet) :\n this._iconRegistry.getDefaultFontSetClass();\n\n if (fontSetClass != this._previousFontSetClass) {\n if (this._previousFontSetClass) {\n elem.classList.remove(this._previousFontSetClass);\n }\n if (fontSetClass) {\n elem.classList.add(fontSetClass);\n }\n this._previousFontSetClass = fontSetClass;\n }\n\n if (this.fontIcon != this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n private _cleanupFontValue(value: string) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n private _prependPathToReferences(path: string) {\n const elements = this._elementsWithExternalReferences;\n\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n private _cacheChildrenWithExternalReferences(element: SVGElement) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map();\n\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n\n if (match) {\n let attributes = elements.get(elementWithReference);\n\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n\n attributes!.push({name: attr, value: match[1]});\n }\n });\n }\n }\n\n static ngAcceptInputType_inline: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatIcon} from './icon';\n\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\n})\nexport class MatIconModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './icon-module';\nexport * from './icon';\nexport * from './icon-registry';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;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EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;gBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;aACxB;;;ACjBD;;;;;;GAMG;;ACNH;;GAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"icon.js","sources":["../../../../../../src/material/icon/icon-registry.ts","../../../../../../src/material/icon/icon.ts","../../../../../../src/material/icon/icon-module.ts","../../../../../../src/material/icon/public-api.ts","../../../../../../src/material/icon/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\n OnDestroy,\n} from '@angular/core';\nimport {DomSanitizer, SafeResourceUrl, SafeHtml} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\n\n\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nexport function getMatIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n\n\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error('Could not find HttpClient provider for use with Angular Material icons. ' +\n 'Please include the HttpClientModule from @angular/common/http in your ' +\n 'app imports.');\n}\n\n\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error {\n return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n\n/** Options that can be used to configure how an icon or the icons in an icon set are presented. */\nexport interface IconOptions {\n /** View box to set on the icon. */\n viewBox?: string;\n\n /** Whether or not to fetch the icon or icon set using HTTP credentials. */\n withCredentials?: boolean;\n}\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n svgElement: SVGElement | null;\n\n constructor(\n public url: SafeResourceUrl,\n public svgText: string | null,\n public options?: IconOptions) {}\n}\n\n/** Icon configuration whose content has already been loaded. */\ntype LoadedSvgIconConfig = SvgIconConfig & {svgText: string};\n\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\n@Injectable({providedIn: 'root'})\nexport class MatIconRegistry implements OnDestroy {\n private _document: Document;\n\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n private _svgIconConfigs = new Map<string, SvgIconConfig>();\n\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n private _iconSetConfigs = new Map<string, SvgIconConfig[]>();\n\n /** Cache for icons loaded by direct URLs. */\n private _cachedIconsByUrl = new Map<string, SVGElement>();\n\n /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n private _inProgressUrlFetches = new Map<string, Observable<string>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /**\n * The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = 'material-icons';\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n private readonly _errorHandler: ErrorHandler) {\n this._document = document;\n }\n\n /**\n * Registers an icon by URL in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIcon(iconName: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconInNamespace('', iconName, url, options);\n }\n\n /**\n * Registers an icon using an HTML string in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteral(iconName: string, literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\n }\n\n /**\n * Registers an icon by URL in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIconInNamespace(namespace: string, iconName: string, url: SafeResourceUrl,\n options?: IconOptions): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon using an HTML string in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SafeHtml,\n options?: IconOptions): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n // TODO: add an ngDevMode check\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n return this._addSvgIconConfig(namespace, iconName,\n new SvgIconConfig('', cleanLiteral, options));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconSetInNamespace('', url, options);\n }\n\n /**\n * Registers an icon set using an HTML string in the default namespace.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteral(literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconSetLiteralInNamespace('', literal, options);\n }\n\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param url\n */\n addSvgIconSetInNamespace(namespace: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon set using an HTML string in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml,\n options?: IconOptions): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', cleanLiteral, options));\n }\n\n /**\n * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the `<mat-icon>` element.\n *\n * @param alias Alias for the font.\n * @param className Class name override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, className: string = alias): this {\n this._fontCssClassesByAlias.set(alias, className);\n return this;\n }\n\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n */\n classNameForFontAlias(alias: string): string {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n\n /**\n * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n *\n * @param className\n */\n setDefaultFontSetClass(className: string): this {\n this._defaultFontSetClass = className;\n return this;\n }\n\n /**\n * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n getDefaultFontSetClass(): string {\n return this._defaultFontSetClass;\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param safeUrl URL from which to fetch the SVG icon.\n */\n getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement> {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n const cachedIcon = this._cachedIconsByUrl.get(url);\n\n if (cachedIcon) {\n return observableOf(cloneSvg(cachedIcon));\n }\n\n return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl, null)).pipe(\n tap(svg => this._cachedIconsByUrl.set(url!, svg)),\n map(svg => cloneSvg(svg)),\n );\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param name Name of the icon to be retrieved.\n * @param namespace Namespace in which to look for the icon.\n */\n getNamedSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = iconKey(namespace, name);\n const config = this._svgIconConfigs.get(key);\n\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this._iconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return observableThrow(getMatIconNameNotFoundError(key));\n }\n\n ngOnDestroy() {\n this._svgIconConfigs.clear();\n this._iconSetConfigs.clear();\n this._cachedIconsByUrl.clear();\n }\n\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n */\n private _getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgText) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(this._svgElementFromConfig(config as LoadedSvgIconConfig)));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(map(svg => cloneSvg(svg)));\n }\n }\n\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n */\n private _getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]):\n Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return observableOf(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<string | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgText)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse) => {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n return observableOf(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n // TODO: add an ngDevMode check\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }));\n }\n\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractIconWithNameFromAnySet(iconName: string, iconSetConfigs: SvgIconConfig[]):\n SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n\n // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of\n // the parsing by doing a quick check using `indexOf` to see if there's any chance for the\n // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least\n // some of the parsing.\n if (config.svgText && config.svgText.indexOf(iconName) > -1) {\n const svg = this._svgElementFromConfig(config as LoadedSvgIconConfig);\n const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this._fetchIcon(config).pipe(\n tap(svgText => config.svgText = svgText),\n map(() => this._svgElementFromConfig(config as LoadedSvgIconConfig))\n );\n }\n\n /**\n * Loads the content of the icon set URL specified in the\n * SvgIconConfig and attaches it to the config.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<string | null> {\n if (config.svgText) {\n return observableOf(null);\n }\n\n return this._fetchIcon(config).pipe(tap(svgText => config.svgText = svgText));\n }\n\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractSvgIconFromSet(iconSet: SVGElement, iconName: string,\n options?: IconOptions): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(iconElement as SVGElement, options);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconElement), options);\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this._svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this._setSvgAttributes(svg, options);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: string): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n // TODO: add an ngDevMode check\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n /**\n * Converts an element into an SVG node by cloning all of its children.\n */\n private _toSvgElement(element: Element): SVGElement {\n const svg = this._svgElementFromString('<svg></svg>');\n const attributes = element.attributes;\n\n // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n for (let i = 0; i < attributes.length; i++) {\n const {name, value} = attributes[i];\n\n if (name !== 'id') {\n svg.setAttribute(name, value);\n }\n }\n\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n */\n private _setSvgAttributes(svg: SVGElement, options?: IconOptions): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n\n if (options && options.viewBox) {\n svg.setAttribute('viewBox', options.viewBox);\n }\n\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given icon. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchIcon(iconConfig: SvgIconConfig): Observable<string> {\n const {url: safeUrl, options} = iconConfig;\n const withCredentials = options?.withCredentials ?? false;\n\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n // TODO: add an ngDevMode check\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n // TODO: add an ngDevMode check\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this._inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n }\n\n const req = this._httpClient.get(url, {responseType: 'text', withCredentials}).pipe(\n finalize(() => this._inProgressUrlFetches.delete(url)),\n share(),\n );\n\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n\n /**\n * Registers an icon config by name in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param iconName Name under which to register the config.\n * @param config Config to be registered.\n */\n private _addSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n return this;\n }\n\n /**\n * Registers an icon set config in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param config Config to be registered.\n */\n private _addSvgIconSetConfig(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this._iconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n\n /** Parses a config's text into an SVG element. */\n private _svgElementFromConfig(config: LoadedSvgIconConfig): SVGElement {\n if (!config.svgElement) {\n const svg = this._svgElementFromString(config.svgText);\n this._setSvgAttributes(svg, config.options);\n config.svgElement = svg;\n }\n\n return config.svgElement;\n }\n}\n\n/** @docs-private */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(\n parentRegistry: MatIconRegistry,\n httpClient: HttpClient,\n sanitizer: DomSanitizer,\n errorHandler: ErrorHandler,\n document?: any) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);\n}\n\n/** @docs-private */\nexport const ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [\n [new Optional(), new SkipSelf(), MatIconRegistry],\n [new Optional(), HttpClient],\n DomSanitizer,\n ErrorHandler,\n [new Optional(), DOCUMENT as InjectionToken<any>],\n ],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n}\n\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace: string, name: string) {\n return namespace + ':' + name;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ErrorHandler,\n inject,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nclass MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatIconMixinBase: CanColorCtor & typeof MatIconBase = mixinColor(MatIconBase);\n\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_ICON_LOCATION = new InjectionToken<MatIconLocation>('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY\n});\n\n/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_ICON_LOCATION_FACTORY(): MatIconLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => _location ? (_location.pathname + _location.search) : ''\n };\n}\n\n\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke'\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the `<mat-icon>`\n * component. By default the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\n@Component({\n template: '<ng-content></ng-content>',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styleUrls: ['icon.css'],\n inputs: ['color'],\n host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[attr.data-mat-icon-type]': '_usingFontIcon() ? \"font\" : \"svg\"',\n '[attr.data-mat-icon-name]': '_svgName || fontIcon',\n '[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',\n '[class.mat-icon-inline]': 'inline',\n '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIcon extends _MatIconMixinBase implements OnInit, AfterViewChecked, CanColor,\n OnDestroy {\n\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n @Input()\n get inline(): boolean {\n return this._inline;\n }\n set inline(inline: boolean) {\n this._inline = coerceBooleanProperty(inline);\n }\n private _inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input()\n get svgIcon(): string { return this._svgIcon; }\n set svgIcon(value: string) {\n if (value !== this._svgIcon) {\n if (value) {\n this._updateSvgIcon(value);\n } else if (this._svgIcon) {\n this._clearSvgElement();\n }\n this._svgIcon = value;\n }\n }\n private _svgIcon: string;\n\n /** Font set that the icon is a part of. */\n @Input()\n get fontSet(): string { return this._fontSet; }\n set fontSet(value: string) {\n const newValue = this._cleanupFontValue(value);\n\n if (newValue !== this._fontSet) {\n this._fontSet = newValue;\n this._updateFontIconClasses();\n }\n }\n private _fontSet: string;\n\n /** Name of an icon within a font set. */\n @Input()\n get fontIcon(): string { return this._fontIcon; }\n set fontIcon(value: string) {\n const newValue = this._cleanupFontValue(value);\n\n if (newValue !== this._fontIcon) {\n this._fontIcon = newValue;\n this._updateFontIconClasses();\n }\n }\n private _fontIcon: string;\n\n private _previousFontSetClass: string;\n private _previousFontIconClass: string;\n\n _svgName: string | null;\n _svgNamespace: string | null;\n\n /** Keeps track of the current page path. */\n private _previousPath?: string;\n\n /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n private _elementsWithExternalReferences?: Map<Element, {name: string, value: string}[]>;\n\n /** Subscription to the current in-progress SVG icon request. */\n private _currentIconFetch = Subscription.EMPTY;\n\n constructor(\n elementRef: ElementRef<HTMLElement>, private _iconRegistry: MatIconRegistry,\n @Attribute('aria-hidden') ariaHidden: string,\n @Inject(MAT_ICON_LOCATION) private _location: MatIconLocation,\n private readonly _errorHandler: ErrorHandler) {\n super(elementRef);\n\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n private _splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1: return ['', parts[0]]; // Use default namespace.\n case 2: return <[string, string]>parts;\n default: throw Error(`Invalid icon name: \"${iconName}\"`); // TODO: add an ngDevMode check\n }\n }\n\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n this._updateFontIconClasses();\n }\n\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n\n if (cachedElements && cachedElements.size) {\n const newPath = this._location.getPathname();\n\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n\n ngOnDestroy() {\n this._currentIconFetch.unsubscribe();\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n\n _usingFontIcon(): boolean {\n return !this.svgIcon;\n }\n\n private _setSvgElement(svg: SVGElement) {\n this._clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n this._elementRef.nativeElement.appendChild(svg);\n }\n\n private _clearSvgElement() {\n const layoutElement: HTMLElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClass = this.fontSet ?\n this._iconRegistry.classNameForFontAlias(this.fontSet) :\n this._iconRegistry.getDefaultFontSetClass();\n\n if (fontSetClass != this._previousFontSetClass) {\n if (this._previousFontSetClass) {\n elem.classList.remove(this._previousFontSetClass);\n }\n if (fontSetClass) {\n elem.classList.add(fontSetClass);\n }\n this._previousFontSetClass = fontSetClass;\n }\n\n if (this.fontIcon != this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n private _cleanupFontValue(value: string) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n private _prependPathToReferences(path: string) {\n const elements = this._elementsWithExternalReferences;\n\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n private _cacheChildrenWithExternalReferences(element: SVGElement) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map();\n\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n\n if (match) {\n let attributes = elements.get(elementWithReference);\n\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n\n attributes!.push({name: attr, value: match[1]});\n }\n });\n }\n }\n\n /** Sets a new SVG icon with a particular name. */\n private _updateSvgIcon(rawName: string|undefined) {\n this._svgNamespace = null;\n this._svgName = null;\n this._currentIconFetch.unsubscribe();\n\n if (rawName) {\n const [namespace, iconName] = this._splitIconName(rawName);\n\n if (namespace) {\n this._svgNamespace = namespace;\n }\n\n if (iconName) {\n this._svgName = iconName;\n }\n\n this._currentIconFetch = this._iconRegistry.getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(svg => this._setSvgElement(svg), (err: Error) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n });\n }\n }\n\n static ngAcceptInputType_inline: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatIcon} from './icon';\n\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\n})\nexport class MatIconModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './icon-module';\nexport * from './icon';\nexport * from './icon-registry';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;AAAA;;;;;;;AAQA,AAiBA;;;;;AAKA,SAAgB,2BAA2B,CAAC,QAAgB;IAC1D,OAAO,KAAK,CAAC,sCAAsC,QAAQ,GAAG,CAAC,CAAC;CACjE;;;;;;AAQD,SAAgB,6BAA6B;IAC3C,OAAO,KAAK,CAAC,0EAA0E;QAC1E,wEAAwE;QACxE,cAAc,CAAC,CAAC;CAC9B;;;;;;AAQD,SAAgB,kCAAkC,CAAC,GAAoB;IACrE,OAAO,KAAK,CAAC,wEAAwE;QACxE,kDAAkD,GAAG,IAAI,CAAC,CAAC;CACzE;;;;;;AAOD,SAAgB,sCAAsC,CAAC,OAAiB;IACtE,OAAO,KAAK,CAAC,0EAA0E;QAC1E,kDAAkD,OAAO,IAAI,CAAC,CAAC;CAC7E;;;;;AAeD,MAAM,aAAa;IAGjB,YACS,GAAoB,EACpB,OAAsB,EACtB,OAAqB;QAFrB,QAAG,GAAH,GAAG,CAAiB;QACpB,YAAO,GAAP,OAAO,CAAe;QACtB,YAAO,GAAP,OAAO,CAAc;KAAI;CACnC;;;;;;;;AAaD,MAAa,eAAe;IA8B1B,YACsB,WAAuB,EACnC,UAAwB,EACF,QAAa,EAC1B,aAA2B;QAHxB,gBAAW,GAAX,WAAW,CAAY;QACnC,eAAU,GAAV,UAAU,CAAc;QAEf,kBAAa,GAAb,aAAa,CAAc;;;;QA5BtC,oBAAe,GAAG,IAAI,GA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AAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,SAAS;gBAEnB,MAAM,EAAE,CAAC,OAAO,CAAC;gBACjB,IAAI,EAAE;oBACJ,MAAM,EAAE,KAAK;oBACb,OAAO,EAAE,sBAAsB;oBAC/B,2BAA2B,EAAE,mCAAmC;oBAChE,2BAA2B,EAAE,sBAAsB;oBACnD,gCAAgC,EAAE,0BAA0B;oBAC5D,yBAAyB,EAAE,QAAQ;oBACnC,2BAA2B,EAAE,+DAA+D;iBAC7F;gBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;YAzHC,UAAU;YAcJ,eAAe;yCAsLhB,SAAS,SAAC,aAAa;4CACvB,MAAM,SAAC,iBAAiB;YApM7B,YAAY;;;qBAgIX,KAAK;sBAUL,KAAK;sBAeL,KAAK;uBAaL,KAAK;;;ACtLR;;;;;;;AAQA,MAUa,aAAa;;;YALzB,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;gBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;aACxB;;;ACjBD;;;;;;GAMG;;ACNH;;GAEG;;;;"}
|
package/fesm2015/list/testing.js
CHANGED
|
@@ -9,6 +9,8 @@ import { MatDividerHarness } from '@angular/material/divider/testing';
|
|
|
9
9
|
* Use of this source code is governed by an MIT-style license that can be
|
|
10
10
|
* found in the LICENSE file at https://angular.io/license
|
|
11
11
|
*/
|
|
12
|
+
const iconSelector = '.mat-list-icon';
|
|
13
|
+
const avatarSelector = '.mat-list-avatar';
|
|
12
14
|
/**
|
|
13
15
|
* Gets a `HarnessPredicate` that applies the given `BaseListItemHarnessFilters` to the given
|
|
14
16
|
* list item harness.
|
|
@@ -43,13 +45,13 @@ class MatListItemHarnessBase extends ComponentHarness {
|
|
|
43
45
|
constructor() {
|
|
44
46
|
super(...arguments);
|
|
45
47
|
this._lines = this.locatorForAll('.mat-line');
|
|
46
|
-
this._avatar = this.locatorForOptional(
|
|
47
|
-
this._icon = this.locatorForOptional(
|
|
48
|
+
this._avatar = this.locatorForOptional(avatarSelector);
|
|
49
|
+
this._icon = this.locatorForOptional(iconSelector);
|
|
48
50
|
}
|
|
49
51
|
/** Gets the full text content of the list item (including text from any font icons). */
|
|
50
52
|
getText() {
|
|
51
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
return (yield this.host()).text();
|
|
54
|
+
return (yield this.host()).text({ exclude: `${iconSelector}, ${avatarSelector}` });
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
/** Gets the lines of text (`mat-line` elements) in this nav list item. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list__testing.js","sources":["../../../../../../src/material/list/testing/list-item-harness-base.ts","../../../../../../src/material/list/testing/list-harness-base.ts","../../../../../../src/material/list/testing/action-list-harness.ts","../../../../../../src/material/list/testing/list-harness.ts","../../../../../../src/material/list/testing/list-harness-filters.ts","../../../../../../src/material/list/testing/nav-list-harness.ts","../../../../../../src/material/list/testing/selection-list-harness.ts","../../../../../../src/material/list/testing/public-api.ts","../../../../../../src/material/list/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessLoader,\n HarnessPredicate\n} from '@angular/cdk/testing';\nimport {BaseListItemHarnessFilters, SubheaderHarnessFilters} from './list-harness-filters';\n\n/**\n * Gets a `HarnessPredicate` that applies the given `BaseListItemHarnessFilters` to the given\n * list item harness.\n * @template H The type of list item harness to create a predicate for.\n * @param harnessType A constructor for a list item harness.\n * @param options An instance of `BaseListItemHarnessFilters` to apply.\n * @return A `HarnessPredicate` for the given harness type with the given options applied.\n */\nexport function getListItemPredicate<H extends MatListItemHarnessBase>(\n harnessType: ComponentHarnessConstructor<H>,\n options: BaseListItemHarnessFilters): HarnessPredicate<H> {\n return new HarnessPredicate(harnessType, options)\n .addOption('text', options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text));\n}\n\n/** Harness for interacting with a list subheader. */\nexport class MatSubheaderHarness extends ComponentHarness {\n static hostSelector = '.mat-subheader';\n\n static with(options: SubheaderHarnessFilters = {}): HarnessPredicate<MatSubheaderHarness> {\n return new HarnessPredicate(MatSubheaderHarness, options)\n .addOption('text', options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text));\n }\n\n /** Gets the full text content of the list item (including text from any font icons). */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n}\n\n/**\n * Shared behavior among the harnesses for the various `MatListItem` flavors.\n * @docs-private\n */\nexport class MatListItemHarnessBase extends ComponentHarness {\n private _lines = this.locatorForAll('.mat-line');\n private _avatar = this.locatorForOptional('.mat-list-avatar');\n private _icon = this.locatorForOptional('.mat-list-icon');\n\n /** Gets the full text content of the list item (including text from any font icons). */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Gets the lines of text (`mat-line` elements) in this nav list item. */\n async getLinesText(): Promise<string[]> {\n return Promise.all((await this._lines()).map(l => l.text()));\n }\n\n /** Whether this list item has an avatar. */\n async hasAvatar(): Promise<boolean> {\n return !!await this._avatar();\n }\n\n /** Whether this list item has an icon. */\n async hasIcon(): Promise<boolean> {\n return !!await this._icon();\n }\n\n /** Gets a `HarnessLoader` used to get harnesses within the list item's content. */\n async getHarnessLoaderForContent(): Promise<HarnessLoader> {\n return this.locatorFactory.harnessLoaderFor('.mat-list-item-content');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate\n} from '@angular/cdk/testing';\nimport {DividerHarnessFilters, MatDividerHarness} from '@angular/material/divider/testing';\nimport {BaseListItemHarnessFilters, SubheaderHarnessFilters} from './list-harness-filters';\nimport {MatSubheaderHarness} from './list-item-harness-base';\n\n/** Represents a section of a list falling under a specific header. */\nexport interface ListSection<I> {\n /** The heading for this list section. `undefined` if there is no heading. */\n heading?: string;\n\n /** The items in this list section. */\n items: I[];\n}\n\n/**\n * Shared behavior among the harnesses for the various `MatList` flavors.\n * @template T A constructor type for a list item harness type used by this list harness.\n * @template C The list item harness type that `T` constructs.\n * @template F The filter type used filter list item harness of type `C`.\n * @docs-private\n */\nexport class MatListHarnessBase\n <\n T extends (ComponentHarnessConstructor<C> & {with: (options?: F) => HarnessPredicate<C>}),\n C extends ComponentHarness,\n F extends BaseListItemHarnessFilters\n > extends ComponentHarness {\n protected _itemHarness: T;\n\n /**\n * Gets a list of harnesses representing the items in this list.\n * @param filters Optional filters used to narrow which harnesses are included\n * @return The list of items matching the given filters.\n */\n async getItems(filters?: F): Promise<C[]> {\n return this.locatorForAll(this._itemHarness.with(filters))();\n }\n\n /**\n * Gets a list of `ListSection` representing the list items grouped by subheaders. If the list has\n * no subheaders it is represented as a single `ListSection` with an undefined `heading` property.\n * @param filters Optional filters used to narrow which list item harnesses are included\n * @return The list of items matching the given filters, grouped into sections by subheader.\n */\n async getItemsGroupedBySubheader(filters?: F): Promise<ListSection<C>[]> {\n const listSections = [];\n let currentSection: ListSection<C> = {items: []};\n const itemsAndSubheaders =\n await this.getItemsWithSubheadersAndDividers({item: filters, divider: false});\n for (const itemOrSubheader of itemsAndSubheaders) {\n if (itemOrSubheader instanceof MatSubheaderHarness) {\n if (currentSection.heading !== undefined || currentSection.items.length) {\n listSections.push(currentSection);\n }\n currentSection = {heading: await itemOrSubheader.getText(), items: []};\n } else {\n currentSection.items.push(itemOrSubheader);\n }\n }\n if (currentSection.heading !== undefined || currentSection.items.length ||\n !listSections.length) {\n listSections.push(currentSection);\n }\n return listSections;\n }\n\n /**\n * Gets a list of sub-lists representing the list items grouped by dividers. If the list has no\n * dividers it is represented as a list with a single sub-list.\n * @param filters Optional filters used to narrow which list item harnesses are included\n * @return The list of items matching the given filters, grouped into sub-lists by divider.\n */\n async getItemsGroupedByDividers(filters?: F): Promise<C[][]> {\n const listSections: C[][] = [[]];\n const itemsAndDividers =\n await this.getItemsWithSubheadersAndDividers({item: filters, subheader: false});\n for (const itemOrDivider of itemsAndDividers) {\n if (itemOrDivider instanceof MatDividerHarness) {\n listSections.push([]);\n } else {\n listSections[listSections.length - 1].push(itemOrDivider);\n }\n }\n return listSections;\n }\n\n /**\n * Gets a list of harnesses representing all of the items, subheaders, and dividers\n * (in the order they appear in the list). Use `instanceof` to check which type of harness a given\n * item is.\n * @param filters Optional filters used to narrow which list items, subheaders, and dividers are\n * included. A value of `false` for the `item`, `subheader`, or `divider` properties indicates\n * that the respective harness type should be omitted completely.\n * @return The list of harnesses representing the items, subheaders, and dividers matching the\n * given filters.\n */\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader: false,\n divider: false\n }): Promise<[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader: false,\n divider: false\n }): Promise<C[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader?: SubheaderHarnessFilters | false,\n divider: false\n }): Promise<MatSubheaderHarness[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader: false,\n divider?: DividerHarnessFilters | false\n }): Promise<MatDividerHarness[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader?: SubheaderHarnessFilters | false,\n divider: false\n }): Promise<(C | MatSubheaderHarness)[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader: false,\n divider?: false | DividerHarnessFilters\n }): Promise<(C | MatDividerHarness)[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader?: false | SubheaderHarnessFilters,\n divider?: false | DividerHarnessFilters\n }): Promise<(MatSubheaderHarness | MatDividerHarness)[]>;\n getItemsWithSubheadersAndDividers(filters?: {\n item?: F | false,\n subheader?: SubheaderHarnessFilters | false,\n divider?: DividerHarnessFilters | false\n }): Promise<(C | MatSubheaderHarness | MatDividerHarness)[]>;\n async getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader?: SubheaderHarnessFilters | false,\n divider?: DividerHarnessFilters | false\n } = {}): Promise<(C | MatSubheaderHarness | MatDividerHarness)[]> {\n const query = [];\n if (filters.item !== false) {\n query.push(this._itemHarness.with(filters.item || {} as F));\n }\n if (filters.subheader !== false) {\n query.push(MatSubheaderHarness.with(filters.subheader));\n }\n if (filters.divider !== false) {\n query.push(MatDividerHarness.with(filters.divider));\n }\n return this.locatorForAll(...query)();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {ActionListHarnessFilters, ActionListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-action-list in tests. */\nexport class MatActionListHarness extends MatListHarnessBase<\n typeof MatActionListItemHarness, MatActionListItemHarness, ActionListItemHarnessFilters> {\n /** The selector for the host element of a `MatActionList` instance. */\n static hostSelector = 'mat-action-list.mat-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatActionListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which action list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ActionListHarnessFilters = {}): HarnessPredicate<MatActionListHarness> {\n return new HarnessPredicate(MatActionListHarness, options);\n }\n\n _itemHarness = MatActionListItemHarness;\n}\n\n/** Harness for interacting with an action list item. */\nexport class MatActionListItemHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatActionListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatActionListItemHarness` that\n * meets certain criteria.\n * @param options Options for filtering which action list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ActionListItemHarnessFilters = {}):\n HarnessPredicate<MatActionListItemHarness> {\n return getListItemPredicate(MatActionListItemHarness, options);\n }\n\n /** Clicks on the action list item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Focuses the action list item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the action list item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the action list item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {ListHarnessFilters, ListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-list in tests. */\nexport class MatListHarness extends\n MatListHarnessBase<typeof MatListItemHarness, MatListItemHarness, ListItemHarnessFilters> {\n /** The selector for the host element of a `MatList` instance. */\n static hostSelector = '.mat-list:not(mat-action-list)';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListHarness` that meets certain\n * criteria.\n * @param options Options for filtering which list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListHarnessFilters = {}): HarnessPredicate<MatListHarness> {\n return new HarnessPredicate(MatListHarness, options);\n }\n\n _itemHarness = MatListItemHarness;\n}\n\n/** Harness for interacting with a list item. */\nexport class MatListItemHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListItemHarness` that meets\n * certain criteria.\n * @param options Options for filtering which list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListItemHarnessFilters = {}): HarnessPredicate<MatListItemHarness> {\n return getListItemPredicate(MatListItemHarness, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\nexport interface ListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface ActionListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface NavListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface SelectionListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface BaseListItemHarnessFilters extends BaseHarnessFilters {\n text?: string | RegExp;\n}\n\nexport interface ListItemHarnessFilters extends BaseListItemHarnessFilters {}\n\nexport interface ActionListItemHarnessFilters extends BaseListItemHarnessFilters {}\n\nexport interface NavListItemHarnessFilters extends BaseListItemHarnessFilters {\n href?: string | RegExp | null;\n}\n\nexport interface ListOptionHarnessFilters extends BaseListItemHarnessFilters {\n selected?: boolean;\n}\n\nexport interface SubheaderHarnessFilters extends BaseHarnessFilters {\n text?: string | RegExp;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {NavListHarnessFilters, NavListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-nav-list in tests. */\nexport class MatNavListHarness extends MatListHarnessBase<\n typeof MatNavListItemHarness, MatNavListItemHarness, NavListItemHarnessFilters> {\n /** The selector for the host element of a `MatNavList` instance. */\n static hostSelector = '.mat-nav-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNavListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which nav list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NavListHarnessFilters = {}): HarnessPredicate<MatNavListHarness> {\n return new HarnessPredicate(MatNavListHarness, options);\n }\n\n _itemHarness = MatNavListItemHarness;\n}\n\n/** Harness for interacting with a nav list item. */\nexport class MatNavListItemHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatNavListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNavListItemHarness` that\n * meets certain criteria.\n * @param options Options for filtering which nav list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NavListItemHarnessFilters = {}): HarnessPredicate<MatNavListItemHarness> {\n return getListItemPredicate(MatNavListItemHarness, options)\n .addOption('href', options.href,\n async (harness, href) => HarnessPredicate.stringMatches(harness.getHref(), href));\n }\n\n /** Gets the href for this nav list item. */\n async getHref(): Promise<string | null> {\n return (await this.host()).getAttribute('href');\n }\n\n /** Clicks on the nav list item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Focuses the nav list item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the nav list item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the nav list item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {\n ListItemHarnessFilters,\n ListOptionHarnessFilters,\n SelectionListHarnessFilters\n} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-selection-list in tests. */\nexport class MatSelectionListHarness extends MatListHarnessBase<\n typeof MatListOptionHarness, MatListOptionHarness, ListOptionHarnessFilters> {\n /** The selector for the host element of a `MatSelectionList` instance. */\n static hostSelector = '.mat-selection-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatSelectionListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which selection list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: SelectionListHarnessFilters = {}):\n HarnessPredicate<MatSelectionListHarness> {\n return new HarnessPredicate(MatSelectionListHarness, options);\n }\n\n _itemHarness = MatListOptionHarness;\n\n /** Whether the selection list is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /**\n * Selects all items matching any of the given filters.\n * @param filters Filters that specify which items should be selected.\n */\n async selectItems(...filters: ListOptionHarnessFilters[]): Promise<void> {\n const items = await this._getItems(filters);\n await Promise.all(items.map(item => item.select()));\n }\n\n /**\n * Deselects all items matching any of the given filters.\n * @param filters Filters that specify which items should be deselected.\n */\n async deselectItems(...filters: ListItemHarnessFilters[]): Promise<void> {\n const items = await this._getItems(filters);\n await Promise.all(items.map(item => item.deselect()));\n }\n\n /** Gets all items matching the given list of filters. */\n private async _getItems(filters: ListOptionHarnessFilters[]): Promise<MatListOptionHarness[]> {\n if (!filters.length) {\n return this.getItems();\n }\n return ([] as MatListOptionHarness[]).concat(...await Promise.all(\n filters.map(filter => this.locatorForAll(MatListOptionHarness.with(filter))())));\n }\n}\n\n/** Harness for interacting with a list option. */\nexport class MatListOptionHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListOption` instance. */\n static hostSelector = '.mat-list-option';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListOptionHarness` that\n * meets certain criteria.\n * @param options Options for filtering which list option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListOptionHarnessFilters = {}): HarnessPredicate<MatListOptionHarness> {\n return getListItemPredicate(MatListOptionHarness, options)\n .addOption('is selected', options.selected,\n async (harness, selected) => await harness.isSelected() === selected);\n }\n\n private _itemContent = this.locatorFor('.mat-list-item-content');\n\n /** Gets the position of the checkbox relative to the list option content. */\n async getCheckboxPosition(): Promise<'before' | 'after'> {\n return await (await this._itemContent()).hasClass('mat-list-item-content-reverse') ?\n 'after' : 'before';\n }\n\n /** Whether the list option is selected. */\n async isSelected(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-selected') === 'true';\n }\n\n /** Whether the list option is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /** Focuses the list option. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the list option. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the list option is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Toggles the checked state of the checkbox. */\n async toggle() {\n return (await this.host()).click();\n }\n\n /**\n * Puts the list option in a checked state by toggling it if it is currently unchecked, or doing\n * nothing if it is already checked.\n */\n async select() {\n if (!await this.isSelected()) {\n return this.toggle();\n }\n }\n\n /**\n * Puts the list option in an unchecked state by toggling it if it is currently checked, or doing\n * nothing if it is already unchecked.\n */\n async deselect() {\n if (await this.isSelected()) {\n return this.toggle();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './action-list-harness';\nexport * from './list-harness';\nexport * from './list-harness-filters';\nexport * from './nav-list-harness';\nexport * from './selection-list-harness';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAgBA;;;;;;;;AAQA,SAAgB,oBAAoB,CAChC,WAA2C,EAC3C,OAAmC;I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K,MAAM;;YACV,IAAI,EAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAA,EAAE;gBAC5B,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;aACtB;SACF;KAAA;;;;;IAMK,QAAQ;;YACZ,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC3B,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;aACtB;SACF;KAAA;;;AAtEM,iCAAY,GAAG,kBAAkB,CAAC;;ACxE3C;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
|
|
1
|
+
{"version":3,"file":"list__testing.js","sources":["../../../../../../src/material/list/testing/list-item-harness-base.ts","../../../../../../src/material/list/testing/list-harness-base.ts","../../../../../../src/material/list/testing/action-list-harness.ts","../../../../../../src/material/list/testing/list-harness.ts","../../../../../../src/material/list/testing/list-harness-filters.ts","../../../../../../src/material/list/testing/nav-list-harness.ts","../../../../../../src/material/list/testing/selection-list-harness.ts","../../../../../../src/material/list/testing/public-api.ts","../../../../../../src/material/list/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessLoader,\n HarnessPredicate\n} from '@angular/cdk/testing';\nimport {BaseListItemHarnessFilters, SubheaderHarnessFilters} from './list-harness-filters';\n\nconst iconSelector = '.mat-list-icon';\nconst avatarSelector = '.mat-list-avatar';\n\n/**\n * Gets a `HarnessPredicate` that applies the given `BaseListItemHarnessFilters` to the given\n * list item harness.\n * @template H The type of list item harness to create a predicate for.\n * @param harnessType A constructor for a list item harness.\n * @param options An instance of `BaseListItemHarnessFilters` to apply.\n * @return A `HarnessPredicate` for the given harness type with the given options applied.\n */\nexport function getListItemPredicate<H extends MatListItemHarnessBase>(\n harnessType: ComponentHarnessConstructor<H>,\n options: BaseListItemHarnessFilters): HarnessPredicate<H> {\n return new HarnessPredicate(harnessType, options)\n .addOption('text', options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text));\n}\n\n/** Harness for interacting with a list subheader. */\nexport class MatSubheaderHarness extends ComponentHarness {\n static hostSelector = '.mat-subheader';\n\n static with(options: SubheaderHarnessFilters = {}): HarnessPredicate<MatSubheaderHarness> {\n return new HarnessPredicate(MatSubheaderHarness, options)\n .addOption('text', options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text));\n }\n\n /** Gets the full text content of the list item (including text from any font icons). */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n}\n\n/**\n * Shared behavior among the harnesses for the various `MatListItem` flavors.\n * @docs-private\n */\nexport class MatListItemHarnessBase extends ComponentHarness {\n private _lines = this.locatorForAll('.mat-line');\n private _avatar = this.locatorForOptional(avatarSelector);\n private _icon = this.locatorForOptional(iconSelector);\n\n /** Gets the full text content of the list item (including text from any font icons). */\n async getText(): Promise<string> {\n return (await this.host()).text({exclude: `${iconSelector}, ${avatarSelector}`});\n }\n\n /** Gets the lines of text (`mat-line` elements) in this nav list item. */\n async getLinesText(): Promise<string[]> {\n return Promise.all((await this._lines()).map(l => l.text()));\n }\n\n /** Whether this list item has an avatar. */\n async hasAvatar(): Promise<boolean> {\n return !!await this._avatar();\n }\n\n /** Whether this list item has an icon. */\n async hasIcon(): Promise<boolean> {\n return !!await this._icon();\n }\n\n /** Gets a `HarnessLoader` used to get harnesses within the list item's content. */\n async getHarnessLoaderForContent(): Promise<HarnessLoader> {\n return this.locatorFactory.harnessLoaderFor('.mat-list-item-content');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate\n} from '@angular/cdk/testing';\nimport {DividerHarnessFilters, MatDividerHarness} from '@angular/material/divider/testing';\nimport {BaseListItemHarnessFilters, SubheaderHarnessFilters} from './list-harness-filters';\nimport {MatSubheaderHarness} from './list-item-harness-base';\n\n/** Represents a section of a list falling under a specific header. */\nexport interface ListSection<I> {\n /** The heading for this list section. `undefined` if there is no heading. */\n heading?: string;\n\n /** The items in this list section. */\n items: I[];\n}\n\n/**\n * Shared behavior among the harnesses for the various `MatList` flavors.\n * @template T A constructor type for a list item harness type used by this list harness.\n * @template C The list item harness type that `T` constructs.\n * @template F The filter type used filter list item harness of type `C`.\n * @docs-private\n */\nexport class MatListHarnessBase\n <\n T extends (ComponentHarnessConstructor<C> & {with: (options?: F) => HarnessPredicate<C>}),\n C extends ComponentHarness,\n F extends BaseListItemHarnessFilters\n > extends ComponentHarness {\n protected _itemHarness: T;\n\n /**\n * Gets a list of harnesses representing the items in this list.\n * @param filters Optional filters used to narrow which harnesses are included\n * @return The list of items matching the given filters.\n */\n async getItems(filters?: F): Promise<C[]> {\n return this.locatorForAll(this._itemHarness.with(filters))();\n }\n\n /**\n * Gets a list of `ListSection` representing the list items grouped by subheaders. If the list has\n * no subheaders it is represented as a single `ListSection` with an undefined `heading` property.\n * @param filters Optional filters used to narrow which list item harnesses are included\n * @return The list of items matching the given filters, grouped into sections by subheader.\n */\n async getItemsGroupedBySubheader(filters?: F): Promise<ListSection<C>[]> {\n const listSections = [];\n let currentSection: ListSection<C> = {items: []};\n const itemsAndSubheaders =\n await this.getItemsWithSubheadersAndDividers({item: filters, divider: false});\n for (const itemOrSubheader of itemsAndSubheaders) {\n if (itemOrSubheader instanceof MatSubheaderHarness) {\n if (currentSection.heading !== undefined || currentSection.items.length) {\n listSections.push(currentSection);\n }\n currentSection = {heading: await itemOrSubheader.getText(), items: []};\n } else {\n currentSection.items.push(itemOrSubheader);\n }\n }\n if (currentSection.heading !== undefined || currentSection.items.length ||\n !listSections.length) {\n listSections.push(currentSection);\n }\n return listSections;\n }\n\n /**\n * Gets a list of sub-lists representing the list items grouped by dividers. If the list has no\n * dividers it is represented as a list with a single sub-list.\n * @param filters Optional filters used to narrow which list item harnesses are included\n * @return The list of items matching the given filters, grouped into sub-lists by divider.\n */\n async getItemsGroupedByDividers(filters?: F): Promise<C[][]> {\n const listSections: C[][] = [[]];\n const itemsAndDividers =\n await this.getItemsWithSubheadersAndDividers({item: filters, subheader: false});\n for (const itemOrDivider of itemsAndDividers) {\n if (itemOrDivider instanceof MatDividerHarness) {\n listSections.push([]);\n } else {\n listSections[listSections.length - 1].push(itemOrDivider);\n }\n }\n return listSections;\n }\n\n /**\n * Gets a list of harnesses representing all of the items, subheaders, and dividers\n * (in the order they appear in the list). Use `instanceof` to check which type of harness a given\n * item is.\n * @param filters Optional filters used to narrow which list items, subheaders, and dividers are\n * included. A value of `false` for the `item`, `subheader`, or `divider` properties indicates\n * that the respective harness type should be omitted completely.\n * @return The list of harnesses representing the items, subheaders, and dividers matching the\n * given filters.\n */\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader: false,\n divider: false\n }): Promise<[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader: false,\n divider: false\n }): Promise<C[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader?: SubheaderHarnessFilters | false,\n divider: false\n }): Promise<MatSubheaderHarness[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader: false,\n divider?: DividerHarnessFilters | false\n }): Promise<MatDividerHarness[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader?: SubheaderHarnessFilters | false,\n divider: false\n }): Promise<(C | MatSubheaderHarness)[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader: false,\n divider?: false | DividerHarnessFilters\n }): Promise<(C | MatDividerHarness)[]>;\n getItemsWithSubheadersAndDividers(filters: {\n item: false,\n subheader?: false | SubheaderHarnessFilters,\n divider?: false | DividerHarnessFilters\n }): Promise<(MatSubheaderHarness | MatDividerHarness)[]>;\n getItemsWithSubheadersAndDividers(filters?: {\n item?: F | false,\n subheader?: SubheaderHarnessFilters | false,\n divider?: DividerHarnessFilters | false\n }): Promise<(C | MatSubheaderHarness | MatDividerHarness)[]>;\n async getItemsWithSubheadersAndDividers(filters: {\n item?: F | false,\n subheader?: SubheaderHarnessFilters | false,\n divider?: DividerHarnessFilters | false\n } = {}): Promise<(C | MatSubheaderHarness | MatDividerHarness)[]> {\n const query = [];\n if (filters.item !== false) {\n query.push(this._itemHarness.with(filters.item || {} as F));\n }\n if (filters.subheader !== false) {\n query.push(MatSubheaderHarness.with(filters.subheader));\n }\n if (filters.divider !== false) {\n query.push(MatDividerHarness.with(filters.divider));\n }\n return this.locatorForAll(...query)();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {ActionListHarnessFilters, ActionListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-action-list in tests. */\nexport class MatActionListHarness extends MatListHarnessBase<\n typeof MatActionListItemHarness, MatActionListItemHarness, ActionListItemHarnessFilters> {\n /** The selector for the host element of a `MatActionList` instance. */\n static hostSelector = 'mat-action-list.mat-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatActionListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which action list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ActionListHarnessFilters = {}): HarnessPredicate<MatActionListHarness> {\n return new HarnessPredicate(MatActionListHarness, options);\n }\n\n _itemHarness = MatActionListItemHarness;\n}\n\n/** Harness for interacting with an action list item. */\nexport class MatActionListItemHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatActionListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatActionListItemHarness` that\n * meets certain criteria.\n * @param options Options for filtering which action list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ActionListItemHarnessFilters = {}):\n HarnessPredicate<MatActionListItemHarness> {\n return getListItemPredicate(MatActionListItemHarness, options);\n }\n\n /** Clicks on the action list item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Focuses the action list item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the action list item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the action list item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {ListHarnessFilters, ListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-list in tests. */\nexport class MatListHarness extends\n MatListHarnessBase<typeof MatListItemHarness, MatListItemHarness, ListItemHarnessFilters> {\n /** The selector for the host element of a `MatList` instance. */\n static hostSelector = '.mat-list:not(mat-action-list)';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListHarness` that meets certain\n * criteria.\n * @param options Options for filtering which list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListHarnessFilters = {}): HarnessPredicate<MatListHarness> {\n return new HarnessPredicate(MatListHarness, options);\n }\n\n _itemHarness = MatListItemHarness;\n}\n\n/** Harness for interacting with a list item. */\nexport class MatListItemHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListItemHarness` that meets\n * certain criteria.\n * @param options Options for filtering which list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListItemHarnessFilters = {}): HarnessPredicate<MatListItemHarness> {\n return getListItemPredicate(MatListItemHarness, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\nexport interface ListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface ActionListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface NavListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface SelectionListHarnessFilters extends BaseHarnessFilters {}\n\nexport interface BaseListItemHarnessFilters extends BaseHarnessFilters {\n text?: string | RegExp;\n}\n\nexport interface ListItemHarnessFilters extends BaseListItemHarnessFilters {}\n\nexport interface ActionListItemHarnessFilters extends BaseListItemHarnessFilters {}\n\nexport interface NavListItemHarnessFilters extends BaseListItemHarnessFilters {\n href?: string | RegExp | null;\n}\n\nexport interface ListOptionHarnessFilters extends BaseListItemHarnessFilters {\n selected?: boolean;\n}\n\nexport interface SubheaderHarnessFilters extends BaseHarnessFilters {\n text?: string | RegExp;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {NavListHarnessFilters, NavListItemHarnessFilters} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-nav-list in tests. */\nexport class MatNavListHarness extends MatListHarnessBase<\n typeof MatNavListItemHarness, MatNavListItemHarness, NavListItemHarnessFilters> {\n /** The selector for the host element of a `MatNavList` instance. */\n static hostSelector = '.mat-nav-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNavListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which nav list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NavListHarnessFilters = {}): HarnessPredicate<MatNavListHarness> {\n return new HarnessPredicate(MatNavListHarness, options);\n }\n\n _itemHarness = MatNavListItemHarness;\n}\n\n/** Harness for interacting with a nav list item. */\nexport class MatNavListItemHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListItem` instance. */\n static hostSelector = `${MatNavListHarness.hostSelector} .mat-list-item`;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNavListItemHarness` that\n * meets certain criteria.\n * @param options Options for filtering which nav list item instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NavListItemHarnessFilters = {}): HarnessPredicate<MatNavListItemHarness> {\n return getListItemPredicate(MatNavListItemHarness, options)\n .addOption('href', options.href,\n async (harness, href) => HarnessPredicate.stringMatches(harness.getHref(), href));\n }\n\n /** Gets the href for this nav list item. */\n async getHref(): Promise<string | null> {\n return (await this.host()).getAttribute('href');\n }\n\n /** Clicks on the nav list item. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Focuses the nav list item. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the nav list item. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the nav list item is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatListHarnessBase} from './list-harness-base';\nimport {\n ListItemHarnessFilters,\n ListOptionHarnessFilters,\n SelectionListHarnessFilters\n} from './list-harness-filters';\nimport {getListItemPredicate, MatListItemHarnessBase} from './list-item-harness-base';\n\n/** Harness for interacting with a standard mat-selection-list in tests. */\nexport class MatSelectionListHarness extends MatListHarnessBase<\n typeof MatListOptionHarness, MatListOptionHarness, ListOptionHarnessFilters> {\n /** The selector for the host element of a `MatSelectionList` instance. */\n static hostSelector = '.mat-selection-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatSelectionListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which selection list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: SelectionListHarnessFilters = {}):\n HarnessPredicate<MatSelectionListHarness> {\n return new HarnessPredicate(MatSelectionListHarness, options);\n }\n\n _itemHarness = MatListOptionHarness;\n\n /** Whether the selection list is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /**\n * Selects all items matching any of the given filters.\n * @param filters Filters that specify which items should be selected.\n */\n async selectItems(...filters: ListOptionHarnessFilters[]): Promise<void> {\n const items = await this._getItems(filters);\n await Promise.all(items.map(item => item.select()));\n }\n\n /**\n * Deselects all items matching any of the given filters.\n * @param filters Filters that specify which items should be deselected.\n */\n async deselectItems(...filters: ListItemHarnessFilters[]): Promise<void> {\n const items = await this._getItems(filters);\n await Promise.all(items.map(item => item.deselect()));\n }\n\n /** Gets all items matching the given list of filters. */\n private async _getItems(filters: ListOptionHarnessFilters[]): Promise<MatListOptionHarness[]> {\n if (!filters.length) {\n return this.getItems();\n }\n return ([] as MatListOptionHarness[]).concat(...await Promise.all(\n filters.map(filter => this.locatorForAll(MatListOptionHarness.with(filter))())));\n }\n}\n\n/** Harness for interacting with a list option. */\nexport class MatListOptionHarness extends MatListItemHarnessBase {\n /** The selector for the host element of a `MatListOption` instance. */\n static hostSelector = '.mat-list-option';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatListOptionHarness` that\n * meets certain criteria.\n * @param options Options for filtering which list option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListOptionHarnessFilters = {}): HarnessPredicate<MatListOptionHarness> {\n return getListItemPredicate(MatListOptionHarness, options)\n .addOption('is selected', options.selected,\n async (harness, selected) => await harness.isSelected() === selected);\n }\n\n private _itemContent = this.locatorFor('.mat-list-item-content');\n\n /** Gets the position of the checkbox relative to the list option content. */\n async getCheckboxPosition(): Promise<'before' | 'after'> {\n return await (await this._itemContent()).hasClass('mat-list-item-content-reverse') ?\n 'after' : 'before';\n }\n\n /** Whether the list option is selected. */\n async isSelected(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-selected') === 'true';\n }\n\n /** Whether the list option is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /** Focuses the list option. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the list option. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the list option is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Toggles the checked state of the checkbox. */\n async toggle() {\n return (await this.host()).click();\n }\n\n /**\n * Puts the list option in a checked state by toggling it if it is currently unchecked, or doing\n * nothing if it is already checked.\n */\n async select() {\n if (!await this.isSelected()) {\n return this.toggle();\n }\n }\n\n /**\n * Puts the list option in an unchecked state by toggling it if it is currently checked, or doing\n * nothing if it is already unchecked.\n */\n async deselect() {\n if (await this.isSelected()) {\n return this.toggle();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './action-list-harness';\nexport * from './list-harness';\nexport * from './list-harness-filters';\nexport * from './nav-list-harness';\nexport * from './selection-list-harness';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAgBA,MAAM,YAAY,GAAG,gBAAgB,CAAC;AACtC,MAAM,cAAc,GAAG,kBAAkB,CAAC;;;;;;;;;AAU1C,SAAgB,oB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ACV,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACpC;KAAA;;;;;IAMK,MAAM;;YACV,IAAI,EAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAA,EAAE;gBAC5B,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;aACtB;SACF;KAAA;;;;;IAMK,QAAQ;;YACZ,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC3B,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;aACtB;SACF;KAAA;;;AAtEM,iCAAY,GAAG,kBAAkB,CAAC;;ACxE3C;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
|
package/icon/icon.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
9
|
-
import { AfterViewChecked, ElementRef, ErrorHandler, InjectionToken,
|
|
9
|
+
import { AfterViewChecked, ElementRef, ErrorHandler, InjectionToken, OnDestroy, OnInit } from '@angular/core';
|
|
10
10
|
import { CanColor, CanColorCtor } from '@angular/material/core';
|
|
11
11
|
import { MatIconRegistry } from './icon-registry';
|
|
12
12
|
/** @docs-private */
|
|
@@ -57,7 +57,7 @@ export declare function MAT_ICON_LOCATION_FACTORY(): MatIconLocation;
|
|
|
57
57
|
* Example:
|
|
58
58
|
* `<mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>`
|
|
59
59
|
*/
|
|
60
|
-
export declare class MatIcon extends _MatIconMixinBase implements
|
|
60
|
+
export declare class MatIcon extends _MatIconMixinBase implements OnInit, AfterViewChecked, CanColor, OnDestroy {
|
|
61
61
|
private _iconRegistry;
|
|
62
62
|
private _location;
|
|
63
63
|
private readonly _errorHandler;
|
|
@@ -69,7 +69,9 @@ export declare class MatIcon extends _MatIconMixinBase implements OnChanges, OnI
|
|
|
69
69
|
set inline(inline: boolean);
|
|
70
70
|
private _inline;
|
|
71
71
|
/** Name of the icon in the SVG icon set. */
|
|
72
|
-
svgIcon: string;
|
|
72
|
+
get svgIcon(): string;
|
|
73
|
+
set svgIcon(value: string);
|
|
74
|
+
private _svgIcon;
|
|
73
75
|
/** Font set that the icon is a part of. */
|
|
74
76
|
get fontSet(): string;
|
|
75
77
|
set fontSet(value: string);
|
|
@@ -103,7 +105,6 @@ export declare class MatIcon extends _MatIconMixinBase implements OnChanges, OnI
|
|
|
103
105
|
* 'a:b:c' -> (throws Error)`
|
|
104
106
|
*/
|
|
105
107
|
private _splitIconName;
|
|
106
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
107
108
|
ngOnInit(): void;
|
|
108
109
|
ngAfterViewChecked(): void;
|
|
109
110
|
ngOnDestroy(): void;
|
|
@@ -128,6 +129,8 @@ export declare class MatIcon extends _MatIconMixinBase implements OnChanges, OnI
|
|
|
128
129
|
* references that we need to prefix with the current path.
|
|
129
130
|
*/
|
|
130
131
|
private _cacheChildrenWithExternalReferences;
|
|
132
|
+
/** Sets a new SVG icon with a particular name. */
|
|
133
|
+
private _updateSvgIcon;
|
|
131
134
|
static ngAcceptInputType_inline: BooleanInput;
|
|
132
135
|
}
|
|
133
136
|
export {};
|