1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
9 | import { Observable, Subject } from 'rxjs';
|
10 | import { StyleDefinition, StyleUtils } from '../style-utils/style-utils';
|
11 | import { StyleBuilder } from '../style-builder/style-builder';
|
12 | import { MediaMarshaller } from '../media-marshaller/media-marshaller';
|
13 | export declare abstract class BaseDirective2 implements OnChanges, OnDestroy {
|
14 | protected elementRef: ElementRef;
|
15 | protected styleBuilder: StyleBuilder;
|
16 | protected styler: StyleUtils;
|
17 | protected marshal: MediaMarshaller;
|
18 | protected DIRECTIVE_KEY: string;
|
19 | protected inputs: string[];
|
20 |
|
21 | protected mru: StyleDefinition;
|
22 | protected destroySubject: Subject<void>;
|
23 | protected currentValue: any;
|
24 |
|
25 | protected get parentElement(): HTMLElement | null;
|
26 |
|
27 | protected get nativeElement(): HTMLElement;
|
28 |
|
29 | get activatedValue(): string;
|
30 | set activatedValue(value: string);
|
31 |
|
32 | protected styleCache: Map<string, StyleDefinition>;
|
33 | protected constructor(elementRef: ElementRef, styleBuilder: StyleBuilder, styler: StyleUtils, marshal: MediaMarshaller);
|
34 | /** For @Input changes */
|
35 | ngOnChanges(changes: SimpleChanges): void;
|
36 | ngOnDestroy(): void;
|
37 | /** Register with central marshaller service */
|
38 | protected init(extraTriggers?: Observable<any>[]): void;
|
39 | /** Add styles to the element using predefined style builder */
|
40 | protected addStyles(input: string, parent?: Object): void;
|
41 | /** Remove generated styles from an element using predefined style builder */
|
42 | protected clearStyles(): void;
|
43 | /** Force trigger style updates on DOM element */
|
44 | protected triggerUpdate(): void;
|
45 | /**
|
46 | * Determine the DOM element's Flexbox flow (flex-direction).
|
47 | *
|
48 | * Check inline style first then check computed (stylesheet) style.
|
49 | * And optionally add the flow value to element's inline style.
|
50 | */
|
51 | protected getFlexFlowDirection(target: HTMLElement, addIfMissing?: boolean): string;
|
52 | protected hasWrap(target: HTMLElement): boolean;
|
53 | /** Applies styles given via string pair or object map to the directive element */
|
54 | protected applyStyleToElement(style: StyleDefinition, value?: string | number, element?: HTMLElement): void;
|
55 | protected setValue(val: any, bp: string): void;
|
56 | protected updateWithValue(input: string): void;
|
57 | }
|