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

86 lines (83 loc) 2.65 kB
import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough } from 'primeng/api'; /** * 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 { TimelineItemTemplateContext, TimelinePassThrough, TimelinePassThroughOptions, TimelineTemplates };