import * as i0 from "@angular/core"; /** * Keeps a field overlay — a select panel, autocomplete list, date picker or time * picker — inside the bounds of the form it belongs to. * * Without this, the CDK positions these panels against the viewport, so a panel * that cannot fit below its field flips upward and is drawn over the form's * heading and pinned tab strip, visually escaping the form. * * Containment is expressed as a clip band published on the document element and * consumed by each overlay's stylesheet: * --ieeesa-form-overlay-clip-top distance from the viewport top to the band * --ieeesa-form-overlay-clip-bottom distance from the band to the viewport bottom * plus an `ieeesa-form-overlay-open` class that activates those rules. * * The band is the form's field area intersected with the space the form's own * pinned chrome leaves free, so a panel never covers the tab strip / step header * above it or the action bar below it. It is recalculated on scroll and resize: * the form scrolls with the page, so a band measured only when the panel opened * would drift and clip the panel away as the user scrolled. * @export * @class FormOverlayBoundsService */ export declare class FormOverlayBoundsService { private static readonly OPEN_CLASS; private static readonly CLIP_TOP_PROPERTY; private static readonly CLIP_BOTTOM_PROPERTY; /** Field areas an overlay can be contained within, most specific first. */ private static readonly FIELD_AREA_SELECTORS; /** Chrome pinned above the field area, which a panel must not cover. */ private static readonly PINNED_ABOVE_SELECTORS; /** Chrome pinned below the field area, which a panel must not cover. */ private static readonly PINNED_BELOW_SELECTORS; private fieldArea?; private updateBand?; /** * Returns the form field area the given host element sits in, or null when the * host is not inside a form (a filter popover, a dialog) and so needs no * containment. * @param {HTMLElement} host * @return {(HTMLElement | null)} * @memberof FormOverlayBoundsService */ getFieldArea(host: HTMLElement): HTMLElement | null; /** * Starts containing overlays to the form the host element belongs to, and keeps * the band current until `release` is called. * @param {HTMLElement} host * @return {(HTMLElement | null)} the field area, or null when not in a form * @memberof FormOverlayBoundsService */ contain(host: HTMLElement): HTMLElement | null; /** * Returns the band an overlay is currently confined to, in viewport * coordinates. Callers use it to position a panel inside the form. * @return {({ top: number; bottom: number } | null)} * @memberof FormOverlayBoundsService */ getBand(): { top: number; bottom: number; } | null; positionOverlayAboveField(host: HTMLElement, panelClass: string, triggerSelector: string): void; /** * Stops containing overlays and removes the published band, so unrelated * overlays are positioned normally. * @memberof FormOverlayBoundsService */ release(): void; /** * Measures the usable band: the field area, trimmed by any of the form's own * chrome that is currently pinned over it. * @param {HTMLElement} fieldArea * @return {{ top: number; bottom: number }} * @memberof FormOverlayBoundsService */ private measureBand; /** * Publishes the band as clip custom properties for the overlay stylesheets. * @param {HTMLElement} fieldArea * @memberof FormOverlayBoundsService */ private publishBand; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }