@angular/material 21.0.0-rc.2 → 21.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button-toggle/_m3-button-toggle.scss +1 -1
- package/fesm2022/_animation-chunk.mjs.map +1 -1
- package/fesm2022/_date-formats-chunk.mjs.map +1 -1
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_error-options-chunk.mjs.map +1 -1
- package/fesm2022/_error-state-chunk.mjs.map +1 -1
- package/fesm2022/_form-field-chunk.mjs.map +1 -1
- package/fesm2022/_icon-button-chunk.mjs.map +1 -1
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
- package/fesm2022/_input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
- package/fesm2022/_line-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_option-harness-chunk.mjs.map +1 -1
- package/fesm2022/_option-module-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
- package/fesm2022/_public-api-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/autocomplete-testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +3 -3
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge-testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-testing.mjs +4 -3
- package/fesm2022/button-testing.mjs.map +1 -1
- package/fesm2022/button-toggle-testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card-testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox-testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips-testing.mjs.map +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core-testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker-testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog-testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider-testing.mjs.map +1 -1
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion-testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field-testing-control.mjs.map +1 -1
- package/fesm2022/form-field-testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list-testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon-testing.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input-testing.mjs.map +1 -1
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list-testing.mjs.map +1 -1
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator-testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar-testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner-testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio-testing.mjs.map +1 -1
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select-testing.mjs.map +1 -1
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav-testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle-testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider-testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar-testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort-testing.mjs.map +1 -1
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper-testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table-testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker-testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip-testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/stepper/_m3-stepper.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-list.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list-base.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile-text.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/tile-styler.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list.html","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list-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 {InjectionToken} from '@angular/core';\n\n/**\n * Injection token used to provide a grid list to a tile and to avoid circular imports.\n * @docs-private\n */\nexport const MAT_GRID_LIST = new InjectionToken<MatGridListBase>('MAT_GRID_LIST');\n\n/**\n * Base interface for a `MatGridList`.\n * @docs-private\n */\nexport interface MatGridListBase {\n cols: number;\n gutterSize: string;\n rowHeight: number | string;\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 {\n Component,\n ViewEncapsulation,\n ElementRef,\n Input,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Directive,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatLine, setLines} from '../core';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n@Component({\n selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n // Ensures that the \"rowspan\" and \"colspan\" input value is reflected in\n // the DOM. This is needed for the grid-tile harness.\n '[attr.rowspan]': 'rowspan',\n '[attr.colspan]': 'colspan',\n },\n templateUrl: 'grid-tile.html',\n styleUrl: 'grid-list.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatGridTile {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n _gridList? = inject<MatGridListBase>(MAT_GRID_LIST, {optional: true});\n\n _rowspan: number = 1;\n _colspan: number = 1;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of rows that the grid tile takes up. */\n @Input()\n get rowspan(): number {\n return this._rowspan;\n }\n set rowspan(value: NumberInput) {\n this._rowspan = Math.round(coerceNumberProperty(value));\n }\n\n /** Amount of columns that the grid tile takes up. */\n @Input()\n get colspan(): number {\n return this._colspan;\n }\n set colspan(value: NumberInput) {\n this._colspan = Math.round(coerceNumberProperty(value));\n }\n\n /**\n * Sets the style of the grid-tile element. Needs to be set manually to avoid\n * \"Changed after checked\" errors that would occur with HostBinding.\n */\n _setStyle(property: string, value: any): void {\n (this._element.nativeElement.style as any)[property] = value;\n }\n}\n\n@Component({\n selector: 'mat-grid-tile-header, mat-grid-tile-footer',\n templateUrl: 'grid-tile-text.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridTileText implements AfterContentInit {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-grid-avatar], [matGridAvatar]',\n host: {'class': 'mat-grid-avatar'},\n})\nexport class MatGridAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-header',\n host: {'class': 'mat-grid-tile-header'},\n})\nexport class MatGridTileHeaderCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-footer',\n host: {'class': 'mat-grid-tile-footer'},\n})\nexport class MatGridTileFooterCssMatStyler {}\n","<div class=\"mat-grid-tile-content\">\n <ng-content></ng-content>\n</div>\n","<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content>\n<div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n<ng-content></ng-content>\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 {QueryList} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\n\n/**\n * RegExp that can be used to check whether a value will\n * be allowed inside a CSS `calc()` expression.\n */\nconst cssCalcAllowedValue = /^-?\\d+((\\.\\d+)?[A-Za-z%$]?)+$/;\n\n/** Object that can be styled by the `TileStyler`. */\nexport interface TileStyleTarget {\n _setListStyle(style: [string, string | null] | null): void;\n _tiles: QueryList<MatGridTile>;\n}\n\n/**\n * Sets the style properties for an individual tile, given the position calculated by the\n * Tile Coordinator.\n * @docs-private\n */\nexport abstract class TileStyler {\n _gutterSize: string;\n _rows: number = 0;\n _rowspan: number = 0;\n _cols: number;\n _direction: string;\n\n /**\n * Adds grid-list layout info once it is available. Cannot be processed in the constructor\n * because these properties haven't been calculated by that point.\n *\n * @param gutterSize Size of the grid's gutter.\n * @param tracker Instance of the TileCoordinator.\n * @param cols Amount of columns in the grid.\n * @param direction Layout direction of the grid.\n */\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string): void {\n this._gutterSize = normalizeUnits(gutterSize);\n this._rows = tracker.rowCount;\n this._rowspan = tracker.rowspan;\n this._cols = cols;\n this._direction = direction;\n }\n\n /**\n * Computes the amount of space a single 1x1 tile would take up (width or height).\n * Used as a basis for other calculations.\n * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.\n * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.\n * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().\n */\n getBaseTileSize(sizePercent: number, gutterFraction: number): string {\n // Take the base size percent (as would be if evenly dividing the size between cells),\n // and then subtracting the size of one gutter. However, since there are no gutters on the\n // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter\n // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the\n // edge evenly among the cells).\n return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;\n }\n\n /**\n * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n * @param offset Number of tiles that have already been rendered in the row/column.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @return Position of the tile as a CSS calc() expression.\n */\n getTilePosition(baseSize: string, offset: number): string {\n // The position comes the size of a 1x1 tile plus gutter for each previous tile in the\n // row/column (offset).\n return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);\n }\n\n /**\n * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @param span The tile's rowspan or colspan.\n * @return Size of the tile as a CSS calc() expression.\n */\n getTileSize(baseSize: string, span: number): string {\n return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;\n }\n\n /**\n * Sets the style properties to be applied to a tile for the given row and column index.\n * @param tile Tile to which to apply the styling.\n * @param rowIndex Index of the tile's row.\n * @param colIndex Index of the tile's column.\n */\n setStyle(tile: MatGridTile, rowIndex: number, colIndex: number): void {\n // Percent of the available horizontal space that one column takes up.\n let percentWidthPerTile = 100 / this._cols;\n\n // Fraction of the vertical gutter size that each column takes up.\n // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.\n let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;\n\n this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n }\n\n /** Sets the horizontal placement of the tile in the list. */\n setColStyles(tile: MatGridTile, colIndex: number, percentWidth: number, gutterWidth: number) {\n // Base horizontal size of a column.\n let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n let side = this._direction === 'rtl' ? 'right' : 'left';\n tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));\n tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));\n }\n\n /**\n * Calculates the total size taken up by gutters across one axis of a list.\n */\n getGutterSpan(): string {\n return `${this._gutterSize} * (${this._rowspan} - 1)`;\n }\n\n /**\n * Calculates the total size taken up by tiles across one axis of a list.\n * @param tileHeight Height of the tile.\n */\n getTileSpan(tileHeight: string): string {\n return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;\n }\n\n /**\n * Sets the vertical placement of the tile in the list.\n * This method will be implemented by each type of TileStyler.\n * @docs-private\n */\n abstract setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void;\n\n /**\n * Calculates the computed height and returns the correct style property to set.\n * This method can be implemented by each type of TileStyler.\n * @docs-private\n */\n getComputedHeight(): [string, string] | null {\n return null;\n }\n\n /**\n * Called when the tile styler is swapped out with a different one. To be used for cleanup.\n * @param list Grid list that the styler was attached to.\n * @docs-private\n */\n abstract reset(list: TileStyleTarget): void;\n}\n\n/**\n * This type of styler is instantiated when the user passes in a fixed row height.\n * Example `<mat-grid-list cols=\"3\" rowHeight=\"100px\">`\n * @docs-private\n */\nexport class FixedTileStyler extends TileStyler {\n constructor(public fixedRowHeight: string) {\n super();\n }\n\n override init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string) {\n super.init(gutterSize, tracker, cols, direction);\n this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);\n\n if (\n !cssCalcAllowedValue.test(this.fixedRowHeight) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error(`Invalid value \"${this.fixedRowHeight}\" set as rowHeight.`);\n }\n }\n\n override setRowStyles(tile: MatGridTile, rowIndex: number): void {\n tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return ['height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)];\n }\n\n override reset(list: TileStyleTarget) {\n list._setListStyle(['height', null]);\n\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/**\n * This type of styler is instantiated when the user passes in a width:height ratio\n * for the row height. Example `<mat-grid-list cols=\"3\" rowHeight=\"3:1\">`\n * @docs-private\n */\nexport class RatioTileStyler extends TileStyler {\n /** Ratio width:height given by user to determine row height. */\n rowHeightRatio: number;\n baseTileHeight: string;\n\n constructor(value: string) {\n super();\n this._parseRatio(value);\n }\n\n setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void {\n let percentHeightPerTile = percentWidth / this.rowHeightRatio;\n this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);\n\n // Use padding-top and margin-top to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied versus the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));\n tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return [\n 'paddingBottom',\n calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`),\n ];\n }\n\n reset(list: TileStyleTarget) {\n list._setListStyle(['paddingBottom', null]);\n\n list._tiles.forEach(tile => {\n tile._setStyle('marginTop', null);\n tile._setStyle('paddingTop', null);\n });\n }\n\n private _parseRatio(value: string): void {\n const ratioParts = value.split(':');\n\n if (ratioParts.length !== 2 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`mat-grid-list: invalid ratio given for row-height: \"${value}\"`);\n }\n\n this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);\n }\n}\n\n/**\n * This type of styler is instantiated when the user selects a \"fit\" row height mode.\n * In other words, the row height will reflect the total height of the container divided\n * by the number of rows. Example `<mat-grid-list cols=\"3\" rowHeight=\"fit\">`\n *\n * @docs-private\n */\nexport class FitTileStyler extends TileStyler {\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n // Percent of the available vertical space that one row takes up.\n let percentHeightPerTile = 100 / this._rowspan;\n\n // Fraction of the horizontal gutter size that each column takes up.\n let gutterHeightPerTile = (this._rows - 1) / this._rows;\n\n // Base vertical size of a column.\n let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);\n\n tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));\n }\n\n reset(list: TileStyleTarget) {\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/** Wraps a CSS string in a calc function */\nfunction calc(exp: string): string {\n return `calc(${exp})`;\n}\n\n/** Appends pixels to a CSS string if no units are given. */\nfunction normalizeUnits(value: string): string {\n return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;\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 {\n Component,\n ViewEncapsulation,\n AfterContentChecked,\n OnInit,\n Input,\n ContentChildren,\n QueryList,\n ElementRef,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\nimport {\n TileStyler,\n FitTileStyler,\n RatioTileStyler,\n FixedTileStyler,\n TileStyleTarget,\n} from './tile-styler';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n// TODO(kara): Conditional (responsive) column count / row size.\n// TODO(kara): Re-layout on window resize / media change (debounced).\n// TODO(kara): gridTileHeader and gridTileFooter.\n\nconst MAT_FIT_MODE = 'fit';\n\n@Component({\n selector: 'mat-grid-list',\n exportAs: 'matGridList',\n templateUrl: 'grid-list.html',\n styleUrl: 'grid-list.css',\n host: {\n 'class': 'mat-grid-list',\n // Ensures that the \"cols\" input value is reflected in the DOM. This is\n // needed for the grid-list harness.\n '[attr.cols]': 'cols',\n },\n providers: [\n {\n provide: MAT_GRID_LIST,\n useExisting: MatGridList,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridList implements MatGridListBase, OnInit, AfterContentChecked, TileStyleTarget {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n private _dir = inject(Directionality, {optional: true});\n\n /** Number of columns being rendered. */\n private _cols: number;\n\n /** Used for determining the position of each tile in the grid. */\n private _tileCoordinator: TileCoordinator;\n\n /**\n * Row height value passed in by user. This can be one of three types:\n * - Number value (ex: \"100px\"): sets a fixed row height to that value\n * - Ratio value (ex: \"4:3\"): sets the row height based on width:height ratio\n * - \"Fit\" mode (ex: \"fit\"): sets the row height to total height divided by number of rows\n */\n private _rowHeight: string;\n\n /** The amount of space between tiles. This will be something like '5px' or '2em'. */\n private _gutter: string = '1px';\n\n /** Sets position and size styles for a tile */\n private _tileStyler: TileStyler;\n\n /** Query list of tiles that are being rendered. */\n @ContentChildren(MatGridTile, {descendants: true}) _tiles: QueryList<MatGridTile>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of columns in the grid list. */\n @Input()\n get cols(): number {\n return this._cols;\n }\n set cols(value: NumberInput) {\n this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n /** Size of the grid list's gutter in pixels. */\n @Input()\n get gutterSize(): string {\n return this._gutter;\n }\n set gutterSize(value: string) {\n this._gutter = `${value == null ? '' : value}`;\n }\n\n /** Set internal representation of row height from the user-provided value. */\n @Input()\n get rowHeight(): string | number {\n return this._rowHeight;\n }\n set rowHeight(value: string | number) {\n const newValue = `${value == null ? '' : value}`;\n\n if (newValue !== this._rowHeight) {\n this._rowHeight = newValue;\n this._setTileStyler(this._rowHeight);\n }\n }\n\n ngOnInit() {\n this._checkCols();\n this._checkRowHeight();\n }\n\n /**\n * The layout calculation is fairly cheap if nothing changes, so there's little cost\n * to run it frequently.\n */\n ngAfterContentChecked() {\n this._layoutTiles();\n }\n\n /** Throw a friendly error if cols property is missing */\n private _checkCols() {\n if (!this.cols && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(\n `mat-grid-list: must pass in number of columns. ` + `Example: <mat-grid-list cols=\"3\">`,\n );\n }\n }\n\n /** Default to equal width:height if rowHeight property is missing */\n private _checkRowHeight(): void {\n if (!this._rowHeight) {\n this._setTileStyler('1:1');\n }\n }\n\n /** Creates correct Tile Styler subtype based on rowHeight passed in by user */\n private _setTileStyler(rowHeight: string): void {\n if (this._tileStyler) {\n this._tileStyler.reset(this);\n }\n\n if (rowHeight === MAT_FIT_MODE) {\n this._tileStyler = new FitTileStyler();\n } else if (rowHeight && rowHeight.indexOf(':') > -1) {\n this._tileStyler = new RatioTileStyler(rowHeight);\n } else {\n this._tileStyler = new FixedTileStyler(rowHeight);\n }\n }\n\n /** Computes and applies the size and position for all children grid tiles. */\n private _layoutTiles(): void {\n if (!this._tileCoordinator) {\n this._tileCoordinator = new TileCoordinator();\n }\n\n const tracker = this._tileCoordinator;\n const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);\n const direction = this._dir ? this._dir.value : 'ltr';\n\n this._tileCoordinator.update(this.cols, tiles);\n this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);\n\n tiles.forEach((tile, index) => {\n const pos = tracker.positions[index];\n this._tileStyler.setStyle(tile, pos.row, pos.col);\n });\n\n this._setListStyle(this._tileStyler.getComputedHeight());\n }\n\n /** Sets style on the main grid-list element, given the style name and value. */\n _setListStyle(style: [string, string | null] | null): void {\n if (style) {\n (this._element.nativeElement.style as any)[style[0]] = style[1];\n }\n }\n}\n","<div>\n <ng-content></ng-content>\n</div>","/**\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 {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatLineModule} from '../core';\nimport {MatGridList} from './grid-list';\nimport {\n MatGridAvatarCssMatStyler,\n MatGridTile,\n MatGridTileFooterCssMatStyler,\n MatGridTileHeaderCssMatStyler,\n MatGridTileText,\n} from './grid-tile';\n\n// Export required to fix compiler confusion about import module paths\nexport {MatLine} from '../core';\n\n@NgModule({\n imports: [\n MatLineModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n exports: [\n BidiModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatLineModule,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n})\nexport class MatGridListModule {}\n"],"names":["MAT_GRID_LIST","InjectionToken","MatGridTile","_element","inject","ElementRef","_gridList","optional","_rowspan","_colspan","constructor","rowspan","value","Math","round","coerceNumberProperty","colspan","_setStyle","property","nativeElement","style","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","exportAs","host","template","Input","MatGridTileText","_lines","ngAfterContentInit","setLines","isStandalone","selector","queries","propertyName","predicate","MatLine","descendants","ngImport","args","ContentChildren","MatGridAvatarCssMatStyler","Directive","classAttribute","MatGridTileHeaderCssMatStyler","MatGridTileFooterCssMatStyler","cssCalcAllowedValue","TileStyler","_gutterSize","_rows","_cols","_direction","init","gutterSize","tracker","cols","direction","normalizeUnits","rowCount","getBaseTileSize","sizePercent","gutterFraction","getTilePosition","baseSize","offset","calc","getTileSize","span","setStyle","tile","rowIndex","colIndex","percentWidthPerTile","gutterWidthFractionPerTile","setColStyles","setRowStyles","percentWidth","gutterWidth","baseTileWidth","side","getGutterSpan","getTileSpan","tileHeight","getComputedHeight","FixedTileStyler","fixedRowHeight","test","ngDevMode","Error","reset","list","_setListStyle","_tiles","forEach","RatioTileStyler","rowHeightRatio","baseTileHeight","_parseRatio","percentHeightPerTile","ratioParts","split","length","parseFloat","FitTileStyler","gutterHeightPerTile","exp","match","MAT_FIT_MODE","MatGridList","_dir","Directionality","_tileCoordinator","_rowHeight","_gutter","_tileStyler","max","rowHeight","newValue","_setTileStyler","ngOnInit","_checkCols","_checkRowHeight","ngAfterContentChecked","_layoutTiles","indexOf","TileCoordinator","tiles","filter","update","index","pos","positions","row","col","inputs","properties","providers","provide","useExisting","MatGridListModule","NgModule","ɵmod","ɵɵngDeclareNgModule","MatLineModule","BidiModule","imports","exports"],"mappings":";;;;;;;;;AAcO,MAAMA,aAAa,GAAG,IAAIC,cAAc,CAAkB,eAAe,CAAC;;MCyBpEC,WAAW,CAAA;AACdC,EAAAA,QAAQ,GAAGC,MAAM,CAA0BC,UAAU,CAAC;AAC9DC,EAAAA,SAAS,GAAIF,MAAM,CAAkBJ,aAAa,EAAE;AAACO,IAAAA,QAAQ,EAAE;AAAK,GAAA,CAAC;AAErEC,EAAAA,QAAQ,GAAW,CAAC;AACpBC,EAAAA,QAAQ,GAAW,CAAC;EAGpBC,WAAAA,GAAA;EAGA,IACIC,OAAOA,GAAA;IACT,OAAO,IAAI,CAACH,QAAQ;AACtB;EACA,IAAIG,OAAOA,CAACC,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}
|
|
1
|
+
{"version":3,"file":"grid-list.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list-base.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-tile-text.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/tile-styler.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list.html","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/grid-list/grid-list-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 {InjectionToken} from '@angular/core';\n\n/**\n * Injection token used to provide a grid list to a tile and to avoid circular imports.\n * @docs-private\n */\nexport const MAT_GRID_LIST = new InjectionToken<MatGridListBase>('MAT_GRID_LIST');\n\n/**\n * Base interface for a `MatGridList`.\n * @docs-private\n */\nexport interface MatGridListBase {\n cols: number;\n gutterSize: string;\n rowHeight: number | string;\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 {\n Component,\n ViewEncapsulation,\n ElementRef,\n Input,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Directive,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatLine, setLines} from '../core';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n@Component({\n selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n // Ensures that the \"rowspan\" and \"colspan\" input value is reflected in\n // the DOM. This is needed for the grid-tile harness.\n '[attr.rowspan]': 'rowspan',\n '[attr.colspan]': 'colspan',\n },\n templateUrl: 'grid-tile.html',\n styleUrl: 'grid-list.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatGridTile {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n _gridList? = inject<MatGridListBase>(MAT_GRID_LIST, {optional: true});\n\n _rowspan: number = 1;\n _colspan: number = 1;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of rows that the grid tile takes up. */\n @Input()\n get rowspan(): number {\n return this._rowspan;\n }\n set rowspan(value: NumberInput) {\n this._rowspan = Math.round(coerceNumberProperty(value));\n }\n\n /** Amount of columns that the grid tile takes up. */\n @Input()\n get colspan(): number {\n return this._colspan;\n }\n set colspan(value: NumberInput) {\n this._colspan = Math.round(coerceNumberProperty(value));\n }\n\n /**\n * Sets the style of the grid-tile element. Needs to be set manually to avoid\n * \"Changed after checked\" errors that would occur with HostBinding.\n */\n _setStyle(property: string, value: any): void {\n (this._element.nativeElement.style as any)[property] = value;\n }\n}\n\n@Component({\n selector: 'mat-grid-tile-header, mat-grid-tile-footer',\n templateUrl: 'grid-tile-text.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridTileText implements AfterContentInit {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-grid-avatar], [matGridAvatar]',\n host: {'class': 'mat-grid-avatar'},\n})\nexport class MatGridAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-header',\n host: {'class': 'mat-grid-tile-header'},\n})\nexport class MatGridTileHeaderCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-footer',\n host: {'class': 'mat-grid-tile-footer'},\n})\nexport class MatGridTileFooterCssMatStyler {}\n","<div class=\"mat-grid-tile-content\">\n <ng-content></ng-content>\n</div>\n","<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content>\n<div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n<ng-content></ng-content>\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 {QueryList} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\n\n/**\n * RegExp that can be used to check whether a value will\n * be allowed inside a CSS `calc()` expression.\n */\nconst cssCalcAllowedValue = /^-?\\d+((\\.\\d+)?[A-Za-z%$]?)+$/;\n\n/** Object that can be styled by the `TileStyler`. */\nexport interface TileStyleTarget {\n _setListStyle(style: [string, string | null] | null): void;\n _tiles: QueryList<MatGridTile>;\n}\n\n/**\n * Sets the style properties for an individual tile, given the position calculated by the\n * Tile Coordinator.\n * @docs-private\n */\nexport abstract class TileStyler {\n _gutterSize: string;\n _rows: number = 0;\n _rowspan: number = 0;\n _cols: number;\n _direction: string;\n\n /**\n * Adds grid-list layout info once it is available. Cannot be processed in the constructor\n * because these properties haven't been calculated by that point.\n *\n * @param gutterSize Size of the grid's gutter.\n * @param tracker Instance of the TileCoordinator.\n * @param cols Amount of columns in the grid.\n * @param direction Layout direction of the grid.\n */\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string): void {\n this._gutterSize = normalizeUnits(gutterSize);\n this._rows = tracker.rowCount;\n this._rowspan = tracker.rowspan;\n this._cols = cols;\n this._direction = direction;\n }\n\n /**\n * Computes the amount of space a single 1x1 tile would take up (width or height).\n * Used as a basis for other calculations.\n * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.\n * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.\n * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().\n */\n getBaseTileSize(sizePercent: number, gutterFraction: number): string {\n // Take the base size percent (as would be if evenly dividing the size between cells),\n // and then subtracting the size of one gutter. However, since there are no gutters on the\n // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter\n // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the\n // edge evenly among the cells).\n return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;\n }\n\n /**\n * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n * @param offset Number of tiles that have already been rendered in the row/column.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @return Position of the tile as a CSS calc() expression.\n */\n getTilePosition(baseSize: string, offset: number): string {\n // The position comes the size of a 1x1 tile plus gutter for each previous tile in the\n // row/column (offset).\n return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);\n }\n\n /**\n * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @param span The tile's rowspan or colspan.\n * @return Size of the tile as a CSS calc() expression.\n */\n getTileSize(baseSize: string, span: number): string {\n return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;\n }\n\n /**\n * Sets the style properties to be applied to a tile for the given row and column index.\n * @param tile Tile to which to apply the styling.\n * @param rowIndex Index of the tile's row.\n * @param colIndex Index of the tile's column.\n */\n setStyle(tile: MatGridTile, rowIndex: number, colIndex: number): void {\n // Percent of the available horizontal space that one column takes up.\n let percentWidthPerTile = 100 / this._cols;\n\n // Fraction of the vertical gutter size that each column takes up.\n // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.\n let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;\n\n this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n }\n\n /** Sets the horizontal placement of the tile in the list. */\n setColStyles(tile: MatGridTile, colIndex: number, percentWidth: number, gutterWidth: number) {\n // Base horizontal size of a column.\n let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n let side = this._direction === 'rtl' ? 'right' : 'left';\n tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));\n tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));\n }\n\n /**\n * Calculates the total size taken up by gutters across one axis of a list.\n */\n getGutterSpan(): string {\n return `${this._gutterSize} * (${this._rowspan} - 1)`;\n }\n\n /**\n * Calculates the total size taken up by tiles across one axis of a list.\n * @param tileHeight Height of the tile.\n */\n getTileSpan(tileHeight: string): string {\n return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;\n }\n\n /**\n * Sets the vertical placement of the tile in the list.\n * This method will be implemented by each type of TileStyler.\n * @docs-private\n */\n abstract setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void;\n\n /**\n * Calculates the computed height and returns the correct style property to set.\n * This method can be implemented by each type of TileStyler.\n * @docs-private\n */\n getComputedHeight(): [string, string] | null {\n return null;\n }\n\n /**\n * Called when the tile styler is swapped out with a different one. To be used for cleanup.\n * @param list Grid list that the styler was attached to.\n * @docs-private\n */\n abstract reset(list: TileStyleTarget): void;\n}\n\n/**\n * This type of styler is instantiated when the user passes in a fixed row height.\n * Example `<mat-grid-list cols=\"3\" rowHeight=\"100px\">`\n * @docs-private\n */\nexport class FixedTileStyler extends TileStyler {\n constructor(public fixedRowHeight: string) {\n super();\n }\n\n override init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string) {\n super.init(gutterSize, tracker, cols, direction);\n this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);\n\n if (\n !cssCalcAllowedValue.test(this.fixedRowHeight) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error(`Invalid value \"${this.fixedRowHeight}\" set as rowHeight.`);\n }\n }\n\n override setRowStyles(tile: MatGridTile, rowIndex: number): void {\n tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return ['height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)];\n }\n\n override reset(list: TileStyleTarget) {\n list._setListStyle(['height', null]);\n\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/**\n * This type of styler is instantiated when the user passes in a width:height ratio\n * for the row height. Example `<mat-grid-list cols=\"3\" rowHeight=\"3:1\">`\n * @docs-private\n */\nexport class RatioTileStyler extends TileStyler {\n /** Ratio width:height given by user to determine row height. */\n rowHeightRatio: number;\n baseTileHeight: string;\n\n constructor(value: string) {\n super();\n this._parseRatio(value);\n }\n\n setRowStyles(\n tile: MatGridTile,\n rowIndex: number,\n percentWidth: number,\n gutterWidth: number,\n ): void {\n let percentHeightPerTile = percentWidth / this.rowHeightRatio;\n this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);\n\n // Use padding-top and margin-top to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied versus the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));\n tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));\n }\n\n override getComputedHeight(): [string, string] {\n return [\n 'paddingBottom',\n calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`),\n ];\n }\n\n reset(list: TileStyleTarget) {\n list._setListStyle(['paddingBottom', null]);\n\n list._tiles.forEach(tile => {\n tile._setStyle('marginTop', null);\n tile._setStyle('paddingTop', null);\n });\n }\n\n private _parseRatio(value: string): void {\n const ratioParts = value.split(':');\n\n if (ratioParts.length !== 2 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`mat-grid-list: invalid ratio given for row-height: \"${value}\"`);\n }\n\n this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);\n }\n}\n\n/**\n * This type of styler is instantiated when the user selects a \"fit\" row height mode.\n * In other words, the row height will reflect the total height of the container divided\n * by the number of rows. Example `<mat-grid-list cols=\"3\" rowHeight=\"fit\">`\n *\n * @docs-private\n */\nexport class FitTileStyler extends TileStyler {\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n // Percent of the available vertical space that one row takes up.\n let percentHeightPerTile = 100 / this._rowspan;\n\n // Fraction of the horizontal gutter size that each column takes up.\n let gutterHeightPerTile = (this._rows - 1) / this._rows;\n\n // Base vertical size of a column.\n let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);\n\n tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));\n }\n\n reset(list: TileStyleTarget) {\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n/** Wraps a CSS string in a calc function */\nfunction calc(exp: string): string {\n return `calc(${exp})`;\n}\n\n/** Appends pixels to a CSS string if no units are given. */\nfunction normalizeUnits(value: string): string {\n return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;\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 {\n Component,\n ViewEncapsulation,\n AfterContentChecked,\n OnInit,\n Input,\n ContentChildren,\n QueryList,\n ElementRef,\n ChangeDetectionStrategy,\n inject,\n} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\nimport {\n TileStyler,\n FitTileStyler,\n RatioTileStyler,\n FixedTileStyler,\n TileStyleTarget,\n} from './tile-styler';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n// TODO(kara): Conditional (responsive) column count / row size.\n// TODO(kara): Re-layout on window resize / media change (debounced).\n// TODO(kara): gridTileHeader and gridTileFooter.\n\nconst MAT_FIT_MODE = 'fit';\n\n@Component({\n selector: 'mat-grid-list',\n exportAs: 'matGridList',\n templateUrl: 'grid-list.html',\n styleUrl: 'grid-list.css',\n host: {\n 'class': 'mat-grid-list',\n // Ensures that the \"cols\" input value is reflected in the DOM. This is\n // needed for the grid-list harness.\n '[attr.cols]': 'cols',\n },\n providers: [\n {\n provide: MAT_GRID_LIST,\n useExisting: MatGridList,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridList implements MatGridListBase, OnInit, AfterContentChecked, TileStyleTarget {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n private _dir = inject(Directionality, {optional: true});\n\n /** Number of columns being rendered. */\n private _cols: number;\n\n /** Used for determining the position of each tile in the grid. */\n private _tileCoordinator: TileCoordinator;\n\n /**\n * Row height value passed in by user. This can be one of three types:\n * - Number value (ex: \"100px\"): sets a fixed row height to that value\n * - Ratio value (ex: \"4:3\"): sets the row height based on width:height ratio\n * - \"Fit\" mode (ex: \"fit\"): sets the row height to total height divided by number of rows\n */\n private _rowHeight: string;\n\n /** The amount of space between tiles. This will be something like '5px' or '2em'. */\n private _gutter: string = '1px';\n\n /** Sets position and size styles for a tile */\n private _tileStyler: TileStyler;\n\n /** Query list of tiles that are being rendered. */\n @ContentChildren(MatGridTile, {descendants: true}) _tiles: QueryList<MatGridTile>;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /** Amount of columns in the grid list. */\n @Input()\n get cols(): number {\n return this._cols;\n }\n set cols(value: NumberInput) {\n this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n /** Size of the grid list's gutter in pixels. */\n @Input()\n get gutterSize(): string {\n return this._gutter;\n }\n set gutterSize(value: string) {\n this._gutter = `${value == null ? '' : value}`;\n }\n\n /** Set internal representation of row height from the user-provided value. */\n @Input()\n get rowHeight(): string | number {\n return this._rowHeight;\n }\n set rowHeight(value: string | number) {\n const newValue = `${value == null ? '' : value}`;\n\n if (newValue !== this._rowHeight) {\n this._rowHeight = newValue;\n this._setTileStyler(this._rowHeight);\n }\n }\n\n ngOnInit() {\n this._checkCols();\n this._checkRowHeight();\n }\n\n /**\n * The layout calculation is fairly cheap if nothing changes, so there's little cost\n * to run it frequently.\n */\n ngAfterContentChecked() {\n this._layoutTiles();\n }\n\n /** Throw a friendly error if cols property is missing */\n private _checkCols() {\n if (!this.cols && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(\n `mat-grid-list: must pass in number of columns. ` + `Example: <mat-grid-list cols=\"3\">`,\n );\n }\n }\n\n /** Default to equal width:height if rowHeight property is missing */\n private _checkRowHeight(): void {\n if (!this._rowHeight) {\n this._setTileStyler('1:1');\n }\n }\n\n /** Creates correct Tile Styler subtype based on rowHeight passed in by user */\n private _setTileStyler(rowHeight: string): void {\n if (this._tileStyler) {\n this._tileStyler.reset(this);\n }\n\n if (rowHeight === MAT_FIT_MODE) {\n this._tileStyler = new FitTileStyler();\n } else if (rowHeight && rowHeight.indexOf(':') > -1) {\n this._tileStyler = new RatioTileStyler(rowHeight);\n } else {\n this._tileStyler = new FixedTileStyler(rowHeight);\n }\n }\n\n /** Computes and applies the size and position for all children grid tiles. */\n private _layoutTiles(): void {\n if (!this._tileCoordinator) {\n this._tileCoordinator = new TileCoordinator();\n }\n\n const tracker = this._tileCoordinator;\n const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);\n const direction = this._dir ? this._dir.value : 'ltr';\n\n this._tileCoordinator.update(this.cols, tiles);\n this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);\n\n tiles.forEach((tile, index) => {\n const pos = tracker.positions[index];\n this._tileStyler.setStyle(tile, pos.row, pos.col);\n });\n\n this._setListStyle(this._tileStyler.getComputedHeight());\n }\n\n /** Sets style on the main grid-list element, given the style name and value. */\n _setListStyle(style: [string, string | null] | null): void {\n if (style) {\n (this._element.nativeElement.style as any)[style[0]] = style[1];\n }\n }\n}\n","<div>\n <ng-content></ng-content>\n</div>","/**\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 {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatLineModule} from '../core';\nimport {MatGridList} from './grid-list';\nimport {\n MatGridAvatarCssMatStyler,\n MatGridTile,\n MatGridTileFooterCssMatStyler,\n MatGridTileHeaderCssMatStyler,\n MatGridTileText,\n} from './grid-tile';\n\n// Export required to fix compiler confusion about import module paths\nexport {MatLine} from '../core';\n\n@NgModule({\n imports: [\n MatLineModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n exports: [\n BidiModule,\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatLineModule,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler,\n ],\n})\nexport class MatGridListModule {}\n"],"names":["MAT_GRID_LIST","InjectionToken","MatGridTile","_element","inject","ElementRef","_gridList","optional","_rowspan","_colspan","constructor","rowspan","value","Math","round","coerceNumberProperty","colspan","_setStyle","property","nativeElement","style","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","exportAs","host","template","Input","MatGridTileText","_lines","ngAfterContentInit","setLines","isStandalone","selector","queries","propertyName","predicate","MatLine","descendants","ngImport","args","ContentChildren","MatGridAvatarCssMatStyler","Directive","classAttribute","MatGridTileHeaderCssMatStyler","MatGridTileFooterCssMatStyler","cssCalcAllowedValue","TileStyler","_gutterSize","_rows","_cols","_direction","init","gutterSize","tracker","cols","direction","normalizeUnits","rowCount","getBaseTileSize","sizePercent","gutterFraction","getTilePosition","baseSize","offset","calc","getTileSize","span","setStyle","tile","rowIndex","colIndex","percentWidthPerTile","gutterWidthFractionPerTile","setColStyles","setRowStyles","percentWidth","gutterWidth","baseTileWidth","side","getGutterSpan","getTileSpan","tileHeight","getComputedHeight","FixedTileStyler","fixedRowHeight","test","ngDevMode","Error","reset","list","_setListStyle","_tiles","forEach","RatioTileStyler","rowHeightRatio","baseTileHeight","_parseRatio","percentHeightPerTile","ratioParts","split","length","parseFloat","FitTileStyler","gutterHeightPerTile","exp","match","MAT_FIT_MODE","MatGridList","_dir","Directionality","_tileCoordinator","_rowHeight","_gutter","_tileStyler","max","rowHeight","newValue","_setTileStyler","ngOnInit","_checkCols","_checkRowHeight","ngAfterContentChecked","_layoutTiles","indexOf","TileCoordinator","tiles","filter","update","index","pos","positions","row","col","inputs","properties","providers","provide","useExisting","MatGridListModule","NgModule","ɵmod","ɵɵngDeclareNgModule","MatLineModule","BidiModule","imports","exports"],"mappings":";;;;;;;;;AAcO,MAAMA,aAAa,GAAG,IAAIC,cAAc,CAAkB,eAAe,CAAC;;MCyBpEC,WAAW,CAAA;AACdC,EAAAA,QAAQ,GAAGC,MAAM,CAA0BC,UAAU,CAAC;AAC9DC,EAAAA,SAAS,GAAIF,MAAM,CAAkBJ,aAAa,EAAE;AAACO,IA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fiB,6BAA6B,EAC7BC,6BAA6B,EAC7BJ,yBAAyB,CAC1B;AACDyG,MAAAA,OAAO,EAAE,CACPF,UAAU,EACVpC,WAAW,EACX1H,WAAW,EACXyC,eAAe,EACfoH,aAAa,EACbnG,6BAA6B,EAC7BC,6BAA6B,EAC7BJ,yBAAyB;KAE5B;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/icon-harness-filters.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/icon-harness.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/fake-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\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** Possible types of icons. */\nexport enum IconType {\n SVG,\n FONT,\n}\n\n/** A set of criteria that can be used to filter a list of `MatIconHarness` instances. */\nexport interface IconHarnessFilters extends BaseHarnessFilters {\n /** Filters based on the typef of the icon. */\n type?: IconType;\n /** Filters based on the name of the icon. */\n name?: string | RegExp;\n /** Filters based on the namespace of the icon. */\n namespace?: string | null | RegExp;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {IconHarnessFilters, IconType} from './icon-harness-filters';\n\n/** Harness for interacting with a standard mat-icon in tests. */\nexport class MatIconHarness extends ComponentHarness {\n /** The selector for the host element of a `MatIcon` instance. */\n static hostSelector = '.mat-icon';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatIconHarness` that meets\n * certain criteria.\n * @param options Options for filtering which icon instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: IconHarnessFilters = {}): HarnessPredicate<MatIconHarness> {\n return new HarnessPredicate(MatIconHarness, options)\n .addOption('type', options.type, async (harness, type) => (await harness.getType()) === type)\n .addOption('name', options.name, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getName(), text),\n )\n .addOption('namespace', options.namespace, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getNamespace(), text),\n );\n }\n\n /** Gets the type of the icon. */\n async getType(): Promise<IconType> {\n const type = await (await this.host()).getAttribute('data-mat-icon-type');\n return type === 'svg' ? IconType.SVG : IconType.FONT;\n }\n\n /** Gets the name of the icon. */\n async getName(): Promise<string | null> {\n const host = await this.host();\n const nameFromDom = await host.getAttribute('data-mat-icon-name');\n\n // If we managed to figure out the name from the attribute, use it.\n if (nameFromDom) {\n return nameFromDom;\n }\n\n // Some icons support defining the icon as a ligature.\n // As a fallback, try to extract it from the DOM text.\n if ((await this.getType()) === IconType.FONT) {\n // Other directives may add content to the icon (e.g. `MatBadge`), however only the direct\n // text nodes affect the name of the icon. Exclude all element descendants from the result.\n const text = await host.text({exclude: '*'});\n\n // There are some internal cases where the icon name is wrapped in another node.\n // Fall back to extracting the entire text if we ended up excluding everything above.\n return text.length > 0 ? text : host.text();\n }\n\n return null;\n }\n\n /** Gets the namespace of the icon. */\n async getNamespace(): Promise<string | null> {\n return (await this.host()).getAttribute('data-mat-icon-namespace');\n }\n\n /** Gets whether the icon is inline. */\n async isInline(): Promise<boolean> {\n return (await this.host()).hasClass('mat-icon-inline');\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 {Injectable, NgModule, OnDestroy} from '@angular/core';\nimport {MatIconRegistry} from '../../icon';\nimport {Observable, of as observableOf} from 'rxjs';\n\ntype PublicApi<T> = {\n [K in keyof T]: T[K] extends (...x: any[]) => T ? (...x: any[]) => PublicApi<T> : T[K];\n};\n\n/**\n * A null icon registry that must be imported to allow disabling of custom\n * icons.\n */\n@Injectable()\nexport class FakeMatIconRegistry implements PublicApi<MatIconRegistry>, OnDestroy {\n addSvgIcon(): this {\n return this;\n }\n\n addSvgIconLiteral(): this {\n return this;\n }\n\n addSvgIconInNamespace(): this {\n return this;\n }\n\n addSvgIconLiteralInNamespace(): this {\n return this;\n }\n\n addSvgIconSet(): this {\n return this;\n }\n\n addSvgIconSetLiteral(): this {\n return this;\n }\n\n addSvgIconSetInNamespace(): this {\n return this;\n }\n\n addSvgIconSetLiteralInNamespace(): this {\n return this;\n }\n\n registerFontClassAlias(): this {\n return this;\n }\n\n classNameForFontAlias(alias: string): string {\n return alias;\n }\n\n getDefaultFontSetClass() {\n return ['material-icons'];\n }\n\n getSvgIconFromUrl(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n getNamedSvgIcon(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n setDefaultFontSetClass(): this {\n return this;\n }\n\n addSvgIconResolver(): this {\n return this;\n }\n\n ngOnDestroy() {}\n\n private _generateEmptySvg(): SVGElement {\n const emptySvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n emptySvg.classList.add('fake-testing-svg');\n // Emulate real icon characteristics from `MatIconRegistry` so size remains consistent in tests.\n emptySvg.setAttribute('fit', '');\n emptySvg.setAttribute('height', '100%');\n emptySvg.setAttribute('width', '100%');\n emptySvg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n emptySvg.setAttribute('focusable', 'false');\n return emptySvg;\n }\n}\n\n/** Import this module in tests to install the null icon registry. */\n@NgModule({\n providers: [{provide: MatIconRegistry, useClass: FakeMatIconRegistry}],\n})\nexport class MatIconTestingModule {}\n"],"names":["IconType","MatIconHarness","ComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","type","harness","getType","name","text","stringMatches","getName","namespace","getNamespace","host","getAttribute","SVG","FONT","nameFromDom","exclude","length","isInline","hasClass","FakeMatIconRegistry","addSvgIcon","addSvgIconLiteral","addSvgIconInNamespace","addSvgIconLiteralInNamespace","addSvgIconSet","addSvgIconSetLiteral","addSvgIconSetInNamespace","addSvgIconSetLiteralInNamespace","registerFontClassAlias","classNameForFontAlias","alias","getDefaultFontSetClass","getSvgIconFromUrl","observableOf","_generateEmptySvg","getNamedSvgIcon","setDefaultFontSetClass","addSvgIconResolver","ngOnDestroy","emptySvg","document","createElementNS","classList","add","setAttribute","deps","target","i0","ɵɵFactoryTarget","Injectable","decorators","MatIconTestingModule","NgModule","providers","provide","MatIconRegistry","useClass","args"],"mappings":";;;;;;;;;IAWYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;EAClBA,QAAA,CAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAG;EACHA,QAAA,CAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAHWA,QAAQ,KAARA,QAAQ,GAGnB,EAAA,CAAA,CAAA;;ACFK,MAAOC,cAAe,SAAQC,gBAAgB,CAAA;EAElD,OAAOC,YAAY,GAAG,WAAW;AAQjC,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAA8B,EAAE,EAAA;AAC1C,IAAA,OAAO,IAAIC,gBAAgB,CAACL,cAAc,EAAEI,OAAO,CAAA,CAChDE,SAAS,CAAC,MAAM,EAAEF,OAAO,CAACG,IAAI,EAAE,OAAOC,OAAO,EAAED,IAAI,KAAK,CAAC,MAAMC,OAAO,CAACC,OAAO,EAAE,MAAMF,IAAI,CAAA,CAC3FD,SAAS,CAAC,MAAM,EAAEF,OAAO,CAACM,IAAI,EAAE,CAACF,OAAO,EAAEG,IAAI,KAC7CN,gBAAgB,CAACO,aAAa,CAACJ,OAAO,CAACK,OAAO,EAAE,EAAEF,IAAI,CAAC,CAAA,CAExDL,SAAS,CAAC,WAAW,EAAEF,OAAO,CAACU,SAAS,EAAE,CAACN,OAAO,EAAEG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AAO,EAAE,MAAM,CAAC;AACtCL,IAAAA,QAAQ,CAACK,YAAY,CAAC,qBAAqB,EAAE,eAAe,CAAC;AAC7DL,IAAAA,QAAQ,CAACK,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC;AAC3C,IAAA,OAAOL,QAAQ;AACjB;;;;;UAzEWpB,mBAAmB;AAAA0B,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;;;;;UAAnB9B;AAAmB,GAAA,CAAA;;;;;;QAAnBA,mBAAmB;AAAA+B,EAAAA,UAAA,EAAA,CAAA;UAD/BD;;;MAiFYE,oBAAoB,CAAA;;;;;UAApBA,oBAAoB;AAAAN,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAI;AAAA,GAAA,CAAA;;;;;UAApBD;AAAoB,GAAA,CAAA;;;;;UAApBA,oBAAoB;AAAAE,IAAAA,SAAA,EAFpB,CAAC;AAACC,MAAAA,OAAO,EAAEC,eAAe;AAAEC,MAAAA,QAAQ,EAAErC;KAAoB;AAAC,GAAA,CAAA;;;;;;QAE3DgC,oBAAoB;AAAAD,EAAAA,UAAA,EAAA,CAAA;UAHhCE,QAAQ;AAACK,IAAAA,IAAA,EAAA,CAAA;AACRJ,MAAAA,SAAS,EAAE,CAAC;AAACC,QAAAA,OAAO,EAAEC,eAAe;AAAEC,QAAAA,QAAQ,EAAErC;OAAoB;KACtE;;;;;;"}
|
|
1
|
+
{"version":3,"file":"icon-testing.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/icon-harness-filters.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/icon-harness.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/testing/fake-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\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** Possible types of icons. */\nexport enum IconType {\n SVG,\n FONT,\n}\n\n/** A set of criteria that can be used to filter a list of `MatIconHarness` instances. */\nexport interface IconHarnessFilters extends BaseHarnessFilters {\n /** Filters based on the typef of the icon. */\n type?: IconType;\n /** Filters based on the name of the icon. */\n name?: string | RegExp;\n /** Filters based on the namespace of the icon. */\n namespace?: string | null | RegExp;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {IconHarnessFilters, IconType} from './icon-harness-filters';\n\n/** Harness for interacting with a standard mat-icon in tests. */\nexport class MatIconHarness extends ComponentHarness {\n /** The selector for the host element of a `MatIcon` instance. */\n static hostSelector = '.mat-icon';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatIconHarness` that meets\n * certain criteria.\n * @param options Options for filtering which icon instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: IconHarnessFilters = {}): HarnessPredicate<MatIconHarness> {\n return new HarnessPredicate(MatIconHarness, options)\n .addOption('type', options.type, async (harness, type) => (await harness.getType()) === type)\n .addOption('name', options.name, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getName(), text),\n )\n .addOption('namespace', options.namespace, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getNamespace(), text),\n );\n }\n\n /** Gets the type of the icon. */\n async getType(): Promise<IconType> {\n const type = await (await this.host()).getAttribute('data-mat-icon-type');\n return type === 'svg' ? IconType.SVG : IconType.FONT;\n }\n\n /** Gets the name of the icon. */\n async getName(): Promise<string | null> {\n const host = await this.host();\n const nameFromDom = await host.getAttribute('data-mat-icon-name');\n\n // If we managed to figure out the name from the attribute, use it.\n if (nameFromDom) {\n return nameFromDom;\n }\n\n // Some icons support defining the icon as a ligature.\n // As a fallback, try to extract it from the DOM text.\n if ((await this.getType()) === IconType.FONT) {\n // Other directives may add content to the icon (e.g. `MatBadge`), however only the direct\n // text nodes affect the name of the icon. Exclude all element descendants from the result.\n const text = await host.text({exclude: '*'});\n\n // There are some internal cases where the icon name is wrapped in another node.\n // Fall back to extracting the entire text if we ended up excluding everything above.\n return text.length > 0 ? text : host.text();\n }\n\n return null;\n }\n\n /** Gets the namespace of the icon. */\n async getNamespace(): Promise<string | null> {\n return (await this.host()).getAttribute('data-mat-icon-namespace');\n }\n\n /** Gets whether the icon is inline. */\n async isInline(): Promise<boolean> {\n return (await this.host()).hasClass('mat-icon-inline');\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 {Injectable, NgModule, OnDestroy} from '@angular/core';\nimport {MatIconRegistry} from '../../icon';\nimport {Observable, of as observableOf} from 'rxjs';\n\ntype PublicApi<T> = {\n [K in keyof T]: T[K] extends (...x: any[]) => T ? (...x: any[]) => PublicApi<T> : T[K];\n};\n\n/**\n * A null icon registry that must be imported to allow disabling of custom\n * icons.\n */\n@Injectable()\nexport class FakeMatIconRegistry implements PublicApi<MatIconRegistry>, OnDestroy {\n addSvgIcon(): this {\n return this;\n }\n\n addSvgIconLiteral(): this {\n return this;\n }\n\n addSvgIconInNamespace(): this {\n return this;\n }\n\n addSvgIconLiteralInNamespace(): this {\n return this;\n }\n\n addSvgIconSet(): this {\n return this;\n }\n\n addSvgIconSetLiteral(): this {\n return this;\n }\n\n addSvgIconSetInNamespace(): this {\n return this;\n }\n\n addSvgIconSetLiteralInNamespace(): this {\n return this;\n }\n\n registerFontClassAlias(): this {\n return this;\n }\n\n classNameForFontAlias(alias: string): string {\n return alias;\n }\n\n getDefaultFontSetClass() {\n return ['material-icons'];\n }\n\n getSvgIconFromUrl(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n getNamedSvgIcon(): Observable<SVGElement> {\n return observableOf(this._generateEmptySvg());\n }\n\n setDefaultFontSetClass(): this {\n return this;\n }\n\n addSvgIconResolver(): this {\n return this;\n }\n\n ngOnDestroy() {}\n\n private _generateEmptySvg(): SVGElement {\n const emptySvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n emptySvg.classList.add('fake-testing-svg');\n // Emulate real icon characteristics from `MatIconRegistry` so size remains consistent in tests.\n emptySvg.setAttribute('fit', '');\n emptySvg.setAttribute('height', '100%');\n emptySvg.setAttribute('width', '100%');\n emptySvg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n emptySvg.setAttribute('focusable', 'false');\n return emptySvg;\n }\n}\n\n/** Import this module in tests to install the null icon registry. */\n@NgModule({\n providers: [{provide: MatIconRegistry, useClass: FakeMatIconRegistry}],\n})\nexport class MatIconTestingModule {}\n"],"names":["IconType","MatIconHarness","ComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","type","harness","getType","name","text","stringMatches","getName","namespace","getNamespace","host","getAttribute","SVG","FONT","nameFromDom","exclude","length","isInline","hasClass","FakeMatIconRegistry","addSvgIcon","addSvgIconLiteral","addSvgIconInNamespace","addSvgIconLiteralInNamespace","addSvgIconSet","addSvgIconSetLiteral","addSvgIconSetInNamespace","addSvgIconSetLiteralInNamespace","registerFontClassAlias","classNameForFontAlias","alias","getDefaultFontSetClass","getSvgIconFromUrl","observableOf","_generateEmptySvg","getNamedSvgIcon","setDefaultFontSetClass","addSvgIconResolver","ngOnDestroy","emptySvg","document","createElementNS","classList","add","setAttribute","deps","target","i0","ɵɵFactoryTarget","Injectable","decorators","MatIconTestingModule","NgModule","providers","provide","MatIconRegistry","useClass","args"],"mappings":";;;;;;;;;IAWYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;EAClBA,QAAA,CAAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAG;EACHA,QAAA,CAAAA,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AAAC,eAAA,CAAAI;AAAA,GAAA,CAAA;;;;;UAApBD;AAAoB,GAAA,CAAA;;;;;UAApBA,oBAAoB;AAAAE,IAAAA,SAAA,EAFpB,CAAC;AAACC,MAAAA,OAAO,EAAEC,eAAe;AAAEC,MAAAA,QAAQ,EAAErC;KAAoB;AAAC,GAAA,CAAA;;;;;;QAE3DgC,oBAAoB;AAAAD,EAAAA,UAAA,EAAA,CAAA;UAHhCE,QAAQ;AAACK,IAAAA,IAAA,EAAA,CAAA;AACRJ,MAAAA,SAAS,EAAE,CAAC;AAACC,QAAAA,OAAO,EAAEC,eAAe;AAAEC,QAAAA,QAAQ,EAAErC;OAAoB;KACtE;;;;;;"}
|
package/fesm2022/icon.mjs.map
CHANGED
|
@@ -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: () => {\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 {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatIcon} from './icon';\n\n@NgModule({\n imports: [MatIcon],\n exports: [MatIcon, BidiModule],\n})\nexport class MatIconModule {}\n"],"names":["MAT_ICON_DEFAULT_OPTIONS","InjectionToken","MAT_ICON_LOCATION","providedIn","factory","_document","inject","DOCUMENT","_location","location","getPathname","pathname","search","funcIriAttributes","funcIriAttributeSelector","map","attr","join","funcIriPattern","MatIcon","_elementRef","ElementRef","_iconRegistry","MatIconRegistry","_errorHandler","ErrorHandler","_defaultColor","color","_color","value","inline","svgIcon","_svgIcon","_updateSvgIcon","_clearSvgElement","fontSet","_fontSet","newValue","_cleanupFontValue","_updateFontIconClasses","fontIcon","_fontIcon","_previousFontSetClass","_previousFontIconClass","_svgName","_svgNamespace","_previousPath","_elementsWithExternalReferences","_currentIconFetch","Subscription","EMPTY","constructor","ariaHidden","HostAttributeToken","optional","defaults","nativeElement","setAttribute","_splitIconName","iconName","parts","split","length","Error","ngOnInit","ngAfterViewChecked","cachedElements","size","newPath","_prependPathToReferences","ngOnDestroy","unsubscribe","clear","_usingFontIcon","_setSvgElement","svg","path","_cacheChildrenWithExternalReferences","appendChild","layoutElement","childCount","childNodes","child","nodeType","nodeName","toLowerCase","remove","elem","fontSetClasses","classNameForFontAlias","getDefaultFontSetClass","filter","className","forEach","classList","add","includes","trim","elements","attrs","element","name","elementsWithFuncIri","querySelectorAll","Map","i","elementWithReference","getAttribute","match","attributes","get","set","push","rawName","namespace","getNamedSvgIcon","pipe","take","subscribe","err","errorMessage","message","handleError","deps","target","i0","ɵɵFactoryTarget","Component","isStandalone","selector","inputs","booleanAttribute","host","properties","classAttribute","exportAs","ngImport","template","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","Input","transform","MatIconModule","NgModule","ɵmod","ɵɵngDeclareNgModule","minVersion","version","type","imports","exports","BidiModule","ɵinj","ɵɵngDeclareInjector"],"mappings":";;;;;;;;;;MA6CaA,wBAAwB,GAAG,IAAIC,cAAc,CACxD,0BAA0B;MAQfC,iBAAiB,GAAG,IAAID,cAAc,CAAkB,mBAAmB,EAAE;AACxFE,EAAAA,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAEA,MAAK;AACZ,IAAA,MAAMC,SAAS,GAAGC,MAAM,CAACC,QAAQ,CAAC;IAClC,MAAMC,SAAS,GAAGH,SAAS,GAAGA,SAAS,CAACI,QAAQ,GAAG,IAAI;IAEvD,OAAO;AAGLC,MAAAA,WAAW,EAAEA,MAAOF,SAAS,GAAGA,SAAS,CAACG,QAAQ,GAAGH,SAAS,CAACI,MAAM,GAAG;KACzE;AACH;AACD,CAAA;AAWD,MAAMC,iBAAiB,GAAG,CACxB,WAAW,EACX,eAAe,EACf,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,QAAQ,CACT;AAGD,MAAMC,wBAAwB,GAAGD,iBAAiB,CAACE,GAAG,CAACC,IAAI,IAAI,CAAIA,CAAAA,EAAAA,IAAI,GAAG,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAGtF,MAAMC,cAAc,GAAG,2BAA2B;MAqDrCC,OAAO,CAAA;AACTC,EAAAA,WAAW,GAAGd,MAAM,CAA0Be,UAAU,CAAC;AAC1DC,EAAAA,aAAa,GAAGhB,MAAM,CAACiB,eAAe,CAAC;AACvCf,EAAAA,SAAS,GAAGF,MAAM,CAAkBJ,iBAAiB,CAAC;AAC7CsB,EAAAA,aAAa,GAAGlB,MAAM,CAACmB,YAAY,CAAC;EAC7CC,aAAa;EASrB,IACIC,KAAKA,GAAA;AAC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UE,aAAa,CAAA;;;;;UAAbA,aAAa;AAAA3B,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAyB;AAAA,GAAA,CAAA;AAAb,EAAA,OAAAC,IAAA,GAAA3B,EAAA,CAAA4B,mBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAnB,IAAAA,QAAA,EAAAX,EAAA;AAAA+B,IAAAA,IAAA,EAAAN,aAAa;IAHdO,OAAA,EAAA,CAAA1I,OAAO,CACP;AAAA2I,IAAAA,OAAA,EAAA,CAAA3I,OAAO,EAAE4I,UAAU;AAAA,GAAA,CAAA;AAElB,EAAA,OAAAC,IAAA,GAAAnC,EAAA,CAAAoC,mBAAA,CAAA;AAAAP,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,eAAA;AAAAnB,IAAAA,QAAA,EAAAX,EAAA;AAAA+B,IAAAA,IAAA,EAAAN,aAAa;cAFLS,UAAU;AAAA,GAAA,CAAA;;;;;;QAElBT,aAAa;AAAAJ,EAAAA,UAAA,EAAA,CAAA;UAJzBK,QAAQ;AAACJ,IAAAA,IAAA,EAAA,CAAA;MACRU,OAAO,EAAE,CAAC1I,OAAO,CAAC;AAClB2I,MAAAA,OAAO,EAAE,CAAC3I,OAAO,EAAE4I,UAAU;KAC9B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"icon.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/icon/icon.ts","../../../../../k8-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 {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {MatIcon} from './icon';\n\n@NgModule({\n imports: [MatIcon],\n exports: [MatIcon, BidiModule],\n})\nexport class MatIconModule {}\n"],"names":["MAT_ICON_DEFAULT_OPTIONS","InjectionToken","MAT_ICON_LOCATION","providedIn","factory","_document","inject","DOCUMENT","_location","location","getPathname","pathname","search","funcIriAttributes","funcIriAttributeSelector","map","attr","join","funcIriPattern","MatIcon","_elementRef","ElementRef","_iconRegistry","MatIconRegistry","_errorHandler","ErrorHandler","_defaultColor","color","_color","value","inline","svgIcon","_svgIcon","_updateSvgIcon","_clearSvgElement","fontSet","_fontSet","newValue","_cleanupFontValue","_updateFontIconClasses","fontIcon","_fontIcon","_previousFontSetClass","_previousFontIconClass","_svgName","_svgNamespace","_previousPath","_elementsWithExternalReferences","_currentIconFetch","Subscription","EMPTY","constructor","ariaHidden","HostAttributeToken","optional","defaults","nativeElement","setAttribute","_splitIconName","iconName","parts","split","length","Error","ngOnInit","ngAfterViewChecked","cachedElements","size","newPath","_prependPathToReferences","ngOnDestroy","unsubscribe","clear","_usingFontIcon","_setSvgElement","svg","path","_cacheChildrenWithExternalReferences","appendChild","layoutElement","childCount","childNodes","child","nodeType","nodeName","toLowerCase","remove","elem","fontSetClasses","classNameForFontAlias","getDefaultFontSetClass","filter","className","forEach","classList","add","includes","trim","elements","attrs","element","name","elementsWithFuncIri","querySelectorAll","Map","i","elementWithReference","getAttribute","match","attributes","get","set","push","rawName","namespace","getNamedSvgIcon","pipe","take","subscribe","err","errorMessage","message","handleError","deps","target","i0","ɵɵFactoryTarget","Component","isStandalone","selector","inputs","booleanAttribute","host","properties","classAttribute","exportAs","ngImport","template","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","Input","transform","MatIconModule","NgModule","ɵmod","ɵɵngDeclareNgModule","minVersion","version","type","imports","exports","BidiModule","ɵinj","ɵɵngDeclareInjector"],"mappings":";;;;;;;;;;MA6CaA,wBAAwB,GAAG,IAAIC,cAAc,CACxD,0BAA0B;MAQfC,iBAAiB,GAAG,IAAID,cAAc,CAAkB,mBAAmB,EAAE;AACxFE,EAAAA,UAAU,EAAE,MAAM;EAClBC,OAAO,EAAEA,MAAK;AACZ,IAAA,MAAMC,SAAS,GAAGC,MAAM,CAACC,QAAQ,CAAC;IAClC,MAAMC,SAAS,GAAGH,SAAS,GAAGA,SAAS,CAACI,QAAQ,GAAG,IAAI;IAEvD,OAAO;AAGLC,MAAAA,WAAW,EAAEA,MAAOF,SAAS,GAAGA,SAAS,CAACG,QAAQ,GAAGH,SAAS,CAACI,MAAM,GAAG;KACzE;AACH;AACD,CAAA;AAWD,MAAMC,iBAAiB,GAAG,CACxB,WAAW,EACX,eAAe,EACf,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,QAAQ,CACT;AAGD,MAAMC,wBAAwB,GAAGD,iBAAiB,CAACE,GAAG,CAACC,IAA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OAAO,EAAE,CAAC3I,OAAO,EAAE4I,UAAU;KAC9B;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-testing.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"input-testing.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/input/testing/native-option-harness.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/material/input/testing/native-select-harness.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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {NativeOptionHarnessFilters} from './native-select-harness-filters';\n\n/** Harness for interacting with a native `option` in tests. */\nexport class MatNativeOptionHarness extends ComponentHarness {\n /** Selector used to locate option instances. */\n static hostSelector = 'select[matNativeControl] option';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNativeOptionHarness` that meets\n * certain criteria.\n * @param options Options for filtering which option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NativeOptionHarnessFilters = {}) {\n return new HarnessPredicate(MatNativeOptionHarness, options)\n .addOption('text', options.text, async (harness, title) =>\n HarnessPredicate.stringMatches(await harness.getText(), title),\n )\n .addOption(\n 'index',\n options.index,\n async (harness, index) => (await harness.getIndex()) === index,\n )\n .addOption(\n 'isSelected',\n options.isSelected,\n async (harness, isSelected) => (await harness.isSelected()) === isSelected,\n );\n }\n\n /** Gets the option's label text. */\n async getText(): Promise<string> {\n return (await this.host()).getProperty<string>('label');\n }\n\n /** Index of the option within the native `select` element. */\n async getIndex(): Promise<number> {\n return (await this.host()).getProperty<number>('index');\n }\n\n /** Gets whether the option is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Gets whether the option is selected. */\n async isSelected(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('selected');\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 {HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarnessBase} from '../../form-field/testing/control';\nimport {MatNativeOptionHarness} from './native-option-harness';\nimport {\n NativeOptionHarnessFilters,\n NativeSelectHarnessFilters,\n} from './native-select-harness-filters';\n\n/** Harness for interacting with a native `select` in tests. */\nexport class MatNativeSelectHarness extends MatFormFieldControlHarnessBase {\n static hostSelector = 'select[matNativeControl]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatNativeSelectHarness` that meets\n * certain criteria.\n * @param options Options for filtering which select instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: NativeSelectHarnessFilters = {}): HarnessPredicate<MatNativeSelectHarness> {\n return new HarnessPredicate(MatNativeSelectHarness, options).addOption(\n 'label',\n options.label,\n (harness, label) => {\n return HarnessPredicate.stringMatches(harness.getLabel(), label);\n },\n );\n }\n\n /** Gets a boolean promise indicating if the select is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('disabled');\n }\n\n /** Gets a boolean promise indicating if the select is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('required');\n }\n\n /** Gets a boolean promise indicating if the select is in multi-selection mode. */\n async isMultiple(): Promise<boolean> {\n return (await this.host()).getProperty<boolean>('multiple');\n }\n\n /** Gets the name of the select. */\n async getName(): Promise<string> {\n // The \"name\" property of the native select is never undefined.\n return await (await this.host()).getProperty<string>('name');\n }\n\n /** Gets the id of the select. */\n async getId(): Promise<string> {\n // We're guaranteed to have an id, because the `matNativeControl` always assigns one.\n return await (await this.host()).getProperty<string>('id');\n }\n\n /** Focuses the select and returns a void promise that indicates when the action is complete. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the select and returns a void promise that indicates when the action is complete. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the select is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Gets the options inside the select panel. */\n async getOptions(filter: NativeOptionHarnessFilters = {}): Promise<MatNativeOptionHarness[]> {\n return this.locatorForAll(MatNativeOptionHarness.with(filter))();\n }\n\n /**\n * Selects the options that match the passed-in filter. If the select is in multi-selection\n * mode all options will be clicked, otherwise the harness will pick the first matching option.\n */\n async selectOptions(filter: NativeOptionHarnessFilters = {}): Promise<void> {\n const [isMultiple, options] = await parallel(() => {\n return [this.isMultiple(), this.getOptions(filter)];\n });\n\n if (options.length === 0) {\n throw Error('Select does not have options matching the specified filter');\n }\n\n const [host, optionIndexes] = await parallel(() => [\n this.host(),\n parallel(() => options.slice(0, isMultiple ? undefined : 1).map(option => option.getIndex())),\n ]);\n\n await host.selectOptions(...optionIndexes);\n }\n}\n"],"names":["MatNativeOptionHarness","ComponentHarness","hostSelector","with","options","HarnessPredicate","addOption","text","harness","title","stringMatches","getText","index","getIndex","isSelected","host","getProperty","isDisabled","MatNativeSelectHarness","MatFormFieldControlHarnessBase","label","getLabel","isRequired","isMultiple","getName","getId","focus","blur","isFocused","getOptions","filter","locatorForAll","selectOptions","parallel","length","Error","optionIndexes","slice","undefined","map","option"],"mappings":";;;;;;AAYM,MAAOA,sBAAuB,SAAQC,gBAAgB,CAAA;EAE1D,OAAOC,YAAY,GAAG,iCAAiC;AAQvD,EAAA,OAAOC,IAAIA,CAACC,OAAA,GAAsC,EAAE,EAAA;AAClD,IAAA,OAAO,IAAIC,gBAAgB,CAACL,sBAAsB,EAAEI,OAAO,CAAA,CACxDE,SAAS,CAAC,MAAM,EAAEF,OAAO,CAACG,IAAI,EAAE,OAAOC,OAAO,EAAEC,KAAK,KACpDJ,gBAAgB,CAACK,aAAa,CAAC,MAAMF,OAAO,CAACG,OAAO,EAAE,EAAEF,KAAK,CAAC,CAAA,CAE/DH,SAAS,CAC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