blob: 28576e7b4d860db349a605fa9eda8c8e5b789bce [file] [log] [blame]
{"version":3,"file":"material-grid-list.umd.min.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/material/grid-list/tile-styler.ts","../../src/material/grid-list/grid-list-base.ts","../../src/material/grid-list/grid-tile.ts","../../src/material/grid-list/tile-coordinator.ts","../../src/material/grid-list/grid-list.ts","../../src/material/grid-list/grid-list-module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MatGridList} from './grid-list';\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/**\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 /**\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 /**\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 /**\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,\n 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(tile: MatGridTile, rowIndex: number, percentWidth: number,\n gutterWidth: number): 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 { return null; }\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: MatGridList): void;\n}\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\n constructor(public fixedRowHeight: string) { super(); }\n\n 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 (!cssCalcAllowedValue.test(this.fixedRowHeight)) {\n throw Error(`Invalid value \"${this.fixedRowHeight}\" set as rowHeight.`);\n }\n }\n\n 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 getComputedHeight(): [string, string] {\n return [\n 'height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n\n reset(list: MatGridList) {\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/**\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\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(tile: MatGridTile, rowIndex: number, percentWidth: number,\n gutterWidth: number): 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 getComputedHeight(): [string, string] {\n return [\n 'paddingBottom', calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n\n reset(list: MatGridList) {\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) {\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: MatGridList) {\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/** Wraps a CSS string in a calc function */\nfunction calc(exp: string): string {\n return `calc(${exp})`;\n}\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {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.io/license\n */\n\nimport {\n Component,\n ViewEncapsulation,\n ElementRef,\n Input,\n Optional,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Directive,\n ChangeDetectionStrategy,\n Inject,\n} from '@angular/core';\nimport {MatLine, setLines} from '@angular/material/core';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n@Component({\n moduleId: module.id,\n selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n },\n templateUrl: 'grid-tile.html',\n styleUrls: ['grid-list.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatGridTile {\n _rowspan: number = 1;\n _colspan: number = 1;\n\n constructor(\n private _element: ElementRef<HTMLElement>,\n @Optional() @Inject(MAT_GRID_LIST) public _gridList?: MatGridListBase) {}\n\n /** Amount of rows that the grid tile takes up. */\n @Input()\n get rowspan(): number { return this._rowspan; }\n set rowspan(value: number) { this._rowspan = Math.round(coerceNumberProperty(value)); }\n\n /** Amount of columns that the grid tile takes up. */\n @Input()\n get colspan(): number { return this._colspan; }\n set colspan(value: number) { this._colspan = Math.round(coerceNumberProperty(value)); }\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 moduleId: module.id,\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 @ContentChildren(MatLine) _lines: QueryList<MatLine>;\n\n constructor(private _element: ElementRef<HTMLElement>) {}\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MatGridTile} from './grid-tile';\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 /** Tracking array (see class description). */\n tracker: number[];\n\n /** Index at which the search for the next gap will start. */\n columnIndex: number = 0;\n\n /** The current row index. */\n rowIndex: number = 0;\n\n /** Gets the total number of rows occupied by tiles */\n get rowCount(): number { return this.rowIndex + 1; }\n\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 */\n get rowspan() {\n const 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 /** The computed (row, col) position of each tile (the output). */\n positions: TilePosition[];\n\n /**\n * Updates the tile positions.\n * @param numColumns Amount of columns in the grid.\n */\n update(numColumns: number, tiles: MatGridTile[]) {\n this.columnIndex = 0;\n this.rowIndex = 0;\n\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 /** Calculates the row and col position of a tile. */\n private _trackTile(tile: MatGridTile): TilePosition {\n // Find a gap large enough for this tile.\n const gapStartIndex = this._findMatchingGap(tile.colspan);\n\n // Place tile in the resulting gap.\n this._markTilePosition(gapStartIndex, tile);\n\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\n return new TilePosition(this.rowIndex, gapStartIndex);\n }\n\n /** Finds the next available space large enough to fit the tile. */\n private _findMatchingGap(tileCols: number): number {\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\n // Start index is inclusive, end index is exclusive.\n let gapStartIndex = -1;\n let gapEndIndex = -1;\n\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 gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n\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 gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n\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\n // Continue iterating until we find a gap wide enough for this tile. Since gapEndIndex is\n // exclusive, gapEndIndex is 0 means we didn't find a gap and should continue.\n } while ((gapEndIndex - gapStartIndex < tileCols) || (gapEndIndex == 0));\n\n // If we still didn't manage to find a gap, ensure that the index is\n // at least zero so the tile doesn't get pulled out of the grid.\n return Math.max(gapStartIndex, 0);\n }\n\n /** Move \"down\" to the next row. */\n private _nextRow(): void {\n this.columnIndex = 0;\n this.rowIndex++;\n\n // Decrement all spaces by one to reflect moving down one row.\n for (let i = 0; i < this.tracker.length; i++) {\n this.tracker[i] = Math.max(0, this.tracker[i] - 1);\n }\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 */\n private _findGapEndIndex(gapStartIndex: number): number {\n for (let i = gapStartIndex + 1; i < this.tracker.length; i++) {\n if (this.tracker[i] != 0) {\n return i;\n }\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 private _markTilePosition(start: number, tile: MatGridTile): void {\n for (let i = 0; i < tile.colspan; i++) {\n this.tracker[start + i] = tile.rowspan;\n }\n }\n}\n\n/**\n * Simple data structure for tile position (row, col).\n * @docs-private\n */\nexport class TilePosition {\n constructor(public row: number, public col: number) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Component,\n ViewEncapsulation,\n AfterContentChecked,\n OnInit,\n Input,\n ContentChildren,\n QueryList,\n ElementRef,\n Optional,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\nimport {TileStyler, FitTileStyler, RatioTileStyler, FixedTileStyler} from './tile-styler';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\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 moduleId: module.id,\n selector: 'mat-grid-list',\n exportAs: 'matGridList',\n templateUrl: 'grid-list.html',\n styleUrls: ['grid-list.css'],\n host: {\n 'class': 'mat-grid-list',\n },\n providers: [{\n provide: MAT_GRID_LIST,\n useExisting: MatGridList\n }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridList implements MatGridListBase, OnInit, AfterContentChecked {\n /** Number of columns being rendered. */\n private _cols: number;\n\n /** Used for determiningthe 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(private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality) {}\n\n /** Amount of columns in the grid list. */\n @Input()\n get cols(): number { return this._cols; }\n set cols(value: number) {\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 { return this._gutter; }\n set gutterSize(value: string) { this._gutter = `${value == null ? '' : value}`; }\n\n /** Set internal representation of row height from the user-provided value. */\n @Input()\n get rowHeight(): string | number { return this._rowHeight; }\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) {\n throw Error(`mat-grid-list: must pass in number of columns. ` +\n `Example: <mat-grid-list cols=\"3\">`);\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\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatLineModule, MatCommonModule} from '@angular/material/core';\nimport {\n MatGridTile, MatGridTileText, MatGridTileFooterCssMatStyler,\n MatGridTileHeaderCssMatStyler, MatGridAvatarCssMatStyler\n} from './grid-tile';\nimport {MatGridList} from './grid-list';\n\n\n@NgModule({\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})\nexport class MatGridListModule {}\n"],"names":["__extends","d","b","__","this","constructor","extendStatics","prototype","Object","create","calc","exp","normalizeUnits","value","match","setPrototypeOf","__proto__","Array","p","hasOwnProperty","MAT_GRID_LIST","InjectionToken","MatGridTile","_element","_gridList","_rowspan","_colspan","defineProperty","Math","round","coerceNumberProperty","_setStyle","property","nativeElement","type","Component","args","selector","exportAs","host","class","template","styles","encapsulation","ViewEncapsulation","None","changeDetection","ChangeDetectionStrategy","OnPush","propDecorators","MatGridTileText","decorators","ctorParameters","ElementRef","Directive","MatGridAvatarCssMatStyler","MatGridTileHeaderCssMatStyler","MatGridTileFooterCssMatStyler","TileCoordinator","columnIndex","rowIndex","lastRowMax","max","apply","tracker","rowCount","update","numColumns","tiles","_this","fill","length","positions","map","tile","_trackTile","gapStartIndex","_findMatchingGap","colspan","_markTilePosition","TilePosition","tileCols","Error","gapEndIndex","_nextRow","indexOf","_findGapEndIndex","i","start","rowspan","row","col","cssCalcAllowedValue","TileStyler","_rows","init","gutterSize","cols","direction","_gutterSize","_cols","_direction","getBaseTileSize","sizePercent","gutterFraction","getTilePosition","baseSize","offset","getTileSize","span","setStyle","colIndex","percentWidthPerTile","gutterWidthFractionPerTile","setColStyles","setRowStyles","percentWidth","gutterWidth","baseTileWidth","side","getGutterSpan","getTileSpan","tileHeight","getComputedHeight","FixedTileStyler","fixedRowHeight","_super","call","tslib_1.__extends","test","reset","list","_setListStyle","_tiles","forEach","RatioTileStyler","_parseRatio","percentHeightPerTile","rowHeightRatio","baseTileHeight","ratioParts","split","parseFloat","FitTileStyler","gutterHeightPerTile","MatGridList","_dir","_gutter","_rowHeight","newValue","_setTileStyler","ngOnInit","_checkCols","_checkRowHeight","ngAfterContentChecked","_layoutTiles","rowHeight","_tileStyler","_tileCoordinator","filter","index","pos","style","providers","provide","useExisting","Input","MatGridListModule","NgModule","imports","MatLineModule","MatCommonModule","exports","declarations"],"mappings":";;;;;;;uiBAuBA,SAAgBA,GAAUC,EAAGC,GAEzB,QAASC,KAAOC,KAAKC,YAAcJ,EADnCK,EAAcL,EAAGC,GAEjBD,EAAEM,UAAkB,OAANL,EAAaM,OAAOC,OAAOP,IAAMC,EAAGI,UAAYL,EAAEK,UAAW,GAAIJ,ICsQnF,QAASO,GAAKC,GACZ,MAAO,QAAQA,EAAjB,IAKA,QAASC,GAAeC,GACtB,MAAOA,GAAMC,MAAM,iBAAmBD,EAAWA,EAAnD,KDvRA,GAAIP,GAAgB,SAASL,EAAGC,GAI5B,OAHAI,EAAgBE,OAAOO,iBAChBC,uBAA2BC,QAAS,SAAUhB,EAAGC,GAAKD,EAAEe,UAAYd,IACvE,SAAUD,EAAGC,GAAK,IAAK,GAAIgB,KAAKhB,GAAOA,EAAEiB,eAAeD,KAAIjB,EA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