UNPKG

2.41 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, OnDestroy, NgZone, AfterContentInit } from '@angular/core';
9import { Directionality } from '@angular/cdk/bidi';
10import { BaseDirective2, StyleBuilder, StyleDefinition, StyleUtils, MediaMarshaller, ElementMatcher } from '@angular/flex-layout/core';
11import { Subject } from 'rxjs';
12export interface LayoutGapParent {
13 directionality: string;
14 items: HTMLElement[];
15 layout: string;
16}
17export declare class LayoutGapStyleBuilder extends StyleBuilder {
18 private _styler;
19 constructor(_styler: StyleUtils);
20 buildStyles(gapValue: string, parent: LayoutGapParent): StyleDefinition;
21 sideEffect(gapValue: string, _styles: StyleDefinition, parent: LayoutGapParent): void;
22}
23/**
24 * 'layout-padding' styling directive
25 * Defines padding of child elements in a layout container
26 */
27export declare class LayoutGapDirective extends BaseDirective2 implements AfterContentInit, OnDestroy {
28 protected zone: NgZone;
29 protected directionality: Directionality;
30 protected styleUtils: StyleUtils;
31 protected layout: string;
32 protected DIRECTIVE_KEY: string;
33 protected observerSubject: Subject<void>;
34 /** Special accessor to query for all child 'element' nodes regardless of type, class, etc */
35 protected get childrenNodes(): HTMLElement[];
36 constructor(elRef: ElementRef, zone: NgZone, directionality: Directionality, styleUtils: StyleUtils, styleBuilder: LayoutGapStyleBuilder, marshal: MediaMarshaller);
37 ngAfterContentInit(): void;
38 ngOnDestroy(): void;
39 /**
40 * Cache the parent container 'flex-direction' and update the 'margin' styles
41 */
42 protected onLayoutChange(matcher: ElementMatcher): void;
43 /**
44 *
45 */
46 protected updateWithValue(value: string): void;
47 /** We need to override clearStyles because in most cases mru isn't populated */
48 protected clearStyles(): void;
49 /** Determine if an element will show or hide based on current activation */
50 protected willDisplay(source: HTMLElement): boolean;
51 protected buildChildObservable(): void;
52 protected observer?: MutationObserver;
53}
54export declare class DefaultLayoutGapDirective extends LayoutGapDirective {
55 protected inputs: string[];
56}