devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
112 lines (107 loc) • 3.92 kB
TypeScript
/**
* DevExtreme (ui/responsive_box.d.ts)
* Version: 19.2.6
* Build date: Thu Jan 30 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import DataSource, {
DataSourceOptions
} from '../data/data_source';
import CollectionWidget, {
CollectionWidgetItem,
CollectionWidgetOptions
} from './collection/ui.collection_widget.base';
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface dxResponsiveBoxOptions extends CollectionWidgetOptions<dxResponsiveBox> {
/**
* @docid dxResponsiveBoxOptions.cols
* @type Array<Object>
* @prevFileNamespace DevExpress.ui
* @public
*/
cols?: Array<{ baseSize?: number | 'auto', ratio?: number, screen?: string, shrink?: number }>;
/**
* @docid dxResponsiveBoxOptions.dataSource
* @type string|Array<string,dxResponsiveBoxItem,object>|DataSource|DataSourceOptions
* @default null
* @prevFileNamespace DevExpress.ui
* @public
*/
dataSource?: string | Array<string | dxResponsiveBoxItem | any> | DataSource | DataSourceOptions;
/**
* @docid dxResponsiveBoxOptions.height
* @default '100%'
* @prevFileNamespace DevExpress.ui
* @public
*/
height?: number | string | (() => number | string);
/**
* @docid dxResponsiveBoxOptions.items
* @type Array<string, dxResponsiveBoxItem, object>
* @fires dxResponsiveBoxOptions.onOptionChanged
* @prevFileNamespace DevExpress.ui
* @public
*/
items?: Array<string | dxResponsiveBoxItem | any>;
/**
* @docid dxResponsiveBoxOptions.rows
* @type Array<Object>
* @prevFileNamespace DevExpress.ui
* @public
*/
rows?: Array<{ baseSize?: number | 'auto', ratio?: number, screen?: string, shrink?: number }>;
/**
* @docid dxResponsiveBoxOptions.screenByWidth
* @type function
* @default null
* @prevFileNamespace DevExpress.ui
* @public
*/
screenByWidth?: Function;
/**
* @docid dxResponsiveBoxOptions.singleColumnScreen
* @type string
* @default ""
* @prevFileNamespace DevExpress.ui
* @public
*/
singleColumnScreen?: string;
/**
* @docid dxResponsiveBoxOptions.width
* @default '100%'
* @prevFileNamespace DevExpress.ui
* @public
*/
width?: number | string | (() => number | string);
}
/** The ResponsiveBox widget allows you to create an application or a website with a layout adapted to different screen sizes. */
export default class dxResponsiveBox extends CollectionWidget {
constructor(element: Element, options?: dxResponsiveBoxOptions)
constructor(element: JQuery, options?: dxResponsiveBoxOptions)
}
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface dxResponsiveBoxItem extends CollectionWidgetItem {
/**
* @docid dxResponsiveBoxItem.location
* @type Object|Array<Object>
* @prevFileNamespace DevExpress.ui
* @public
*/
location?: { col?: number, colspan?: number, row?: number, rowspan?: number, screen?: string } | Array<{ col?: number, colspan?: number, row?: number, rowspan?: number, screen?: string }>;
}
declare global {
interface JQuery {
dxResponsiveBox(): JQuery;
dxResponsiveBox(options: "instance"): dxResponsiveBox;
dxResponsiveBox(options: string): any;
dxResponsiveBox(options: string, ...params: any[]): any;
dxResponsiveBox(options: dxResponsiveBoxOptions): JQuery;
}
}
/** Warning! This type is used for internal purposes. Do not import it directly. */
export type Options = dxResponsiveBoxOptions;
/** @deprecated use Options instead */
/** Warning! This type is used for internal purposes. Do not import it directly. */
export type IOptions = dxResponsiveBoxOptions;