[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { AfterContentChecked, OnInit, QueryList, ElementRef } from '@angular/core';
|
---|
| 9 | import { MatGridTile } from './grid-tile';
|
---|
| 10 | import { TileStyleTarget } from './tile-styler';
|
---|
| 11 | import { Directionality } from '@angular/cdk/bidi';
|
---|
| 12 | import { NumberInput } from '@angular/cdk/coercion';
|
---|
| 13 | import { MatGridListBase } from './grid-list-base';
|
---|
| 14 | export declare class MatGridList implements MatGridListBase, OnInit, AfterContentChecked, TileStyleTarget {
|
---|
| 15 | private _element;
|
---|
| 16 | private _dir;
|
---|
| 17 | /** Number of columns being rendered. */
|
---|
| 18 | private _cols;
|
---|
| 19 | /** Used for determiningthe position of each tile in the grid. */
|
---|
| 20 | private _tileCoordinator;
|
---|
| 21 | /**
|
---|
| 22 | * Row height value passed in by user. This can be one of three types:
|
---|
| 23 | * - Number value (ex: "100px"): sets a fixed row height to that value
|
---|
| 24 | * - Ratio value (ex: "4:3"): sets the row height based on width:height ratio
|
---|
| 25 | * - "Fit" mode (ex: "fit"): sets the row height to total height divided by number of rows
|
---|
| 26 | */
|
---|
| 27 | private _rowHeight;
|
---|
| 28 | /** The amount of space between tiles. This will be something like '5px' or '2em'. */
|
---|
| 29 | private _gutter;
|
---|
| 30 | /** Sets position and size styles for a tile */
|
---|
| 31 | private _tileStyler;
|
---|
| 32 | /** Query list of tiles that are being rendered. */
|
---|
| 33 | _tiles: QueryList<MatGridTile>;
|
---|
| 34 | constructor(_element: ElementRef<HTMLElement>, _dir: Directionality);
|
---|
| 35 | /** Amount of columns in the grid list. */
|
---|
| 36 | get cols(): number;
|
---|
| 37 | set cols(value: number);
|
---|
| 38 | /** Size of the grid list's gutter in pixels. */
|
---|
| 39 | get gutterSize(): string;
|
---|
| 40 | set gutterSize(value: string);
|
---|
| 41 | /** Set internal representation of row height from the user-provided value. */
|
---|
| 42 | get rowHeight(): string | number;
|
---|
| 43 | set rowHeight(value: string | number);
|
---|
| 44 | ngOnInit(): void;
|
---|
| 45 | /**
|
---|
| 46 | * The layout calculation is fairly cheap if nothing changes, so there's little cost
|
---|
| 47 | * to run it frequently.
|
---|
| 48 | */
|
---|
| 49 | ngAfterContentChecked(): void;
|
---|
| 50 | /** Throw a friendly error if cols property is missing */
|
---|
| 51 | private _checkCols;
|
---|
| 52 | /** Default to equal width:height if rowHeight property is missing */
|
---|
| 53 | private _checkRowHeight;
|
---|
| 54 | /** Creates correct Tile Styler subtype based on rowHeight passed in by user */
|
---|
| 55 | private _setTileStyler;
|
---|
| 56 | /** Computes and applies the size and position for all children grid tiles. */
|
---|
| 57 | private _layoutTiles;
|
---|
| 58 | /** Sets style on the main grid-list element, given the style name and value. */
|
---|
| 59 | _setListStyle(style: [string, string | null] | null): void;
|
---|
| 60 | static ngAcceptInputType_cols: NumberInput;
|
---|
| 61 | }
|
---|