blob: 1c0dee1dbb2695a31471c46f2872327fc7e819d2 [file] [log] [blame]
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { DoCheck, ElementRef } from '@angular/core';
import { NgStyle, ɵNgStyleImpl, ɵNgStyleR2Impl } from '@angular/common';
import { DomSanitizer } from '@angular/platform-browser';
import { BaseDirective2, StyleUtils, MediaMarshaller } from '@angular/flex-layout/core';
import { NgStyleType, NgStyleMap } from './style-transforms';
export declare class StyleDirective extends BaseDirective2 implements DoCheck {
protected elementRef: ElementRef;
protected styler: StyleUtils;
protected marshal: MediaMarshaller;
protected delegate: ɵNgStyleImpl;
protected sanitizer: DomSanitizer;
private readonly ngStyleInstance;
protected DIRECTIVE_KEY: string;
protected fallbackStyles: NgStyleMap;
protected isServer: boolean;
constructor(elementRef: ElementRef, styler: StyleUtils, marshal: MediaMarshaller, delegate: ɵNgStyleImpl, sanitizer: DomSanitizer, ngStyleInstance: NgStyle, serverLoaded: boolean, platformId: Object);
/** Add generated styles */
protected updateWithValue(value: any): void;
/** Remove generated styles */
protected clearStyles(): void;
/**
* Convert raw strings to ngStyleMap; which is required by ngStyle
* NOTE: Raw string key-value pairs MUST be delimited by `;`
* Comma-delimiters are not supported due to complexities of
* possible style values such as `rgba(x,x,x,x)` and others
*/
protected buildStyleMap(styles: NgStyleType): NgStyleMap;
/** For ChangeDetectionStrategy.onPush and ngOnChanges() updates */
ngDoCheck(): void;
}
export declare const LayoutNgStyleImplProvider: {
provide: typeof ɵNgStyleImpl;
useClass: typeof ɵNgStyleR2Impl;
};
/**
* Directive to add responsive support for ngStyle.
*
*/
export declare class DefaultStyleDirective extends StyleDirective implements DoCheck {
protected inputs: string[];
}