@angular/material 21.0.0-next.1 → 21.0.0-next.2

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.
Files changed (99) hide show
  1. package/autocomplete/index.d.ts +1 -23
  2. package/bottom-sheet/index.d.ts +1 -10
  3. package/button/index.d.ts +1 -7
  4. package/button-toggle/index.d.ts +1 -1
  5. package/button-toggle.d.d.ts +1 -7
  6. package/checkbox/index.d.ts +1 -7
  7. package/core/index.d.ts +1 -1
  8. package/core/tokens/_classes.scss +20 -16
  9. package/date-adapter.d.d.ts +1 -7
  10. package/datepicker/index.d.ts +2 -55
  11. package/dialog/index.d.ts +1 -23
  12. package/expansion/index.d.ts +1 -36
  13. package/fesm2022/autocomplete.mjs +5 -33
  14. package/fesm2022/autocomplete.mjs.map +1 -1
  15. package/fesm2022/bottom-sheet.mjs +1 -82
  16. package/fesm2022/bottom-sheet.mjs.map +1 -1
  17. package/fesm2022/button-toggle.mjs +5 -13
  18. package/fesm2022/button-toggle.mjs.map +1 -1
  19. package/fesm2022/button.mjs +6 -14
  20. package/fesm2022/button.mjs.map +1 -1
  21. package/fesm2022/checkbox.mjs +10 -19
  22. package/fesm2022/checkbox.mjs.map +1 -1
  23. package/fesm2022/core.mjs +1 -2
  24. package/fesm2022/core.mjs.map +1 -1
  25. package/fesm2022/date-formats.mjs +2 -10
  26. package/fesm2022/date-formats.mjs.map +1 -1
  27. package/fesm2022/datepicker.mjs +26 -178
  28. package/fesm2022/datepicker.mjs.map +1 -1
  29. package/fesm2022/dialog/testing.mjs +5 -5
  30. package/fesm2022/dialog.mjs +882 -114
  31. package/fesm2022/dialog.mjs.map +1 -1
  32. package/fesm2022/expansion.mjs +1 -103
  33. package/fesm2022/expansion.mjs.map +1 -1
  34. package/fesm2022/form-field.mjs +37 -49
  35. package/fesm2022/form-field.mjs.map +1 -1
  36. package/fesm2022/icon-registry.mjs +2 -29
  37. package/fesm2022/icon-registry.mjs.map +1 -1
  38. package/fesm2022/icon.mjs +11 -17
  39. package/fesm2022/icon.mjs.map +1 -1
  40. package/fesm2022/input.mjs +1 -1
  41. package/fesm2022/menu.mjs +5 -152
  42. package/fesm2022/menu.mjs.map +1 -1
  43. package/fesm2022/paginator.mjs +7 -27
  44. package/fesm2022/paginator.mjs.map +1 -1
  45. package/fesm2022/progress-bar.mjs +13 -16
  46. package/fesm2022/progress-bar.mjs.map +1 -1
  47. package/fesm2022/progress-spinner.mjs +2 -10
  48. package/fesm2022/progress-spinner.mjs.map +1 -1
  49. package/fesm2022/radio.mjs +4 -12
  50. package/fesm2022/radio.mjs.map +1 -1
  51. package/fesm2022/ripple.mjs +2 -2
  52. package/fesm2022/ripple.mjs.map +1 -1
  53. package/fesm2022/select.mjs +1293 -90
  54. package/fesm2022/select.mjs.map +1 -1
  55. package/fesm2022/sidenav.mjs +2 -88
  56. package/fesm2022/sidenav.mjs.map +1 -1
  57. package/fesm2022/snack-bar.mjs +2 -80
  58. package/fesm2022/snack-bar.mjs.map +1 -1
  59. package/fesm2022/sort.mjs +3 -329
  60. package/fesm2022/sort.mjs.map +1 -1
  61. package/fesm2022/stepper.mjs +4 -171
  62. package/fesm2022/stepper.mjs.map +1 -1
  63. package/fesm2022/tabs.mjs +8 -153
  64. package/fesm2022/tabs.mjs.map +1 -1
  65. package/fesm2022/tooltip.mjs +21 -53
  66. package/fesm2022/tooltip.mjs.map +1 -1
  67. package/fesm2022/tooltip2.mjs +6 -33
  68. package/fesm2022/tooltip2.mjs.map +1 -1
  69. package/form-field/index.d.ts +1 -11
  70. package/icon/index.d.ts +2 -2
  71. package/icon-module.d.d.ts +1 -7
  72. package/icon-registry.d.d.ts +2 -18
  73. package/menu/index.d.ts +1 -42
  74. package/package.json +2 -2
  75. package/paginator/index.d.ts +3 -3
  76. package/paginator.d.d.ts +2 -18
  77. package/progress-bar/index.d.ts +1 -7
  78. package/progress-spinner/index.d.ts +1 -1
  79. package/progress-spinner.d.d.ts +3 -9
  80. package/radio/index.d.ts +1 -7
  81. package/ripple.d.d.ts +3 -3
  82. package/schematics/ng-add/index.js +1 -1
  83. package/select/index.d.ts +439 -27
  84. package/sidenav/index.d.ts +1 -17
  85. package/snack-bar/index.d.ts +1 -17
  86. package/sort/index.d.ts +2 -33
  87. package/stepper/index.d.ts +2 -29
  88. package/tabs/index.d.ts +1 -18
  89. package/tooltip/index.d.ts +302 -16
  90. package/fesm2022/dialog-module.mjs +0 -891
  91. package/fesm2022/dialog-module.mjs.map +0 -1
  92. package/fesm2022/form-field-module.mjs +0 -39
  93. package/fesm2022/form-field-module.mjs.map +0 -1
  94. package/fesm2022/select-module.mjs +0 -1318
  95. package/fesm2022/select-module.mjs.map +0 -1
  96. package/fesm2022/tooltip-module.mjs +0 -24
  97. package/fesm2022/tooltip-module.mjs.map +0 -1
  98. package/select-module.d.d.ts +0 -456
  99. package/tooltip-module.d.d.ts +0 -329
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/form-field/form-field-animations.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.dev/license\n */\n\n/**\n * Animations used by the MatFormField.\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport const matFormFieldAnimations: {\n readonly transitionMessages: any;\n} = {\n // Represents:\n // trigger('transitionMessages', [\n // // TODO(mmalerba): Use angular animations for label animation as well.\n // state('enter', style({opacity: 1, transform: 'translateY(0%)'})),\n // transition('void => enter', [\n // style({opacity: 0, transform: 'translateY(-5px)'}),\n // animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),\n // ]),\n // ])\n\n /** Animation that transitions the form field's error and hint messages. */\n transitionMessages: {\n type: 7,\n name: 'transitionMessages',\n definitions: [\n {\n type: 0,\n name: 'enter',\n styles: {\n type: 6,\n styles: {opacity: 1, transform: 'translateY(0%)'},\n offset: null,\n },\n },\n {\n type: 1,\n expr: 'void => enter',\n animation: [\n {type: 6, styles: {opacity: 0, transform: 'translateY(-5px)'}, offset: null},\n {type: 4, styles: null, timings: '300ms cubic-bezier(0.55, 0, 0.55, 0.2)'},\n ],\n options: null,\n },\n ],\n options: {},\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAQA;;;;;AAKG;AACU,MAAA,sBAAsB,GAE/B;;;;;;;;;;;AAYF,IAAA,kBAAkB,EAAE;AAClB,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,IAAI,EAAE,oBAAoB;AAC1B,QAAA,WAAW,EAAE;AACX,YAAA;AACE,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,OAAO;AACb,gBAAA,MAAM,EAAE;AACN,oBAAA,IAAI,EAAE,CAAC;oBACP,MAAM,EAAE,EAAC,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAC;AACjD,oBAAA,MAAM,EAAE,IAAI;AACb,iBAAA;AACF,aAAA;AACD,YAAA;AACE,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,eAAe;AACrB,gBAAA,SAAS,EAAE;AACT,oBAAA,EAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,EAAC,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAC,EAAE,MAAM,EAAE,IAAI,EAAC;oBAC5E,EAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,wCAAwC,EAAC;AAC3E,iBAAA;AACD,gBAAA,OAAO,EAAE,IAAI;AACd,aAAA;AACF,SAAA;AACD,QAAA,OAAO,EAAE,EAAE;AACZ,KAAA;;;;;"}
1
+ {"version":3,"file":"form-field.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/form-field/form-field-module.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.dev/license\n */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatError} from './directives/error';\nimport {MatHint} from './directives/hint';\nimport {MatLabel} from './directives/label';\nimport {MatPrefix} from './directives/prefix';\nimport {MatSuffix} from './directives/suffix';\nimport {MatFormField} from './form-field';\n\n@NgModule({\n imports: [\n MatCommonModule,\n ObserversModule,\n MatFormField,\n MatLabel,\n MatError,\n MatHint,\n MatPrefix,\n MatSuffix,\n ],\n exports: [MatFormField, MatLabel, MatHint, MatError, MatPrefix, MatSuffix, MatCommonModule],\n})\nexport class MatFormFieldModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MA+Ba,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,eAAe;YACf,eAAe;YACf,YAAY;YACZ,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,SAAS;AACT,YAAA,SAAS,CAED,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,CAAA,EAAA,CAAA;AAE/E,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,eAAe;YACf,eAAe;AACf,YAAA,YAAY,EAO6D,eAAe,CAAA,EAAA,CAAA;;kGAE/E,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,eAAe;wBACf,YAAY;wBACZ,QAAQ;wBACR,QAAQ;wBACR,OAAO;wBACP,SAAS;wBACT,SAAS;AACV,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC;AAC5F,iBAAA;;;;;"}
@@ -1,9 +1,7 @@
1
1
  import * as i1 from '@angular/common/http';
2
- import { HttpClient } from '@angular/common/http';
3
2
  import * as i0 from '@angular/core';
4
- import { SecurityContext, DOCUMENT, Injectable, Optional, Inject, SkipSelf, ErrorHandler } from '@angular/core';
3
+ import { SecurityContext, DOCUMENT, Injectable, Optional, Inject } from '@angular/core';
5
4
  import * as i2 from '@angular/platform-browser';
6
- import { DomSanitizer } from '@angular/platform-browser';
7
5
  import { of, throwError, forkJoin } from 'rxjs';
8
6
  import { tap, map, catchError, finalize, share } from 'rxjs/operators';
9
7
 
@@ -597,31 +595,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2",
597
595
  type: Inject,
598
596
  args: [DOCUMENT]
599
597
  }] }, { type: i0.ErrorHandler }] });
