UNPKG

primeng

Version:

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

230 lines (226 loc) 9.31 kB
import { ConfirmPopupPassThrough, ConfirmPopupDefaultFocus, ConfirmPopupHeadlessTemplateContext, ConfirmPopupContentTemplateContext } from 'primeng/types/confirmpopup'; export * from 'primeng/types/confirmpopup'; import * as _angular_core from '@angular/core'; import { ElementRef, Renderer2, ChangeDetectorRef, TemplateRef } from '@angular/core'; import { MotionOptions, MotionEvent } from '@primeuix/motion'; import * as i2 from 'primeng/api'; import { OverlayService, Confirmation, ConfirmationService } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import * as i1 from 'primeng/bind'; import { Bind } from 'primeng/bind'; import { ConnectedOverlayScrollHandler } from 'primeng/dom'; import { CSSProperties, AppendTo } from 'primeng/types/shared'; import { Nullable, VoidListener } from 'primeng/ts-helpers'; import { Subscription } from 'rxjs'; 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; style: string; classes: { root: () => string[]; content: string; icon: ({ instance }: { instance: any; }) => any[]; message: string; footer: string; pcRejectButton: string; pcAcceptButton: string; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmPopupStyle, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConfirmPopupStyle>; } interface ConfirmPopupStyle extends BaseStyle { } /** * ConfirmPopup displays a confirmation overlay displayed relatively to its target. * @group Components */ declare class ConfirmPopup extends BaseComponent<ConfirmPopupPassThrough> { el: ElementRef; private confirmationService; renderer: Renderer2; cd: ChangeDetectorRef; overlayService: OverlayService; document: Document; componentName: string; $pcConfirmPopup: ConfirmPopup | undefined; bindDirectiveInstance: Bind; onAfterViewChecked(): void; /** * Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. * @group Props */ key: _angular_core.InputSignal<string | undefined>; /** * Element to receive the focus when the popup gets visible, valid values are "accept", "reject", and "none". * @group Props */ defaultFocus: _angular_core.InputSignal<ConfirmPopupDefaultFocus>; /** * Whether to automatically manage layering. * @group Props */ autoZIndex: _angular_core.InputSignalWithTransform<boolean, unknown>; /** * Base zIndex value to use in layering. * @group Props */ baseZIndex: _angular_core.InputSignalWithTransform<number, unknown>; /** * Inline style of the component. * @group Props */ style: _angular_core.InputSignal<CSSProperties>; /** * Style class of the component. * @group Props */ styleClass: _angular_core.InputSignal<string | undefined>; /** * Defines if the component is visible. * @group Props */ visible: _angular_core.InputSignal<boolean | undefined>; private _visible; computedVisible: _angular_core.Signal<boolean>; render: _angular_core.WritableSignal<boolean>; /** * The motion options. * @group Props */ motionOptions: _angular_core.InputSignal<MotionOptions | undefined>; computedMotionOptions: _angular_core.Signal<MotionOptions>; /** * Target element to attach the overlay, 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). * @defaultValue 'body' * @group Props */ appendTo: _angular_core.InputSignal<AppendTo>; headlessContext: _angular_core.Signal<ConfirmPopupHeadlessTemplateContext>; contentContext: _angular_core.Signal<ConfirmPopupContentTemplateContext>; $appendTo: _angular_core.Signal<AppendTo>; container: HTMLElement | null; subscription: Subscription; confirmation: _angular_core.WritableSignal<Nullable<Confirmation>>; autoFocusAccept: boolean; autoFocusReject: boolean; /** * Custom content template. * @group Templates */ contentTemplate: _angular_core.Signal<TemplateRef<ConfirmPopupContentTemplateContext> | undefined>; /** * Custom accept icon template. * @group Templates */ acceptIconTemplate: _angular_core.Signal<TemplateRef<void> | undefined>; /** * Custom reject icon template. * @group Templates */ rejectIconTemplate: _angular_core.Signal<TemplateRef<void> | undefined>; /** * Custom headless template. * @group Templates */ headlessTemplate: _angular_core.Signal<TemplateRef<ConfirmPopupHeadlessTemplateContext> | undefined>; acceptButtonViewChild: _angular_core.Signal<ElementRef<any> | undefined>; rejectButtonViewChild: _angular_core.Signal<ElementRef<any> | 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); option(name: string, k?: string): any; onEscapeKeydown(event: KeyboardEvent): void; onBeforeEnter(event: MotionEvent): void; handleFocus(): void; onAfterLeave(): void; getAcceptButtonProps(): any; getRejectButtonProps(): any; alignOverlay(): void; setZIndex(): void; alignArrow(): void; appendOverlay(): void; restoreAppend(): 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; get acceptButtonLabel(): string; get rejectButtonLabel(): string; get rejectVisible(): boolean; get acceptVisible(): boolean; get rejectButtonSize(): any; get rejectButtonText(): boolean; get acceptButtonSize(): any; get rejectButtonStyleClass(): string | undefined; get acceptButtonStyleClass(): string | undefined; get hasIcon(): boolean; get hasRejectIcon(): boolean; get hasAcceptIcon(): boolean; get rejectIcon(): string | undefined; get acceptIcon(): string | undefined; get message(): string | undefined; onDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmPopup, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmPopup, "p-confirmpopup", never, { "key": { "alias": "key"; "required": false; "isSignal": true; }; "defaultFocus": { "alias": "defaultFocus"; "required": false; "isSignal": true; }; "autoZIndex": { "alias": "autoZIndex"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "motionOptions": { "alias": "motionOptions"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; }, {}, ["contentTemplate", "acceptIconTemplate", "rejectIconTemplate", "headlessTemplate"], never, true, [{ directive: typeof i1.Bind; inputs: {}; outputs: {}; }]>; } declare class ConfirmPopupModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmPopupModule, never>; static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ConfirmPopupModule, never, [typeof ConfirmPopup, typeof i2.SharedModule], [typeof ConfirmPopup, typeof i2.SharedModule]>; static ɵinj: _angular_core.ɵɵInjectorDeclaration<ConfirmPopupModule>; } export { ConfirmPopup, ConfirmPopupClasses, ConfirmPopupModule, ConfirmPopupStyle };