devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
1,413 lines (1,410 loc) • 1.21 MB
TypeScript
/**
* DevExtreme (dx.all.d.ts)
* Version: 21.1.5
* Build date: Mon Aug 02 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
declare global {
interface JQuery<TElement = HTMLElement> {}
interface JQueryEventObject {}
interface JQueryPromise<T> {}
}
declare module DevExpress {
/**
* Defines animation properties.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface animationConfig {
/**
* A function called after animation is completed.
*/
complete?: ($element: DevExpress.core.DxElement, config: any) => void;
/**
* A number specifying wait time before animation execution.
*/
delay?: number;
/**
* Specifies the animation direction for the 'slideIn' and 'slideOut' animation types.
*/
direction?: 'bottom' | 'left' | 'right' | 'top';
/**
* A number specifying the time in milliseconds spent on animation.
*/
duration?: number;
/**
* A string specifying the easing function for animation.
*/
easing?: string;
/**
* Specifies the initial animation state.
*/
from?: number | string | any;
/**
* A number specifying the time period to wait before the animation of the next stagger item starts.
*/
staggerDelay?: number;
/**
* A function called before animation is started.
*/
start?: ($element: DevExpress.core.DxElement, config: any) => void;
/**
* Specifies a final animation state.
*/
to?: number | string | any;
/**
* A string value specifying the animation type.
*/
type?:
| 'css'
| 'fade'
| 'fadeIn'
| 'fadeOut'
| 'pop'
| 'slide'
| 'slideIn'
| 'slideOut';
}
/**
* A repository of animations.
*/
export class animationPresets {
/**
* Applies the changes made in the animation repository.
*/
applyChanges(): void;
/**
* Removes all animations from the repository.
*/
clear(): void;
/**
* Deletes an animation with a specific name.
*/
clear(name: string): void;
/**
* Gets the configuration of an animation with a specific name.
*/
getPreset(name: string): any;
/**
* Registers predefined animations in the animation repository.
*/
registerDefaultPresets(): void;
/**
* Adds an animation with a specific name to the animation repository.
*/
registerPreset(
name: string,
config: { animation?: animationConfig; device?: Device }
): void;
/**
* Deletes all custom animations.
*/
resetToDefaults(): void;
}
/**
* A base class for all components and UI components.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export class Component {
constructor(options?: ComponentOptions);
/**
* Prevents the UI component from refreshing until the endUpdate() method is called.
*/
beginUpdate(): void;
/**
* Refreshes the UI component after a call of the beginUpdate() method.
*/
endUpdate(): void;
/**
* Gets the UI component's instance. Use it to access other methods of the UI component.
*/
instance(): this;
/**
* Detaches all event handlers from a single event.
*/
off(eventName: string): this;
/**
* Detaches a particular event handler from a single event.
*/
off(eventName: string, eventHandler: Function): this;
/**
* Subscribes to an event.
*/
on(eventName: string, eventHandler: Function): this;
/**
* Subscribes to events.
*/
on(events: any): this;
/**
* Gets all UI component properties.
*/
option(): any;
/**
* Gets the value of a single property.
*/
option(optionName: string): any;
/**
* Updates the value of a single property.
*/
option(optionName: string, optionValue: any): void;
/**
* Updates the values of several properties.
*/
option(options: any): void;
/**
* Resets an property to its default value.
*/
resetOption(optionName: string): void;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface ComponentOptions<T = Component> {
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing?: (e: { component: T }) => void;
/**
* A function used in JavaScript frameworks to save the UI component instance.
*/
onInitialized?: (e: {
component?: T;
element?: DevExpress.core.DxElement;
}) => void;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged?: (e: {
component?: T;
name?: string;
fullName?: string;
value?: any;
}) => void;
}
/**
* Gets the current global configuration.
*/
export function config(): globalConfig;
/**
* Configures your application before its launch.
*/
export function config(config: globalConfig): void;
/**
*
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export class DataHelperMixin {
/**
* Gets the DataSource instance.
*/
getDataSource(): DevExpress.data.DataSource;
}
/**
* The device object defines the device on which the application is running.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface Device {
/**
* Indicates whether or not the device platform is Android.
*/
android?: boolean;
/**
* Specifies the type of the device on which the application is running.
*/
deviceType?: 'phone' | 'tablet' | 'desktop';
/**
* Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic 'light' or 'dark' theme.
*/
generic?: boolean;
/**
* Specifies a performance grade of the current device.
*/
grade?: 'A' | 'B' | 'C';
/**
* Indicates whether or not the device platform is iOS.
*/
ios?: boolean;
/**
* Indicates whether or not the device type is 'phone'.
*/
phone?: boolean;
/**
* Specifies the platform of the device on which the application is running.
*/
platform?: 'android' | 'ios' | 'generic';
/**
* Indicates whether or not the device type is 'tablet'.
*/
tablet?: boolean;
/**
* Specifies an array with the major and minor versions of the device platform.
*/
version?: Array<number>;
}
/**
*
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export const devices: DevicesObject;
/**
* An object that serves as a namespace for the methods and events specifying information on the current device.
*/
export class DevicesObject {
constructor(options: { window?: Window });
/**
* Gets information on the current device.
*/
current(): Device;
/**
* Overrides actual device information to force the application to operate as if it was running on a specified device.
*/
current(deviceName: string | Device): void;
/**
* Detaches all event handlers from a single event.
*/
off(eventName: string): this;
/**
* Detaches a particular event handler from a single event.
*/
off(eventName: string, eventHandler: Function): this;
/**
* Subscribes to an event.
*/
on(eventName: string, eventHandler: Function): this;
/**
* Subscribes to events.
*/
on(events: any): this;
/**
* Returns the current device orientation.
*/
orientation(): string;
/**
* Returns real information about the current device regardless of the value passed to the DevExpress.devices.current(deviceName) method.
*/
real(): Device;
isSimulator(): boolean;
}
/**
* A base class for all components.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export class DOMComponent extends Component {
constructor(
element: DevExpress.core.UserDefinedElement,
options?: DOMComponentOptions
);
/**
* Specifies the device-dependent default configuration properties 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 UI component element.
*/
element(): DevExpress.core.DxElement;
/**
* Gets the instance of a UI component found using its DOM node.
*/
static getInstance(
element: DevExpress.core.UserDefinedElement
): DOMComponent;
$element(): DevExpress.core.UserDefinedElement;
_getTemplate(template: unknown): DevExpress.core.FunctionTemplate;
_invalidate(): void;
_refresh(): void;
_templateManager: DevExpress.core.TemplateManager;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface DOMComponentOptions<T = DOMComponent>
extends ComponentOptions<T> {
/**
*
*/
bindingOptions?: any;
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
elementAttr?: any;
/**
* Specifies the UI component's height.
*/
height?: number | string | (() => number | string);
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing?: (e: {
component?: T;
element?: DevExpress.core.DxElement;
model?: any;
}) => void;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged?: (e: {
component?: T;
element?: DevExpress.core.DxElement;
model?: any;
name?: string;
fullName?: string;
value?: any;
}) => void;
/**
* Switches the UI component to a right-to-left representation.
*/
rtlEnabled?: boolean;
/**
* Specifies the UI component's width.
*/
width?: number | string | (() => number | string);
}
/**
* A time zone object.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface dxSchedulerTimeZone {
/**
* A time zone text string from the IANA database.
*/
id: string;
/**
* A GMT offset.
*/
offset: number;
/**
* A time zone in the following format: `(GMT ±[hh]:[mm]) [id]`.
*/
title: string;
}
/**
* The EndpointSelector is an object for managing OData endpoints in your application.
*/
export class EndpointSelector {
constructor(options: any);
/**
* Gets an endpoint with a specific key.
*/
urlFor(key: string): string;
}
/**
* Configures the load panel.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface ExportLoadPanel {
/**
* Specifies whether the load panel is enabled.
*/
enabled?: boolean;
/**
* Specifies text displayed on the load panel.
*/
text?: string;
/**
* Specifies the width of the load panel in pixels.
*/
width?: number;
/**
* Specifies the height of the load panel in pixels.
*/
height?: number;
/**
* Specifies whether to show the loading indicator.
*/
showIndicator?: boolean;
/**
* Specifies a URL pointing to an image to be used as a loading indicator.
*/
indicatorSrc?: string;
/**
* Specifies whether to show the pane of the load panel.
*/
showPane?: boolean;
/**
* Specifies whether to shade the UI component when the load panel is shown.
*/
shading?: boolean;
/**
* Specifies the shading color. Applies only if shading is true.
*/
shadingColor?: string;
}
/**
* An object that serves as a namespace for the methods that are used to animate UI elements.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export const fx: {
/**
* Animates an element.
*/
animate(
element: Element,
config: animationConfig
): DevExpress.core.utils.DxPromise<void>;
/**
* Checks whether an element is being animated.
*/
isAnimating(element: Element): boolean;
/**
* Stops an element's animation.
*/
stop(element: Element, jumpToEnd: boolean): void;
};
/**
* Specifies settings that affect all DevExtreme UI components.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface globalConfig {
/**
* A decimal separator. No longer applies.
* @deprecated
*/
decimalSeparator?: string;
/**
* The default currency. Accepts a 3-letter ISO 4217 code.
*/
defaultCurrency?: string;
/**
* Specifies how editors' text fields are styled in your application.
*/
editorStylingMode?: 'outlined' | 'underlined' | 'filled';
/**
* Configures a Floating Action Button (FAB) that emits a stack of related actions (speed dial).
*/
floatingActionButtonConfig?: {
/**
* Specifies the icon the FAB displays when the speed dial is opened.
*/
closeIcon?: string;
/**
* Specifies the direction in which to open the speed dial menu.
*/
direction?: 'auto' | 'up' | 'down';
/**
* Specifies the icon the FAB displays when the speed dial is closed.
*/
icon?: string;
/**
* Specifies the text label displayed inside the FAB.
*/
label?: string;
/**
* Limits the number of speed dial actions.
*/
maxSpeedDialActionCount?: number;
/**
* Positions the FAB on the screen.
*/
position?:
| 'bottom'
| 'center'
| 'left'
| 'left bottom'
| 'left top'
| 'right'
| 'right bottom'
| 'right top'
| 'top'
| positionConfig
| Function;
/**
* If true, the background should be shaded when the speed dial menu is open.
*/
shading?: boolean;
};
/**
* Specifies whether dates are parsed and serialized according to the ISO 8601 standard in all browsers.
*/
forceIsoDateParsing?: boolean;
/**
* Specifies whether to convert string values to lowercase in filter and search requests to OData services. Applies to the following operations: 'startswith', 'endswith', 'contains', and 'notcontains'.
*/
oDataFilterToLower?: boolean;
/**
* Specifies whether the UI components support a right-to-left representation. Available for individual UI components as well.
*/
rtlEnabled?: boolean;
/**
* The decimal separator that is used when submitting a value to the server.
*/
serverDecimalSeparator?: string;
/**
* A group separator. No longer applies.
* @deprecated
*/
thousandsSeparator?: string;
/**
*
*/
useLegacyStoreResult?: boolean;
/**
*
*/
useLegacyVisibleIndex?: boolean;
}
/**
* Hides the last displayed overlay UI component.
*/
export function hideTopOverlay(): boolean;
/**
* Configures the position of an overlay element.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface positionConfig {
/**
* Specifies the target element's side or corner where the overlay element should be positioned.
*/
at?:
| 'bottom'
| 'center'
| 'left'
| 'left bottom'
| 'left top'
| 'right'
| 'right bottom'
| 'right top'
| 'top'
| {
/**
* Specifies a position in the horizontal direction (for left, right, or center alignment).
*/
x?: 'center' | 'left' | 'right';
/**
* Specifies a position in the vertical direction (for top, bottom, or center alignment).
*/
y?: 'bottom' | 'center' | 'top';
};
/**
* A boundary element in which the overlay element must be positioned.
*/
boundary?: string | DevExpress.core.UserDefinedElement | Window;
/**
* Specifies the offset of boundaries from the boundary element.
*/
boundaryOffset?:
| string
| {
/**
* Specifies a horizontal offset.
*/
x?: number;
/**
* Specifies a vertical offset.
*/
y?: number;
};
/**
* Specifies how to resolve collisions - when the overlay element exceeds the boundary element.
*/
collision?:
| 'fit'
| 'fit flip'
| 'fit flipfit'
| 'fit none'
| 'flip'
| 'flip fit'
| 'flip none'
| 'flipfit'
| 'flipfit fit'
| 'flipfit none'
| 'none'
| 'none fit'
| 'none flip'
| 'none flipfit'
| {
/**
* Specifies how to resolve horizontal collisions.
*/
x?: 'fit' | 'flip' | 'flipfit' | 'none';
/**
* Specifies how to resolve vertical collisions.
*/
y?: 'fit' | 'flip' | 'flipfit' | 'none';
};
/**
* Specifies the overlay element's side or corner to align with a target element.
*/
my?:
| 'bottom'
| 'center'
| 'left'
| 'left bottom'
| 'left top'
| 'right'
| 'right bottom'
| 'right top'
| 'top'
| {
/**
* Specifies a position in the horizontal direction (for left, right, or center alignment).
*/
x?: 'center' | 'left' | 'right';
/**
* Specifies a position in the vertical direction (for top, bottom, or center alignment).
*/
y?: 'bottom' | 'center' | 'top';
};
/**
* The target element relative to which the overlay element should be positioned.
*/
of?: string | DevExpress.core.UserDefinedElement | Window;
/**
* Specifies the overlay element's offset from a specified position.
*/
offset?:
| string
| {
/**
* Specifies a horizontal offset.
*/
x?: number;
/**
* Specifies a vertical offset.
*/
y?: number;
};
}
/**
* Registers a new component in the DevExpress.ui namespace.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export function registerComponent(name: string, componentClass: any): void;
/**
* Registers a new component in the specified namespace.
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export function registerComponent(
name: string,
namespace: any,
componentClass: any
): void;
/**
* Sets a supported template engine to use when using jQuery.
*/
export function setTemplateEngine(templateEngineName: string): void;
/**
* Sets custom functions that compile and render templates.
*/
export function setTemplateEngine(templateEngineOptions: {
compile?: Function;
render?: Function;
}): void;
/**
* The manager that performs several specified animations at a time.
*/
export class TransitionExecutor {
/**
* Registers the set of elements that should be animated as 'entering' using the specified animation configuration.
*/
enter(
elements: DevExpress.core.UserDefinedElementsArray,
animation: animationConfig | string
): void;
/**
* Registers a set of elements that should be animated as 'leaving' using the specified animation configuration.
*/
leave(
elements: DevExpress.core.UserDefinedElementsArray,
animation: animationConfig | string
): void;
/**
* Deletes all the animations registered in the Transition Executor by using the enter(elements, animation) and leave(elements, animation) methods.
*/
reset(): void;
/**
* Starts all the animations registered using the enter(elements, animation) and leave(elements, animation) methods beforehand.
*/
start(): DevExpress.core.utils.DxPromise<void>;
/**
* Stops all started animations.
*/
stop(): void;
}
/**
* An object that serves as a namespace for the methods required to perform validation.
*/
export class validationEngine {
/**
* Gets the default validation group.
*/
static getGroupConfig(): any;
/**
* Gets a validation group with a specific key.
*/
static getGroupConfig(group: string | any): any;
/**
* Registers all the Validator objects extending fields of the specified ViewModel.
*/
static registerModelForValidation(model: any): void;
/**
* Resets the values and validation result of the editors that belong to the default validation group.
*/
static resetGroup(): void;
/**
* Resets the values and validation result of the editors that belong to the specified validation group.
*/
static resetGroup(group: string | any): void;
/**
* Unregisters all the Validator objects extending fields of the specified ViewModel.
*/
static unregisterModelForValidation(model: any): void;
/**
* Validates editors from the default validation group.
*/
static validateGroup(): DevExpress.ui.dxValidationGroupResult;
/**
* Validates editors from a specific validation group.
*/
static validateGroup(
group: string | any
): DevExpress.ui.dxValidationGroupResult;
/**
* Validates a view model.
*/
static validateModel(model: any): any;
}
}
declare module DevExpress.core {
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
interface Component {
// eslint-disable-line @typescript-eslint/no-unused-vars
_optionsByReference: Record<string, any>;
_deprecatedOptions: Record<string, any>;
_options: {
silent(path: any, value: any): void;
};
_createActionByOption(
optionName: string,
config: Record<string, any>
): (...args: any[]) => any;
_dispose(): void;
_getDefaultOptions(): Record<string, any>;
_init(): void;
_initializeComponent(): void;
_optionChanging(name: string, value: unknown, prevValue: unknown): void;
_optionChanged(args: { name: string; value: unknown }): void;
_setOptionsByReference(): void;
_setDeprecatedOptions(): void;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface Condition {}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
interface Condition extends JQueryEventObject {}
/**
*
* @deprecated
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export type dxElement = DxElement<HTMLElement>;
/**
*
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export type DxElement<T extends Element = HTMLElement> = {} extends Condition
? T
: ElementWrapper<T>;
/**
*
* @deprecated
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export type dxSVGElement = DxElement<SVGElement>;
/**
* A custom template's markup.
*/
export type dxTemplate = Template;
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface dxTemplateOptions {
/**
* Specifies the name of the template.
*/
name?: string;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface ElementsArrayWrapper<T extends Element> {}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
interface ElementsArrayWrapper<T extends Element> extends JQuery<T> {}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface ElementWrapper<T extends Element> {}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
interface ElementWrapper<T extends Element> extends JQuery<T> {}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export class FunctionTemplate {
render(template: {
container: unknown;
model?: object;
transclude?: boolean;
}): DxElement;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface PromiseType<T> {}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
interface PromiseType<T> extends JQueryPromise<T> {}
/**
* A template notation used to specify templates for UI component elements.
*/
export type template = string | Function | UserDefinedElement;
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export class Template {
constructor(options?: dxTemplateOptions);
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export class TemplateManager {
anonymousTemplateName: string;
}
/**
*
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export type UserDefinedElement<T extends Element = Element> =
{} extends Condition ? T : ElementWrapper<T> | T;
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export type UserDefinedElementsArray = {} extends Condition
? Array<Element>
: ElementsArrayWrapper<Element>;
}
declare module DevExpress.core.utils {
/**
*
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export type DxPromise<T = void> = {} extends PromiseType<T>
? Promise<T>
: PromiseType<T>;
}
declare module DevExpress.data {
/**
* Applies an array of changes to a source data array.
*/
export function applyChanges(
data: Array<any>,
changes: Array<any>,
options?: { keyExpr?: string | Array<string>; immutable?: boolean }
): Array<any>;
/**
* The ArrayStore is a store that provides an interface for loading and editing an in-memory array and handling related events.
*/
export class ArrayStore extends Store {
constructor(options?: ArrayStoreOptions);
/**
* Clears all the ArrayStore's associated data.
*/
clear(): void;
/**
* Creates a Query for the underlying array.
*/
createQuery(): any;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface ArrayStoreOptions<T = ArrayStore> extends StoreOptions<T> {
/**
* Specifies the store's associated array.
*/
data?: Array<any>;
}
/**
* Encodes a string or array of bytes in Base64.
*/
export function base64_encode(input: string | Array<number>): string;
/**
* The CustomStore enables you to implement custom data access logic for consuming data from any source.
*/
export class CustomStore extends Store {
constructor(options?: CustomStoreOptions);
/**
* Deletes data from the cache. Takes effect only if the cacheRawData property is true.
*/
clearRawDataCache(): void;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface CustomStoreOptions extends StoreOptions<CustomStore> {
/**
* Specifies a custom implementation of the byKey(key) method.
*/
byKey?: (key: any | string | number) => PromiseLike<any>;
/**
* Specifies whether raw data should be saved in the cache. Applies only if loadMode is 'raw'.
*/
cacheRawData?: boolean;
/**
* Specifies a custom implementation of the insert(values) method.
*/
insert?: (values: any) => PromiseLike<any>;
/**
* Specifies a custom implementation of the load(options) method.
*/
load?: (options: LoadOptions) => PromiseLike<any> | Array<any>;
/**
* Specifies how data returned by the load function is treated.
*/
loadMode?: 'processed' | 'raw';
/**
* Specifies a custom implementation of the remove(key) method.
*/
remove?: (key: any | string | number) => PromiseLike<void>;
/**
* Specifies a custom implementation of the totalCount(options) method.
*/
totalCount?: (loadOptions: {
filter?: any;
group?: any;
}) => PromiseLike<number>;
/**
* Specifies a custom implementation of the update(key, values) method.
*/
update?: (key: any | string | number, values: any) => PromiseLike<any>;
/**
* Specifies whether the store combines the search and filter expressions. Defaults to true if the loadMode is 'raw' and false if it is 'processed'.
*/
useDefaultSearch?: boolean;
}
/**
* The DataSource is an object that provides an API for processing data from an underlying store.
*/
export class DataSource {
constructor(data: Array<any>);
constructor(options: CustomStoreOptions | DataSourceOptions);
constructor(store: Store);
constructor(url: string);
/**
* Cancels the load operation with a specific identifier.
*/
cancel(): boolean;
/**
* Disposes of all the resources allocated to the DataSource instance.
*/
dispose(): void;
/**
* Gets the filter property's value.
*/
filter(): any;
/**
* Sets the filter property's value.
*/
filter(filterExpr: any): void;
/**
* Gets the group property's value.
*/
group(): any;
/**
* Sets the group property's value.
*/
group(groupExpr: any): void;
/**
* Checks whether the count of items on the current page is less than the pageSize. Takes effect only with enabled paging.
*/
isLastPage(): boolean;
/**
* Checks whether data is loaded in the DataSource.
*/
isLoaded(): boolean;
/**
* Checks whether data is being loaded in the DataSource.
*/
isLoading(): boolean;
/**
* Gets an array of data items on the current page.
*/
items(): Array<any>;
/**
* Gets the value of the underlying store's key property.
*/
key(): any & string & number;
/**
* Starts loading data.
*/
load(): DevExpress.core.utils.DxPromise<any>;
/**
* Gets an object with current data processing settings.
*/
loadOptions(): any;
/**
* Detaches all event handlers from a single event.
*/
off(eventName: string): this;
/**
* Detaches a particular event handler from a single event.
*/
off(eventName: string, eventHandler: Function): this;
/**
* Subscribes to an event.
*/
on(eventName: string, eventHandler: Function): this;
/**
* Subscribes to events.
*/
on(events: any): this;
/**
* Gets the current page index.
*/
pageIndex(): number;
/**
* Sets the index of the page that should be loaded on the next load() method call.
*/
pageIndex(newIndex: number): void;
/**
* Gets the page size.
*/
pageSize(): number;
/**
* Sets the page size.
*/
pageSize(value: number): void;
/**
* Gets the paginate property's value.
*/
paginate(): boolean;
/**
* Sets the paginate property's value.
*/
paginate(value: boolean): void;
/**
* Clears currently loaded DataSource items and calls the load() method.
*/
reload(): DevExpress.core.utils.DxPromise<any>;
/**
* Gets the requireTotalCount property's value.
*/
requireTotalCount(): boolean;
/**
* Sets the requireTotalCount property's value.
*/
requireTotalCount(value: boolean): void;
/**
* Gets the searchExpr property's value.
*/
searchExpr(): string & Function & Array<string | Function>;
/**
* Sets the searchExpr property's value.
*/
searchExpr(expr: string | Function | Array<string | Function>): void;
/**
* Gets the searchOperation property's value.
*/
searchOperation(): string;
/**
* Sets the searchOperation property's value.
*/
searchOperation(op: string): void;
/**
* Gets the searchValue property's value.
*/
searchValue(): any;
/**
* Sets the searchValue property's value.
*/
searchValue(value: any): void;
/**
* Gets the select property's value.
*/
select(): any;
/**
* Sets the select property's value.
*/
select(expr: any): void;
/**
* Gets the sort property's value.
*/
sort(): any;
/**
* Sets the sort property's value.
*/
sort(sortExpr: any): void;
/**
* Gets the instance of the store underlying the DataSource.
*/
store(): any;
/**
* Gets the number of data items in the store after the last load() operation without paging. Takes effect only if requireTotalCount is true
*/
totalCount(): number;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface DataSourceOptions {
/**
* Custom parameters that should be passed to an OData service with the load query. Available only for the ODataStore.
*/
customQueryParams?: any;
/**
* Specifies the navigation properties to be loaded with the OData entity. Available only for the ODataStore.
*/
expand?: Array<string> | string;
/**
* Specifies data filtering conditions.
*/
filter?: string | Array<any> | Function;
/**
* Specifies data grouping properties.
*/
group?: string | Array<any> | Function;
/**
* Specifies an item mapping function.
*/
map?: (dataItem: any) => any;
/**
* A function that is executed after data is loaded.
*/
onChanged?: (e: { changes?: Array<any> }) => void;
/**
* A function that is executed when data loading fails.
*/
onLoadError?: (error: { message?: string }) => void;
/**
* A function that is executed when the data loading status changes.
*/
onLoadingChanged?: (isLoading: boolean) => void;
/**
* Specifies the maximum number of data items per page. Applies only if paginate is true.
*/
pageSize?: number;
/**
* Specifies whether the DataSource loads data items by pages or all at once. Defaults to false if group is set; otherwise, true.
*/
paginate?: boolean;
/**
* Specifies a post processing function.
*/
postProcess?: (data: Array<any>) => Array<any>;
/**
* Specifies the period (in milliseconds) when changes are aggregated before pushing them to the DataSource.
*/
pushAggregationTimeout?: number;
/**
* Specifies whether the DataSource requests the total count of data items in the storage.
*/
requireTotalCount?: boolean;
/**
* Specifies whether to reapply sorting, filtering, grouping, and other data processing operations after receiving a push.
*/
reshapeOnPush?: boolean;
/**
* Specifies the fields to search.
*/
searchExpr?: string | Function | Array<string | Function>;
/**
* Specifies the comparison operation used in searching. The following values are accepted: '=', '<>', '>', '>=', '<', '<=', 'startswith', 'endswith', 'contains', 'notcontains'.
*/
searchOperation?: string;
/**
* Specifies the value to which the search expression is compared.
*/
searchValue?: any;
/**
* Specifies the fields to select from data objects.
*/
select?: string | Array<any> | Function;
/**
* Specifies data sorting properties.
*/
sort?: string | Array<any> | Function;
/**
* Configures the store underlying the DataSource.
*/
store?: Store | StoreOptions | Array<any> | any;
}
/**
* The EdmLiteral is an object for working with primitive data types from the OData's Abstract Type System that are not supported in JavaScript.
*/
export class EdmLiteral {
constructor(value: string);
/**
* Gets the EdmLiteral's value converted to a string.
*/
valueOf(): string;
}
/**
* Specifies the function that is executed when a data layer object throws an error.
* @deprecated Use setErrorHandler instead.
*/
export function errorHandler(e: Error): void;
/**
* The Guid is an object used to generate and contain a GUID.
*/
export class Guid {
constructor();
constructor(value: string);
/**
* Gets the GUID. Works identically to the valueOf() method.
*/
toString(): string;
/**
* Gets the GUID. Works identically to the toString() method.
*/
valueOf(): string;
}
/**
*
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface LoadOptions {
/**
* An object for storing additional settings that should be sent to the server. Relevant to the ODataStore only.
*/
customQueryParams?: any;
/**
* An array of strings that represent the names of navigation properties to be loaded simultaneously with the ODataStore.
*/
expand?: any;
/**
* A filter expression.
*/
filter?: any;
/**
* A group expression.
*/
group?: any;
/**
* A group summary expression. Used with the group setting.
*/
groupSummary?: any;
/**
* The IDs of the rows being expanded. Relevant only when the CustomStore is used in the TreeList UI component.
*/
parentIds?: Array<any>;
/**
* Indicates whether a top-level group count is required. Used in conjunction with the filter, take, skip, requireTotalCount, and group settings.
*/
requireGroupCount?: boolean;
/**
* Indicates whether the total count of data objects is needed.
*/
requireTotalCount?: boolean;
/**
* A data field or expression whose value is compared to the search value.
*/
searchExpr?: string | Function | Array<string | Function>;
/**
* A comparison operation. Can have one of the following values: '=', '<>', '>', '>=', '<', '<=', 'startswith', 'endswith', 'contains', 'notcontains', 'isblank' and 'isnotblank'.
*/
searchOperation?: string;
/**
* The current search value.
*/
searchValue?: any;
/**
* A select expression.
*/
select?: any;
/**
* The number of data objects to be skipped from the result set's start. In conjunction with take, used to implement paging.
*/
skip?: number;
/**
* A sort expression.
*/
sort?: any;
/**
* The number of data objects to be loaded. In conjunction with skip, used to implement paging.
*/
take?: number;
/**
* A total summary expression.
*/
totalSummary?: any;
/**
* An object for storing additional settings that should be sent to the server.
*/
userData?: any;
}
/**
* The LocalStore is a store that provides an interface for loading and editing data from HTML Web Storage (also known as window.localStorage) and handling related events.
*/
export class LocalStore extends ArrayStore {
constructor(options?: LocalStoreOptions);
/**
* Removes data from the local storage.
*/
clear(): void;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface LocalStoreOptions extends ArrayStoreOptions<LocalStore> {
/**
* Specifies a delay in milliseconds between when data changes and the moment these changes are saved in the local storage. Applies only if immediate is false.
*/
flushInterval?: number;
/**
* Specifies whether the LocalStore saves changes in the local storage immediately.
*/
immediate?: boolean;
/**
* Specifies the name under which data should be saved in the local storage. The `dx-data-localStore-` prefix will be added to the name.
*/
name?: string;
}
/**
* The ODataContent is an object that provides access to an entire OData service.
*/
export class ODataContext {
constructor(options?: ODataContextOptions);
/**
* Invokes an OData operation that returns a value.
*/
get(
operationName: string,
params: any
): DevExpress.core.utils.DxPromise<any>;
/**
* Invokes an OData operation that returns nothing.
*/
invoke(
operationName: string,
params: any,
httpMethod: any
): DevExpress.core.utils.DxPromise<void>;
/**
* Gets a link to an entity with a specific key.
*/
objectLink(entityAlias: string, key: any | string | number): any;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}.
*/
export interface ODataContextOptions {
/**
* Specifies a function that customizes the request before it is sent to the server.
*/
beforeSend?: (opt