UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

219 lines (214 loc) 7.65 kB
import { AnimationEvent } from '@angular/animations'; import * as i0 from '@angular/core'; import { AfterContentInit, OnDestroy, ElementRef, Renderer2, ChangeDetectorRef, TemplateRef, QueryList } from '@angular/core'; import * as i1 from 'primeng/api'; import { OverlayService, Confirmation, ConfirmationService, PrimeTemplate } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import { ConnectedOverlayScrollHandler } from 'primeng/dom'; import { Nullable, VoidListener } from 'primeng/ts-helpers'; import { Subscription } from 'rxjs'; import * as _primeuix_styled from '@primeuix/styled'; import { BaseStyle } from 'primeng/base'; /** * * ConfirmPopup displays a confirmation overlay displayed relatively to its target. * * [Live Demo](https://www.primeng.org/confirmpopup) * * @module confirmpopupstyle * */ declare enum ConfirmPopupClasses { /** * Class name of the root element */ root = "p-confirmpopup", /** * Class name of the content element */ content = "p-confirmpopup-content", /** * Class name of the icon element */ icon = "p-confirmpopup-icon", /** * Class name of the message element */ message = "p-confirmpopup-message", /** * Class name of the footer element */ footer = "p-confirmpopup-footer", /** * Class name of the reject button element */ pcRejectButton = "p-confirmpopup-reject-button", /** * Class name of the accept button element */ pcAcceptButton = "p-confirmpopup-accept-button" } declare class ConfirmPopupStyle extends BaseStyle { name: string; theme: _primeuix_styled.StyleType; classes: { root: () => string[]; content: string; icon: ({ instance }: { instance: any; }) => any[]; message: string; footer: string; pcRejectButton: string; pcAcceptButton: string; }; static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmPopupStyle, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmPopupStyle>; } interface ConfirmPopupStyle extends BaseStyle { } /** * ConfirmPopup displays a confirmation overlay displayed relatively to its target. * @group Components */ declare class ConfirmPopup extends BaseComponent implements AfterContentInit, OnDestroy { el: ElementRef; private confirmationService; renderer: Renderer2; cd: ChangeDetectorRef; overlayService: OverlayService; document: Document; /** * Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. * @group Props */ key: string | undefined; /** * Element to receive the focus when the popup gets visible, valid values are "accept", "reject", and "none". * @group Props */ defaultFocus: string; /** * Transition options of the show animation. * @group Props */ showTransitionOptions: string; /** * Transition options of the hide animation. * @group Props */ hideTransitionOptions: string; /** * Whether to automatically manage layering. * @group Props */ autoZIndex: boolean; /** * Base zIndex value to use in layering. * @group Props */ baseZIndex: number; /** * Inline style of the component. * @group Props */ style: { [klass: string]: any; } | null | undefined; /** * Style class of the component. * @group Props */ styleClass: string | undefined; /** * Defines if the component is visible. * @group Props */ get visible(): any; set visible(value: any); container: Nullable<HTMLDivElement>; subscription: Subscription; confirmation: Nullable<Confirmation>; autoFocusAccept: boolean; autoFocusReject: boolean; contentTemplate: Nullable<TemplateRef<any>>; acceptIconTemplate: Nullable<TemplateRef<any>>; rejectIconTemplate: Nullable<TemplateRef<any>>; headlessTemplate: Nullable<TemplateRef<any>>; _contentTemplate: TemplateRef<any> | undefined; _acceptIconTemplate: TemplateRef<any> | undefined; _rejectIconTemplate: TemplateRef<any> | undefined; _headlessTemplate: TemplateRef<any> | undefined; _visible: boolean | undefined; documentClickListener: VoidListener; documentResizeListener: VoidListener; scrollHandler: Nullable<ConnectedOverlayScrollHandler>; private window; _componentStyle: ConfirmPopupStyle; constructor(el: ElementRef, confirmationService: ConfirmationService, renderer: Renderer2, cd: ChangeDetectorRef, overlayService: OverlayService, document: Document); templates: QueryList<PrimeTemplate> | undefined; ngAfterContentInit(): void; option(name: string, k?: string): any; onEscapeKeydown(event: KeyboardEvent): void; onAnimationStart(event: AnimationEvent): void; onAnimationEnd(event: AnimationEvent): void; getAcceptButtonProps(): any; getRejectButtonProps(): any; align(): void; hide(): void; onAccept(): void; onReject(): void; onOverlayClick(event: MouseEvent): void; bindListeners(): void; unbindListeners(): void; bindDocumentClickListener(): void; unbindDocumentClickListener(): void; onWindowResize(): void; bindDocumentResizeListener(): void; unbindDocumentResizeListener(): void; bindScrollListener(): void; unbindScrollListener(): void; unsubscribeConfirmationSubscriptions(): void; onContainerDestroy(): void; restoreAppend(): void; get acceptButtonLabel(): string; get rejectButtonLabel(): string; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmPopup, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmPopup, "p-confirmpopup", never, { "key": { "alias": "key"; "required": false; }; "defaultFocus": { "alias": "defaultFocus"; "required": false; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; }; "autoZIndex": { "alias": "autoZIndex"; "required": false; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; }; "style": { "alias": "style"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; }, {}, ["contentTemplate", "acceptIconTemplate", "rejectIconTemplate", "headlessTemplate", "templates"], never, true, never>; static ngAcceptInputType_autoZIndex: unknown; static ngAcceptInputType_baseZIndex: unknown; } declare class ConfirmPopupModule { static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmPopupModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ConfirmPopupModule, never, [typeof ConfirmPopup, typeof i1.SharedModule], [typeof ConfirmPopup, typeof i1.SharedModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<ConfirmPopupModule>; } /** * Defines valid templates in ConfirmPopup. * @group Templates */ interface ConfirmPopupTemplates { /** * Custom content template. */ content(context: { $implicit?: any; }): TemplateRef<any>; /** * Custom template of rejecticon. */ rejecticon(): TemplateRef<any>; /** * Custom template of accepticon. */ accepticon(): TemplateRef<any>; /** * Headless template. */ headless(context: { $implicit?: any; }): TemplateRef<any>; } export { ConfirmPopup, ConfirmPopupClasses, ConfirmPopupModule, ConfirmPopupStyle }; export type { ConfirmPopupTemplates };