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

106 lines (103 loc) 3.12 kB
import { Confirmation, PassThrough, PassThroughOption } from 'primeng/api'; import { ButtonPassThrough } from 'primeng/types/button'; import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link ConfirmPopup.pt} * @group Interface */ interface ConfirmPopupPassThroughOptions<I = unknown> { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption<HTMLElement, I>; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the content's DOM element. */ content?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the icon's DOM element. */ icon?: PassThroughOption<HTMLElement, I>; /** * Used to pass attributes to the message's DOM element. */ message?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the footer's DOM element. */ footer?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the reject Button component. * @see {@link ButtonPassThrough} */ pcRejectButton?: ButtonPassThrough; /** * Used to pass attributes to the accept Button component. * @see {@link ButtonPassThrough} */ pcAcceptButton?: ButtonPassThrough; /** * Used to pass options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in ConfirmPopup. * @see {@link ConfirmPopupPassThroughOptions} * * @template I Type of instance. */ type ConfirmPopupPassThrough<I = unknown> = PassThrough<I, ConfirmPopupPassThroughOptions<I>>; /** * Custom headless template context. * @group Interface */ interface ConfirmPopupHeadlessTemplateContext { /** * Confirmation instance. */ $implicit: Confirmation | null | undefined; } /** * Custom content template context. * @group Interface */ interface ConfirmPopupContentTemplateContext { /** * Confirmation instance. */ $implicit: Confirmation | null | undefined; } /** * Defines valid templates in ConfirmPopup. * @group Templates */ interface ConfirmPopupTemplates { /** * Custom content template. * @param {Object} context - content context. */ content(context: ConfirmPopupContentTemplateContext): TemplateRef<ConfirmPopupContentTemplateContext>; /** * Custom reject icon template. */ rejecticon(): TemplateRef<void>; /** * Custom accept icon template. */ accepticon(): TemplateRef<void>; /** * Custom headless template. * @param {Object} context - headless context. */ headless(context: ConfirmPopupHeadlessTemplateContext): TemplateRef<ConfirmPopupHeadlessTemplateContext>; } export type { ConfirmPopupContentTemplateContext, ConfirmPopupHeadlessTemplateContext, ConfirmPopupPassThrough, ConfirmPopupPassThroughOptions, ConfirmPopupTemplates };