ri-flex-layout
Version:
An alternative library to Angular's deprecated [angular-flex-layout](https://github.com/angular/flex-layout) library. `ri-flex-layout` helps you achieve responsive layouts in Angular applications with minimal code changes.
52 lines (51 loc) • 2.77 kB
TypeScript
import { ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { StyleDefinition, StyleUtilsService } from '../style-utils/style-utils.service';
import { StyleGenerator } from '../style-generator/style-generator';
import { Observable, Subject } from 'rxjs';
import { MediaMarshaller } from '../media-marshaller/media-marshaller';
import * as i0 from "@angular/core";
export declare abstract class BaseDirective implements OnChanges, OnDestroy {
protected elementRef: ElementRef;
protected styleBuilder: StyleGenerator;
protected styler: StyleUtilsService;
protected marshal: MediaMarshaller;
protected RI_DIRECTIVE_KEY: string;
protected inputs: string[];
protected mru: StyleDefinition;
protected destroySubject: Subject<void>;
protected currentValue: any;
/** Access to host element's parent DOM node */
protected get parentElement(): HTMLElement | null;
/** Access to the HTMLElement for the directive */
protected get nativeElement(): HTMLElement;
/** Access to the activated value for the directive */
get activatedValue(): string;
set activatedValue(value: string);
/** Cache map for style computation */
protected styleCache: Map<string, StyleDefinition>;
protected constructor(elementRef: ElementRef, styleBuilder: StyleGenerator, styler: StyleUtilsService, marshal: MediaMarshaller);
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
/** Register with central marshaller service */
protected init(extraTriggers?: Observable<any>[]): void;
/** Add styles to the element using predefined style builder */
protected addStyles(input: string, parent?: Object): void;
/** Remove generated styles from an element using predefined style builder */
protected clearStyles(): void;
/** Force trigger style updates on DOM element */
protected triggerUpdate(): void;
/**
* Determine the DOM element's Flexbox flow (flex-direction).
*
* Check inline style first then check computed (stylesheet) style.
* And optionally add the flow value to element's inline style.
*/
protected getFlexFlowDirection(target: HTMLElement, addIfMissing?: boolean): string;
protected hasWrap(target: HTMLElement): boolean;
/** Applies styles given via string pair or object map to the directive element */
protected applyStyleToElement(style: StyleDefinition, value?: string | number, element?: HTMLElement): void;
protected setValue(val: any, bp: string): void;
protected updateWithValue(input: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<BaseDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseDirective, never, never, {}, {}, never, never, true, never>;
}