600
- /**
601
- * @docs-private
602
- * @deprecated No longer used, will be removed.
603
- * @breaking-change 21.0.0
604
- */
605
- function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, errorHandler, document) {
606
- return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);
607
- }
608
- /**
609
- * @docs-private
610
- * @deprecated No longer used, will be removed.
611
- * @breaking-change 21.0.0
612
- */
613
- const ICON_REGISTRY_PROVIDER = {
614
- // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.
615
- provide: MatIconRegistry,
616
- deps: [
617
- [new Optional(), new SkipSelf(), MatIconRegistry],
618
- [new Optional(), HttpClient],
619
- DomSanitizer,
620
- ErrorHandler,
621
- [new Optional(), DOCUMENT],
622
- ],
623
- useFactory: ICON_REGISTRY_PROVIDER_FACTORY,
624
- };
625
598
  /** Clones an SVGElement while preserving type information. */
626
599
  function cloneSvg(svg) {
627
600
  return svg.cloneNode(true);
@@ -634,5 +607,5 @@ function isSafeUrlWithOptions(value) {
634
607
  return !!(value.url && value.options);
635
608
  }
636
609
 
637
- export { ICON_REGISTRY_PROVIDER, ICON_REGISTRY_PROVIDER_FACTORY, MatIconRegistry, getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlError, getMatIconNameNotFoundError, getMatIconNoHttpProviderError };
610
+ export { MatIconRegistry, getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlError, getMatIconNameNotFoundError, getMatIconNoHttpProviderError };
638
611
  //# sourceMappingURL=icon-registry.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon-registry.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/trusted-types.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/icon-registry.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.dev/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular Material. It lazily constructs the Trusted Types policy, providing\n * helper utilities for promoting strings to Trusted Types. When Trusted Types\n * are not available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nexport declare interface TrustedHTML {\n __brand__: 'TrustedHTML';\n}\n\nexport declare interface TrustedTypePolicyFactory {\n createPolicy(\n policyName: string,\n policyOptions: {\n createHTML?: (input: string) => string;\n },\n ): TrustedTypePolicy;\n}\n\nexport declare interface TrustedTypePolicy {\n createHTML(input: string): TrustedHTML;\n}\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy | null | undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy | null {\n if (policy === undefined) {\n policy = null;\n if (typeof window !== 'undefined') {\n const ttWindow = window as unknown as {trustedTypes?: TrustedTypePolicyFactory};\n if (ttWindow.trustedTypes !== undefined) {\n policy = ttWindow.trustedTypes.createPolicy('angular#components', {\n createHTML: (s: string) => s,\n });\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML {\n return getPolicy()?.createHTML(html) || (html as unknown as TrustedHTML);\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.dev/license\n */\n\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n InjectionToken,\n OnDestroy,\n Optional,\n SecurityContext,\n SkipSelf,\n DOCUMENT,\n} from '@angular/core';\nimport {DomSanitizer, SafeHtml, SafeResourceUrl} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\nimport {TrustedHTML, trustedHTMLFromString} from './trusted-types';\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 * 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(\n 'Could not find HttpClient for use with Angular Material icons. ' +\n 'Please add provideHttpClient() to your providers.',\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(\n `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/**\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(\n `The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`,\n );\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 * Function that will be invoked by the icon registry when trying to resolve the\n * URL from which to fetch an icon. The returned URL will be used to make a request for the icon.\n */\nexport type IconResolver = (\n name: string,\n namespace: string,\n) => SafeResourceUrl | SafeResourceUrlWithIconOptions | null;\n\n/** Object that specifies a URL from which to fetch an icon and the options to use for it. */\nexport interface SafeResourceUrlWithIconOptions {\n url: SafeResourceUrl;\n options: IconOptions;\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: TrustedHTML | null,\n public options?: IconOptions,\n ) {}\n}\n\n/** Icon configuration whose content has already been loaded. */\ntype LoadedSvgIconConfig = SvgIconConfig & {svgText: TrustedHTML};\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<TrustedHTML>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /** Registered icon resolver functions. */\n private _resolvers: IconResolver[] = [];\n\n /**\n * The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font\n * specified. The default 'material-icons' value assumes that the material icon font has been\n * loaded as described at https://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = ['material-icons', 'mat-ligature-font'];\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n private readonly _errorHandler: ErrorHandler,\n ) {\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(\n namespace: string,\n iconName: string,\n url: SafeResourceUrl,\n options?: IconOptions,\n ): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon resolver function with the registry. The function will be invoked with the\n * name and namespace of an icon when the registry tries to resolve the URL from which to fetch\n * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,\n * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers\n * will be invoked in the order in which they have been registered.\n * @param resolver Resolver function to be registered.\n */\n addSvgIconResolver(resolver: IconResolver): this {\n this._resolvers.push(resolver);\n return this;\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(\n namespace: string,\n iconName: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): 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 // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconConfig(\n namespace,\n iconName,\n new SvgIconConfig('', trustedLiteral, options),\n );\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(\n namespace: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));\n }\n\n /**\n * Defines an alias for CSS class names 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 * If the registered font is a ligature font, then don't forget to also include the special\n * class `mat-ligature-font` to allow the usage via attribute. So register like this:\n *\n * ```ts\n * iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');\n * ```\n *\n * And use like this:\n *\n * ```html\n * <mat-icon fontSet=\"f1\" fontIcon=\"home\"></mat-icon>\n * ```\n *\n * @param alias Alias for the font.\n * @param classNames Class names override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, classNames: string = alias): this {\n this._fontCssClassesByAlias.set(alias, classNames);\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 classes 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 setDefaultFontSetClass(...classNames: string[]): this {\n this._defaultFontSetClass = classNames;\n return this;\n }\n\n /**\n * Returns the CSS classes 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 const key = iconKey(namespace, name);\n let config = this._svgIconConfigs.get(key);\n\n // Return (copy of) cached icon if possible.\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // Otherwise try to resolve the config from one of the resolver functions.\n config = this._getIconConfigFromResolvers(namespace, name);\n\n if (config) {\n this._svgIconConfigs.set(key, 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._resolvers = [];\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(\n name: string,\n 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<TrustedHTML | 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(\n 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 /**\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(\n iconName: string,\n 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.toString().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<TrustedHTML | 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(\n iconSet: SVGElement,\n iconName: string,\n options?: IconOptions,\n ): 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(trustedHTMLFromString('<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: TrustedHTML): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str as unknown as string;\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(trustedHTMLFromString('<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<TrustedHTML> {\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 map(svg => {\n // Security: This SVG is fetched from a SafeResourceUrl, and is thus\n // trusted HTML.\n return trustedHTMLFromString(svg);\n }),\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 /** Tries to create an icon config through the registered resolver functions. */\n private _getIconConfigFromResolvers(namespace: string, name: string): SvgIconConfig | undefined {\n for (let i = 0; i < this._resolvers.length; i++) {\n const result = this._resolvers[i](name, namespace);\n\n if (result) {\n return isSafeUrlWithOptions(result)\n ? new SvgIconConfig(result.url, null, result.options)\n : new SvgIconConfig(result, null);\n }\n }\n\n return undefined;\n }\n}\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(\n parentRegistry: MatIconRegistry,\n httpClient: HttpClient,\n sanitizer: DomSanitizer,\n errorHandler: ErrorHandler,\n document?: any,\n) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);\n}\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\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\nfunction isSafeUrlWithOptions(value: any): value is SafeResourceUrlWithIconOptions {\n return !!(value.url && value.options);\n}\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;AAmCA;;;AAGG;AACH,IAAI,MAA4C;AAEhD;;;AAGG;AACH,SAAS,SAAS,GAAA;AAChB,IAAA,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,GAAG,IAAI;AACb,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,QAAQ,GAAG,MAA8D;AAC/E,YAAA,IAAI,QAAQ,CAAC,YAAY,KAAK,SAAS,EAAE;gBACvC,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,oBAAoB,EAAE;AAChE,oBAAA,UAAU,EAAE,CAAC,CAAS,KAAK,CAAC;AAC7B,iBAAA,CAAC;;;;AAIR,IAAA,OAAO,MAAM;AACf;AAEA;;;;;;;;AAQG;AACG,SAAU,qBAAqB,CAAC,IAAY,EAAA;IAChD,OAAO,SAAS,EAAE,EAAE,UA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C9C,IAAA,OAAO,SAAS,GAAG,GAAG,GAAG,IAAI;AAC/B;AAEA,SAAS,oBAAoB,CAAC,KAAU,EAAA;IACtC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC;AACvC;;;;"}
1
+ {"version":3,"file":"icon-registry.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/trusted-types.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/icon-registry.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.dev/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular Material. It lazily constructs the Trusted Types policy, providing\n * helper utilities for promoting strings to Trusted Types. When Trusted Types\n * are not available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nexport declare interface TrustedHTML {\n __brand__: 'TrustedHTML';\n}\n\nexport declare interface TrustedTypePolicyFactory {\n createPolicy(\n policyName: string,\n policyOptions: {\n createHTML?: (input: string) => string;\n },\n ): TrustedTypePolicy;\n}\n\nexport declare interface TrustedTypePolicy {\n createHTML(input: string): TrustedHTML;\n}\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy: TrustedTypePolicy | null | undefined;\n\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy(): TrustedTypePolicy | null {\n if (policy === undefined) {\n policy = null;\n if (typeof window !== 'undefined') {\n const ttWindow = window as unknown as {trustedTypes?: TrustedTypePolicyFactory};\n if (ttWindow.trustedTypes !== undefined) {\n policy = ttWindow.trustedTypes.createPolicy('angular#components', {\n createHTML: (s: string) => s,\n });\n }\n }\n }\n return policy;\n}\n\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML {\n return getPolicy()?.createHTML(html) || (html as unknown as TrustedHTML);\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.dev/license\n */\n\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n SecurityContext,\n DOCUMENT,\n} from '@angular/core';\nimport {DomSanitizer, SafeHtml, SafeResourceUrl} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\nimport {TrustedHTML, trustedHTMLFromString} from './trusted-types';\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 * 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(\n 'Could not find HttpClient for use with Angular Material icons. ' +\n 'Please add provideHttpClient() to your providers.',\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(\n `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/**\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(\n `The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`,\n );\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 * Function that will be invoked by the icon registry when trying to resolve the\n * URL from which to fetch an icon. The returned URL will be used to make a request for the icon.\n */\nexport type IconResolver = (\n name: string,\n namespace: string,\n) => SafeResourceUrl | SafeResourceUrlWithIconOptions | null;\n\n/** Object that specifies a URL from which to fetch an icon and the options to use for it. */\nexport interface SafeResourceUrlWithIconOptions {\n url: SafeResourceUrl;\n options: IconOptions;\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: TrustedHTML | null,\n public options?: IconOptions,\n ) {}\n}\n\n/** Icon configuration whose content has already been loaded. */\ntype LoadedSvgIconConfig = SvgIconConfig & {svgText: TrustedHTML};\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<TrustedHTML>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /** Registered icon resolver functions. */\n private _resolvers: IconResolver[] = [];\n\n /**\n * The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font\n * specified. The default 'material-icons' value assumes that the material icon font has been\n * loaded as described at https://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = ['material-icons', 'mat-ligature-font'];\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n private readonly _errorHandler: ErrorHandler,\n ) {\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(\n namespace: string,\n iconName: string,\n url: SafeResourceUrl,\n options?: IconOptions,\n ): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon resolver function with the registry. The function will be invoked with the\n * name and namespace of an icon when the registry tries to resolve the URL from which to fetch\n * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,\n * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers\n * will be invoked in the order in which they have been registered.\n * @param resolver Resolver function to be registered.\n */\n addSvgIconResolver(resolver: IconResolver): this {\n this._resolvers.push(resolver);\n return this;\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(\n namespace: string,\n iconName: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): 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 // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconConfig(\n namespace,\n iconName,\n new SvgIconConfig('', trustedLiteral, options),\n );\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(\n namespace: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));\n }\n\n /**\n * Defines an alias for CSS class names 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 * If the registered font is a ligature font, then don't forget to also include the special\n * class `mat-ligature-font` to allow the usage via attribute. So register like this:\n *\n * ```ts\n * iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');\n * ```\n *\n * And use like this:\n *\n * ```html\n * <mat-icon fontSet=\"f1\" fontIcon=\"home\"></mat-icon>\n * ```\n *\n * @param alias Alias for the font.\n * @param classNames Class names override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, classNames: string = alias): this {\n this._fontCssClassesByAlias.set(alias, classNames);\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 classes 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 setDefaultFontSetClass(...classNames: string[]): this {\n this._defaultFontSetClass = classNames;\n return this;\n }\n\n /**\n * Returns the CSS classes 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 const key = iconKey(namespace, name);\n let config = this._svgIconConfigs.get(key);\n\n // Return (copy of) cached icon if possible.\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // Otherwise try to resolve the config from one of the resolver functions.\n config = this._getIconConfigFromResolvers(namespace, name);\n\n if (config) {\n this._svgIconConfigs.set(key, 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._resolvers = [];\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(\n name: string,\n 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<TrustedHTML | 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(\n 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 /**\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(\n iconName: string,\n 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.toString().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<TrustedHTML | 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(\n iconSet: SVGElement,\n iconName: string,\n options?: IconOptions,\n ): 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(trustedHTMLFromString('<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: TrustedHTML): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str as unknown as string;\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(trustedHTMLFromString('<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<TrustedHTML> {\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 map(svg => {\n // Security: This SVG is fetched from a SafeResourceUrl, and is thus\n // trusted HTML.\n return trustedHTMLFromString(svg);\n }),\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 /** Tries to create an icon config through the registered resolver functions. */\n private _getIconConfigFromResolvers(namespace: string, name: string): SvgIconConfig | undefined {\n for (let i = 0; i < this._resolvers.length; i++) {\n const result = this._resolvers[i](name, namespace);\n\n if (result) {\n return isSafeUrlWithOptions(result)\n ? new SvgIconConfig(result.url, null, result.options)\n : new SvgIconConfig(result, null);\n }\n }\n\n return undefined;\n }\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\nfunction isSafeUrlWithOptions(value: any): value is SafeResourceUrlWithIconOptions {\n return !!(value.url && value.options);\n}\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;AAmCA;;;AAGG;AACH,IAAI,MAA4C;AAEhD;;;AAGG;AACH,SAAS,SAAS,GAAA;AAChB,IAAA,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,GAAG,IAAI;AACb,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,QAAQ,GAAG,MAA8D;AAC/E,YAAA,IAAI,QAAQ,CAAC,YAAY,KAAK,SAAS,EAAE;gBACvC,MAAM,G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,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO;sBAClD,IAAI,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC;;;AAIvC,QAAA,OAAO,SAAS;;AA/lBP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,wFAoCJ,QAAQ,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AApCnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADH,MAAM,EAAA,CAAA;;kGAClB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;0BAmC3B;;0BAEA;;0BAAY,MAAM;2BAAC,QAAQ;;AA+jBhC;AACA,SAAS,QAAQ,CAAC,GAAe,EAAA;AAC/B,IAAA,OAAO,GAAG,CAAC,SAAS,CAAC,IAAI,CAAe;AAC1C;AAEA;AACA,SAAS,OAAO,CAAC,SAAiB,EAAE,IAAY,EAAA;AAC9C,IAAA,OAAO,SAAS,GAAG,GAAG,GAAG,IAAI;AAC/B;AAEA,SAAS,oBAAoB,CAAC,KAAU,EAAA;IACtC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC;AACvC;;;;"}
package/fesm2022/icon.mjs CHANGED
@@ -3,7 +3,7 @@ import { InjectionToken, inject, DOCUMENT, ElementRef, ErrorHandler, HostAttribu
3
3
  import { Subscription } from 'rxjs';
4
4
  import { take } from 'rxjs/operators';
5
5
  import { MatIconRegistry } from './icon-registry.mjs';
6
- export { ICON_REGISTRY_PROVIDER, ICON_REGISTRY_PROVIDER_FACTORY, getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlError, getMatIconNameNotFoundError, getMatIconNoHttpProviderError } from './icon-registry.mjs';
6
+ export { getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlError, getMatIconNameNotFoundError, getMatIconNoHttpProviderError } from './icon-registry.mjs';
7
7
  import { MatCommonModule } from './common-module.mjs';
8
8
  import '@angular/common/http';
9
9
  import '@angular/platform-browser';
@@ -19,22 +19,16 @@ const MAT_ICON_DEFAULT_OPTIONS = new InjectionToken('MAT_ICON_DEFAULT_OPTIONS');
19
19
  */
20
20
  const MAT_ICON_LOCATION = new InjectionToken('mat-icon-location', {
21
21
  providedIn: 'root',
22
- factory: MAT_ICON_LOCATION_FACTORY,
22
+ factory: () => {
23
+ const _document = inject(DOCUMENT);
24
+ const _location = _document ? _document.location : null;
25
+ return {
26
+ // Note that this needs to be a function, rather than a property, because Angular
27
+ // will only resolve it once, but we want the current path on each call.
28
+ getPathname: () => (_location ? _location.pathname + _location.search : ''),
29
+ };
30
+ },
23
31
  });
24
- /**
25
- * @docs-private
26
- * @deprecated No longer used, will be removed.
27
- * @breaking-change 21.0.0
28
- */
29
- function MAT_ICON_LOCATION_FACTORY() {
30
- const _document = inject(DOCUMENT);
31
- const _location = _document ? _document.location : null;
32
- return {
33
- // Note that this needs to be a function, rather than a property, because Angular
34
- // will only resolve it once, but we want the current path on each call.
35
- getPathname: () => (_location ? _location.pathname + _location.search : ''),
36
- };
37
- }
38
32
  /** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */
39
33
  const funcIriAttributes = [
40
34
  'clip-path',
@@ -395,5 +389,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2",
395
389
  }]
396
390
  }] });
