/** * DevExtreme (ui/tile_view.d.ts) * Version: 25.1.7 * Build date: Mon Nov 10 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { DataSourceLike } from '../data/data_source'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, ItemInfo, PointerInteractionEvent, } from '../events'; import CollectionWidget, { CollectionWidgetItem, CollectionWidgetOptions, } from './collection/ui.collection_widget.base'; import { Orientation, ScrollbarMode, } from '../common'; type ItemLike = string | Item | any; export { Orientation, ScrollbarMode, }; /** * The type of the contentReady event handler's argument. */ export type ContentReadyEvent = EventInfo>; /** * The type of the disposing event handler's argument. */ export type DisposingEvent = EventInfo>; /** * The type of the initialized event handler's argument. */ export type InitializedEvent = InitializedEventInfo>; /** * The type of the itemClick event handler's argument. */ export type ItemClickEvent = NativeEventInfo, KeyboardEvent | MouseEvent | PointerEvent> & ItemInfo; /** * The type of the itemContextMenu event handler's argument. */ export type ItemContextMenuEvent = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemHold event handler's argument. */ export type ItemHoldEvent = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemRendered event handler's argument. */ export type ItemRenderedEvent = EventInfo> & ItemInfo; /** * The type of the optionChanged event handler's argument. */ export type OptionChangedEvent = EventInfo> & ChangedOptionInfo; /** * * @deprecated */ export interface dxTileViewOptions< TItem extends ItemLike = any, TKey = any, > extends CollectionWidgetOptions, TItem, TKey> { /** * Specifies whether the UI component changes its visual state as a result of user interaction. */ activeStateEnabled?: boolean; /** * Specifies the height of the base tile view item. */ baseItemHeight?: number; /** * Specifies the width of the base tile view item. */ baseItemWidth?: number; /** * Binds the UI component to data. */ dataSource?: DataSourceLike | null; /** * Specifies whether the UI component is oriented horizontally or vertically. */ direction?: Orientation; /** * Specifies whether the UI component can be focused using keyboard navigation. */ focusStateEnabled?: boolean; /** * Specifies the UI component's height. */ height?: number | string; /** * Specifies whether the UI component changes its state when a user pauses on it. */ hoverStateEnabled?: boolean; /** * Specifies the distance in pixels between adjacent tiles. */ itemMargin?: number; /** * An array of items displayed by the UI component. */ items?: Array; /** * Specifies when the UI component shows the scrollbar. */ showScrollbar?: ScrollbarMode; } /** * The TileView UI component contains a collection of tiles. Tiles can store much more information than ordinary buttons, that is why they are very popular in apps designed for touch devices. */ export default class dxTileView< TItem extends ItemLike = any, TKey = any, > extends CollectionWidget, TItem, TKey> { /** * Gets the current scroll position. */ scrollPosition(): number; } export type Item = dxTileViewItem; /** * @deprecated Use Item instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export interface dxTileViewItem extends CollectionWidgetItem { /** * Specifies a multiplier for the baseItemHeight property value (for the purpose of obtaining the actual item height). */ heightRatio?: number; /** * Specifies a multiplier for the baseItemWidth property value (for the purpose of obtaining the actual item width). */ widthRatio?: number; } export type ExplicitTypes< TItem extends ItemLike, TKey, > = { Properties: Properties; ContentReadyEvent: ContentReadyEvent; DisposingEvent: DisposingEvent; InitializedEvent: InitializedEvent; ItemClickEvent: ItemClickEvent; ItemContextMenuEvent: ItemContextMenuEvent; ItemHoldEvent: ItemHoldEvent; ItemRenderedEvent: ItemRenderedEvent; OptionChangedEvent: OptionChangedEvent; }; export type Properties< TItem extends ItemLike = any, TKey = any, > = dxTileViewOptions; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type Options< TItem extends ItemLike = any, TKey = any, > = Properties;