UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

57 lines (51 loc) 2.39 kB
/** * DevExtreme (core/dom_component.d.ts) * Version: 20.1.7 * Build date: Tue Aug 25 2020 * * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import Component, { ComponentOptions } from './component'; import { Device } from './devices'; import { dxElement } from './element'; /** Warning! This type is used for internal purposes. Do not import it directly. */ export interface DOMComponentOptions<T = DOMComponent> extends ComponentOptions<T> { bindingOptions?: any; /** Specifies the attributes to be attached to the widget's root element. */ elementAttr?: any; /** Specifies the widget's height. */ height?: number | string | (() => number | string); /** A function that is executed before the widget is disposed of. */ onDisposing?: ((e: { component?: T, element?: dxElement, model?: any }) => any); /** A function that is executed after a widget option is changed. */ onOptionChanged?: ((e: { component?: T, element?: dxElement, model?: any, name?: string, fullName?: string, value?: any }) => any); /** Switches the widget to a right-to-left representation. */ rtlEnabled?: boolean; /** Specifies the widget's width. */ width?: number | string | (() => number | string); } /** Warning! This type is used for internal purposes. Do not import it directly. */ /** A base class for all components. */ export default class DOMComponent extends Component { constructor(element: Element | JQuery, options?: DOMComponentOptions); /** Specifies the device-dependent default configuration options for this component. */ static defaultOptions(rule: { device?: Device | Array<Device> | Function, options?: any }): void; /** Disposes of all the resources allocated to the widget instance. */ dispose(): void; /** Gets the root widget element. */ element(): dxElement; /** Gets the instance of a widget found using its DOM node. */ static getInstance(element: Element | JQuery): DOMComponent; } /** Warning! This type is used for internal purposes. Do not import it directly. */ export type Options = DOMComponentOptions; /** @deprecated use Options instead */ /** Warning! This type is used for internal purposes. Do not import it directly. */ export type IOptions = DOMComponentOptions;