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,

435 lines (432 loc) 14.4 kB
import { PassThrough, PassThroughOption } from 'primeng/api'; import { CarouselPassThrough, CarouselContentPassThrough, CarouselItemPassThrough } from 'primeng/types/carousel'; /** * Represents a pending action dispatched from toolbar to the active gallery item. * @group Interface */ interface GalleryPendingAction { /** * The type of the action. */ type: 'zoom-in' | 'zoom-out' | 'rotate-left' | 'rotate-right' | 'flip-x' | 'flip-y' | 'download'; /** * Timestamp to ensure repeated identical actions trigger new effects. */ timestamp: number; } /** * Event fired when the gallery's active index changes. * @group Events */ interface GalleryActiveIndexChangeEvent { /** * The original event that triggered the change. */ originalEvent?: Event; /** * The new active index value. */ value: number; } /** * Defines the state of a gallery item. * @group Interface */ interface GalleryItemState { /** * The index of the item in the gallery. */ index: number; /** * Whether the item is the active (visible) item. */ isActive: boolean; /** * The current pan position. */ position: { x: number; y: number; }; /** * The current zoom scale. */ scale: number; /** * The current rotation in degrees. */ rotation: number; /** * The current flip state. */ flip: { x: number; y: number; }; } /** * Defines valid pass-through options in Gallery component. * @template I Type of instance. * @group Interface */ interface GalleryPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * Defines valid pass-through options in Gallery component. * @see {@link GalleryPassThroughOptions} * @template I Type of instance. */ type GalleryPassThrough<I = unknown> = PassThrough<I, GalleryPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryBackdrop component. * @template I Type of instance. * @group Interface */ interface GalleryBackdropPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryBackdropPassThroughOptions} * @template I Type of instance. */ type GalleryBackdropPassThrough<I = unknown> = PassThrough<I, GalleryBackdropPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryHeader component. * @template I Type of instance. * @group Interface */ interface GalleryHeaderPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryHeaderPassThroughOptions} * @template I Type of instance. */ type GalleryHeaderPassThrough<I = unknown> = PassThrough<I, GalleryHeaderPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryContent component. * @template I Type of instance. * @group Interface */ interface GalleryContentPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryContentPassThroughOptions} * @template I Type of instance. */ type GalleryContentPassThrough<I = unknown> = PassThrough<I, GalleryContentPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryFooter component. * @template I Type of instance. * @group Interface */ interface GalleryFooterPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryFooterPassThroughOptions} * @template I Type of instance. */ type GalleryFooterPassThrough<I = unknown> = PassThrough<I, GalleryFooterPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryItem component. * @template I Type of instance. * @group Interface */ interface GalleryItemPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryItemPassThroughOptions} * @template I Type of instance. */ type GalleryItemPassThrough<I = unknown> = PassThrough<I, GalleryItemPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryPrev component. * @template I Type of instance. * @group Interface */ interface GalleryPrevPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryPrevPassThroughOptions} * @template I Type of instance. */ type GalleryPrevPassThrough<I = unknown> = PassThrough<I, GalleryPrevPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryNext component. * @template I Type of instance. * @group Interface */ interface GalleryNextPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryNextPassThroughOptions} * @template I Type of instance. */ type GalleryNextPassThrough<I = unknown> = PassThrough<I, GalleryNextPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryToolbar component. * @template I Type of instance. * @group Interface */ interface GalleryToolbarPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryToolbarPassThroughOptions} * @template I Type of instance. */ type GalleryToolbarPassThrough<I = unknown> = PassThrough<I, GalleryToolbarPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryToolbarItem component. * @template I Type of instance. * @group Interface */ interface GalleryToolbarItemPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryToolbarItemPassThroughOptions} * @template I Type of instance. */ type GalleryToolbarItemPassThrough<I = unknown> = PassThrough<I, GalleryToolbarItemPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryZoomIn component. * @template I Type of instance. * @group Interface */ interface GalleryZoomInPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryZoomInPassThroughOptions} * @template I Type of instance. */ type GalleryZoomInPassThrough<I = unknown> = PassThrough<I, GalleryZoomInPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryZoomOut component. * @template I Type of instance. * @group Interface */ interface GalleryZoomOutPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryZoomOutPassThroughOptions} * @template I Type of instance. */ type GalleryZoomOutPassThrough<I = unknown> = PassThrough<I, GalleryZoomOutPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryZoomToggle component. * @template I Type of instance. * @group Interface */ interface GalleryZoomTogglePassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryZoomTogglePassThroughOptions} * @template I Type of instance. */ type GalleryZoomTogglePassThrough<I = unknown> = PassThrough<I, GalleryZoomTogglePassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryRotateLeft component. * @template I Type of instance. * @group Interface */ interface GalleryRotateLeftPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryRotateLeftPassThroughOptions} * @template I Type of instance. */ type GalleryRotateLeftPassThrough<I = unknown> = PassThrough<I, GalleryRotateLeftPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryRotateRight component. * @template I Type of instance. * @group Interface */ interface GalleryRotateRightPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryRotateRightPassThroughOptions} * @template I Type of instance. */ type GalleryRotateRightPassThrough<I = unknown> = PassThrough<I, GalleryRotateRightPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryFlipX component. * @template I Type of instance. * @group Interface */ interface GalleryFlipXPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryFlipXPassThroughOptions} * @template I Type of instance. */ type GalleryFlipXPassThrough<I = unknown> = PassThrough<I, GalleryFlipXPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryFlipY component. * @template I Type of instance. * @group Interface */ interface GalleryFlipYPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryFlipYPassThroughOptions} * @template I Type of instance. */ type GalleryFlipYPassThrough<I = unknown> = PassThrough<I, GalleryFlipYPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryDownload component. * @template I Type of instance. * @group Interface */ interface GalleryDownloadPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryDownloadPassThroughOptions} * @template I Type of instance. */ type GalleryDownloadPassThrough<I = unknown> = PassThrough<I, GalleryDownloadPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryFullScreen component. * @template I Type of instance. * @group Interface */ interface GalleryFullScreenPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryFullScreenPassThroughOptions} * @template I Type of instance. */ type GalleryFullScreenPassThrough<I = unknown> = PassThrough<I, GalleryFullScreenPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryThumbnail component. * @template I Type of instance. * @group Interface */ interface GalleryThumbnailPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; /** * Used to pass attributes to the internal Carousel component. */ pcCarousel?: CarouselPassThrough; /** * Used to pass attributes to the internal CarouselContent component. */ pcCarouselContent?: CarouselContentPassThrough; /** * Used to pass attributes to the internal CarouselItem components. */ pcCarouselItem?: CarouselItemPassThrough; } /** * @see {@link GalleryThumbnailPassThroughOptions} * @template I Type of instance. */ type GalleryThumbnailPassThrough<I = unknown> = PassThrough<I, GalleryThumbnailPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryThumbnailContent component. * @template I Type of instance. * @group Interface */ interface GalleryThumbnailContentPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryThumbnailContentPassThroughOptions} * @template I Type of instance. */ type GalleryThumbnailContentPassThrough<I = unknown> = PassThrough<I, GalleryThumbnailContentPassThroughOptions<I>>; /** * Defines valid pass-through options in GalleryThumbnailItem component. * @template I Type of instance. * @group Interface */ interface GalleryThumbnailItemPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLElement, I>; } /** * @see {@link GalleryThumbnailItemPassThroughOptions} * @template I Type of instance. */ type GalleryThumbnailItemPassThrough<I = unknown> = PassThrough<I, GalleryThumbnailItemPassThroughOptions<I>>; export type { GalleryActiveIndexChangeEvent, GalleryBackdropPassThrough, GalleryBackdropPassThroughOptions, GalleryContentPassThrough, GalleryContentPassThroughOptions, GalleryDownloadPassThrough, GalleryDownloadPassThroughOptions, GalleryFlipXPassThrough, GalleryFlipXPassThroughOptions, GalleryFlipYPassThrough, GalleryFlipYPassThroughOptions, GalleryFooterPassThrough, GalleryFooterPassThroughOptions, GalleryFullScreenPassThrough, GalleryFullScreenPassThroughOptions, GalleryHeaderPassThrough, GalleryHeaderPassThroughOptions, GalleryItemPassThrough, GalleryItemPassThroughOptions, GalleryItemState, GalleryNextPassThrough, GalleryNextPassThroughOptions, GalleryPassThrough, GalleryPassThroughOptions, GalleryPendingAction, GalleryPrevPassThrough, GalleryPrevPassThroughOptions, GalleryRotateLeftPassThrough, GalleryRotateLeftPassThroughOptions, GalleryRotateRightPassThrough, GalleryRotateRightPassThroughOptions, GalleryThumbnailContentPassThrough, GalleryThumbnailContentPassThroughOptions, GalleryThumbnailItemPassThrough, GalleryThumbnailItemPassThroughOptions, GalleryThumbnailPassThrough, GalleryThumbnailPassThroughOptions, GalleryToolbarItemPassThrough, GalleryToolbarItemPassThroughOptions, GalleryToolbarPassThrough, GalleryToolbarPassThroughOptions, GalleryZoomInPassThrough, GalleryZoomInPassThroughOptions, GalleryZoomOutPassThrough, GalleryZoomOutPassThroughOptions, GalleryZoomTogglePassThrough, GalleryZoomTogglePassThroughOptions };