UNPKG

2.16 kBTypeScriptView Raw
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 */
8import { ElementRef, OnInit } from '@angular/core';
9import { BaseDirective2, LayoutConfigOptions, StyleUtils, StyleBuilder, StyleDefinition, MediaMarshaller, ElementMatcher } from '@angular/flex-layout/core';
10interface FlexBuilderParent {
11 direction: string;
12 hasWrap: boolean;
13}
14export declare class FlexStyleBuilder extends StyleBuilder {
15 protected layoutConfig: LayoutConfigOptions;
16 constructor(layoutConfig: LayoutConfigOptions);
17 buildStyles(input: string, parent: FlexBuilderParent): StyleDefinition;
18}
19/**
20 * Directive to control the size of a flex item using flex-basis, flex-grow, and flex-shrink.
21 * Corresponds to the css `flex` shorthand property.
22 *
23 * @see https://css-tricks.com/snippets/css/a-guide-to-flexbox/
24 */
25export declare class FlexDirective extends BaseDirective2 implements OnInit {
26 protected layoutConfig: LayoutConfigOptions;
27 protected marshal: MediaMarshaller;
28 protected DIRECTIVE_KEY: string;
29 protected direction?: string;
30 protected wrap?: boolean;
31 get shrink(): string;
32 set shrink(value: string);
33 get grow(): string;
34 set grow(value: string);
35 protected flexGrow: string;
36 protected flexShrink: string;
37 constructor(elRef: ElementRef, styleUtils: StyleUtils, layoutConfig: LayoutConfigOptions, styleBuilder: FlexStyleBuilder, marshal: MediaMarshaller);
38 ngOnInit(): void;
39 /**
40 * Caches the parent container's 'flex-direction' and updates the element's style.
41 * Used as a handler for layout change events from the parent flex container.
42 */
43 protected onLayoutChange(matcher: ElementMatcher): void;
44 /** Input to this is exclusively the basis input value */
45 protected updateWithValue(value: string): void;
46 /** Trigger a style reflow, usually based on a shrink/grow input event */
47 protected triggerReflow(): void;
48}
49export declare class DefaultFlexDirective extends FlexDirective {
50 protected inputs: string[];
51}
52export {};