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,

94 lines (91 loc) 2.91 kB
import { TemplateRef } from '@angular/core'; import { PassThrough, PassThroughOption } from 'primeng/api'; /** * Defines valid align values for Timeline. */ type TimelineAlign = 'left' | 'right' | 'top' | 'bottom' | 'alternate'; /** * Defines valid layout values for Timeline. */ type TimelineLayout = 'vertical' | 'horizontal'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Timeline.pt} * @group Interface */ interface TimelinePassThroughOptions<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 event's DOM element. */ event?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the event opposite's DOM element. */ eventOpposite?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the event separator's DOM element. */ eventSeparator?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the event marker's DOM element. */ eventMarker?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the event connector's DOM element. */ eventConnector?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the event content's DOM element. */ eventContent?: PassThroughOption<HTMLDivElement, I>; } /** * Defines valid pass-through options in Timeline. * @see {@link TimelinePassThroughOptions} * * @template I Type of instance. */ type TimelinePassThrough<I = unknown> = PassThrough<I, TimelinePassThroughOptions<I>>; /** * Custom item template context. * @template T Type of item. * @group Interface */ interface TimelineItemTemplateContext<T = any> { /** * Item instance. */ $implicit: T; } /** * Defines valid templates in Timeline. * @group Templates */ interface TimelineTemplates<T = any> { /** * Custom content template. * @param {TimelineItemTemplateContext} context - item data. */ content(context: TimelineItemTemplateContext<T>): TemplateRef<TimelineItemTemplateContext<T>>; /** * Custom opposite item template. * @param {TimelineItemTemplateContext} context - item data. */ opposite(context: TimelineItemTemplateContext<T>): TemplateRef<TimelineItemTemplateContext<T>>; /** * Custom marker template. * @param {TimelineItemTemplateContext} context - item data. */ marker(context: TimelineItemTemplateContext<T>): TemplateRef<TimelineItemTemplateContext<T>>; } export type { TimelineAlign, TimelineItemTemplateContext, TimelineLayout, TimelinePassThrough, TimelinePassThroughOptions, TimelineTemplates };