import * as i0 from '@angular/core'; import { ElementRef, OnChanges, OnDestroy, EventEmitter, NgZone, SimpleChanges, AfterViewInit, DoCheck, ViewContainerRef, OnInit } from '@angular/core'; import * as i6 from '@angular/material/button'; import { MatButton, MatIconButton, MatIconAnchor, MatFabButton, MatFabAnchor, MatMiniFabButton, MatMiniFabAnchor } from '@angular/material/button'; import { Subscription } from 'rxjs'; import * as i8 from '@angular/cdk/observers'; import { ContentObserver } from '@angular/cdk/observers'; import * as i5 from '@angular/common'; import * as i7 from '@angular/material/progress-spinner'; /** * Use this directive to designate a target HTML element, based on which the child elements' * `[buiSizing]` directives will calculate the sizes. * * ```html *
*
*
*
*
*
*
*
* ``` */ declare class SizingMonitorDirective { readonly element: ElementRef; constructor(element: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * This directive monitors the changes in the width of the `sizingBy` target, and apply specified style * classes and/or inline styles to the current element dynamically. * * In order for the layout engine to efficiently calculate and stabilize the dimensions, the effective style property * `box-sizing` of the `sizingBy` target element must be set to `border-box`. * * The directive uses [ResizeObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API) * to capture the events of element resizing. Please use a polyfill if you want to support older browsers * that do not implement ResizeObserver API. * * Examples: * * ```html *
*
*
*
*
* ``` */ declare class SizingDirective implements OnChanges, OnDestroy { private _doc; private _defaultTarget; private _zone; /** * @ignore */ static defaultSizingBreakpoints: string[]; /** * Specifies the breakpoint widths and the style classes. * * The sizing spec `{"400": "small", "800": "medium", "~": "large"}` tells the directive to apply * a style class `small` when the width of the monitored target is smaller than 400 pixels, * `medium` when the width is between 400 and 800 pixels, and `large` when above. * * @example {'400': 'small', '800': 'medium', '~': 'large'} */ buiSizing: string | Array | { [key: string]: string; }; /** * The alias of `buiSizingBy`. * @default 'root' * @deprecated * @ignore */ sizingBy: 'root' | 'parent' | HTMLElement; /** * Designate an element to be monitored for recalculating the style classes of the current element. * * - `root` specifies the document root or the enclosing shadow host. This is the default value. * - `parent` specifies the parent element. * * @default 'root' * @alias sizingBy */ get buiSizingBy(): 'root' | 'parent' | HTMLElement; set buiSizingBy(target: 'root' | 'parent' | HTMLElement); /** * Emits `{width, height}` when the monitor target element resizes. * * Note that the dimensions emitted are of the [sizingBy] target, but not the current element. */ buiResized: EventEmitter<{ width: number; height: number; }>; /** * Recalculate the height of this element according to the height of the monitored target. */ buiFixedHeight: boolean; private _monitorTarget; private _observer; private _sizingSpec; private _width; private _height; private _reflowFrameCount; private _element; private _frameHandlerId; constructor(_doc: Document, _defaultTarget: SizingMonitorDirective, elemRef: ElementRef, _zone: NgZone); ngOnChanges(_: SimpleChanges): void; ngOnDestroy(): void; private _initOrReset; private _setUpNodeMonitor; private _tearDownNodeMonitor; private _runWithObserver; private _calculateSize; private _applyClassesOrStyles; private _removeClassesOrStyles; private _reflowHeight; private _toNumber; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Use this directive on a `MatButton` element to provide an alternative view when an async operation is in progress. * * For example: * * ``` * * ``` * * Please refer to [Material Design](https://material.io/components/progress-indicators#circular-progress-indicators) * for more details of integrating circular spinner component with action buttons. * * The operation is considered 'in progress' when the bound property `buiAwait` evaluates to * * - `true`; or * - a `number` within 0 - 100; or * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy * * When in progress * * - the button's caption will be hidden; * - a `` will be displayed in place of the caption; * - the button will be disabled by setting the property `disabled` of the `MatButton` instance. */ declare class AwaitDirective implements AfterViewInit, DoCheck { private readonly _eRef; readonly _button: MatButton; readonly _iconButton: MatIconButton; readonly _iconAnchor: MatIconAnchor; readonly _fab: MatFabButton; readonly _fabAnchor: MatFabAnchor; readonly _miniFab: MatMiniFabButton; readonly _miniFabAnchor: MatMiniFabAnchor; private readonly doc; private _viewCont; /** * Indicates the `in progress` status of an async operation. * * The operation is considered 'in progress' when the property evaluates to * * - `true`; or * - a `number` within 0 - 100; or * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy * * When it is a number, it represets the progress in percentage term. */ buiAwait: null | undefined | boolean | Subscription | number; /** The ARIA label to be put on the spinner. The default value is `"In progress"`. */ buiAwaitAriaLabel: string; /** The diameter of the in-progress spinner. The default value is `20`. */ buiAwaitDiameter: number; private _overlayEl; private _processing; private _spinnerRef; private _captionWrapper; private button; constructor(_eRef: ElementRef, _button: MatButton, _iconButton: MatIconButton, _iconAnchor: MatIconAnchor, _fab: MatFabButton, _fabAnchor: MatFabAnchor, _miniFab: MatMiniFabButton, _miniFabAnchor: MatMiniFabAnchor, doc: Document, _viewCont: ViewContainerRef); /** @ignore */ ngAfterViewInit(): void; /** @ignore */ ngDoCheck(): void; /** @ignore */ private get _isDeterminate(); private _statusChanged; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Use `[bui-class.not-empty]` to specify a style class activated only when the host element has DOM children; * * use `[bui-class.empty]` for a style class activated when it has no DOM children. * * Use `[bui-class.no-text]` to specify a style class activated only when the host element has text content; * * use `[bui-class.has-text]` for a style class activated when it has no text content. */ declare class ObserveContentClassDirective implements OnDestroy, OnInit { private readonly subscription; private readonly element; private classToRemove; classEmpty?: string; classNotEmpty?: string; classNoText?: string; classHasText?: string; constructor(observer: ContentObserver, elementRef: ElementRef); ngOnInit(): void; ngOnDestroy(): void; private checkClass; private checkClassWith; private addClass; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * For functionality that cannot be easily achieved via CSS. */ declare class BehaviorModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { AwaitDirective, BehaviorModule, ObserveContentClassDirective, SizingDirective, SizingMonitorDirective };