@aheadlabs/ngx-toolset
Version:
Opinionated Angular library that contains common tools and patterns to simplify things and reuse code.
53 lines (52 loc) • 2.21 kB
TypeScript
import { OnInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
import { BreakpointObserver, MediaMatcher } from '@angular/cdk/layout';
import * as i0 from "@angular/core";
/**
* Emits a string that can be used to visualize the current bootstrap breakpoint.
* For more info, see https://getbootstrap.com/docs/5.0/layout/breakpoints/
*/
export declare class BootstrapBreakpointComponent implements OnInit, OnDestroy {
mediaMatcher: MediaMatcher;
breakPointObserver: BreakpointObserver;
bootstrapBreakpointComponent: ElementRef;
/**
* Event that emits bootstrap breakpoint value
* @type EventEmitter<string>
* @public
*/
bootstrapBreakpoint: EventEmitter<string>;
/**
* Event that emits bootstrap breakpoint value with a hyphen at the start.
* F.I: -sm, -xs, -xxl
*
* @type EventEmitter<string>
* @public
*/
bootstrapBreakpointStart: EventEmitter<string>;
/**
* Event that emits bootstrap breakpoint value with a hyphen at the end.
* F.I: sm-, xs-, xxl-
* @type EventEmitter<string>
* @public
*/
bootstrapBreakpointEnd: EventEmitter<string>;
/**
* Event that emits bootstrap breakpoint value with a hyphen both at the start and end.
* F.I: -sm-, -xs-, -xxl-
* @type EventEmitter<string>
* @public
*/
bootstrapBreakpointStartEnd: EventEmitter<string>;
private _bootstrapBreakpoint;
private _matcher;
private _mediaQueries;
constructor(mediaMatcher: MediaMatcher, breakPointObserver: BreakpointObserver);
ngOnInit(): void;
private getBreakpointFromMediaQuery;
private handleMediaQueryListEvent;
private observeMediaQueries;
private setVariables;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<BootstrapBreakpointComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<BootstrapBreakpointComponent, "ngxtoolset-bootstrap-breakpoint", never, {}, { "bootstrapBreakpoint": "bootstrapBreakpoint"; "bootstrapBreakpointStart": "bootstrapBreakpointStart"; "bootstrapBreakpointEnd": "bootstrapBreakpointEnd"; "bootstrapBreakpointStartEnd": "bootstrapBreakpointStartEnd"; }, never, never, false>;
}