UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

50 lines (45 loc) 1.96 kB
/** * DevExtreme (ui/editor/editor.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 '../../jquery_augmentation'; import { dxElement } from '../../core/element'; import { event } from '../../events/index'; import Widget, { WidgetOptions } from '../widget/ui.widget'; /** Warning! This type is used for internal purposes. Do not import it directly. */ export interface EditorOptions<T = Editor> extends WidgetOptions<T> { /** Specifies or indicates whether the editor's value is valid. */ isValid?: boolean; /** A function that is executed after the widget's value is changed. */ onValueChanged?: ((e: { component?: T, element?: dxElement, model?: any, value?: any, previousValue?: any, jQueryEvent?: JQueryEventObject, event?: event }) => any); /** Specifies whether the editor is read-only. */ readOnly?: boolean; /** Information on the broken validation rule. Contains the first item from the validationErrors array. */ validationError?: any; /** An array of the validation rules that failed. */ validationErrors?: Array<any>; /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ validationMessageMode?: 'always' | 'auto'; /** Indicates or specifies the current validation status. */ validationStatus?: 'valid' | 'invalid' | 'pending'; /** Specifies the widget's value. */ value?: any; } /** Warning! This type is used for internal purposes. Do not import it directly. */ /** A base class for editors. */ export default class Editor extends Widget { constructor(element: Element, options?: EditorOptions) constructor(element: JQuery, options?: EditorOptions) /** Resets the value option to the default value. */ reset(): void; }