UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

827 lines (807 loc) • 671 kB
/** * DevExtreme (dx.all.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/ */ declare global { interface JQuery { } interface JQueryPromise<T> { } interface JQueryCallback { } interface JQueryEventObject { cancel?: boolean; } interface PromiseLike<T> { } interface Promise<T> { then<TResult1 = T, TResult2 = never>( onfulfilled?: ((value: T, extraParameters: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null ): Promise<TResult1 | TResult2>; } } declare module DevExpress { export interface ComponentOptions<T = Component> { /** A function that is executed before the widget is disposed of. */ onDisposing?: ((e: { component?: T }) => any); /** A function used in JavaScript frameworks to save the widget instance. */ onInitialized?: ((e: { component?: T, element?: DevExpress.core.dxElement }) => any); /** A function that is executed after a widget option is changed. */ onOptionChanged?: ((e: { component?: T, name?: string, fullName?: string, value?: any }) => any); } /** A base class for all components and widgets. */ export class Component { constructor(options?: ComponentOptions); /** Prevents the widget from refreshing until the endUpdate() method is called. */ beginUpdate(): void; /** Refreshes the widget after a call of the beginUpdate() method. */ endUpdate(): void; /** Gets the widget's instance. Use it to access other methods of the widget. */ 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 widget options. */ option(): any; /** Gets the value of a single option. */ option(optionName: string): any; /** Updates the value of a single option. */ option(optionName: string, optionValue: any): void; /** Updates the values of several options. */ option(options: any): void; /** Resets an option to its default value. */ resetOption(optionName: string): void; } 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?: DevExpress.core.dxElement, model?: any }) => any); /** A function that is executed after a widget option is changed. */ onOptionChanged?: ((e: { component?: T, element?: DevExpress.core.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); } /** A base class for all components. */ export 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(): DevExpress.core.dxElement; /** Gets the instance of a widget found using its DOM node. */ static getInstance(element: Element | JQuery): DOMComponent; } export class DataHelperMixin { /** Gets the DataSource instance. */ getDataSource(): DevExpress.data.DataSource; } /** The device object defines the device on which the application is running. */ 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>; } /** 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 devices.current(deviceName) method. */ real(): Device; } /** 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; } /** 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: JQuery, animation: animationConfig | string): void; /** Registers a set of elements that should be animated as "leaving" using the specified animation configuration. */ leave(elements: JQuery, 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(): Promise<void> & JQueryPromise<void>; /** Stops all started animations. */ stop(): void; } /** Defines animation options. */ export interface animationConfig { /** A function called after animation is completed. */ complete?: (($element: DevExpress.core.dxElement, config: any) => any); /** 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) => any); /** 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; } /** Gets the current global configuration. */ export function config(): globalConfig; /** Configures your application before its launch. */ export function config(config: globalConfig): void; export var devices: DevicesObject; /** Describes dxEvent, a counterpart of the jQuery.Event to be used without jQuery. */ export class dxEvent { /** The DOM element within the current event propagation stage. */ currentTarget: Element; /** Data passed to the event handler. */ data: any; /** The DOM element to which the currently-called event handler was attached. */ delegateTarget: Element; /** The DOM element that initiated the event. */ target: Element; /** Checks if the preventDefault() method was called on this event object. */ isDefaultPrevented(): boolean; /** Checks if the stopImmediatePropagation() method was called on this event object. */ isImmediatePropagationStopped(): boolean; /** Checks if the stopPropagation() method was called on this event object. */ isPropagationStopped(): boolean; /** Prevents the event's default action from triggering. */ preventDefault(): void; /** Stops the event's propagation up the DOM tree, preventing the rest of the handlers from being executed. */ stopImmediatePropagation(): void; /** Stops the event's propagation up the DOM tree, keeping parent handlers unnotified of the event. */ stopPropagation(): void; } export type event = dxEvent | JQueryEventObject; export function eventsHandler(event: dxEvent, extraParameters: any): boolean; /** Specifies settings that affect all DevExtreme widgets. */ export interface globalConfig { /** @deprecated */ /** A decimal separator. No longer applies. */ 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?: { closeIcon?: string, direction?: 'auto' | 'up' | 'down', icon?: string, label?: string, maxSpeedDialActionCount?: number, position?: 'bottom' | 'center' | 'left' | 'left bottom' | 'left top' | 'right' | 'right bottom' | 'right top' | 'top' | positionConfig | Function, 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 widgets support a right-to-left representation. Available for individual widgets as well. */ rtlEnabled?: boolean; /** The decimal separator that is used when submitting a value to the server. */ serverDecimalSeparator?: string; /** @deprecated */ /** A group separator. No longer applies. */ thousandsSeparator?: string; useLegacyStoreResult?: boolean; useLegacyVisibleIndex?: boolean; } /** Hides the last displayed overlay widget. */ export function hideTopOverlay(): boolean; export class localization { /** Converts a Date object to a string using the specified format. */ static formatDate(value: Date, format: DevExpress.ui.format): string; /** Substitutes the provided value(s) for placeholders in a message that the key specifies. */ static formatMessage(key: string, value: string | Array<string>): string; /** Converts a numeric value to a string using the specified format. */ static formatNumber(value: number, format: DevExpress.ui.format): string; /** Loads localized messages. */ static loadMessages(messages: any): void; /** Gets the current locale identifier. */ static locale(): string; /** Sets the current locale identifier. */ static locale(locale: string): void; /** Parses a string into a Date object. */ static parseDate(text: string, format: DevExpress.ui.format): Date; /** Parses a string into a numeric value. */ static parseNumber(text: string, format: DevExpress.ui.format): number; } /** The position object specifies the widget positioning options. */ export interface positionConfig { /** The target element position that the widget is positioned against. */ at?: 'bottom' | 'center' | 'left' | 'left bottom' | 'left top' | 'right' | 'right bottom' | 'right top' | 'top' | { x?: 'center' | 'left' | 'right', y?: 'bottom' | 'center' | 'top' }; /** The element within which the widget is positioned. */ boundary?: string | Element | JQuery | Window; /** Specifies the horizontal and vertical offset from the window's boundaries. */ boundaryOffset?: string | { x?: number, y?: number }; /** Specifies how to move the widget if it overflows the screen. */ 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' | { x?: 'fit' | 'flip' | 'flipfit' | 'none', y?: 'fit' | 'flip' | 'flipfit' | 'none' }; /** The position of the widget to align against the target element. */ my?: 'bottom' | 'center' | 'left' | 'left bottom' | 'left top' | 'right' | 'right bottom' | 'right top' | 'top' | { x?: 'center' | 'left' | 'right', y?: 'bottom' | 'center' | 'top' }; /** The target element that the widget is positioned against. */ of?: string | Element | JQuery | Window; /** Specifies horizontal and vertical offset in pixels. */ offset?: string | { x?: number, y?: number }; } /** Registers a new component in the DevExpress.ui namespace. */ export function registerComponent(name: string, componentClass: any): void; /** Registers a new component in the specified namespace. */ 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; /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ export class ui { /** Creates a toast message. */ static notify(message: string, type?: string, displayTime?: number): void; /** Creates a toast message. */ static notify(options: any, type?: string, displayTime?: number): void; /** Repaints the Floating Action Button. */ static repaintFloatingActionButton(): void; /** Sets a template engine. */ static setTemplateEngine(templateEngineName: string): void; /** Sets a custom template engine defined via custom compile and render functions. */ static setTemplateEngine(templateEngineOptions: { compile?: Function, render?: Function }): 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; } /** An object that serves as a namespace for DevExtreme Data Visualization Widgets. */ export class viz { /** Gets the current palette's name. */ static currentPalette(): string; /** Changes the current palette for all data visualization widgets on the page. */ static currentPalette(paletteName: string): void; /** Gets the current theme's name. */ static currentTheme(): string; /** Changes the current theme for all data visualization widgets on the page. The color scheme is defined separately. */ static currentTheme(platform: string, colorScheme: string): void; /** Changes the current theme for all data visualization widgets on the page. */ static currentTheme(theme: string): void; /** Allows you to export widgets using their SVG markup. */ static exportFromMarkup(markup: string, options: { fileName?: string, format?: string, backgroundColor?: string, proxyUrl?: string, width?: number, height?: number, onExporting?: Function, onExported?: Function, onFileSaving?: Function, margin?: number, svgToCanvas?: Function }): void; /** Exports one or several widgets to PNG. */ static exportWidgets(widgetInstances: Array<Array<DOMComponent>>): void; /** Exports one or several widgets. */ static exportWidgets(widgetInstances: Array<Array<DOMComponent>>, options: { fileName?: string, format?: 'GIF' | 'JPEG' | 'PDF' | 'PNG' | 'SVG', backgroundColor?: string, margin?: number, gridLayout?: boolean, verticalAlignment?: 'bottom' | 'center' | 'top', horizontalAlignment?: 'center' | 'left' | 'right', proxyUrl?: string, onExporting?: Function, onExported?: Function, onFileSaving?: Function, svgToCanvas?: Function }): void; /** Returns a subset of palette colors. */ static generateColors(palette: 'Bright' | 'Default' | 'Harmony Light' | 'Ocean' | 'Pastel' | 'Soft' | 'Soft Pastel' | 'Vintage' | 'Violet' | 'Carmine' | 'Dark Moon' | 'Dark Violet' | 'Green Mist' | 'Soft Blue' | 'Material' | 'Office' | Array<string>, count: number, options: { paletteExtensionMode?: 'alternate' | 'blend' | 'extrapolate', baseColorSet?: 'simpleSet' | 'indicatingSet' | 'gradientSet' }): Array<string>; /** Gets the SVG markup of specific widgets for their subsequent export. */ static getMarkup(widgetInstances: Array<DOMComponent>): string; /** Gets the color sets of a predefined or registered palette. */ static getPalette(paletteName: string): any; /** Gets a predefined or registered theme's settings. */ static getTheme(theme: string): any; /** The method to be called every time the active entry in the browser history is modified without reloading the current page. */ static refreshPaths(): void; /** Refreshes the current theme and palette in all data visualization widgets on the page. */ static refreshTheme(): void; /** Registers a new palette. */ static registerPalette(paletteName: string, palette: any): void; /** Registers a new theme based on the existing one. */ static registerTheme(customTheme: any, baseTheme: string): void; } } declare module DevExpress.core { /** A mixin that provides a capability to fire and subscribe to events. */ export class EventsMixin { /** 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; } export type dxElement = Element & JQuery; export interface dxTemplateOptions { /** Specifies the name of the template. */ name?: string; } /** A custom template's markup. */ export class dxTemplate { constructor(options?: dxTemplateOptions) } /** A template notation used to specify templates for widget elements. */ export type template = string | Function | Element | JQuery; } declare module DevExpress.data { export interface ArrayStoreOptions<T = ArrayStore> extends StoreOptions<T> { /** Specifies the store's associated array. */ data?: 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; } export interface CustomStoreOptions extends StoreOptions<CustomStore> { /** Specifies a custom implementation of the byKey(key) method. */ byKey?: ((key: any | string | number) => Promise<any> | JQueryPromise<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) => Promise<any> | JQueryPromise<any>); /** Specifies a custom implementation of the load(options) method. */ load?: ((options: LoadOptions) => Promise<any> | JQueryPromise<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) => Promise<void> | JQueryPromise<void>); /** Specifies a custom implementation of the totalCount(options) method. */ totalCount?: ((loadOptions: { filter?: any, group?: any }) => Promise<number> | JQueryPromise<number>); /** Specifies a custom implementation of the update(key, values) method. */ update?: ((key: any | string | number, values: any) => Promise<any> | JQueryPromise<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 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 option is true. */ clearRawDataCache(): void; } 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 options. */ 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> }) => any); /** A function that is executed when data loading fails. */ onLoadError?: ((error: { message?: string }) => any); /** A function that is executed when the data loading status changes. */ onLoadingChanged?: ((isLoading: boolean) => any); /** 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 options. */ sort?: string | Array<any> | Function; /** Configures the store underlying the DataSource. */ store?: Store | StoreOptions | Array<any> | any; } /** 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 option's value. */ filter(): any; /** Sets the filter option's value. */ filter(filterExpr: any): void; /** Gets the group option's value. */ group(): any; /** Sets the group option'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 data items the DataSource performs operations on. */ items(): Array<any>; /** Gets the value of the underlying store's key option. */ key(): any & string & number; /** Starts loading data. */ load(): Promise<any> & JQueryPromise<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 option's value. */ paginate(): boolean; /** Sets the paginate option's value. */ paginate(value: boolean): void; /** Clears currently loaded DataSource items and calls the load() method. */ reload(): Promise<any> & JQueryPromise<any>; /** Gets the requireTotalCount option's value. */ requireTotalCount(): boolean; /** Sets the requireTotalCount option's value. */ requireTotalCount(value: boolean): void; /** Gets the searchExpr option's value. */ searchExpr(): string & Function & Array<string | Function>; /** Sets the searchExpr option's value. */ searchExpr(expr: string | Function | Array<string | Function>): void; /** Gets the searchOperation option's value. */ searchOperation(): string; /** Sets the searchOperation option's value. */ searchOperation(op: string): void; /** Gets the searchValue option's value. */ searchValue(): any; /** Sets the searchValue option's value. */ searchValue(value: any): void; /** Gets the select option's value. */ select(): any; /** Sets the select option's value. */ select(expr: any): void; /** Gets the sort option's value. */ sort(): any; /** Sets the sort option'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; } /** 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; } /** 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; } /** This section describes the loadOptions object's fields. */ 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 widget. */ 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; } 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 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; } export interface ODataContextOptions { /** Specifies a function that customizes the request before it is sent to the server. */ beforeSend?: ((options: { url?: string, async?: boolean, method?: string, timeout?: number, params?: any, payload?: any, headers?: any }) => any); /** Specifies whether stores in the ODataContext serialize/parse date-time values. */ deserializeDates?: boolean; /** Specifies entity collections to be accessed. */ entities?: any; /** Specifies a function that is executed when the ODataContext throws an error. */ errorHandler?: ((e: { httpStatus?: number, errorDetails?: any, requestOptions?: any }) => any); /** Specifies whether to convert string values to lowercase in filter and search requests. Applies to the following operations: "startswith", "endswith", "contains", and "notcontains". */ filterToLower?: boolean; /** Specifies whether data should be sent using JSONP. */ jsonp?: boolean; /** Specifies the URL of an OData service. */ url?: string; /** Specifies the OData version. */ version?: number; /** Specifies whether to send cookies, authorization headers, and client certificates in a cross-origin request. */ withCredentials?: boolean; } /** 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): Promise<any> & JQueryPromise<any>; /** Invokes an OData operation that returns nothing. */ invoke(operationName: string, params: any, httpMethod: any): Promise<void> & JQueryPromise<void>; /** Gets a link to an entity with a specific key. */ objectLink(entityAlias: string, key: any | string | number): any; } export interface ODataStoreOptions extends StoreOptions<ODataStore> { /** Specifies a function that customizes the request before it is sent to the server. */ beforeSend?: ((options: { url?: string, async?: boolean, method?: string, timeout?: number, params?: any, payload?: any, headers?: any }) => any); /** Specifies whether the store serializes/parses date-time values. */ deserializeDates?: boolean; /** Specifies a function that is executed when the ODataStore throws an error. */ errorHandler?: ((e: { httpStatus?: number, errorDetails?: any, requestOptions?: any }) => any); /** Specifies the data field types. Accepts the following types: "String", "Int32", "Int64", "Boolean", "Single", "Decimal" and "Guid". */ fieldTypes?: any; /** Specifies whether to convert string values to lowercase in filter and search requests. Applies to the following operations: "startswith", "endswith", "contains", and "notcontains". */ filterToLower?: boolean; /** Specifies whether data should be sent using JSONP. */ jsonp?: boolean; /** Specifies the type of the key property or properties. */ keyType?: 'String' | 'Int32' | 'Int64' | 'Guid' | 'Boolean' | 'Single' | 'Decimal' | any; /** A function that is executed before data is loaded to the store. */ onLoading?: ((loadOptions: LoadOptions) => any); /** Specifies the URL of an OData entity collection. */ url?: string; /** Specifies the OData version. */ version?: number; /** Specifies whether to send cookies, authorization headers, and client certificates in a cross-origin request. */ withCredentials?: boolean; } /** The ODataStore is a store that provides an interface for loading and editing data from an individual OData entity collection and handling related events. */ export class ODataStore extends Store { constructor(options?: ODataStoreOptions) /** Gets a data item with a specific key. */ byKey(key: any | string | number): Promise<any> & JQueryPromise<any>; /** Gets an entity with a specific key. */ byKey(key: any | string | number, extraOptions: { expand?: string | Array<string>, select?: string | Array<string> }): Promise<any> & JQueryPromise<any>; /** Creates a Query for the OData endpoint. */ createQuery(loadOptions: any): any; } export interface PivotGridDataSourceOptions { /** Configures pivot grid fields. */ fields?: Array<PivotGridDataSourceField>; /** Specifies data filtering conditions. Cannot be used with an XmlaStore. */ filter?: string | Array<any> | Function; /** A function that is executed after data is successfully loaded. */ onChanged?: Function; /** A function that is executed when all fields are loaded from the store and they are ready to be displayed in the PivotGrid. */ onFieldsPrepared?: ((fields: Array<PivotGridDataSourceField>) => any); /** A function that is executed when data loading fails. */ onLoadError?: ((error: any) => any); /** A function that is executed when the data loading status changes. */ onLoadingChanged?: ((isLoading: boolean) => any); /** Specifies whether the PivotGridDataSource should load data in portions. Can be used only with an XmlaStore. */ paginate?: boolean; /** Specifies whether the data processing operations (filtering, grouping, summary calculation) should be performed on the server. */ remoteOperations?: boolean; /** Specifies whether to auto-generate pivot grid fields from the store's data. */ retrieveFields?: boolean; /** Configures the DataSource's underlying store. */ store?: Store | StoreOptions | XmlaStore | XmlaStoreOptions | Array<{ type?: 'array' | 'local' | 'odata' | 'xmla' }> | { type?: 'array' | 'local' | 'odata' | 'xmla' }; } /** Configures pivot grid fields. */ export interface PivotGridDataSourceField { /** Specifies whether to take neighboring groups' summary values into account when calculating a running total and absolute or percent variation. */ allowCrossGroupCalculation?: boolean; /** Specifies whether a user can expand/collapse all items within the same column or row header level using the context menu. */ allowExpandAll?: boolean; /** Specifies whether a user can filter the field's values. */ allowFiltering?: boolean; /** Specifies whether a user can change the field's sorting. */ allowSorting?: boolean; /** Specifies whether a user can sort the pivot grid by summary values instead of field values. */ allowSortingBySummary?: boolean; /** Specifies the field's area. */ area?: 'column' | 'data' | 'filter' | 'row' | undefined; /** Specifies the field's order among the other fields in the same area. Corresponds to the field's order in the fields array by default. */ areaIndex?: number; /** Specifies a custom aggregate function. Applies only if the summaryType is "custom" and the remoteOperations is false. Cannot be used with an XmlaStore. */ calculateCustomSummary?: ((options: { summaryProcess?: string, value?: any, totalValue?: any }) => any); /** Specifies a custom post-processing function for summary values. */ calculateSummaryValue?: ((e: DevExpress.ui.dxPivotGridSummaryCell) => number); /** Specifies the field's caption to be displayed in the field chooser and on the field panel. */ caption?: string; /** Customizes the text displayed in summary cells. */ customizeText?: ((cellInfo: { value?: string | number | Date, valueText?: string }) => string); /** Specifies which data source field provides data for the pivot grid field. */ dataField?: string; /** Casts field values to a specific data type. */ dataType?: 'date' | 'number' | 'string'; /** Specifies the name of the folder in which the field is located when displayed in the field chooser. */ displayFolder?: string; /** Specifies whether to expand all items within the field's header level. */ expanded?: boolean; /** Specifies whether a user changes the current filter by including (selecting) or excluding (clearing the selection of) values. */ filterType?: 'exclude' | 'include'; /** Specifies the values by which the field is filtered. */ filterValues?: Array<any>; /** Formats field values before they are displayed. */ format?: DevExpress.ui.format; /** Specifies the field's index within its group. */ groupIndex?: number; /** Specifies how the field's values are combined into groups for the headers. Cannot be used with an XmlaStore. */ groupInterval?: 'day' | 'dayOfWeek' | 'month' | 'quarter' | 'year' | number; /** Specifies the name of the field's group. */ groupName?: string; /** Configures the field's header filter. */ headerFilter?: { allowSearch?: boolean, height?: number, width?: number }; /** Specifies whether the field should be treated as a measure (a field providing data for calculation). */ isMeasure?: boolean; /** Specifies the field's identifier. */ name?: string; /** Specifies whether to calculate the running total by rows or by columns. */ runningTotal?: 'column' | 'row'; /** Specifies a function that combines the field's values into groups for the headers. Cannot be used with an XmlaStore or remote operations. */ selector?: Function; /** Specifies whether to display the field's grand totals. Applies only if the field is in the data area. */ showGrandTotals?: boolean; /** Specifies whether to display the field's totals. */ showTotals?: boolean; /** Specifies whether to display the field's summary values. Applies only if the field is in the data area. Inherits the showTotals' value by default. */ showValues?: boolean; /** Specifies how the field's values in the headers should be sorted. */ sortBy?: 'displayText' | 'value' | 'none'; /** Sorts the field's values in the headers by the specified measure's summary values. Accepts the measure's name, caption, dataField, or index in the fields array. */ sortBySummaryField?: string; /** Specifies a path to the column or row whose summary values should be used to sort the field's values in the headers. */ sortBySummaryPath?: Array<number | string>; /** Specifies the field values' sorting order. */ sortOrder?: 'asc' | 'desc'; /** Specifies a custom comparison function that sorts the field's values in the headers. */ sortingMethod?: ((a: { value?: string | number, children?: Array<any> }, b: { value?: string | number, children?: Array<any> }) => number); /** Specifies a predefined post-processing function. Does not apply when the calculateSummaryValue option is set. */ summaryDisplayMode?: 'absoluteVariation' | 'percentOfColumnGrandTotal' | 'percentOfColumnTotal' | 'percentOfGrandTotal' | 'percentOfRowGrandTotal' | 'percentOfRowTotal' | 'percentVariation'; /** Specifies how to aggregate the field's data. Cannot be used with an XmlaStore. */ summaryType?: 'avg' | 'count' | 'custom' | 'max' | 'min' | 'sum' | string; /** Specifies whether the field is visible in the pivot grid and field chooser. */ visible?: boolean; /** Specifies the field's width in pixels when the field is displayed in the pivot grid. */ width?: number; /** Specifies whether text that does not fit into a header item should be wrapped. */ wordWrapEnabled?: boolean; } /** The PivotGridDataSource is an object that provides an API for processing data from an underlying store. This object is used in the PivotGrid widget. */ export class PivotGridDataSource { constructor(options?: PivotGridDataSourceOptions) /** Collapses all header items of a field with the specified identifier. */ collapseAll(id: number | string): void; /** Collapses a specific header item. */ collapseHeaderItem(area: string, path: Array<string | number | Date>): void; /** Provides access to the facts that were used to calculate a specific summary value. */ createDrillDownDataSource(options: { columnPath?: Array<string | number | Date>, rowPath?: Array<string | number | Date>, dataIndex?: number, maxRowCount?: number, customColumns?: Array<string> }): DataSource; /** Disposes of all the resources allocated to the PivotGridDataSource instance. */ dispose(): void; /** Expands all the header items of a field with the specified identifier. */ expandAll(id: number | string): void; /** Expands a specific header item. */ expandHeaderItem(area: string, path: Array<any>): void; /** Gets all the options of a field with the specified identifier. */ field(id: number | string): any; /** Updates field options' values. */ field(id: number | string, options: any): void; /** Gets all the fields including those generated automatically. */ fields(): Array<PivotGridDataSour