UNPKG

2.28 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, OnChanges, SimpleChanges, AfterViewInit } from '@angular/core';
9import { BaseDirective2, LayoutConfigOptions, MediaMarshaller, StyleUtils, StyleBuilder } from '@angular/flex-layout/core';
10export interface ShowHideParent {
11 display: string;
12 isServer: boolean;
13}
14export declare class ShowHideStyleBuilder extends StyleBuilder {
15 buildStyles(show: string, parent: ShowHideParent): {
16 display: string;
17 };
18}
19export declare class ShowHideDirective extends BaseDirective2 implements AfterViewInit, OnChanges {
20 protected layoutConfig: LayoutConfigOptions;
21 protected platformId: Object;
22 protected serverModuleLoaded: boolean;
23 protected DIRECTIVE_KEY: string;
24 /** Original DOM Element CSS display style */
25 protected display: string;
26 protected hasLayout: boolean;
27 protected hasFlexChild: boolean;
28 constructor(elementRef: ElementRef, styleBuilder: ShowHideStyleBuilder, styler: StyleUtils, marshal: MediaMarshaller, layoutConfig: LayoutConfigOptions, platformId: Object, serverModuleLoaded: boolean);
29 ngAfterViewInit(): void;
30 /**
31 * On changes to any @Input properties...
32 * Default to use the non-responsive Input value ('fxShow')
33 * Then conditionally override with the mq-activated Input's current value
34 */
35 ngOnChanges(changes: SimpleChanges): void;
36 /**
37 * Watch for these extra triggers to update fxShow, fxHide stylings
38 */
39 protected trackExtraTriggers(): void;
40 /**
41 * Override accessor to the current HTMLElement's `display` style
42 * Note: Show/Hide will not change the display to 'flex' but will set it to 'block'
43 * unless it was already explicitly specified inline or in a CSS stylesheet.
44 */
45 protected getDisplayStyle(): string;
46 /** Validate the visibility value and then update the host's inline display style */
47 protected updateWithValue(value?: boolean | string): void;
48}
49/**
50 * 'show' Layout API directive
51 */
52export declare class DefaultShowHideDirective extends ShowHideDirective {
53 protected inputs: string[];
54}