{"version":3,"file":"grid-list.js","sources":["../../packages/material/grid-list/grid-list-measure.js","../../packages/material/grid-list/grid-tile.js","../../packages/material/grid-list/tile-coordinator.js","../../packages/material/grid-list/tile-styler.js","../../packages/material/grid-list/grid-list.js","../../packages/material/grid-list/grid-list-module.js","../../packages/material/grid-list/index.js"],"sourcesContent":["/**\n * Converts values into strings. Falsy values become empty strings.\n * \\@docs-private\n * @param {?} value\n * @return {?}\n */\nexport function coerceToString(value) {\n return `${value || ''}`;\n}\n/**\n * Converts a value that might be a string into a number.\n * \\@docs-private\n * @param {?} value\n * @return {?}\n */\nexport function coerceToNumber(value) {\n return typeof value === 'string' ? parseInt(value, 10) : value;\n}\n//# sourceMappingURL=grid-list-measure.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Component, ViewEncapsulation, Renderer2, ElementRef, Input, ContentChildren, Directive, ChangeDetectionStrategy, } from '@angular/core';\nimport { MatLine, MatLineSetter } from '@angular/material/core';\nimport { coerceToNumber } from './grid-list-measure';\nexport class MatGridTile {\n /**\n * @param {?} _renderer\n * @param {?} _element\n */\n constructor(_renderer, _element) {\n this._renderer = _renderer;\n this._element = _element;\n this._rowspan = 1;\n this._colspan = 1;\n }\n /**\n * Amount of rows that the grid tile takes up.\n * @return {?}\n */\n get rowspan() { return this._rowspan; }\n /**\n * @param {?} value\n * @return {?}\n */\n set rowspan(value) { this._rowspan = coerceToNumber(value); }\n /**\n * Amount of columns that the grid tile takes up.\n * @return {?}\n */\n get colspan() { return this._colspan; }\n /**\n * @param {?} value\n * @return {?}\n */\n set colspan(value) { this._colspan = coerceToNumber(value); }\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 * @param {?} property\n * @param {?} value\n * @return {?}\n */\n _setStyle(property, value) {\n this._renderer.setStyle(this._element.nativeElement, property, value);\n }\n}\nMatGridTile.decorators = [\n { type: Component, args: [{selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n },\n template: \"
\",\n styles: [\".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}\"],\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n },] },\n];\n/**\n * @nocollapse\n */\nMatGridTile.ctorParameters = () => [\n { type: Renderer2, },\n { type: ElementRef, },\n];\nMatGridTile.propDecorators = {\n 'rowspan': [{ type: Input },],\n 'colspan': [{ type: Input },],\n};\nfunction MatGridTile_tsickle_Closure_declarations() {\n /** @type {?} */\n MatGridTile.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatGridTile.ctorParameters;\n /** @type {?} */\n MatGridTile.propDecorators;\n /** @type {?} */\n MatGridTile.prototype._rowspan;\n /** @type {?} */\n MatGridTile.prototype._colspan;\n /** @type {?} */\n MatGridTile.prototype._renderer;\n /** @type {?} */\n MatGridTile.prototype._element;\n}\nexport class MatGridTileText {\n /**\n * @param {?} _renderer\n * @param {?} _element\n */\n constructor(_renderer, _element) {\n this._renderer = _renderer;\n this._element = _element;\n }\n /**\n * @return {?}\n */\n ngAfterContentInit() {\n this._lineSetter = new MatLineSetter(this._lines, this._renderer, this._element);\n }\n}\nMatGridTileText.decorators = [\n { type: Component, args: [{selector: 'mat-grid-tile-header, mat-grid-tile-footer',\n template: \"
\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n },] },\n];\n/**\n * @nocollapse\n */\nMatGridTileText.ctorParameters = () => [\n { type: Renderer2, },\n { type: ElementRef, },\n];\nMatGridTileText.propDecorators = {\n '_lines': [{ type: ContentChildren, args: [MatLine,] },],\n};\nfunction MatGridTileText_tsickle_Closure_declarations() {\n /** @type {?} */\n MatGridTileText.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatGridTileText.ctorParameters;\n /** @type {?} */\n MatGridTileText.propDecorators;\n /**\n * Helper that watches the number of lines in a text area and sets\n * a class on the host element that matches the line count.\n * @type {?}\n */\n MatGridTileText.prototype._lineSetter;\n /** @type {?} */\n MatGridTileText.prototype._lines;\n /** @type {?} */\n MatGridTileText.prototype._renderer;\n /** @type {?} */\n MatGridTileText.prototype._element;\n}\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * \\@docs-private\n */\nexport class MatGridAvatarCssMatStyler {\n}\nMatGridAvatarCssMatStyler.decorators = [\n { type: Directive, args: [{\n selector: '[mat-grid-avatar], [matGridAvatar]',\n host: { 'class': 'mat-grid-avatar' }\n },] },\n];\n/**\n * @nocollapse\n */\nMatGridAvatarCssMatStyler.ctorParameters = () => [];\nfunction MatGridAvatarCssMatStyler_tsickle_Closure_declarations() {\n /** @type {?} */\n MatGridAvatarCssMatStyler.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatGridAvatarCssMatStyler.ctorParameters;\n}\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * \\@docs-private\n */\nexport class MatGridTileHeaderCssMatStyler {\n}\nMatGridTileHeaderCssMatStyler.decorators = [\n { type: Directive, args: [{\n selector: 'mat-grid-tile-header',\n host: { 'class': 'mat-grid-tile-header' }\n },] },\n];\n/**\n * @nocollapse\n */\nMatGridTileHeaderCssMatStyler.ctorParameters = () => [];\nfunction MatGridTileHeaderCssMatStyler_tsickle_Closure_declarations() {\n /** @type {?} */\n MatGridTileHeaderCssMatStyler.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatGridTileHeaderCssMatStyler.ctorParameters;\n}\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * \\@docs-private\n */\nexport class MatGridTileFooterCssMatStyler {\n}\nMatGridTileFooterCssMatStyler.decorators = [\n { type: Directive, args: [{\n selector: 'mat-grid-tile-footer',\n host: { 'class': 'mat-grid-tile-footer' }\n },] },\n];\n/**\n * @nocollapse\n */\nMatGridTileFooterCssMatStyler.ctorParameters = () => [];\nfunction MatGridTileFooterCssMatStyler_tsickle_Closure_declarations() {\n /** @type {?} */\n MatGridTileFooterCssMatStyler.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatGridTileFooterCssMatStyler.ctorParameters;\n}\n//# sourceMappingURL=grid-tile.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Class for determining, from a list of tiles, the (row, col) position of each of those tiles\n * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)\n * because the tiles can have a rowspan.\n *\n * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid\n * large enough to accommodate it so that the tiles still render in the same order in which they\n * are given.\n *\n * The basis of the algorithm is the use of an array to track the already placed tiles. Each\n * element of the array corresponds to a column, and the value indicates how many cells in that\n * column are already occupied; zero indicates an empty cell. Moving \"down\" to the next row\n * decrements each value in the tracking array (indicating that the column is one cell closer to\n * being free).\n *\n * \\@docs-private\n */\nexport class TileCoordinator {\n /**\n * @param {?} numColumns\n * @param {?} tiles\n */\n constructor(numColumns, tiles) {\n /**\n * Index at which the search for the next gap will start.\n */\n this.columnIndex = 0;\n /**\n * The current row index.\n */\n this.rowIndex = 0;\n this.tracker = new Array(numColumns);\n this.tracker.fill(0, 0, this.tracker.length);\n this.positions = tiles.map(tile => this._trackTile(tile));\n }\n /**\n * Gets the total number of rows occupied by tiles\n * @return {?}\n */\n get rowCount() { return this.rowIndex + 1; }\n /**\n * Gets the total span of rows occupied by tiles.\n * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.\n * @return {?}\n */\n get rowspan() {\n let /** @type {?} */ lastRowMax = Math.max(...this.tracker);\n // if any of the tiles has a rowspan that pushes it beyond the total row count,\n // add the difference to the rowcount\n return lastRowMax > 1 ? this.rowCount + lastRowMax - 1 : this.rowCount;\n }\n /**\n * Calculates the row and col position of a tile.\n * @param {?} tile\n * @return {?}\n */\n _trackTile(tile) {\n // Find a gap large enough for this tile.\n let /** @type {?} */ gapStartIndex = this._findMatchingGap(tile.colspan);\n // Place tile in the resulting gap.\n this._markTilePosition(gapStartIndex, tile);\n // The next time we look for a gap, the search will start at columnIndex, which should be\n // immediately after the tile that has just been placed.\n this.columnIndex = gapStartIndex + tile.colspan;\n return new TilePosition(this.rowIndex, gapStartIndex);\n }\n /**\n * Finds the next available space large enough to fit the tile.\n * @param {?} tileCols\n * @return {?}\n */\n _findMatchingGap(tileCols) {\n if (tileCols > this.tracker.length) {\n throw Error(`mat-grid-list: tile with colspan ${tileCols} is wider than ` +\n `grid with cols=\"${this.tracker.length}\".`);\n }\n // Start index is inclusive, end index is exclusive.\n let /** @type {?} */ gapStartIndex = -1;\n let /** @type {?} */ gapEndIndex = -1;\n // Look for a gap large enough to fit the given tile. Empty spaces are marked with a zero.\n do {\n // If we've reached the end of the row, go to the next row.\n if (this.columnIndex + tileCols > this.tracker.length) {\n this._nextRow();\n continue;\n }\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n // If there are no more empty spaces in this row at all, move on to the next row.\n if (gapStartIndex == -1) {\n this._nextRow();\n continue;\n }\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n // If a gap large enough isn't found, we want to start looking immediately after the current\n // gap on the next iteration.\n this.columnIndex = gapStartIndex + 1;\n // Continue iterating until we find a gap wide enough for this tile.\n } while (gapEndIndex - gapStartIndex < tileCols);\n return gapStartIndex;\n }\n /**\n * Move \"down\" to the next row.\n * @return {?}\n */\n _nextRow() {\n this.columnIndex = 0;\n this.rowIndex++;\n // Decrement all spaces by one to reflect moving down one row.\n for (let /** @type {?} */ i = 0; i < this.tracker.length; i++) {\n this.tracker[i] = Math.max(0, this.tracker[i] - 1);\n }\n }\n /**\n * Finds the end index (exclusive) of a gap given the index from which to start looking.\n * The gap ends when a non-zero value is found.\n * @param {?} gapStartIndex\n * @return {?}\n */\n _findGapEndIndex(gapStartIndex) {\n for (let /** @type {?} */ i = gapStartIndex + 1; i < this.tracker.length; i++) {\n if (this.tracker[i] != 0) {\n return i;\n }\n }\n // The gap ends with the end of the row.\n return this.tracker.length;\n }\n /**\n * Update the tile tracker to account for the given tile in the given space.\n * @param {?} start\n * @param {?} tile\n * @return {?}\n */\n _markTilePosition(start, tile) {\n for (let /** @type {?} */ i = 0; i < tile.colspan; i++) {\n this.tracker[start + i] = tile.rowspan;\n }\n }\n}\nfunction TileCoordinator_tsickle_Closure_declarations() {\n /**\n * Tracking array (see class description).\n * @type {?}\n */\n TileCoordinator.prototype.tracker;\n /**\n * Index at which the search for the next gap will start.\n * @type {?}\n */\n TileCoordinator.prototype.columnIndex;\n /**\n * The current row index.\n * @type {?}\n */\n TileCoordinator.prototype.rowIndex;\n /**\n * The computed (row, col) position of each tile (the output).\n * @type {?}\n */\n TileCoordinator.prototype.positions;\n}\n/**\n * Simple data structure for tile position (row, col).\n * \\@docs-private\n */\nexport class TilePosition {\n /**\n * @param {?} row\n * @param {?} col\n */\n constructor(row, col) {\n this.row = row;\n this.col = col;\n }\n}\nfunction TilePosition_tsickle_Closure_declarations() {\n /** @type {?} */\n TilePosition.prototype.row;\n /** @type {?} */\n TilePosition.prototype.col;\n}\n//# sourceMappingURL=tile-coordinator.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Sets the style properties for an individual tile, given the position calculated by the\n * Tile Coordinator.\n * \\@docs-private\n * @abstract\n */\nexport class TileStyler {\n constructor() {\n this._rows = 0;\n this._rowspan = 0;\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 * @return {?}\n */\n init(gutterSize, tracker, cols, direction) {\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 * 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, gutterFraction) {\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 * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n * @param {?} baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @param {?} offset Number of tiles that have already been rendered in the row/column.\n * @return {?} Position of the tile as a CSS calc() expression.\n */\n getTilePosition(baseSize, offset) {\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 * 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, span) {\n return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;\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 * @return {?}\n */\n setStyle(tile, rowIndex, colIndex) {\n // Percent of the available horizontal space that one column takes up.\n let /** @type {?} */ percentWidthPerTile = 100 / this._cols;\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 /** @type {?} */ gutterWidthFractionPerTile = (this._cols - 1) / this._cols;\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 * @param {?} tile\n * @param {?} colIndex\n * @param {?} percentWidth\n * @param {?} gutterWidth\n * @return {?}\n */\n setColStyles(tile, colIndex, percentWidth, gutterWidth) {\n // Base horizontal size of a column.\n let /** @type {?} */ baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);\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 /** @type {?} */ side = this._direction === 'ltr' ? 'left' : 'right';\n tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));\n tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));\n }\n /**\n * Calculates the total size taken up by gutters across one axis of a list.\n * @return {?}\n */\n getGutterSpan() {\n return `${this._gutterSize} * (${this._rowspan} - 1)`;\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 * @return {?}\n */\n getTileSpan(tileHeight) {\n return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;\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 * @abstract\n * @param {?} tile\n * @param {?} rowIndex\n * @param {?} percentWidth\n * @param {?} gutterWidth\n * @return {?}\n */\n setRowStyles(tile, rowIndex, percentWidth, gutterWidth) { }\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 * @return {?}\n */\n getComputedHeight() { return null; }\n /**\n * Called when the tile styler is swapped out with a different one. To be used for cleanup.\n * \\@docs-private\n * @abstract\n * @param {?} list Grid list that the styler was attached to.\n * @return {?}\n */\n reset(list) { }\n}\nfunction TileStyler_tsickle_Closure_declarations() {\n /** @type {?} */\n TileStyler.prototype._gutterSize;\n /** @type {?} */\n TileStyler.prototype._rows;\n /** @type {?} */\n TileStyler.prototype._rowspan;\n /** @type {?} */\n TileStyler.prototype._cols;\n /** @type {?} */\n TileStyler.prototype._direction;\n}\n/**\n * This type of styler is instantiated when the user passes in a fixed row height.\n * Example \n * \\@docs-private\n */\nexport class FixedTileStyler extends TileStyler {\n /**\n * @param {?} fixedRowHeight\n */\n constructor(fixedRowHeight) {\n super();\n this.fixedRowHeight = fixedRowHeight;\n }\n /**\n * @param {?} gutterSize\n * @param {?} tracker\n * @param {?} cols\n * @param {?} direction\n * @return {?}\n */\n init(gutterSize, tracker, cols, direction) {\n super.init(gutterSize, tracker, cols, direction);\n this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);\n }\n /**\n * @param {?} tile\n * @param {?} rowIndex\n * @return {?}\n */\n setRowStyles(tile, rowIndex) {\n tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));\n }\n /**\n * @return {?}\n */\n getComputedHeight() {\n return [\n 'height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n /**\n * @param {?} list\n * @return {?}\n */\n reset(list) {\n list._setListStyle(['height', null]);\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n}\nfunction FixedTileStyler_tsickle_Closure_declarations() {\n /** @type {?} */\n FixedTileStyler.prototype.fixedRowHeight;\n}\n/**\n * This type of styler is instantiated when the user passes in a width:height ratio\n * for the row height. Example \n * \\@docs-private\n */\nexport class RatioTileStyler extends TileStyler {\n /**\n * @param {?} value\n */\n constructor(value) {\n super();\n this._parseRatio(value);\n }\n /**\n * @param {?} tile\n * @param {?} rowIndex\n * @param {?} percentWidth\n * @param {?} gutterWidth\n * @return {?}\n */\n setRowStyles(tile, rowIndex, percentWidth, gutterWidth) {\n let /** @type {?} */ percentHeightPerTile = percentWidth / this.rowHeightRatio;\n this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);\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('margin-top', this.getTilePosition(this.baseTileHeight, rowIndex));\n tile._setStyle('padding-top', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));\n }\n /**\n * @return {?}\n */\n getComputedHeight() {\n return [\n 'padding-bottom', calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n /**\n * @param {?} list\n * @return {?}\n */\n reset(list) {\n list._setListStyle(['padding-bottom', null]);\n list._tiles.forEach(tile => {\n tile._setStyle('margin-top', null);\n tile._setStyle('padding-top', null);\n });\n }\n /**\n * @param {?} value\n * @return {?}\n */\n _parseRatio(value) {\n const /** @type {?} */ ratioParts = value.split(':');\n if (ratioParts.length !== 2) {\n throw Error(`mat-grid-list: invalid ratio given for row-height: \"${value}\"`);\n }\n this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);\n }\n}\nfunction RatioTileStyler_tsickle_Closure_declarations() {\n /**\n * Ratio width:height given by user to determine row height.\n * @type {?}\n */\n RatioTileStyler.prototype.rowHeightRatio;\n /** @type {?} */\n RatioTileStyler.prototype.baseTileHeight;\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 \n *\n * \\@docs-private\n */\nexport class FitTileStyler extends TileStyler {\n /**\n * @param {?} tile\n * @param {?} rowIndex\n * @return {?}\n */\n setRowStyles(tile, rowIndex) {\n // Percent of the available vertical space that one row takes up.\n let /** @type {?} */ percentHeightPerTile = 100 / this._rowspan;\n // Fraction of the horizontal gutter size that each column takes up.\n let /** @type {?} */ gutterHeightPerTile = (this._rows - 1) / this._rows;\n // Base vertical size of a column.\n let /** @type {?} */ baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);\n tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));\n }\n /**\n * @param {?} list\n * @return {?}\n */\n reset(list) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n}\n/**\n * Wraps a CSS string in a calc function\n * @param {?} exp\n * @return {?}\n */\nfunction calc(exp) { return `calc(${exp})`; }\n/**\n * Appends pixels to a CSS string if no units are given.\n * @param {?} value\n * @return {?}\n */\nfunction normalizeUnits(value) {\n return (value.match(/px|em|rem/)) ? value : value + 'px';\n}\n//# sourceMappingURL=tile-styler.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Component, ViewEncapsulation, Input, ContentChildren, Renderer2, ElementRef, Optional, ChangeDetectionStrategy, } from '@angular/core';\nimport { MatGridTile } from './grid-tile';\nimport { TileCoordinator } from './tile-coordinator';\nimport { FitTileStyler, RatioTileStyler, FixedTileStyler } from './tile-styler';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceToString, coerceToNumber, } from './grid-list-measure';\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.\nconst /** @type {?} */ MAT_FIT_MODE = 'fit';\nexport class MatGridList {\n /**\n * @param {?} _renderer\n * @param {?} _element\n * @param {?} _dir\n */\n constructor(_renderer, _element, _dir) {\n this._renderer = _renderer;\n this._element = _element;\n this._dir = _dir;\n /**\n * The amount of space between tiles. This will be something like '5px' or '2em'.\n */\n this._gutter = '1px';\n }\n /**\n * Amount of columns in the grid list.\n * @return {?}\n */\n get cols() { return this._cols; }\n /**\n * @param {?} value\n * @return {?}\n */\n set cols(value) { this._cols = coerceToNumber(value); }\n /**\n * Size of the grid list's gutter in pixels.\n * @return {?}\n */\n get gutterSize() { return this._gutter; }\n /**\n * @param {?} value\n * @return {?}\n */\n set gutterSize(value) { this._gutter = coerceToString(value); }\n /**\n * Set internal representation of row height from the user-provided value.\n * @param {?} value\n * @return {?}\n */\n set rowHeight(value) {\n const /** @type {?} */ newValue = coerceToString(value);\n if (newValue !== this._rowHeight) {\n this._rowHeight = newValue;\n this._setTileStyler(this._rowHeight);\n }\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n this._checkCols();\n this._checkRowHeight();\n }\n /**\n * The layout calculation is fairly cheap if nothing changes, so there's little cost\n * to run it frequently.\n * @return {?}\n */\n ngAfterContentChecked() {\n this._layoutTiles();\n }\n /**\n * Throw a friendly error if cols property is missing\n * @return {?}\n */\n _checkCols() {\n if (!this.cols) {\n throw Error(`mat-grid-list: must pass in number of columns. ` +\n `Example: `);\n }\n }\n /**\n * Default to equal width:height if rowHeight property is missing\n * @return {?}\n */\n _checkRowHeight() {\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 * @param {?} rowHeight\n * @return {?}\n */\n _setTileStyler(rowHeight) {\n if (this._tileStyler) {\n this._tileStyler.reset(this);\n }\n if (rowHeight === MAT_FIT_MODE) {\n this._tileStyler = new FitTileStyler();\n }\n else if (rowHeight && rowHeight.indexOf(':') > -1) {\n this._tileStyler = new RatioTileStyler(rowHeight);\n }\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 * @return {?}\n */\n _layoutTiles() {\n const /** @type {?} */ tracker = new TileCoordinator(this.cols, this._tiles);\n const /** @type {?} */ direction = this._dir ? this._dir.value : 'ltr';\n this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);\n this._tiles.forEach((tile, index) => {\n const /** @type {?} */ pos = tracker.positions[index];\n this._tileStyler.setStyle(tile, pos.row, pos.col);\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 * @param {?} style\n * @return {?}\n */\n _setListStyle(style) {\n if (style) {\n this._renderer.setStyle(this._element.nativeElement, style[0], style[1]);\n }\n }\n}\nMatGridList.decorators = [\n { type: Component, args: [{selector: 'mat-grid-list',\n exportAs: 'matGridList',\n template: \"
\",\n styles: [\".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-footer,.mat-grid-tile .mat-grid-tile-header{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-footer>*,.mat-grid-tile .mat-grid-tile-header>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-tile-footer.mat-2-line,.mat-grid-tile .mat-grid-tile-header.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;width:100%;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}\"],\n host: {\n 'class': 'mat-grid-list',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n },] },\n];\n/**\n * @nocollapse\n */\nMatGridList.ctorParameters = () => [\n { type: Renderer2, },\n { type: ElementRef, },\n { type: Directionality, decorators: [{ type: Optional },] },\n];\nMatGridList.propDecorators = {\n '_tiles': [{ type: ContentChildren, args: [MatGridTile,] },],\n 'cols': [{ type: Input },],\n 'gutterSize': [{ type: Input },],\n 'rowHeight': [{ type: Input },],\n};\nfunction MatGridList_tsickle_Closure_declarations() {\n /** @type {?} */\n MatGridList.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatGridList.ctorParameters;\n /** @type {?} */\n MatGridList.propDecorators;\n /**\n * Number of columns being rendered.\n * @type {?}\n */\n MatGridList.prototype._cols;\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 * @type {?}\n */\n MatGridList.prototype._rowHeight;\n /**\n * The amount of space between tiles. This will be something like '5px' or '2em'.\n * @type {?}\n */\n MatGridList.prototype._gutter;\n /**\n * Sets position and size styles for a tile\n * @type {?}\n */\n MatGridList.prototype._tileStyler;\n /**\n * Query list of tiles that are being rendered.\n * @type {?}\n */\n MatGridList.prototype._tiles;\n /** @type {?} */\n MatGridList.prototype._renderer;\n /** @type {?} */\n MatGridList.prototype._element;\n /** @type {?} */\n MatGridList.prototype._dir;\n}\n//# sourceMappingURL=grid-list.js.map","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { NgModule } from '@angular/core';\nimport { MatLineModule, MatCommonModule } from '@angular/material/core';\nimport { MatGridTile, MatGridTileText, MatGridTileFooterCssMatStyler, MatGridTileHeaderCssMatStyler, MatGridAvatarCssMatStyler } from './grid-tile';\nimport { MatGridList } from './grid-list';\nexport class MatGridListModule {\n}\nMatGridListModule.decorators = [\n { type: NgModule, args: [{\n imports: [MatLineModule, MatCommonModule],\n exports: [\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatLineModule,\n MatCommonModule,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler\n ],\n declarations: [\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler\n ],\n },] },\n];\n/**\n * @nocollapse\n */\nMatGridListModule.ctorParameters = () => [];\nfunction MatGridListModule_tsickle_Closure_declarations() {\n /** @type {?} */\n MatGridListModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatGridListModule.ctorParameters;\n}\n//# sourceMappingURL=grid-list-module.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { MatGridTile, MatGridListModule, MatGridList } from './public-api';\nexport { MatGridAvatarCssMatStyler as ɵb13, MatGridTileFooterCssMatStyler as ɵd13, MatGridTileHeaderCssMatStyler as ɵc13, MatGridTileText as ɵa13 } from './grid-tile';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;AAMA,AAAO,SAAS,cAAc,CAAC,KAAK,EAAE;IAClC,OAAO,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;CAC3B;;;;;;;AAOD,AAAO,SAAS,cAAc,CAAC,KAAK,EAAE;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC;CAClE,AACD;;ACRO,MAAM,WAAW,CAAC;;;;;IAKrB,WAAW,CAAC,SAAS,EAAE,QAAQ,EAAE;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;KACrB;;;;;IAKD,IAAI,OAAO,GAAG,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE;;;;;IAKvC,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE;;;;;IAK7D,IAAI,OAAO,GAAG,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE;;;;;IAKvC,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE;;;;;;;;IAQ7D,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE;QACvB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,C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