UNPKG

primeng

Version:

[![npm version](https://badge.fury.io/js/primeng.svg)](https://badge.fury.io/js/primeng) [![npm downloads](https://img.shields.io/npm/dm/primeng.svg)](https://www.npmjs.com/package/primeng) [![Actions CI](https://github.com/primefaces/primeng/workflows/No

172 lines (171 loc) 7.04 kB
import { AnimationEvent } from '@angular/animations'; import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, QueryList, Renderer2, TemplateRef } from '@angular/core'; import { OverlayService, PrimeNGConfig, PrimeTemplate } from 'primeng/api'; import { ConnectedOverlayScrollHandler } from 'primeng/dom'; import { Nullable, VoidListener } from 'primeng/ts-helpers'; import { Subscription } from 'rxjs'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; import * as i2 from "primeng/ripple"; import * as i3 from "primeng/api"; import * as i4 from "primeng/icons/times"; /** * OverlayPanel is a container component positioned as connected to its target. * @group Components */ export declare class OverlayPanel implements AfterContentInit, OnDestroy { private document; private platformId; el: ElementRef; renderer: Renderer2; cd: ChangeDetectorRef; private zone; config: PrimeNGConfig; overlayService: OverlayService; /** * Defines a string that labels the input for accessibility. * @group Props */ ariaLabel: string | undefined; /** * Establishes relationships between the component and label(s) where its value should be one or more element IDs. * @group Props */ ariaLabelledBy: string | undefined; /** * Enables to hide the overlay when outside is clicked. * @group Props */ dismissable: boolean; /** * When enabled, displays a close icon at top right corner. * @group Props */ showCloseIcon: boolean | undefined; /** * Inline style of the component. * @group Props */ style: { [klass: string]: any; } | null | undefined; /** * Style class of the component. * @group Props */ styleClass: string | undefined; /** * Target element to attach the panel, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). * @group Props */ appendTo: HTMLElement | ElementRef | TemplateRef<any> | string | null | undefined | any; /** * Whether to automatically manage layering. * @group Props */ autoZIndex: boolean; /** * Aria label of the close icon. * @group Props */ ariaCloseLabel: string | undefined; /** * Base zIndex value to use in layering. * @group Props */ baseZIndex: number; /** * When enabled, first button receives focus on show. * @group Props */ focusOnShow: boolean; /** * Transition options of the show animation. * @group Props */ showTransitionOptions: string; /** * Transition options of the hide animation. * @group Props */ hideTransitionOptions: string; /** * Callback to invoke when an overlay becomes visible. * @group Emits */ onShow: EventEmitter<any>; /** * Callback to invoke when an overlay gets hidden. * @group Emits */ onHide: EventEmitter<any>; templates: QueryList<PrimeTemplate> | undefined; container: Nullable<HTMLDivElement>; overlayVisible: boolean; render: boolean; isOverlayAnimationInProgress: boolean; selfClick: boolean; documentClickListener: VoidListener; target: any; willHide: Nullable<boolean>; scrollHandler: Nullable<ConnectedOverlayScrollHandler>; documentResizeListener: VoidListener; contentTemplate: Nullable<TemplateRef<any>>; closeIconTemplate: Nullable<TemplateRef<any>>; destroyCallback: Nullable<Function>; overlayEventListener: Nullable<(event?: any) => void>; overlaySubscription: Subscription | undefined; constructor(document: Document, platformId: any, el: ElementRef, renderer: Renderer2, cd: ChangeDetectorRef, zone: NgZone, config: PrimeNGConfig, overlayService: OverlayService); ngAfterContentInit(): void; bindDocumentClickListener(): void; unbindDocumentClickListener(): void; /** * Toggles the visibility of the panel. * @param {Event} event - Browser event * @param {Target} target - Target element. * @group Method */ toggle(event: any, target?: any): void; /** * Displays the panel. * @param {Event} event - Browser event * @param {Target} target - Target element. * @group Method */ show(event: any, target?: any): void; onOverlayClick(event: MouseEvent): void; onContentClick(event: MouseEvent): void; hasTargetChanged(event: any, target: any): boolean; appendContainer(): void; restoreAppend(): void; align(): void; onAnimationStart(event: AnimationEvent): void; onAnimationEnd(event: AnimationEvent): void; focus(): void; /** * Hides the panel. * @group Method */ hide(): void; onCloseClick(event: MouseEvent): void; onEscapeKeydown(event: KeyboardEvent): void; onWindowResize(): void; bindDocumentResizeListener(): void; unbindDocumentResizeListener(): void; bindScrollListener(): void; unbindScrollListener(): void; onContainerDestroy(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<OverlayPanel, never>; static ɵcmp: i0.ɵɵComponentDeclaration<OverlayPanel, "p-overlayPanel", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "dismissable": { "alias": "dismissable"; "required": false; }; "showCloseIcon": { "alias": "showCloseIcon"; "required": false; }; "style": { "alias": "style"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "autoZIndex": { "alias": "autoZIndex"; "required": false; }; "ariaCloseLabel": { "alias": "ariaCloseLabel"; "required": false; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; }; "focusOnShow": { "alias": "focusOnShow"; "required": false; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; }; }, { "onShow": "onShow"; "onHide": "onHide"; }, ["templates"], ["*"], false, never>; static ngAcceptInputType_dismissable: unknown; static ngAcceptInputType_showCloseIcon: unknown; static ngAcceptInputType_autoZIndex: unknown; static ngAcceptInputType_baseZIndex: unknown; static ngAcceptInputType_focusOnShow: unknown; } export declare class OverlayPanelModule { static ɵfac: i0.ɵɵFactoryDeclaration<OverlayPanelModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<OverlayPanelModule, [typeof OverlayPanel], [typeof i1.CommonModule, typeof i2.RippleModule, typeof i3.SharedModule, typeof i4.TimesIcon], [typeof OverlayPanel, typeof i3.SharedModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<OverlayPanelModule>; }