397
391
 
398
- export { MAT_ICON_DEFAULT_OPTIONS, MAT_ICON_LOCATION, MAT_ICON_LOCATION_FACTORY, MatIcon, MatIconModule, MatIconRegistry };
392
+ export { MAT_ICON_DEFAULT_OPTIONS, MAT_ICON_LOCATION, MatIcon, MatIconModule, MatIconRegistry };
399
393
  //# sourceMappingURL=icon.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/icon.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/icon-module.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.dev/license\n */\n\nimport {\n AfterViewChecked,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ErrorHandler,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n HostAttributeToken,\n DOCUMENT,\n} from '@angular/core';\nimport {ThemePalette} from '../core';\nimport {Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {MatIconRegistry} from './icon-registry';\n\n/** Default options for `mat-icon`. */\nexport interface MatIconDefaultOptions {\n /**\n * Theme color of the icon. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/icon/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n /** Font set that the icon is a part of. */\n fontSet?: string;\n}\n\n/** Injection token to be used to override the default options for `mat-icon`. */\nexport const MAT_ICON_DEFAULT_OPTIONS = new InjectionToken<MatIconDefaultOptions>(\n 'MAT_ICON_DEFAULT_OPTIONS',\n);\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/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\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/** 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 `fontIcon` attribute or the\n * content of the `<mat-icon>` component. If you register a custom font class, don't forget to also\n * include the special class `mat-ligature-font`. It is recommended to use the attribute alternative\n * to prevent the ligature text to be selectable and to appear in search engine results.\n * 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 fontIcon=\"home\"></mat-icon>\n * <mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\" fontIcon=\"sun\"></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://fontawesome-v4.github.io/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 styleUrl: 'icon.css',\n host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[class]': 'color ? \"mat-\" + color : \"\"',\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 '[attr.fontIcon]': '_usingFontIcon() ? fontIcon : null',\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 implements OnInit, AfterViewChecked, OnDestroy {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _iconRegistry = inject(MatIconRegistry);\n private _location = inject<MatIconLocation>(MAT_ICON_LOCATION);\n private readonly _errorHandler = inject(ErrorHandler);\n private _defaultColor: ThemePalette;\n\n /**\n * Theme color of the icon. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/icon/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\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({transform: booleanAttribute})\n inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input()\n get svgIcon(): string {\n return this._svgIcon;\n }\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 {\n return this._fontSet;\n }\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 {\n return this._fontIcon;\n }\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(...args: unknown[]);\n\n constructor() {\n const ariaHidden = inject(new HostAttributeToken('aria-hidden'), {optional: true});\n const defaults = inject<MatIconDefaultOptions>(MAT_ICON_DEFAULT_OPTIONS, {optional: true});\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n if (defaults.fontSet) {\n this.fontSet = defaults.fontSet;\n }\n }\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 this._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:\n return ['', parts[0]]; // Use default namespace.\n case 2:\n return <[string, string]>parts;\n default:\n 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 // 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 child.remove();\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClasses = (\n this.fontSet\n ? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/)\n : this._iconRegistry.getDefaultFontSetClass()\n ).filter(className => className.length > 0);\n\n this._previousFontSetClass.forEach(className => elem.classList.remove(className));\n fontSetClasses.forEach(className => elem.classList.add(className));\n this._previousFontSetClass = fontSetClasses;\n\n if (\n this.fontIcon !== this._previousFontIconClass &&\n !fontSetClasses.includes('mat-ligature-font')\n ) {\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\n .getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(\n svg => this._setSvgElement(svg),\n (err: Error) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n },\n );\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatIcon} from './icon';\n\n@NgModule({\n imports: [MatCommonModule, MatIcon],\n exports: [MatIcon, MatCommonModule],\n})\nexport class MatIconModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;AA4CA;MACa,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B;AAG5B;;;;AAIG;MACU,iBAAiB,GAAG,IAAI,cAAc,CAAkB,mBAAmB,EAAE;AACxF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,yBAAyB;AACnC,CAAA;AAUD;;;;AAIG;SACa,yBAAyB,GAAA;AACvC,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAClC,IAAA,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,IAAI;IAEvD,OAAO;;;QAGL,WAAW,EAAE,OAAO,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,GAAG,EAAE,CAAC;KAC5E;AACH;AAEA;AACA,MAAM,iBAAiB,GAAG;IACxB,WAAW;IACX,eAAe;IACf,KAAK;IACL,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,MAAM;IACN,QAAQ;CACT;AAED;AACA,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,GAAG,CAAC,IAAI,IAAI,CAAI,CAAA,EAAA,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAEtF;AACA,MAAM,cAAc,GAAG,2BAA2B;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;MAoBU,OAAO,CAAA;AACT,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AAC1D,IAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,IAAA,SAAS,GAAG,MAAM,CAAkB,iBAAiB,CAAC;AAC7C,IAAA,aAAa,GAAG,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Ae,EAAE,OAAO,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;AACpC,iBAAA;;;;;"}
1
+ {"version":3,"file":"icon.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/icon.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/icon-module.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.dev/license\n */\n\nimport {\n AfterViewChecked,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ErrorHandler,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n HostAttributeToken,\n DOCUMENT,\n} from '@angular/core';\nimport {ThemePalette} from '../core';\nimport {Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {MatIconRegistry} from './icon-registry';\n\n/** Default options for `mat-icon`. */\nexport interface MatIconDefaultOptions {\n /**\n * Theme color of the icon. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/icon/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n /** Font set that the icon is a part of. */\n fontSet?: string;\n}\n\n/** Injection token to be used to override the default options for `mat-icon`. */\nexport const MAT_ICON_DEFAULT_OPTIONS = new InjectionToken<MatIconDefaultOptions>(\n 'MAT_ICON_DEFAULT_OPTIONS',\n);\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: () => {\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/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\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 `fontIcon` attribute or the\n * content of the `<mat-icon>` component. If you register a custom font class, don't forget to also\n * include the special class `mat-ligature-font`. It is recommended to use the attribute alternative\n * to prevent the ligature text to be selectable and to appear in search engine results.\n * 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 fontIcon=\"home\"></mat-icon>\n * <mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\" fontIcon=\"sun\"></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://fontawesome-v4.github.io/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 styleUrl: 'icon.css',\n host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[class]': 'color ? \"mat-\" + color : \"\"',\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 '[attr.fontIcon]': '_usingFontIcon() ? fontIcon : null',\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 implements OnInit, AfterViewChecked, OnDestroy {\n readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _iconRegistry = inject(MatIconRegistry);\n private _location = inject<MatIconLocation>(MAT_ICON_LOCATION);\n private readonly _errorHandler = inject(ErrorHandler);\n private _defaultColor: ThemePalette;\n\n /**\n * Theme color of the icon. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/icon/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input()\n get color() {\n return this._color || this._defaultColor;\n }\n set color(value: string | null | undefined) {\n this._color = value;\n }\n private _color: string | null | undefined;\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({transform: booleanAttribute})\n inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input()\n get svgIcon(): string {\n return this._svgIcon;\n }\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 {\n return this._fontSet;\n }\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 {\n return this._fontIcon;\n }\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(...args: unknown[]);\n\n constructor() {\n const ariaHidden = inject(new HostAttributeToken('aria-hidden'), {optional: true});\n const defaults = inject<MatIconDefaultOptions>(MAT_ICON_DEFAULT_OPTIONS, {optional: true});\n\n if (defaults) {\n if (defaults.color) {\n this.color = this._defaultColor = defaults.color;\n }\n\n if (defaults.fontSet) {\n this.fontSet = defaults.fontSet;\n }\n }\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 this._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:\n return ['', parts[0]]; // Use default namespace.\n case 2:\n return <[string, string]>parts;\n default:\n 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 // 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 child.remove();\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClasses = (\n this.fontSet\n ? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/)\n : this._iconRegistry.getDefaultFontSetClass()\n ).filter(className => className.length > 0);\n\n this._previousFontSetClass.forEach(className => elem.classList.remove(className));\n fontSetClasses.forEach(className => elem.classList.add(className));\n this._previousFontSetClass = fontSetClasses;\n\n if (\n this.fontIcon !== this._previousFontIconClass &&\n !fontSetClasses.includes('mat-ligature-font')\n ) {\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\n .getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(\n svg => this._setSvgElement(svg),\n (err: Error) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n },\n );\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatIcon} from './icon';\n\n@NgModule({\n imports: [MatCommonModule, MatIcon],\n exports: [MatIcon, MatCommonModule],\n})\nexport class MatIconModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;AA4CA;MACa,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B;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AE,oCAAoC;AACvD,wBAAA,yBAAyB,EAAE,QAAQ;AACnC,wBAAA,2BAA2B,EAAE,+DAA+D;AAC7F,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,+3BAAA,CAAA,EAAA;wDAiB3C,KAAK,EAAA,CAAA;sBADR;gBAcD,MAAM,EAAA,CAAA;sBADL,KAAK;uBAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC;gBAKhC,OAAO,EAAA,CAAA;sBADV;gBAkBG,OAAO,EAAA,CAAA;sBADV;gBAgBG,QAAQ,EAAA,CAAA;sBADX;;;MCpMU,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHd,eAAe,EAAE,OAAO,CACxB,EAAA,OAAA,EAAA,CAAA,OAAO,EAAE,eAAe,CAAA,EAAA,CAAA;+GAEvB,aAAa,EAAA,OAAA,EAAA,CAHd,eAAe,EACN,eAAe,CAAA,EAAA,CAAA;;kGAEvB,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,OAAO,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;AACpC,iBAAA;;;;;"}
@@ -11,7 +11,7 @@ import { MAT_FORM_FIELD, MatFormFieldControl } from './form-field2.mjs';
11
11
  export { MatError, MatFormField, MatHint, MatLabel, MatPrefix, MatSuffix } from './form-field2.mjs';
12
12
  import { ErrorStateMatcher } from './error-options.mjs';
13
13
  import { _ErrorStateTracker } from './error-state.mjs';
14
- import { MatFormFieldModule } from './form-field-module.mjs';
14
+ import { MatFormFieldModule } from './form-field.mjs';
15
15
  import { MatCommonModule } from './common-module.mjs';
16
16
  import '@angular/cdk/bidi';
17
17
  import '@angular/common';