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

139 lines (136 loc) 3.99 kB
import { TemplateRef } from '@angular/core'; import { MenuItem, PassThrough, PassThroughOption } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link MegaMenu.pt} * @group Interface */ interface MegaMenuPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the start's DOM element. */ start?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the button's DOM element. */ button?: PassThroughOption<HTMLAnchorElement, I>; /** * Used to pass attributes to the button icon's DOM element. */ buttonIcon?: PassThroughOption<HTMLElement, I>; /** * Used to pass attributes to the root list's DOM element. */ rootList?: PassThroughOption<HTMLUListElement, I>; /** * Used to pass attributes to the submenu label's DOM element. */ submenuLabel?: PassThroughOption<HTMLLIElement, I>; /** * Used to pass attributes to the separator's DOM element. */ separator?: PassThroughOption<HTMLLIElement, I>; /** * Used to pass attributes to the item's DOM element. */ item?: PassThroughOption<HTMLLIElement, I>; /** * Used to pass attributes to the item content's DOM element. */ itemContent?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the item link's DOM element. */ itemLink?: PassThroughOption<HTMLAnchorElement, I>; /** * Used to pass attributes to the item icon's DOM element. */ itemIcon?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the item label's DOM element. */ itemLabel?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the submenu icon's DOM element. */ submenuIcon?: PassThroughOption<HTMLElement, I>; /** * Used to pass attributes to the overlay's DOM element. */ overlay?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the grid's DOM element. */ grid?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the column's DOM element. */ column?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the submenu's DOM element. */ submenu?: PassThroughOption<HTMLUListElement, I>; /** * Used to pass attributes to the end's DOM element. */ end?: PassThroughOption<HTMLDivElement, I>; } /** * Defines valid pass-through options in MegaMenu. * @see {@link MegaMenuPassThroughOptions} * * @template I Type of instance. */ type MegaMenuPassThrough<I = unknown> = PassThrough<I, MegaMenuPassThroughOptions<I>>; /** * Custom item template context. * @group Interface */ interface MegaMenuItemTemplateContext { /** * Menu item instance. */ $implicit: MenuItem; } /** * Defines valid templates in MegaMenu. * @group Templates */ interface MegaMenuTemplates { /** * Custom item template. * @param {Object} context - item context. */ item(context: MegaMenuItemTemplateContext): TemplateRef<MegaMenuItemTemplateContext>; /** * Custom template of start. */ start(): TemplateRef<void>; /** * Custom template of end. */ end(): TemplateRef<void>; /** * Custom template of submenu icon. */ submenuicon(): TemplateRef<void>; /** * Custom menu button template on responsive mode. */ button(): TemplateRef<void>; /** * Custom menu button icon template on responsive mode. */ buttonicon(): TemplateRef<void>; /** * Custom menu icon template. */ menuicon(): TemplateRef<void>; } export type { MegaMenuItemTemplateContext, MegaMenuPassThrough, MegaMenuPassThroughOptions, MegaMenuTemplates };