/** * DevExtreme (ui/gallery.d.ts) * Version: 21.1.7 * Build date: Thu Aug 07 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { UserDefinedElement, } from '../core/element'; import { DxPromise, } from '../core/utils/deferred'; import DataSource, { DataSourceOptions, } from '../data/data_source'; import Store from '../data/abstract_store'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, ItemInfo, } from '../events/index'; import CollectionWidget, { CollectionWidgetItem, CollectionWidgetOptions, SelectionChangedInfo, } from './collection/ui.collection_widget.base'; /** @public */ export type ContentReadyEvent = EventInfo; /** @public */ export type DisposingEvent = EventInfo; /** @public */ export type InitializedEvent = InitializedEventInfo; /** @public */ export type ItemClickEvent = NativeEventInfo & ItemInfo; /** @public */ export type ItemContextMenuEvent = NativeEventInfo & ItemInfo; /** @public */ export type ItemHoldEvent = NativeEventInfo & ItemInfo; /** @public */ export type ItemRenderedEvent = EventInfo & ItemInfo; /** @public */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** @public */ export type SelectionChangedEvent = EventInfo & SelectionChangedInfo; /** * @deprecated use Properties instead * @namespace DevExpress.ui */ export interface dxGalleryOptions extends CollectionWidgetOptions { /** * @docid * @default 400 * @public */ animationDuration?: number; /** * @docid * @default true * @public */ animationEnabled?: boolean; /** * @docid * @type string | Array | Store | DataSource | DataSourceOptions * @default null * @public */ dataSource?: string | Array | Store | DataSource | DataSourceOptions; /** * @docid * @default true &for(desktop) * @public */ focusStateEnabled?: boolean; /** * @docid * @default true * @public */ indicatorEnabled?: boolean; /** * @docid * @default undefined * @public */ initialItemWidth?: number; /** * @docid * @type Array * @fires dxGalleryOptions.onOptionChanged * @public */ items?: Array; /** * @docid * @default false * @public */ loop?: boolean; /** * @docid * @public */ noDataText?: string; /** * @docid * @default 0 * @public */ selectedIndex?: number; /** * @docid * @default true * @public */ showIndicator?: boolean; /** * @docid * @default false * @public */ showNavButtons?: boolean; /** * @docid * @default 0 * @public */ slideshowDelay?: number; /** * @docid * @default false * @public */ stretchImages?: boolean; /** * @docid * @default true * @public */ swipeEnabled?: boolean; /** * @docid * @default false * @public */ wrapAround?: boolean; } /** * @docid * @inherits CollectionWidget * @namespace DevExpress.ui * @public */ export default class dxGallery extends CollectionWidget { constructor(element: UserDefinedElement, options?: dxGalleryOptions) /** * @docid * @publicName goToItem(itemIndex, animation) * @param1 itemIndex:numeric * @return Promise * @public */ goToItem(itemIndex: number, animation: boolean): DxPromise; /** * @docid * @publicName nextItem(animation) * @return Promise * @public */ nextItem(animation: boolean): DxPromise; /** * @docid * @publicName prevItem(animation) * @return Promise * @public */ prevItem(animation: boolean): DxPromise; } /** * @public * @namespace DevExpress.ui.dxGallery */ export type Item = dxGalleryItem; /** * @deprecated Use Item instead * @namespace DevExpress.ui */ export interface dxGalleryItem extends CollectionWidgetItem { /** * @docid * @public */ imageAlt?: string; /** * @docid * @public */ imageSrc?: string; } /** @public */ export type Properties = dxGalleryOptions; /** @deprecated use Properties instead */ export type Options = dxGalleryOptions; /** @deprecated use Properties instead */ export type IOptions = dxGalleryOptions;