diff --git a/angular-dynamic-locale/angular-dynamic-locale-tests.ts b/angular-dynamic-locale/angular-dynamic-locale-tests.ts new file mode 100644 index 000000000..a42d0c446 --- /dev/null +++ b/angular-dynamic-locale/angular-dynamic-locale-tests.ts @@ -0,0 +1,23 @@ +/// +/// + +var app = angular.module('testModule', ['tmh.dynamicLocale']); +app.config((localStorageServiceProvider: angular.dynamicLocale.tmhDynamicLocaleProvider) => { + localStorageServiceProvider + .localeLocationPattern("app/config/locales/") + .useCookieStorage(); +}); + +class LocaleTestController { + + constructor(tmhDynamicLocaleService: angular.dynamicLocale.tmhDynamicLocaleService) { + + var locale = tmhDynamicLocaleService.get(); + + var newLocale = "mt" + tmhDynamicLocaleService.set(newLocale); + } + +} + +app.controller('TestController', LocaleTestController); diff --git a/angular-dynamic-locale/angular-dynamic-locale.d.ts b/angular-dynamic-locale/angular-dynamic-locale.d.ts new file mode 100644 index 000000000..a30df1d7e --- /dev/null +++ b/angular-dynamic-locale/angular-dynamic-locale.d.ts @@ -0,0 +1,21 @@ +// Type definitions for angular-dynamic-locale v0.1.27 +// Project: https://github.com/lgalfaso/angular-dynamic-locale +// Definitions by: Stephen Lautier +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module angular.dynamicLocale { + + interface tmhDynamicLocaleService { + set(locale: string): void; + get(): string; + } + + interface tmhDynamicLocaleProvider extends angular.IServiceProvider { + localeLocationPattern(location: string): tmhDynamicLocaleProvider; + localeLocationPattern(): string; + useStorage(storageName: string): void; + useCookieStorage(): void; + } +} \ No newline at end of file diff --git a/angular-protractor/angular-protractor.d.ts b/angular-protractor/angular-protractor.d.ts index 11e9d3268..76f0b5f10 100644 --- a/angular-protractor/angular-protractor.d.ts +++ b/angular-protractor/angular-protractor.d.ts @@ -564,7 +564,7 @@ declare module protractor { */ element(subLocator: webdriver.Locator): ElementFinder; - /** + /** * Calls to element may be chained to find an array of elements within a parent. * * @alias element(locator).all(locator) @@ -652,7 +652,7 @@ declare module protractor { /** * Override for WebElement.prototype.isElementPresent so that protractor waits * for Angular to settle before making the check. - * + * * @see ElementFinder.isPresent * * @param {webdriver.Locator} subLocator Locator for element to look for. @@ -879,7 +879,7 @@ declare module protractor { * filteredElements[0].click(); * }); * - * @param {function(ElementFinder, number): webdriver.WebElement.Promise} filterFn + * @param {function(ElementFinder, number): webdriver.WebElement.Promise} filterFn * Filter function that will test if an element should be returned. * filterFn can either return a boolean or a promise that resolves to a boolean. * @return {!ElementArrayFinder} A ElementArrayFinder that represents an array @@ -888,11 +888,11 @@ declare module protractor { filter(filterFn: (element: ElementFinder, index: number) => any): ElementArrayFinder; /** - * Apply a reduce function against an accumulator and every element found + * Apply a reduce function against an accumulator and every element found * using the locator (from left-to-right). The reduce function has to reduce - * every element into a single value (the accumulator). Returns promise of - * the accumulator. The reduce function receives the accumulator, current - * ElementFinder, the index, and the entire array of ElementFinders, + * every element into a single value (the accumulator). Returns promise of + * the accumulator. The reduce function receives the accumulator, current + * ElementFinder, the index, and the entire array of ElementFinders, * respectively. * * @alias element.all(locator).reduce(reduceFn) @@ -912,11 +912,11 @@ declare module protractor { * * expect(value).toEqual('First Second Third '); * - * @param {function(number, ElementFinder, number, Array.)} + * @param {function(number, ElementFinder, number, Array.)} * reduceFn Reduce function that reduces every element into a single value. - * @param {*} initialValue Initial value of the accumulator. + * @param {*} initialValue Initial value of the accumulator. * @return {!webdriver.promise.Promise} A promise that resolves to the final - * value of the accumulator. + * value of the accumulator. */ reduce(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => webdriver.promise.Promise, initialValue: T): webdriver.promise.Promise; reduce(reduceFn: (acc: T, element: ElementFinder, index: number, arr: ElementFinder[]) => T, initialValue: T): webdriver.promise.Promise; @@ -924,7 +924,7 @@ declare module protractor { /** * Represents the ElementArrayFinder as an array of ElementFinders. * - * @return {Array.} Return a promise, which resolves to a list + * @return {Array.} Return a promise, which resolves to a list * of ElementFinders specified by the locator. */ asElementFinders_(): ElementFinder[]; @@ -1221,6 +1221,7 @@ declare module protractor { interface LocatorWithColumn extends webdriver.Locator { column(index: number): webdriver.Locator; + column(name: string): webdriver.Locator; } interface RepeaterLocator extends LocatorWithColumn { @@ -1299,7 +1300,7 @@ declare module protractor { * expect(element(by.exactBinding('person_phone')).isPresent()).toBe(true); * expect(element(by.exactBinding('person_phone|uppercase')).isPresent()).toBe(true); * expect(element(by.exactBinding('phone')).isPresent()).toBe(false); - * + * * @param {string} bindingDescriptor * @return {{findElementsOverride: findElementsOverride, toString: Function|string}} */ diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index c9883f86e..5aef97afa 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -141,6 +141,7 @@ testApp.controller('TestCtrl', ( scope: $scope, template: "
i'm a template!
", templateUrl: '/templates/modal.html', + backdropClass: 'modal-backdrop-test', windowClass: 'modal-test' }); @@ -227,4 +228,4 @@ interface IModalTestCtrlScope { close(): void; dismiss(): void; -} \ No newline at end of file +} diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index c3675e7a9..92a7411c9 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -264,6 +264,11 @@ declare module angular.ui.bootstrap { */ keyboard?: boolean; + /** + * additional CSS class(es) to be added to a modal backdrop template + */ + backdropClass?: string; + /** * additional CSS class(es) to be added to a modal window template */ @@ -590,7 +595,14 @@ declare module angular.ui.bootstrap { * * @default false */ - appendtoBody?: boolean; + appendToBody?: boolean; + + /** + * Determines the default open triggers for tooltips and popovers + * + * @default 'mouseenter' for tooltip, 'click' for popover + */ + trigger?: string; } interface ITooltipProvider { diff --git a/angularjs/angular-resource-tests.ts b/angularjs/angular-resource-tests.ts index 148d40901..f7f248ea8 100644 --- a/angularjs/angular-resource-tests.ts +++ b/angularjs/angular-resource-tests.ts @@ -8,6 +8,7 @@ interface IMyResourceClass extends angular.resource.IResourceClass /////////////////////////////////////// var actionDescriptor: angular.resource.IActionDescriptor; +actionDescriptor.url = '/api/test-url/' actionDescriptor.headers = { header: 'value' }; actionDescriptor.isArray = true; actionDescriptor.method = 'method action'; @@ -135,4 +136,11 @@ mod = mod.factory('factory name', resourceServiceFactoryFunction); /////////////////////////////////////// // IResource -/////////////////////////////////////// \ No newline at end of file +/////////////////////////////////////// + + +/////////////////////////////////////// +// IResourceServiceProvider +/////////////////////////////////////// +var resourceServiceProvider: angular.resource.IResourceServiceProvider; +resourceServiceProvider.defaults.stripTrailingSlashes = false; diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index 057cc1b56..7f02a533e 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -21,6 +21,7 @@ declare module angular.resource { stripTrailingSlashes?: boolean; } + /////////////////////////////////////////////////////////////////////////// // ResourceService // see http://docs.angularjs.org/api/ngResource.$resource @@ -45,6 +46,7 @@ declare module angular.resource { // Just a reference to facilitate describing new actions interface IActionDescriptor { + url?: string; method: string; isArray?: boolean; params?: any; @@ -143,6 +145,13 @@ declare module angular.resource { ($resource: angular.resource.IResourceService): IResourceClass; >($resource: angular.resource.IResourceService): U; } + + // IResourceServiceProvider used to configure global settings + interface IResourceServiceProvider extends ng.IServiceProvider { + + defaults: IResourceOptions; + } + } /** extensions to base ng based on using angular-resource */ diff --git a/angularjs/angular-route-tests.ts b/angularjs/angular-route-tests.ts index 3607b6f13..0260359fb 100644 --- a/angularjs/angular-route-tests.ts +++ b/angularjs/angular-route-tests.ts @@ -34,3 +34,7 @@ $routeProvider }) .otherwise({ redirectTo: '/' }) .otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" }); + + +var current: ng.route.ICurrentRoute; +current.locals['test-key'] = 'test-value'; diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts index 4ddf87cab..662b2c11d 100644 --- a/angularjs/angular-route.d.ts +++ b/angularjs/angular-route.d.ts @@ -109,6 +109,7 @@ declare module angular.route { // see http://docs.angularjs.org/api/ng.$route#current interface ICurrentRoute extends IRoute { locals: { + [index: string]: any; $scope: IScope; $template: string; }; diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts old mode 100644 new mode 100755 index 7511f3627..975059999 --- a/angularjs/angular-tests.ts +++ b/angularjs/angular-tests.ts @@ -702,4 +702,30 @@ module locationTests { $location.path() == '/foo/bar' $location.url() == '/foo/bar?x=y' $location.absUrl() == 'http://example.com/#!/foo/bar?x=y' -} \ No newline at end of file +} + +// NgModelController +function NgModelControllerTyping() { + var ngModel: angular.INgModelController; + var $http: angular.IHttpService; + var $q: angular.IQService; + + // See https://docs.angularjs.org/api/ng/type/ngModel.NgModelController#$validators + ngModel.$validators['validCharacters'] = function(modelValue, viewValue) { + var value = modelValue || viewValue; + return /[0-9]+/.test(value) && + /[a-z]+/.test(value) && + /[A-Z]+/.test(value) && + /\W+/.test(value); + }; + + ngModel.$asyncValidators['uniqueUsername'] = function(modelValue, viewValue) { + var value = modelValue || viewValue; + return $http.get('/api/users/' + value). + then(function resolved() { + return $q.reject('exists'); + }, function rejected() { + return true; + }); + }; +} diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 0e54c2aea..eb826fa48 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -524,11 +524,11 @@ declare module angular { } interface IModelValidators { - [index: string]: (...args: any[]) => boolean; + [index: string]: (modelValue: any, viewValue: string) => boolean; } interface IAsyncModelValidators { - [index: string]: (...args: any[]) => IPromise; + [index: string]: (modelValue: any, viewValue: string) => IPromise; } interface IModelParser { diff --git a/async/async.d.ts b/async/async.d.ts index 475191aaf..adf6fe11b 100644 --- a/async/async.d.ts +++ b/async/async.d.ts @@ -96,7 +96,7 @@ interface Async { doWhilst(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void; until(test: () => boolean, fn: AsyncVoidFunction, callback: (err: any) => void): void; doUntil(fn: AsyncVoidFunction, test: () => boolean, callback: (err: any) => void): void; - waterfall(tasks: Function[], callback?: AsyncResultArrayCallback): void; + waterfall(tasks: Function[], callback?: (err: any, ...arguments: any[]) => void): void; queue(worker: AsyncWorker, concurrency: number): AsyncQueue; priorityQueue(worker: AsyncWorker, concurrency: number): AsyncPriorityQueue; auto(tasks: any, callback?: AsyncResultArrayCallback): void; diff --git a/chosen/chosen.jquery.d.ts b/chosen/chosen.jquery.d.ts index 1c9507339..14d37fa97 100644 --- a/chosen/chosen.jquery.d.ts +++ b/chosen/chosen.jquery.d.ts @@ -18,7 +18,7 @@ interface ChosenOptions { placeholder_text_single?: string; search_contains?: boolean; single_backstroke_delete?: boolean; - width?: number; + width?: number|string; display_disabled_options?: boolean; display_selected_options?: boolean; include_group_label_in_selected?: boolean; diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index 19d5c4d0b..17c57c88d 100755 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -1082,6 +1082,7 @@ declare module chrome.history { //////////////////// declare module chrome.identity { var getAuthToken: (options: any, cb: (token: {}) => void) => void; + var launchWebAuthFlow: (options: any, cb: (redirect_url: string) => void) => void; } diff --git a/d3/d3-tests.ts b/d3/d3-tests.ts index 5db3528f5..a0c2d0312 100644 --- a/d3/d3-tests.ts +++ b/d3/d3-tests.ts @@ -873,7 +873,7 @@ function populationPyramid() { // Allow the arrow keys to change the displayed year. window.focus(); d3.select(window).on("keydown", function () { - switch (( d3.event).keyCode) { + switch (d3.event.keyCode) { case 37: year = Math.max(year0, year - 10); break; case 39: year = Math.min(year1, year + 10); break; } @@ -1291,12 +1291,12 @@ function forceDirectedVoronoi() { d3.select(window) .on("keydown", function() { // shift - if(( d3.event).keyCode == 16) { + if(d3.event.keyCode == 16) { zoomToAdd = false } // s - if(( d3.event).keyCode == 83) { + if(d3.event.keyCode == 83) { simulate = !simulate if(simulate) { force.start() @@ -2665,3 +2665,16 @@ function multiTest() { .attr("transform", "translate(0," + height + ")") .call(xAxis); } + +function testD3Events () { + d3.select('svg') + .on('click', () => { + var coords = [d3.event.pageX, d3.event.pageY]; + console.log("clicked", d3.event.target, "at " + coords); + }) + .on('keypress', () => { + if (d3.event.shiftKey) { + console.log('shift + ' + d3.event.which); + } + }); +} \ No newline at end of file diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 2fa1493b7..be329db81 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -918,7 +918,13 @@ declare module d3 { } /** - * The current event's value. Use this variable in a handler registered with selection.on. + * Interface for any and all d3 events. + */ + interface Event extends KeyboardEvent, MouseEvent { + } + + /** + * The current event's value. Use this variable in a handler registered with `selection.on`. */ export var event: Event; diff --git a/dcjs/dc.d.ts b/dcjs/dc.d.ts index 62739e16a..9a7cda23a 100644 --- a/dcjs/dc.d.ts +++ b/dcjs/dc.d.ts @@ -20,6 +20,11 @@ declare module DC { (t: T, r?: R): V; } + export interface IGetSetComputed { + (): R; + (t: T): V; + } + export interface Scale { (x: any): T; @@ -118,7 +123,7 @@ declare module DC { minWidth: IGetSet; minHeight: IGetSet; dimension: IGetSet; - data: IGetSet<(group: any) => Array, T>; + data: IGetSetComputed<(group: any) => Array, Array, T>; group: IGetSet; ordering: IGetSet, T>; filterAll(): void; @@ -180,7 +185,7 @@ declare module DC { colorCalculator: IGetSet, T>; } - export interface CoordinateGridMixin extends BaseMixin, MarginMixin, BaseMixin { + export interface CoordinateGridMixin extends BaseMixin, MarginMixin, ColorMixin { rangeChart: IGetSet, T>; zoomScale: IGetSet, T>; zoomOutRestrict: IGetSet; @@ -297,19 +302,21 @@ declare module DC { elasticRadius: IGetSet; } - export interface CompositeChart extends CoordinateGridMixin { - useRightAxisGridLines: IGetSet; - childOptions: IGetSet; - rightYAxisLabel: IGetSet; - compose: IGetSet>, CompositeChart>; + export interface ICompositeChart extends CoordinateGridMixin { + useRightAxisGridLines: IGetSet>; + childOptions: IGetSet>; + rightYAxisLabel: IGetSet>; + compose: IGetSet>, ICompositeChart>; children(): Array>; - shareColors: IGetSet; - shareTitle: IGetSet; - rightY: IGetSet<(n: any) => any, CompositeChart>; - rightYAxis: IGetSet; + shareColors: IGetSet>; + shareTitle: IGetSet>; + rightY: IGetSet<(n: any) => any, ICompositeChart>; + rightYAxis: IGetSet>; } - export interface SeriesChart extends CompositeChart { + export interface CompositeChart extends ICompositeChart {} + + export interface SeriesChart extends ICompositeChart { chart: IGetSet<(c: any) => BaseMixin, SeriesChart>; seriesAccessor: IGetSet, SeriesChart>; seriesSort: IGetSet<(a: any, b: any) => number, SeriesChart>; diff --git a/devextreme/14.1/dx.chartjs-14.1-tests.ts b/devextreme/14.1/dx.chartjs-14.1-tests.ts deleted file mode 100644 index b9a0be0df..000000000 --- a/devextreme/14.1/dx.chartjs-14.1-tests.ts +++ /dev/null @@ -1,26 +0,0 @@ -/// - -module Test { - $("
").appendTo(document.body).dxChart({ - size: { - width: 600, - height: 400 - }, - title: { - text: 'Chart in jQuery mode', - font: { color: 'rgb(0, 128, 128)!important' } - }, - argumentAxis: { - categories: ['January', 'February', 'March', 'April', 'May', 'June'] - }, - dataSource: [ - { arg: 'January', v1: 10, v2: 20, v3: 24 }, - { arg: 'February', v1: 5, v2: 35, v3: 43 }, - { arg: 'March', v1: 50, v2: 10, v3: 80 }, - { arg: 'April', v1: 9, v2: 79, v3: 39 }, - { arg: 'May', v1: 100, v2: 42, v3: 22 }, - { arg: 'June', v1: 95, v2: 11, v3: 41 } - ], - series: [{ valueField: 'v1' }, { valueField: 'v2' }, { valueField: 'v3' }] - }); -} \ No newline at end of file diff --git a/devextreme/14.1/dx.chartjs-14.1.d.ts b/devextreme/14.1/dx.chartjs-14.1.d.ts deleted file mode 100644 index 632767e7e..000000000 --- a/devextreme/14.1/dx.chartjs-14.1.d.ts +++ /dev/null @@ -1,1865 +0,0 @@ -// Type definitions for ChartJS 14.1.+ -// Project: http://js.devexpress.com/WebDevelopment/Charts/ -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module DevExpress { - export function abstract(): void; - export var rtlEnabled: boolean; - export var hardwareBackButton: JQueryCallback; - interface Endpoint { - local?: string; - production: string; - } - class EndpointSelector { - constructor(config: { [key: string]: Endpoint }); - urlFor(key: string): string; - } - export interface ActionOptions { - context?: Object; - component?: any; - beforeExecute? (e:ActionExecuteArgs): void; - afterExecute? (e:ActionExecuteArgs): void; - } - export interface ActionExecuteArgs { - action: any; - args: any[]; - context: any; - component: any; - cancel: boolean; - handled: boolean; - } - export class Action { - constructor(action?: any, config?: ActionOptions); - execute(): any; - } - export interface IDevice { - deviceType?: string; - platform?: string; - version?: Array; - phone?: boolean; - tablet?: boolean; - android?: boolean; - ios?: boolean; - win8?: boolean; - tizen?: boolean; - generic?: boolean; - } - export module devices { - export function orientation(): string; - export var orientationChanged: JQueryCallback; - export function real(): IDevice; - export function current(deviceOrName: string): IDevice; - export function current(deviceOrName: IDevice): IDevice; - } - export function registerComponent(name: string, componentClass: any): void; - export interface ComponentOptions { - disabled?: boolean; - } - export class Component { - constructor(element: Element, options?: ComponentOptions); - constructor(element: JQuery, options?: ComponentOptions); - disposing: JQueryCallback; - optionChanged: JQueryCallback; - instance(): Component; - beginUpdate(): void; - endUpdate(): void; - option(): any; - option(options: string): any; - option(options: string): T; - option(options: string, value: any): void; - option(options: { [key: string]: any }): void; - option(options?: any): any; - } - export interface DOMComponentOptions extends ComponentOptions { - rtlEnabled?: boolean; - } - export class DOMComponent extends Component { - constructor(element: HTMLElement, options?: DOMComponentOptions); - static defaultOptions(rule: { - device: any; - options: { [key: string]: any }; - }): void; - } -} -declare module DevExpress.data { - export interface DataError extends Error { - httpStatus?: number; - errorDetails?: any; - } - export interface ErrorHandler { (e: DataError): void; } - export interface EntityOptions { key: any; keyType: any; } - export interface Getter { (obj: any, options?: any): any; } - export interface Setter { (obj: any, value: any, options?: any): void; } - export interface QueryOptions { - errorHandler?: ErrorHandler; - requireTotalCount?: boolean; - } - export interface ODataQueryOptions extends QueryOptions { - adapter?: any; - } - interface IQuery { - enumerate(): JQueryPromise>; - count(): JQueryPromise; - slice(skip: number, take?: number): IQuery; - sortBy(field: string): IQuery; - sortBy(field: Getter): IQuery; - sortBy(field: { field: string; desc?: boolean }): IQuery; - sortBy(field: { field: Getter; desc?: boolean }): IQuery; - thenBy(field: string): IQuery; - thenBy(field: Getter): IQuery; - thenBy(field: { field: string; desc?: boolean }): IQuery; - thenBy(field: { field: Getter; desc?: boolean }): IQuery; - filter(field: string, operator: string, value: any): IQuery; - filter(field: string, value: any): IQuery; - filter(criteria: any[]): IQuery; - select(field: string): IQuery; - select(field: string[]): IQuery; - select(...field: string[]): IQuery; - select(field: Getter): IQuery; - select(field: Getter[]): IQuery; - select(...field: Getter[]): IQuery; - groupBy(field: string[]): IQuery; - groupBy(field: Getter[]): IQuery; - groupBy(field: { field: string; desc?: boolean }[]): IQuery; - groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; - sum(getter?: string): JQueryPromise; - min(getter?: string): JQueryPromise; - max(getter?: string): JQueryPromise; - avg(getter?: string): JQueryPromise; - aggregate(step: number): JQueryPromise; - aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryPromise; - } - export interface ArrayQuery extends IQuery { - toArray(): Array; - } - export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } - export function base64_encode(input: string): string; - export function base64_encode(input: any[]): string; - export function query(items?: any[]): IQuery; - export var queryImpl: { - remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; - array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; - }; - export class Guid { - constructor(value?: string); - constructor(value?: any); - toString(): string; - valueOf(): string; - toJSON(): string; - } - export class EdmLiteral { - constructor(value: any); - valueOf(): any; - } - export module utils { - export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeBinaryCriterion(criteria: Array): Array; - export function keysEqual(key1: any, key2: any): boolean; - export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; - export function toComparable(value: Date, caseSensitive?: boolean): number; - export function toComparable(value: Guid, caseSensitive?: boolean): string; - export function toComparable(value: string, caseSensitive?: boolean): string; - export function compileGetter(): Getter; - export function compileGetter(expr: any[]): Getter; - export function compileGetter(expr: string): Getter; - export function compileGetter(expr: "this"): Getter; - export function compileGetter(expr: Getter): Getter; - export function compileSetter(expr: string): Setter; - export module odata { - export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; - export function serializePropName(propName: EdmLiteral): string; - export function serializePropName(propName: string): string; - export function serializeValue(value: Date): string; - export function serializeValue(value: Guid): string; - export function serializeValue(value: string): string; - export function serializeValue(value: "string"): string; - export function serializeValue(value: EdmLiteral): string; - export function serializeKey(key: any): string; - export function serializeKey(key: Date): string; - export function serializeKey(key: Guid): string; - export function serializeKey(key: string): string; - export function serializeKey(key: "string"): string; - export function serializeKey(key: EdmLiteral): string; - export var keyConverters: { - String(value: any): string; - Guid(value: any): Guid; - Int32(value: any): number; - Int64(value: any): EdmLiteral; - }; - } - } - export module queryAdapters { - export function odata(queryOptions: ODataQueryOptions): RemoteQuery; - } - export interface DataSourceOptions { - map? (item: any): any; - postProcess? (result: any[]): any; - pageSize: number; - paginate: boolean; - } - export class DataSource { - public changed: JQueryCallback; - public loadError: JQueryCallback; - public loadingChanged: JQueryCallback; - constructor(options?: Store); - constructor(options?: string); - constructor(options?: Array); - constructor(options?: { store: Store }); - constructor(options?: CustomStoreOptions); - constructor(options?: { store: Array }); - constructor(options?: { store: { type: string } }); - constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); - constructor(options?: { load(options?: LoadOptions): Array; }); - constructor(options?: { load(options?: LoadOptions): JQueryPromise; }); - constructor(options?: DataSourceOptions); - loadOptions(): { [key: string]: any }; - items(): Array; - store(): data.Store; - isLastPage(): boolean; - pageIndex(newIndex?: number): number; - sort(expr: any[]): any[]; - group(expr: any[]): any[]; - filter(expr: any[]): any[]; - select(expr: string[]): string[]; - searchValue(value?: string): string; - searchOperation(op?: string): string; - searchExpr(selector: string): string; - key(): any; - isLoaded(): boolean; - isLoading(): boolean; - totalCount(): number; - load(): JQueryPromise; - dispose(): void; - } - export interface StoreOptions { - key?: any; - errorHandler?: ErrorHandler; - loaded?: (result: Array) => void; - loading?: (loadOptions: LoadOptions) => void; - modified?: () => void; - modifying?: () => void; - inserted?: (values: Object, key: any) => void; - inserting?: (values: Object) => void; - updated?: (key: any, values: Object) => void; - updating?: (key: any, values: Object) => void; - removed?: (key: any) => void; - removing?: (key: any) => void; - } - export interface LoadOptions extends QueryOptions { - skip?: number; - take?: number; - sort?: any; - select?: any; - filter?: any; - group?: any; - expand?: any; - } - export class Store { - loaded: JQueryCallback; - loading: JQueryCallback; - modified: JQueryCallback; - modifying: JQueryCallback; - inserted: JQueryCallback; - inserting: JQueryCallback; - updated: JQueryCallback; - updating: JQueryCallback; - removed: JQueryCallback; - removing: JQueryCallback; - constructor(options?: StoreOptions); - key(): any; - keyOf(obj: any): any; - load(options?: LoadOptions): JQueryPromise; - createQuery(options?: QueryOptions): IQuery; - totalCount(options?: { - filter?: any[]; - group?: string[]; - }): JQueryPromise; - byKey(key: any, extraOptions?: { - expand?: string[] - }): JQueryPromise; - remove(key: any): JQueryPromise; - insert(values: any): JQueryPromise; - update(key: any, values: any): JQueryPromise; - } - export interface CustomStoreOptions extends StoreOptions { - load? (options?: LoadOptions): any; - byKey? (key: any): any; - insert? (values: any): any; - update? (key: any, values: any): any; - remove? (key: any): any; - totalCount? (options?: { - filter?: any[]; - group?: string[]; - }): any; - } - export class CustomStore extends Store { - constructor(options?: CustomStoreOptions); - } - export interface ArrayStoreOptions extends StoreOptions { - data?: Array - } - export class ArrayStore extends Store { - constructor(options?: Array); - constructor(options?: ArrayStoreOptions); - } - export interface LocalStoreOptions extends ArrayStoreOptions { - name: string; - } - export class LocalStore extends ArrayStore { - constructor(options?: string); - constructor(options?: LocalStoreOptions); - clear(): void; - } - export interface ODataStoreOptions extends StoreOptions { - url?: string; - name?: string; - keyType?: string; - jsonp?: boolean; - withCredentials?: boolean; - } - export class ODataStore extends Store { - constructor(options?: ODataStoreOptions); - } - export interface ODataContextOptions { - url: string; - jsonp?: boolean; - withCredentials?: boolean; - errorHandler?: ErrorHandler; - beforeSend?: () => any; - entities?: { - [entityAlias: string]: ODataStoreOptions; - }; - } - export class ODataContext { - constructor(options?: ODataContextOptions); - get(operationName: string, params: { [key: string]: any }): JQueryPromise>; - invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryPromise>; - objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; - } -} -declare module DevExpress.ui { - export var themes: { - current(): string; - current(themeName: string): void; - }; - interface ViewportOptions { - allowPan?: boolean; - allowZoom?: boolean; - } - export interface ITemplate { - compile(html: string): any; - render(template: JQuery, data: any): any; - render(template: any, data: any): any; - } - class Template { - constructor(element: HTMLElement); - constructor(element: JQueryStatic); - render(container: HTMLElement): any; - render(container: JQueryStatic): any; - dispose(): void; - } - interface TemplateStatic { - new (element: HTMLElement): Template; - new (element: JQueryStatic): Template; - } - class TemplateProvider { - constructor(); - getTemplateClass(widget: any): TemplateStatic; - getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; - } - export function initViewport(options: ViewportOptions): void; - interface NotifyOptions { - message: string; - type?: string; - displayTime?: number; - hiddenAction: () => any; - } - export function notyfy(options: any): void; - export function notify(message: string, type?: string, displayTime?: number): void; - export module dialog { - interface Dialog { - show(): JQueryPromise; - hide(value?: any): void; - } - interface DialogButton { - text: string; - icon: string; - clickAction: () => any; - } - interface DialogOptions { - message: string; - title?: string; - } - export function custom(options: DialogOptions): Dialog; - export function custom(message: string, title?: string): Dialog; - export function alert(options: DialogOptions): JQueryPromise; - export function alert(message: string, title?: string): JQueryPromise; - export function confirm(options: DialogOptions): JQueryPromise; - export function confirm(message: string, title?: string): JQueryPromise; - } - export interface CollectionContainerWidgetOptions extends WidgetOptions { - items?: Array; - itemTemplate?: any; - itemRender?: Function; - itemClickAction?: any; - itemRenderedAction?: any; - noDataText?: string; - dataSource?: data.DataSource; - selectedIndex?: number; - itemSelectAction?: any; - itemHoldAction?: any; - itemHoldTimeout?: number; - } - export class CollectionContainerWidget extends Widget { - constructor(element: Element, options?: CollectionContainerWidgetOptions); - constructor(element: JQuery, options?: CollectionContainerWidgetOptions); - } - export interface WidgetOptions extends ComponentOptions { - contentReadyAction?: any; - width?: any; - height?: any; - visible?: boolean; - activeStateEnabled?: boolean; - } - export class Widget extends Component { - constructor(element: Element, options?: WidgetOptions); - constructor(element: JQuery, options?: WidgetOptions); - init(): void; - repaint(): void; - addTemplate(template: ITemplate): void; - } - export interface dxEditorOptions extends WidgetOptions { - value?: any; - valueChangeAction?: any; - } - export class dxEditor extends Widget { - constructor(element: Element, options?: dxEditorOptions); - constructor(element: JQuery, options?: dxEditorOptions); - } -} -declare module DevExpress.viz { - export class Chart extends Component { - constructor(element: Element, options?: viz.charts.ChartOptions); - constructor(element: JQuery, options?: viz.charts.ChartOptions); - clearSelection(): void; - getSeries(): viz.charts.series.Series; - hidiTooltip(): void; - render(options: viz.charts.RenderOptions): void; - render(): void; - zoomArgument(minArg: any, maxArg: any): void; - getSeriesByPos(seriesIndex: number): viz.charts.series.Series; - getSeriesByName(seriesName: string): viz.charts.series.Series; - getAllSeries(): Array; - instance(): Chart; - showLoadingIndicator(): void; - hideLoadingIndicator(): void; - svg(): string; - getSize(): { width: number; height: number }; - } - export class PieChart extends Component { - constructor(element: Element, options?: viz.charts.PieOptions); - constructor(element: JQuery, options?: viz.charts.PieOptions); - clearSelection(): void; - getSeries(): viz.charts.series.PieSeries; - hidiTooltip(): void; - render(options: viz.charts.RenderOptions): void; - render(): void; - instance(): PieChart; - showLoadingIndicator(): void; - hideLoadingIndicator(): void; - svg(): string; - getSize(): { width: number; height: number }; - } - export class RangeSelector extends Component { - constructor(element: Element, options?: viz.rangeSelector.RangeSelectorOptions); - constructor(element: JQuery, options?: viz.rangeSelector.RangeSelectorOptions); - getSelectedRange: () => viz.rangeSelector.SelectedRange; - setSelectedRange: (selectedRange: viz.rangeSelector.SelectedRange) => void; - render(): RangeSelector; - instance(): RangeSelector; - showLoadingIndicator(): void; - hideLoadingIndicator(): void; - svg(): string; - } - export class CircularGauge extends Component { - constructor(element: Element, options?: viz.gauges.CircularGaugeOptions); - constructor(element: JQuery, options?: viz.gauges.CircularGaugeOptions); - value(): number; - value(val: number): CircularGauge; - subvalues(): Array; - subvalues(values: Array): CircularGauge; - render(): CircularGauge; - instance(): CircularGauge; - showLoadingIndicator(): void; - hideLoadingIndicator(): void; - svg(): string; - } - export class LinearGauge extends Component { - constructor(element: Element, options?: viz.gauges.LinearGaugeOptions); - constructor(element: JQuery, options?: viz.gauges.LinearGaugeOptions); - value(): number; - value(val: number): LinearGauge; - subvalues(): Array; - subvalues(values: Array): LinearGauge; - render(): LinearGauge; - instance(): LinearGauge; - showLoadingIndicator(): void; - hideLoadingIndicator(): void; - svg(): string; - } - export class BarGauge extends Component { - constructor(element: Element, options?: viz.gauges.BarGaugeOptions); - constructor(element: JQuery, options?: viz.gauges.BarGaugeOptions); - values(): Array; - values(vals: Array): BarGauge; - render(): BarGauge; - instance(): BarGauge; - showLoadingIndicator(): void; - hideLoadingIndicator(): void; - svg(): string; - } - export class Sparkline extends Component { - constructor(element: Element, options?: viz.sparklines.SparklineOptions); - constructor(element: JQuery, options?: viz.sparklines.SparklineOptions); - render(): Sparkline; - instance(): Sparkline; - svg(): string; - } - export class Bullet extends Component { - constructor(element: Element, options?: viz.sparklines.BulletOptions); - constructor(element: JQuery, options?: viz.sparklines.BulletOptions); - render(): Bullet; - instance(): Bullet; - svg(): string; - } - export class Map extends Component { - constructor(element: Element, options?: viz.map.VectorMapOptions); - constructor(element: JQuery, options?: viz.map.VectorMapOptions); - render(): Map; - instance(): Map; - getAreas(): Array; - getMarkers(): Array; - clearAreaSelection(): Map; - clearMarkerSelection(): Map; - clearSelection(): Map; - showLoadingIndicator(): void; - hideLoadingIndicator(): void; - svg(): string; - center(): Array; - center(center: Array): Map; - zoomFactor(): number; - zoomFactor(zoomFactor: number): Map; - viewport(): Array; - viewport(viewport: Array): Map; - convertCoordinates(x: number, y: number): Array; - } -} -declare module DevExpress.viz.charts { - interface z_BaseLegendOptions { - backgroundColor?: string; - hoverMode?: string; - customizeText?: (arg: { - seriesName: string; - seriesNumber: number; - seriesColor: string; - }) => string; - verticalAlignment?: string; - horizontalAlignment?: string; - itemTextPosition?: string; - equalColumnWidth?: boolean; - font?: viz.common.FontOptions; - visible?: boolean; - margin?: any; - markerSize?: number; - border?: { - visible?: boolean; - width?: number; - color?: string; - cornerRadius?: number; - opacity?: number; - dashStyle?: string; - }; - paddingLeftRight?: number; - paddingTopBottom?: number; - columnsCount?: number; - rowsCount?: number; - columnItemSpacing?: number; - rowItemSpacing?: number; - orientation?: string; - } - interface z_BaseTooltipCustomizeArgument { - value?: any; - valueText: string; - originalValue: string; - argument: any; - argumentText: string; - originalArgument: any; - percent?: any; - percentText?: string; - seriesName: string; - } - interface z_BaseTooltipOptions extends common.BaseTooltipOptions { - customizeText?: (arg: z_BaseTooltipCustomizeArgument) => string; - customizeTooltip?: (arg: z_BaseTooltipCustomizeArgument) => common.CustomizeTooltipResult; - format?: string; - argumentFormat?: string; - precision?: number; - argumentPrecision?: number; - percentPrecision?: number; - } - interface z_ChartTooltipCustomizeArgument extends z_BaseTooltipCustomizeArgument{ - closeValueText?: string; - highValueText?: string; - lowValueText?: string; - openValueText?: string; - originalCloseValue?: any; - originalHighValue?: any; - originalLowValue?: any; - originalOpenValue?: any; - closeValue?: any; - highValue?: any; - lowValue?: any; - openValue?: any; - reductionValue?: any; - reductionValueText?: string; - originalMinValue?: any; - rangeValue1?: any; - rangeValue1Text?: string; - rangeValue2?: any; - rangeValue2Text?: string; - point: series.Point; - } - interface z_ChartTooltipOptions extends z_BaseTooltipOptions { - customizeText?: (arg: z_ChartTooltipCustomizeArgument) => string; - customizeTooltip?: (arg: z_ChartTooltipCustomizeArgument) => common.CustomizeTooltipResult; - shared?: boolean; - } - interface z_BaseChartOptions extends ComponentOptions { - incidentOccured?: () => void; - done?: () => void; - tooltipShown?: () => void; - tooltipHidden?: () => void; - pointSelectionMode?: string; - redrawOnResize?: boolean; - tooltip?: z_BaseTooltipOptions; - loadingIndicator?: common.LoadingIndicatorOptions; - margin?: { - left?: number; - top?: number; - right?: number; - bottom?: number; - }; - size?: { - width?: number; - height?: number; - }; - title?: { - horizontalAlignment?: string; - verticalAlignment?: string; - font?: viz.common.FontOptions; - text?: string; - placeholderSize?: number; - margin?: any; - }; - dataSource?: any; - palette?: any; legend?: z_BaseLegendOptions; - theme?: string; - animation?: { - enabled?: boolean; - duration?: number; - easing?: string; - maxPointCountSupported?: number; - asyncSeriesRendering?: boolean; - asyncTrackersRendering?: boolean; - trackerRenderingDelay?: number; - }; - pathModified?: boolean; - } - export interface CommonPaneSettings { - backgroundColor?: string; - border?: { - color?: string; - bottom?: boolean; - left?: boolean; - right?: boolean; - top?: boolean; - dashStyle?: string; - visible?: boolean; - width?: number; - opacity?: number; - }; - } - export interface PaneSettings extends CommonPaneSettings { - name: string; - } - export interface ChartLegendOptions extends z_BaseLegendOptions { - hoverMode?: string; - position?: string; - } - interface z_CommonAxisLabelSettings { - alignment?: string; - font?: viz.common.FontOptions; - indentFromAxis?: number; - overlappingBehavior?: { - mode?: string; - rotationAngle?: number; - staggeringSpacing?: number; - }; - rotationAngle?: number; - staggered?: boolean; - staggeringSpacing?: number; - } - interface z_BaseConstantLineLabel { - visible?: boolean; - position?: string; - font?: viz.common.FontOptions; - } - interface ConstantLineAxisLabel extends z_BaseConstantLineLabel { - horizontalAlignment?: string; - verticalAlignment?: string; - } - export interface ConstantLineLabel extends ConstantLineAxisLabel { - text?: string; - } - export interface CommonConstantLineStyle { - paddingLeftRight?: number; - paddingTopBottom?: number; - width?: number; - dashStyle?: string; - color?: string; - label?: z_BaseConstantLineLabel; - } - export interface ConstantLineOptions extends CommonConstantLineStyle{ - value?: any; - label?: ConstantLineLabel; - } - interface z_AxisConstantLineStyle extends CommonConstantLineStyle { - label?: ConstantLineAxisLabel; - } - interface z_StripStyle { - label?: { - font?: viz.common.FontOptions; - horizontalAlignment?: string; - verticalAlignment?: string; - }; - paddingLeftRight?: number; - paddingTopBottom?: number; - } - export interface CommonAxisSettings { - color?: string; - discreteAxisDivisionMode?: string; - grid?: { - color?: string; - opacity?: string; - visible?: boolean; - width?: number; - } - inverted?: boolean; - label?: z_CommonAxisLabelSettings; - maxValueMargin?: number; - minValueMargin?: number; - opacity?: number; - placeholderSize?: number; - setTicksAtUnitBeginning?: boolean; - stripStyle?: z_StripStyle - constantLineStyle?: CommonConstantLineStyle; - tick?: { - color?: string; - opacity?: number; - visible?: boolean; - }; - title?: { - font?: viz.common.FontOptions; - margin?: number; - text?: string; - }; - valueMarginsEnabled?: boolean; - visible?: boolean; - width?: number; - } - export interface StripOptions extends z_StripStyle{ - color?: string; - endValue: any; - startValue: any; - label?: { - font?: viz.common.FontOptions; - horizontalAlignment?: string; - verticalAlignment?: string; - text?: string; - }; - } - interface z_AxisLabelSettings extends z_CommonAxisLabelSettings{ - customizeText: (arg: { - value: any; - valueText: string; - }) => string; - } - export interface ArgumentAxisOptions extends CommonAxisSettings { - argumentType?: string; - axisDivisionFactor?: number; - categories?: Array; - hoverMode?: string; - label?: z_AxisLabelSettings; - max?: number; - min?: number; - tickInterval?: any; - position?: string; - constantLineStyle?: z_AxisConstantLineStyle; - strips?: Array; - constantLines?: Array; - type?: string; - } - export interface ValueAxisOptions extends CommonAxisSettings { - valueType?: string; - axisDivisionFactor?: number; - categories?: Array; - hoverMode?: string; - max?: number; - min?: number; - tickInterval?: any; position?: string; - strips?: Array; - constantLines?: Array; - constantLineStyle?: z_AxisConstantLineStyle; - type?: string; - name?: string; - label?: z_AxisLabelSettings; - } - interface z_CrosshairLine { - color?: string; - width?: number; - dashStyle?: string; - opacity?: number; - } - interface z_CrosshairOptions extends z_CrosshairLine { - enabled?: boolean; - verticalLine?: z_CrosshairLine; - horizontalLine?: z_CrosshairLine; - } - export interface ChartOptions extends z_BaseChartOptions { - needAggregate?: boolean; - defaultPane?: string; - adjustOnZoom?: boolean; - rotated?: boolean; - synchronizeMultiAxes?: boolean; - equalBarWidth?: { - spacing?: number; - width?: number; - }; - adaptiveLayout?: { - width?: number; - height?: number; - keepLabels?: boolean; - }; - customizePoint?: (arg: { - index: number; - argument: any; - seriesName: string; - tag: any; - value?: any; - rangeValue1?: any; - rangeValue2?: any; - }) => series.BasePointOptions; - customizeLabel?: (arg: { - index: number; - argument: any; - seriesName: string; - tag: any; - value?: any; - ramgeValue1?: any; - rangeValue2?: any; - }) => series.z_BaseLabelOptions; - commonPaneSettings?: CommonPaneSettings; - panes?: Array; - containerBackgroundColor?: string; - seriesTemplate?: { - nameField?: string; - customizeSeries?: (valueFromNameField: string) => viz.charts.series.SeriesOptions; - }; - crosshair?: z_CrosshairOptions; - seriesSelectionMode?: string; - tooltip?: z_ChartTooltipOptions; - dataPrepareSettings?: { - checkTypeForAllData?: boolean; - convertToAxisDataType?: boolean; - sortingMethod?: any; - }; - useAggregation?: boolean; - argumentAxisClick?: (axis: any, argument: any, event: JQueryMouseEventObject) => void; - legend?: ChartLegendOptions; - argumentAxis?: ArgumentAxisOptions; - valueAxis?: Array; - commonAxisSettings?: CommonAxisSettings; - series?: Array; - commonSeriesSettings?: viz.charts.series.commonSeriesSettings; - seriesClick?: (series: viz.charts.series.Series, event: JQueryMouseEventObject) => void; - seriesHover?: (series: viz.charts.series.Series) => void; - seriesSelected?: (series: viz.charts.series.Series) => void; - seriesHoverChanged?: (series: viz.charts.series.Series) => void; - pointClick?: (point: viz.charts.series.Point, event: JQueryMouseEventObject) => void; - legendClick?: (obj: any, event: JQueryMouseEventObject) => void; pointHover?: (point: viz.charts.series.Point) => void; - pointSelected?: (point: viz.charts.series.Point) => void; - seriesSelectionChanged?: (series: viz.charts.series.Series) => void; - pointSelectionChanged?: (point: viz.charts.series.Point) => void; - pointHoverChanged?: (point: viz.charts.series.Point) => void; - drawn?: (arg:viz.Chart) => void; - minBubbleSize?: number; - maxBubbleSize?: number; - } - export interface PieOptions extends z_BaseChartOptions { - pointClick?: (point: viz.charts.series.PiePoint, event: JQueryMouseEventObject) => void; - legendClick?: (point: viz.charts.series.PiePoint, event: JQueryMouseEventObject) => void; - pointHover?: (point: viz.charts.series.PiePoint) => void; - pointSelected?: (point: viz.charts.series.PiePoint) => void; - pointSelectionChanged?: (point: viz.charts.series.PiePoint) => void; - pointHoverChanged?: (point: viz.charts.series.PiePoint) => void; - series?: viz.charts.series.PieSeriesOptions; - drawn?: (arg:viz.PieChart) => void; - } - export interface RenderOptions { - force?: boolean; - animate?: boolean; - asyncSeriesRendering?: boolean; - } -} -declare module DevExpress.viz.charts.series { - export interface z_BasePointStyle { - color?: string; - border?: { - visible?: boolean; - width?: number; - color?: string; - }; - size?: number; - } - interface BasePointOptions extends z_BasePointStyle { - hoverMode?: string; - selectionMode?: string; - visible?: boolean; - symbol?: string; - image?: any; - hoverStyle?: z_BasePointStyle; - selectionStyle?: z_BasePointStyle; - } - interface z_BaseSeriesOptions { - argumentField?: string; - hoverMode?: string; - maxLabelCount?: number; - label?: z_BaseLabelOptions; - selectionMode?: string; - showInLegend?: boolean; - tagField?: string; - visible?: boolean; - } - interface z_BaseLabelOptions { - visible?: boolean; - alignment?: string; - rotationAngle?: number; - format?: string; - precision?: number; - argumentFormat?: string; - argumentPrecision?: number; - precission?: number; - percentPrecision?: number; - font?: viz.common.FontOptions; - backgroundColor?: string; - border?: { - visible?: boolean; - width?: number; - color?: string; - dashStyle?: string; - }; - connector?: { - visible?: boolean; - width?: number; - color?: string; - } - } - interface z_BaseChartSeriesLabelOptions extends z_BaseLabelOptions { - horizontalOffset?: number; - verticalOffset?: number; - customizeText?: (arg: { - originalValue: any; - value: any; - valueText: string; - originalArgument: any; - argument: any; - argumentText: string; - seriesName: string; - }) => string; - } - interface z_BaseSeriesStyle { - color?: string; - } - export interface ScatterSeriesOptions extends z_BaseSeriesOptions, z_BaseSeriesStyle { - selectionStyle?: z_BaseSeriesStyle; - hoverStyle?: z_BaseSeriesStyle; - valueField?: string; - point?: BasePointOptions; - axis?: string; - pane?: string; - } - export interface LineSeriesStyle extends z_BaseSeriesStyle { - dashStyle?: string; - width?: number; - } - export interface LineSeriesOptions extends LineSeriesStyle, z_BaseSeriesOptions { - selectionStyle?: LineSeriesStyle; - hoverStyle?: LineSeriesStyle; - valueField?: string; - point?: BasePointOptions; - pane?: string; - } - export interface AreaSeriesStyle extends z_BaseSeriesStyle { - hatching?: { - direction?: string; - width?: number; - step?: number; - opacity?: number - }; - border?: { - visible?: boolean; - width?: number; - color?: string; - dashStyle?: string; - }; - } - export interface AreaSeriesOptions extends AreaSeriesStyle, z_BaseSeriesOptions { - selectionStyle?: AreaSeriesStyle; - hoverStyle?: AreaSeriesStyle; - valueField?: string; - point?: BasePointOptions; - pane?: string; - axis?: string; - } - export interface BarSeriesLabel extends z_BaseChartSeriesLabelOptions { - position?: string; - showForZeroValues?: boolean; - } - export interface BarSeriesStyle extends AreaSeriesStyle { } - interface z_BaseBarSeriesOptions extends z_BaseSeriesOptions, BarSeriesStyle { - minBarSize?: number; - cornerRadius?: number; - label?: BarSeriesLabel; - selectionStyle?: BarSeriesStyle; - hoverStyle?: BarSeriesStyle; - pane?: string; - axis?: string; - } - export interface BarSeriesOptions extends z_BaseBarSeriesOptions { - valueField?: string; - } - export interface OHLCSeriesStyle extends z_BaseSeriesStyle{ - width?: number; - } - interface z_BaseOHLCSeries extends z_BaseSeriesOptions{ - openValueField?: string; - highValueField?: string; - lowValueField?: string; - closeValueField?: string; - reduction?: { - color?: string; - level?: string; - }; - pane?: string; - axis?: string; - } - export interface CandleStickSeriesOptions extends z_BaseOHLCSeries, OHLCSeriesStyle { - innerColor?: string; - selectionStyle?: OHLCSeriesStyle; - hoverStyle?: OHLCSeriesStyle; - } - export interface StockSeriesOptions extends z_BaseOHLCSeries, OHLCSeriesStyle { - selectionStyle?: OHLCSeriesStyle; - hoverStyle?: OHLCSeriesStyle; - } - export interface FullStackedAreaSeriesOptions extends z_BaseSeriesOptions, AreaSeriesOptions { - valueField?: string; - selectionStyle?: AreaSeriesStyle; - hoverStyle?: AreaSeriesStyle; - point?: BasePointOptions; - } - export interface FullStackedBarSeriesOptions extends BarSeriesOptions { - stack?: string; - } - export interface FullStackedLineSeriesOptions extends LineSeriesOptions{ - point?: BasePointOptions; - } - interface z_BaseRangeSeriesOptions extends z_BaseSeriesOptions { - rangeValue1Field?: string; - rangeValue2Field?: string; - pane?: string; - axis?: string; - } - export interface RangeAreaSeriesOptions extends z_BaseSeriesOptions, AreaSeriesStyle { - selectionStyle?: AreaSeriesStyle; - hoverStyle?: AreaSeriesStyle; - point?: BasePointOptions; - } - export interface RangeBarSeriesOptions extends z_BaseBarSeriesOptions { - rangeValue1Field?: string; - rangeValue2Field?: string; - pane?: string; - axis?: string; - } - export interface SplineSeriesOptions extends LineSeriesOptions {} - export interface SplineAreaSeries extends AreaSeriesOptions { } - export interface StackedLineSeries extends LineSeriesOptions { } - export interface StackedAreaSeries extends AreaSeriesOptions { } - export interface StackedBasrSeriesOptions extends BarSeriesOptions { - stack?: string; - } - export interface BubbleSeriesStyle extends AreaSeriesStyle { } - export interface BubbleSeriesOptions extends z_BaseBarSeriesOptions, BubbleSeriesStyle { - selectionStyle?: LineSeriesStyle; - hoverStyle?: LineSeriesStyle; - valueField?: string; - pane?: string; - sizeField?: string; - } - export interface StepLineSeries extends LineSeriesOptions { } - export interface StepAreaSeries extends AreaSeriesOptions { } - export interface PieSeriesStyle extends AreaSeriesStyle { } - interface PieSeriesLabelOptions extends z_BaseLabelOptions { - customizeText: (arg: { - value: any; - valueText: string; - originalValue: any; - argument: any; - argumentText: string; - originalArgument: any; - percent: any; - percentText: string; - seriesName: string; - }) => string; - radialOffset?: number; - } - export interface PieSeriesOptions extends z_BaseSeriesOptions, PieSeriesStyle{ - valueField?: string; - minSegmentSize?: string; - selectionStyle?: PieSeriesStyle; - hoverStyle?: PieSeriesStyle; - segmentsDirection?: string; - startAngle?: number; - type?: string; - label?: PieSeriesLabelOptions; - smallValuesGrouping?: valuesGrouping; - } - interface valuesGrouping{ - mode?: string; - topCount?: number; - threshold?: number; - groupName?: string; - } - interface AllSeriesStyleOptions extends z_BaseSeriesStyle, AreaSeriesStyle, LineSeriesStyle { } - interface z_AllLabelsOptions extends z_BaseChartSeriesLabelOptions, BarSeriesLabel { } - export interface CommonSeriesOptions extends z_BaseSeriesOptions, z_BaseBarSeriesOptions, z_BaseRangeSeriesOptions, z_BaseOHLCSeries, AllSeriesStyleOptions, BubbleSeriesOptions { - selectionStyle?: AllSeriesStyleOptions; - hoverStyle?: AllSeriesStyleOptions; - label?: z_AllLabelsOptions; - valueField?: string; - } - export interface SeriesOptions extends CommonSeriesOptions { - tag?: any; - name?: string; - type?: string; - } - export interface commonSeriesSettings extends CommonSeriesOptions { - area?: AreaSeriesOptions; - bar?: BarSeriesOptions; - candlestick?: CandleStickSeriesOptions; - fullstackedarea?: FullStackedAreaSeriesOptions; - fullstackedbar?: FullStackedBarSeriesOptions; - fullstackedline?: FullStackedLineSeriesOptions; - line?: LineSeriesOptions; - rangearea?: RangeAreaSeriesOptions; - rangebar?: RangeBarSeriesOptions; - scatter?: ScatterSeriesOptions; - spline?: SplineSeriesOptions; - splinearea?: SplineAreaSeries; - stackedarea?: StackedAreaSeries; - stackedbar?: StackedBasrSeriesOptions; - stackedline?: StackedLineSeries; - steparea?: StepAreaSeries; - stepline?: StepLineSeries; - stock?: StockSeriesOptions; - bubble?: BubbleSeriesOptions; - } - class z_BasePoint { - fullState: number; - originalArgument: any; - originalValue: any; - tag: any; - clearSelection(): void; - select(): void; - hideTootip(): void; - isSelected(): boolean; - isHovered(): boolean; - getColor(): string; - } - export class Point extends z_BasePoint{ - series: Series; - } - export class PiePoint extends z_BasePoint { - percent: any; - series: PieSeries; - isVisible():boolean; - hide(): void; - show(): void; - } - export class Series { - axis: string; - fullState: number; - name: string; - pane: string; - tag: any; - type: string; - clearSelection (): void; - deselectPoint (point:Point) : void; - getAllPoints () : Array - getPointByArg(pointArg: any): Point; - getPointByPos(positionIndex: number): Point; - select () : void; - selectPoint (point:Point) : void; - isSelected (): boolean; - isHovered(): boolean; - isVisible(): boolean; - show(): void; - hode(): void; - } - export class PieSeries { - fullState: number; - type: string; - clearSelection(): void; - deselectPoint(point:PiePoint): void; - getAllPoints(): Array - getPointByArg(pointArg: any): PiePoint; - getPointByPos(positionIndex: number): PiePoint; - select(): void; - selectPoint(point: PiePoint): void; - isSelected(): boolean; - isHovered(): boolean; - } -} -declare module DevExpress.viz.common { - export interface FontOptions { - color?: string; - family?: string; - opacity?: number; - size?: number; - weight?: number; - } - export interface tickIntervalObject { - years?: number; - quarters?: number; - months?: number; - days?: number; - hours?: number; - minutes?: number; - seconds?: number; - milliseconds?: number; - } - export interface LoadingIndicatorOptions { - backgroundColor?: string; - text?: string; - font?: FontOptions; - } - export interface CustomizeTooltipResult { - color?: string; - text?:string; - } - export interface BaseTooltipOptions { - enabled?: boolean; - color?: string; - border?: { - dashStyle?: string; - color?: string; - opacity?: number; - visible?: boolean; - width?: number; - }; - font?: FontOptions; - arrowLength?: number; - paddingLeftRight?: number; - paddingTopBottom?: number; - opacity?: number; - chadow?: { - color?: string; - opacity?: number; - offsetX?: number; - offsetY?: number; - blur?: number; - } - } -} -declare module DevExpress.viz.gauges { - interface CustomizeTextArgument { - value: number; - valueText: string; - color: string; - } - interface z_textOptions { - format?: string; - precision?: number; - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - } - interface z_textOptionsWithIndent extends z_textOptions { - indent?: number; - } - interface z_GaugeTooltipOptions extends common.BaseTooltipOptions { - format?: string; - precision?: number; - customizeText?: (arg: CustomizeTextArgument) => string; - customizeTooltip?: (arg: CustomizeTextArgument) => common.CustomizeTooltipResult; - } - interface z_BaseGaugeOptions { - size?: { - width?: number; - height?: number; - }; - margin?: { - left?: number; - right?: number; - top?: number; - bottom?: number; - }; - theme?: string; - loadingIndicator?: common.LoadingIndicatorOptions; - containerBackgroundColor?: string; - animation?: { - enabled?: boolean; - duration?: number; - easing?: string; - }; - redrawOnResize?: boolean; - title?: { - position?: string; - text?: string; - font?: viz.common.FontOptions; - }; - subtitle?: { - text?: string; - font?: viz.common.FontOptions; - }; - tooltip?: z_GaugeTooltipOptions; - value?: number; - subvalues?: Array; - pathModified?: boolean; - } - interface z_BaseRangeContainer { - offset?: number; - backgroundColor?: string; - ranges?: Array<{ - startValue?: number; - endValue?: number; - color?: string; - }> - } - interface z_BaseScale { - startValue?: number; - endValue?: number; - hideFirstTick?: boolean; - hideLastTick?: boolean; - hideFirstLabel?: boolean; - hideLastLabel?: boolean; - majorTick?: { - color?: string; - length?: number; - width?: number; - customTickValues?: Array; - useTicksAutoArrangement?: boolean; - tickInterval?: number; - showCalculatedTicks?: boolean; - visible?: boolean; - }; - minorTick?: { - color?: string; - length?: number; - width?: number; - customTickValues?: Array; - tickInterval?: number; - showCalculatedTicks?: boolean; - visible?: boolean; - }; - label?: z_textOptions; - } - interface z_BaseValueIndicator { - color?: string; - baseValue?: number; - size?: number; - backgroundColor?: string; - text?: z_textOptionsWithIndent; - } - interface z_BaseSubValueIndicator { - type?: string; - length?: number; - width?: number; - color?: string; - arrowLength?: number; - text?: z_textOptions; - palette?: Array - } - export interface CircularGaugeRangeContainer extends z_BaseRangeContainer { - width?: number; - orientation?: string; - } - export interface CircularGaugeScale extends z_BaseScale{ - orientation: string; - label: { - format?: string; - precision?: number; - customizeText?: (arg:CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - indentFromTick?: number; - } - } - export interface CircularGaugeValueIndicator extends z_BaseValueIndicator { - type?: string; - offset?: number; - indentFromCenter?: number; - width?: number; - secondColor?: string; - secondFraction?: number; - spindleSize?: number; - spindleGapSize?: number; - } - export interface CircularGaugeSubValueIndicator extends z_BaseSubValueIndicator { - offset?: number; - } - export interface CircularGaugeOptions extends z_BaseGaugeOptions{ - rangeContainer?: CircularGaugeRangeContainer; - geometry?: { - startAngle?: number; - endAngle?: number; - }; - scale?: CircularGaugeScale; - valueIndicator?: CircularGaugeValueIndicator; - spindle?: { - visible?: boolean; - size?: number; - gapSize?: number; - color?: string; - }; - drawn?: (arg:viz.CircularGauge) => void; - } - export interface LinearGaugeScale extends z_BaseScale { - verticalOrientation?: string; - horizontalOrientation?: string; - label?: { - format?: string; - precision?: number; - customizeText?: (arg:CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - indentFromTick?: number; - } - } - export interface LinearGaugeRangeContainer extends z_BaseRangeContainer { - width?: { - start?: number; - end?: number; - }; - verticalOrientation?: string; - horizontalOrientation?: string; - } - export interface LinearGaugeValueIndicator extends z_BaseValueIndicator { - offset?: number; - horizontalOrientation?: string; - verticalOrientation?: string; - length?: number; - width?: number; - } - export interface LinearGaugeSubValueIndicator extends z_BaseSubValueIndicator { - offset?: number; - horizontalOrientation?: string; - verticalOrientation?: string; - } - export interface LinearGaugeOptions extends z_BaseGaugeOptions { - geometry?: { - orientation?: string; - }; - scale?: LinearGaugeScale; - valueIndicator?: LinearGaugeValueIndicator; - drawn?: (arg:viz.LinearGauge) => void; - } - export interface BarGaugeOptions { - size?: { - width?: number; - height?: number; - }; - theme?: string; - loadingIndicator?: common.LoadingIndicatorOptions; - animationEnabled?: boolean; - animationDuration?: number; - animation?: { - enabled?: boolean; - duration?: number; - easing?: string; - }; - redrawOnResize?: boolean; - title?: { - position?: string; - text?: string; - font?: viz.common.FontOptions; - }; - subtitle?: { - text?: string; - font?: viz.common.FontOptions; - }; - tooltip?: z_GaugeTooltipOptions; - geometry?: { - startAngle?: number; - endAngle?: number; - }; - label?: { - visible?: boolean; - indent?: number; - connectorWidth?: number; - connectorColor?: string; - format?: string; - precision?: number; - customizeText?: (arg:CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - }; - startValue?: number; - endValue?: number; - baseValue?: number; - values?: Array; - drawn?: (arg:viz.BarGauge) => void; - pathModified?: boolean; - } -} -declare module DevExpress.viz.map { - interface TooltipOptions extends common.BaseTooltipOptions { - customizeText?: (arg: Proxy) => string; - customizeTooltip?: (arg: Proxy) => common.CustomizeTooltipResult; - borderColor?: string; - } - export interface VectorMapOptions { - size?: { - width?: number; - height?: number; - }; - theme?: string; - background?: { - borderColor?: string; - color?: string; - }; - loadingIndicator?: common.LoadingIndicatorOptions; - mapData?: any; - areaSettings?: { - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - hoverEnabled?: boolean; - selectionMode?: string; - palette?: any; - paletteSize?: number; - customize?: (arg: any) => AreaOptions; - click?: (arg: AreaProxy, event: JQueryMouseEventObject) => void; - selectionChanged?: (arg: AreaProxy) => void; - }; - markers?: any; - markerSettings?: { - size?: number; - minSize?: number; - maxSize?: number; - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - font?: common.FontOptions; - hoverEnabled?: boolean; - selectionMode?: string; - customize?: (arg: any) => MarkerOptions; - click?: (arg: MarkerProxy, event: JQueryMouseEventObject) => void; - selectionChanged?: (arg: MarkerProxy) => void; - }; - controlBar?: { - enabled?: boolean; - borderColor?: string; - color?: string; - }; - tooltip?: TooltipOptions; - bounds?: Array; - center?: Array; - zoomFactor?: number; - click?: (event: JQueryMouseEventObject) => void; - centerChanged?: (arg: Array) => void; - zoomFactorChanged?: (arg: number) => void; - drawn?: (arg: viz.Map) => void; - pathModified?: boolean; - } - export interface AreaOptions { - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - paletteIndex?: number; - isSelected?: boolean; - } - export interface MarkerOptions { - borderColor?: string; - color?: string; - hoveredBorderColor?: string; - hoveredColor?: string; - selectedBorderColor?: string; - selectedColor?: string; - isSelected?: boolean; - } - export interface Proxy { - type: string; - attribute(name: string): any; - selected(state: boolean): void; - selected(): boolean; - } - export interface AreaProxy extends Proxy { - } - export interface MarkerProxy extends Proxy { - coordinates(): Array; - } -} -declare module DevExpress.viz.rangeSelector { - export interface SelectedRange { - startValue: any; endValue: any; - } - interface CustomizeTextArgument { - value: any; - valueText: string; - } - export interface RangeSelectorOptions { - background?: { - color?: string; - image?: { - location?: string; - url?: string; - } - visible?: boolean; - }; - loadingIndicator?: common.LoadingIndicatorOptions; - behavior?: { - allowSlidersSwap?: boolean; - animationEnabled?: boolean; - callSelectedRangeChanged?: string; - manualRangeSelectionEnabled?: boolean; - moveSelectedRangeByClick?: boolean; - snapToTicks?: boolean; - }; - chart?: { - bottomIndent?: number; - equalBarWidth?: { - spacing?: number; - width?: number; - }; - dataPrepareSettings?: { - checkTypeForAllData?: boolean; - convertToAxisDataType?: boolean; - sortingMethod?: any; }; - useAggregation?: boolean; - series?: Array; - commonSeriesSettings?: viz.charts.series.commonSeriesSettings; - topIndent?: number; - valueAxis?: { - max?: any; min?: any; inverted?: boolean; - valueType?: string; - type?: string; - logarithmBase?: number; - }; - } - containerBackgroundColor?: string; - dataSource?: Array<{}>; - dataSourceField?: string; - margin?: { - left?: number; - top?: number; - right?: number; - bottom?: number; - }; - redrawOnResize?: boolean; - scale?: { - startValue?: any; endValue?: any; - label?: { - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - format?: string; - precision?: number; - topIndent?: number; - visible?: boolean; - }; - majorTickInterval?: any; marker?: { - label?: { - customizeText?: (arg: CustomizeTextArgument) => string; - format?: string; - }; - separatorHeight?: number; - textLeftIndent?: number; - textTopIndent?: number; - topIndent?: number; - visible?: boolean; - }; - maxRange?: any; minorTickCount?: number; - placeHolderHeight?: number; - setTicksAtUnitBeginning?: boolean; - showCustomBoundaryTicks?: boolean; - showMinorTicks?: boolean; - tick?: { - color?: string; - opacity?: number; - width?: number; - }; - minorTickInterval?: any; useTicksAutoArrangement?: boolean; - valueType?: string; - type?: string; - logarithmBase?: number; - } - selectedRange?: SelectedRange; - selectedRangeChaged?: (startValue: any, endValue: any) => void; - shutter?: { - color?: string; - opacity?: string; - } - size?: { - width?: number; - height?: number; - }; - sliderHandle?: { - color?: string; - opacity?: number; - width?: string; - }; - sliderMarker?: { - color?: string; - customizeText?: (arg: CustomizeTextArgument) => string; - font?: viz.common.FontOptions; - format?: string; - invalidRangeColor?: string; - padding?: number; - placeHolderSize?: { - height?: number; - width?: { - left?: number; - right?: number; - } - precission?: number; - visible?: boolean; - } - }; - theme?: string; - drawn?: (arg:viz.RangeSelector) => void; - pathModified?: boolean; - } -} -declare module DevExpress.viz.sparklines { - interface z_SparklineTooltipFormatObject { - firstValue?: string; - lastValue?: string; - maxValue?: string; - minValue?: string; - originalFirstValue?: any; - originalLastValue?: any; - originalMaxValue?: any; - originalMinValue?: any; - } - interface SparklineTooltipOptions extends common.BaseTooltipOptions { - customizeText?: (arg: z_SparklineTooltipFormatObject) => string; - customizeTooltip?: (arg: z_SparklineTooltipFormatObject) => common.CustomizeTooltipResult; - allowContainerResizing?: boolean; - horizontalAlignment?: string; - verticalAlignment?: string; - format?: string; - precision?: number; - } - interface z_BaseSparklineSettings { - theme?: string; - size?: { - width?: number; - height?: number; - }; - tooltip?: SparklineTooltipOptions; - pathModified?: boolean; - } - interface SparklineOptions extends z_BaseSparklineSettings { - dataSource?: Array; - argumentField?: string; - valueField?: string; - type?: string; - lineColor?: string; - lineWidth?: number; - showFirstLast?: boolean; - showMinMax?: boolean; - minColor?: string; - maxColor?: string; - firstLastColor?: string; - barPositiveColor?: string; - barNegativeColor?: string; - winColor?: string; - lossColor?: string; - pointSymbol?: string; - pointSize?: number; - pointColor?: string; - winlossThreshold?: number; - drawn?: (arg:viz.Sparkline) => void; - ignoreEmptyPoints?: boolean; - } - interface z_BulletTooltipFormatObject { - originalValue?: any; - originalTarget?: any; - value?: string; - target?: string; - } - interface BulletTooltipOptions extends SparklineTooltipOptions { - customizeText?: (arg: z_BulletTooltipFormatObject) => string; - customizeTooltip?: (arg: z_BulletTooltipFormatObject) => common.CustomizeTooltipResult; - } - interface BulletOptions extends z_BaseSparklineSettings{ - value?: number; - target?: number; - endScaleValue?: number; - color?: string; - targetColor?: string; - targetWidth?: number; - targetVisible?: boolean; - tooltip?: BulletTooltipOptions; - drawn?: (arg:viz.Bullet) => void; - } -} -interface JQuery { - dxChart(options?: DevExpress.viz.charts.ChartOptions): JQuery; - dxChart(method: string, param1?:any, param2?:any): any; - dxPieChart(options?: DevExpress.viz.charts.PieOptions): JQuery; - dxPieChart(method: string, param1?: any, param2?: any): any; - dxRangeSelector(options?: DevExpress.viz.rangeSelector.RangeSelectorOptions): JQuery; - dxRangeSelector(method: string, param1?: any, param2?: any): any; - dxCircularGauge(options?: DevExpress.viz.gauges.CircularGaugeOptions): JQuery; - dxCircularGauge(method: string, param1?: any, param2?: any): any; - dxLinearGauge(options?: DevExpress.viz.gauges.LinearGaugeOptions): JQuery; - dxLinearGauge(method: string, param1?: any, param2?: any): any; - dxBarGauge(options?: DevExpress.viz.gauges.BarGaugeOptions): JQuery; - dxBarGauge(method: string, param1?: any, param2?: any): any; - dxSparkline(options?: DevExpress.viz.sparklines.SparklineOptions): JQuery; - dxSparkline(method: string, param1?: any, param2?: any): any; - dxBullet(options?: DevExpress.viz.sparklines.BulletOptions): JQuery; - dxBullet(method: string, param1?: any, param2?: any): any; - dxVectorMap(options?: DevExpress.viz.map.VectorMapOptions): JQuery; - dxVectorMap(method: string, param1?: any, param2?: any): any; -} \ No newline at end of file diff --git a/devextreme/14.1/dx.phonejs-14.1-tests.ts b/devextreme/14.1/dx.phonejs-14.1-tests.ts deleted file mode 100644 index 9c3f49db3..000000000 --- a/devextreme/14.1/dx.phonejs-14.1-tests.ts +++ /dev/null @@ -1,258 +0,0 @@ -/// - -module Test { - var url = "http://some-json-service.net/data.json"; - var dsFromUrl = new DevExpress.data.DataSource(url); - - var dsFromObject = new DevExpress.data.DataSource({ - load: function (loadOptions?: DevExpress.data.LoadOptions) { - return $.ajax(url); - } - }); - - var application:DevExpress.framework.html.HtmlApplication = new DevExpress.framework.html.HtmlApplication({ - namespace: "global", - defaultLayout: "slideout", - navigation: [ - { id: "first", title: "Home", action: "#home" }, - { id: "second", title: "About", action: "#about" } - ] - }); - application.router.register(":view/:id", { view: "home", id: undefined }); - application.navigate(); - - $("div").appendTo(document.body).dxMap({ - location: [40.749825, -73.987963], - zoom: 13, - provider: "googleStatic", - controls: true, - routes: [ - { - weight: 4, - opacity: 0.75, - color: "red", - mode: "walking", - locations: [ - [40.737102, -73.990318], - [40.749825, -73.987963], - [40.75, -73.98], - [40.755823, -73.986397] - ] - } - ] - }); - $("div").appendTo(document.body).dxTabs({ - itemClickAction: function (e: any) { - console.log(e.itemData.text); - }, - items: [ - { text: "user" }, - { text: "analytics" }, - { text: "customers" }, - { text: "search" }, - { text: "favorites" } - ] - }); - - $("div").appendTo(document.body).dxList({ - scrollByContent: true, - items: ["item1", "item2", "item3"], - itemHoldAction: function (e: any) { console.log("itemHold"); }, - itemClickAction: function (e: any) { console.log("itemClick"); }, - itemSwipeAction: function (e: any) { console.log("itemSwipe " + e.direction); } - }); - $("div").appendTo(document.body).dxToast({ - type: 'error', - message: 'Sample error message' - }); - $("div").appendTo(document.body).dxPopup({ - closeButton: true, - title: "Popup title" - }); - $("div").appendTo(document.body).dxPivot({ - items: [ - { title: "all", text: "all" }, - { title: "unread", text: "unread" }, - { title: "favorites", text: "favorites" } - ], - itemSelectAction: function (e: Object) { console.log("itemSelectAction"); } - }); - $("div").appendTo(document.body).dxLookup({ - items: [ - { id: 1, caption: "red" }, - { id: 3, caption: "blue" }, - { id: 6, caption: "white" }, - { id: 2, caption: "green" }, - { id: 4, caption: "yellow" }, - { id: 5, caption: "orange" }, - { id: 7, caption: "purple" } - ], - valueExpr: 'id', - displayExpr: 'caption', - itemRender: function (item: any) { - return "Text is: " + item.caption; - } - }); - $("div").appendTo(document.body).dxSlider({ - min: 50, - value: 75, - max: 100, - disabled: false - }); - $("div").appendTo(document.body).dxNavBar({ - items: [ - { text: "user", icon: "user" }, - { text: "find", icon: "find", disabled: false }, - { text: "favorites", icon: "favorites" }, - { text: "about", icon: "info" }, - { text: "home", icon: "home" }, - { text: "URI", icon: "tips" } - ], - itemClickAction: function (e: any) { console.log(e.itemData.text); } - }); - $("div").appendTo(document.body).dxSwitch({ - value: false, - onText: 'LongName', - offText: 'Short', - width: "100%", - visible: true - }); - $("div").appendTo(document.body).dxButton({ - text: "Click me", - icon: 'add', - clickAction: function () { console.log("clicked"); } - }); - $("div").appendTo(document.body).dxOverlay({ - visible: false, - closeOnOutsideClick: true, - contentReadyAction: function () { - $("#hideButton").dxButton({ - text: "Hide", - clickAction: function () { $("#overlay").data("dxOverlay").option("visible", false); } - }); - } - }); - $("div").appendTo(document.body).dxDateBox({ - value: new Date(), - format: "datetime" - }); - $("div").appendTo(document.body).dxPopover({ - width: '300', - height: 'auto', - visible: true, - target: '.dx-button' - }); - $("div").appendTo(document.body).dxTextBox({ - value: "Text", - placeholder: "Placeholder", - mode: "email", - maxLength: 20, - readOnly: false, - changeAction: function (e:Object) { console.log("value changed"); }, - valueUpdateAction: function (e:Object) { console.log("value updated"); } - }); - $("div").appendTo(document.body).dxToolbar({ - items: [ - { align: 'left', widget: 'button', options: { type: 'back', text: 'Back', clickAction: function (e:Object) { console.log("back clicked"); } } }, - { align: 'center', widget: 'button', options: { text: 'button', clickAction: function (e:Object) { console.log("button clicked"); } } }, - { align: 'center', widget: 'button', options: { icon: 'plus', text: 'add', clickAction: function (e:Object) { console.log("plus clicked"); } } }, - { align: 'right', widget: 'button', options: { icon: 'find', clickAction: function (e:Object) { console.log("find clicked"); } }, useMenu: false }, - { text: 'Products', isMenu: true } - ] - }); - $("div").appendTo(document.body).dxTileView({ - items: [ - { text: "item1", widthRatio: 1.7, heightRatio: 1.7 }, - { text: "item2", widthRatio: 0.2, heightRatio: 0.2 }, - { text: "item3", widthRatio: 2, heightRatio: 2 } - ], - listHeight: 500, - itemRender: function (item: any) { return "Text is: " + item.text; }, - itemClickAction: function () { console.log("itemClick"); }, - baseItemWidth: 100, - baseItemHeight: 100, - itemMargin: 20 - }); - $("div").appendTo(document.body).dxPanorama({ - title: "my panorama", - items: [ - { header: "first", text: "first item" }, - { text: "second item" }, - { text: "third" }, - { text: "fourth" } - ], - selectedIndex: 0, - backgroundImage: { width: 89, height: 50 }, - itemSelectAction: function () { console.log("item selected"); } - }); - $("div").appendTo(document.body).dxCheckBox({ - checked: false, - disabled: false, - clickAction: function (e:Object) { console.log("clicked"); } - }); - $("div").appendTo(document.body).dxTextArea({ - value: 'Disabled', - disabled: true, - placeholder: "Placeholder" - }); - $("div").appendTo(document.body).dxLoadPanel({ - message: 'Please wait ...', - showIndicator: true, - visible: true - }); - $("div").appendTo(document.body).dxNumberBox({ - value: 100, - min: 0, - max: 200 - }); - $("div").appendTo(document.body).dxSelectBox({ - value: 2, - dataSource: new DevExpress.data.DataSource([1, 2, 2, 3]) - }); - $("div").appendTo(document.body).dxScrollable({ - useNative: false, - startAction: function (e:Object) { console.log("start"); }, - endAction: function (e:Object) { console.log("end"); } - }); - $("div").appendTo(document.body).dxRadioGroup({ - items: [{ text: "0" }, { text: "1" }, { text: "2" }], - name: "Sample", - selectedIndex: -1 - }); - $("div").appendTo(document.body).dxScrollView({ - pullDownAction: function (e:Object) { console.log("pulling down"); }, - reachBottomAction: function (e:Object) { console.log("bottom reached"); }, - disabled: false - }); - $("div").appendTo(document.body).dxActionSheet({ - title: 'Select action', - items: [ - { text: "Reply", clickAction: function () { console.log("Reply"); } }, - { text: "Forward", clickAction: function () { console.log("Forward"); } }, - { text: "Delete", clickAction: function () { console.log("Delete"); }, type: "danger" }, - { text: "Save Image", clickAction: function () { console.log("Save Image"); }, disabled: true } - ], - showTitle: true, - disabled: false, - target: '#button' - }); - $("div").appendTo(document.body).dxRangeSlider({ - start: 30, - end: 70, - min: 0, - max: 100, - step: 1 - }); - $("div").appendTo(document.body).dxAutocomplete({ - value: "Ivan", - dataSource: new DevExpress.data.DataSource(["Ivan", "Svyatoslav", "Alexander", "Nikolay", "Dmitry", "Afanasiy", "John", "Nash", "Stacy", "Izabella", "Margarita", "Anna"]), - placeholder: "Type name, please", - maxItemsCount: 3, - minSearchLength: 2, - searchTimeout: 1000 - }); - $("div").appendTo(document.body).dxDropDownMenu({ - items: ["Item 1", "Item 2", "Item 3"], - itemTemplate: 'itemWithIcon' - }); -} \ No newline at end of file diff --git a/devextreme/14.1/dx.phonejs-14.1.d.ts b/devextreme/14.1/dx.phonejs-14.1.d.ts deleted file mode 100644 index 54c2e19b7..000000000 --- a/devextreme/14.1/dx.phonejs-14.1.d.ts +++ /dev/null @@ -1,1507 +0,0 @@ -// Type definitions for PhoneJS 14.1.+ -// Project: http://js.devexpress.com/MobileDevelopment/ -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module DevExpress { - export function abstract(): void; - export var rtlEnabled: boolean; - export var hardwareBackButton: JQueryCallback; - interface Endpoint { - local?: string; - production: string; - } - class EndpointSelector { - constructor(config: { [key: string]: Endpoint }); - urlFor(key: string): string; - } - export interface ActionOptions { - context?: Object; - component?: any; - beforeExecute? (e:ActionExecuteArgs): void; - afterExecute? (e:ActionExecuteArgs): void; - } - export interface ActionExecuteArgs { - action: any; - args: any[]; - context: any; - component: any; - cancel: boolean; - handled: boolean; - } - export class Action { - constructor(action?: any, config?: ActionOptions); - execute(): any; - } - export interface IDevice { - deviceType?: string; - platform?: string; - version?: Array; - phone?: boolean; - tablet?: boolean; - android?: boolean; - ios?: boolean; - win8?: boolean; - tizen?: boolean; - generic?: boolean; - } - export module devices { - export function orientation(): string; - export var orientationChanged: JQueryCallback; - export function real(): IDevice; - export function current(deviceOrName: string): IDevice; - export function current(deviceOrName: IDevice): IDevice; - } - export function registerComponent(name: string, componentClass: any): void; - export interface ComponentOptions { - disabled?: boolean; - } - export class Component { - constructor(element: Element, options?: ComponentOptions); - constructor(element: JQuery, options?: ComponentOptions); - disposing: JQueryCallback; - optionChanged: JQueryCallback; - instance(): Component; - beginUpdate(): void; - endUpdate(): void; - option(): any; - option(options: string): any; - option(options: string): T; - option(options: string, value: any): void; - option(options: { [key: string]: any }): void; - option(options?: any): any; - } - export interface DOMComponentOptions extends ComponentOptions { - rtlEnabled?: boolean; - } - export class DOMComponent extends Component { - constructor(element: HTMLElement, options?: DOMComponentOptions); - static defaultOptions(rule: { - device: any; - options: { [key: string]: any }; - }): void; - } -} -declare module DevExpress.data { - export interface DataError extends Error { - httpStatus?: number; - errorDetails?: any; - } - export interface ErrorHandler { (e: DataError): void; } - export interface EntityOptions { key: any; keyType: any; } - export interface Getter { (obj: any, options?: any): any; } - export interface Setter { (obj: any, value: any, options?: any): void; } - export interface QueryOptions { - errorHandler?: ErrorHandler; - requireTotalCount?: boolean; - } - export interface ODataQueryOptions extends QueryOptions { - adapter?: any; - } - interface IQuery { - enumerate(): JQueryPromise>; - count(): JQueryPromise; - slice(skip: number, take?: number): IQuery; - sortBy(field: string): IQuery; - sortBy(field: Getter): IQuery; - sortBy(field: { field: string; desc?: boolean }): IQuery; - sortBy(field: { field: Getter; desc?: boolean }): IQuery; - thenBy(field: string): IQuery; - thenBy(field: Getter): IQuery; - thenBy(field: { field: string; desc?: boolean }): IQuery; - thenBy(field: { field: Getter; desc?: boolean }): IQuery; - filter(field: string, operator: string, value: any): IQuery; - filter(field: string, value: any): IQuery; - filter(criteria: any[]): IQuery; - select(field: string): IQuery; - select(field: string[]): IQuery; - select(...field: string[]): IQuery; - select(field: Getter): IQuery; - select(field: Getter[]): IQuery; - select(...field: Getter[]): IQuery; - groupBy(field: string[]): IQuery; - groupBy(field: Getter[]): IQuery; - groupBy(field: { field: string; desc?: boolean }[]): IQuery; - groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; - sum(getter?: string): JQueryPromise; - min(getter?: string): JQueryPromise; - max(getter?: string): JQueryPromise; - avg(getter?: string): JQueryPromise; - aggregate(step: number): JQueryPromise; - aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryPromise; - } - export interface ArrayQuery extends IQuery { - toArray(): Array; - } - export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } - export function base64_encode(input: string): string; - export function base64_encode(input: any[]): string; - export function query(items?: any[]): IQuery; - export var queryImpl: { - remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; - array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; - }; - export class Guid { - constructor(value?: string); - constructor(value?: any); - toString(): string; - valueOf(): string; - toJSON(): string; - } - export class EdmLiteral { - constructor(value: any); - valueOf(): any; - } - export module utils { - export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeBinaryCriterion(criteria: Array): Array; - export function keysEqual(key1: any, key2: any): boolean; - export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; - export function toComparable(value: Date, caseSensitive?: boolean): number; - export function toComparable(value: Guid, caseSensitive?: boolean): string; - export function toComparable(value: string, caseSensitive?: boolean): string; - export function compileGetter(): Getter; - export function compileGetter(expr: any[]): Getter; - export function compileGetter(expr: string): Getter; - export function compileGetter(expr: "this"): Getter; - export function compileGetter(expr: Getter): Getter; - export function compileSetter(expr: string): Setter; - export module odata { - export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; - export function serializePropName(propName: EdmLiteral): string; - export function serializePropName(propName: string): string; - export function serializeValue(value: Date): string; - export function serializeValue(value: Guid): string; - export function serializeValue(value: string): string; - export function serializeValue(value: "string"): string; - export function serializeValue(value: EdmLiteral): string; - export function serializeKey(key: any): string; - export function serializeKey(key: Date): string; - export function serializeKey(key: Guid): string; - export function serializeKey(key: string): string; - export function serializeKey(key: "string"): string; - export function serializeKey(key: EdmLiteral): string; - export var keyConverters: { - String(value: any): string; - Guid(value: any): Guid; - Int32(value: any): number; - Int64(value: any): EdmLiteral; - }; - } - } - export module queryAdapters { - export function odata(queryOptions: ODataQueryOptions): RemoteQuery; - } - export interface DataSourceOptions { - map? (item: any): any; - postProcess? (result: any[]): any; - pageSize: number; - paginate: boolean; - } - export class DataSource { - public changed: JQueryCallback; - public loadError: JQueryCallback; - public loadingChanged: JQueryCallback; - constructor(options?: Store); - constructor(options?: string); - constructor(options?: Array); - constructor(options?: { store: Store }); - constructor(options?: CustomStoreOptions); - constructor(options?: { store: Array }); - constructor(options?: { store: { type: string } }); - constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); - constructor(options?: { load(options?: LoadOptions): Array; }); - constructor(options?: { load(options?: LoadOptions): JQueryPromise; }); - constructor(options?: DataSourceOptions); - loadOptions(): { [key: string]: any }; - items(): Array; - store(): data.Store; - isLastPage(): boolean; - pageIndex(newIndex?: number): number; - sort(expr: any[]): any[]; - group(expr: any[]): any[]; - filter(expr: any[]): any[]; - select(expr: string[]): string[]; - searchValue(value?: string): string; - searchOperation(op?: string): string; - searchExpr(selector: string): string; - key(): any; - isLoaded(): boolean; - isLoading(): boolean; - totalCount(): number; - load(): JQueryPromise; - dispose(): void; - } - export interface StoreOptions { - key?: any; - errorHandler?: ErrorHandler; - loaded?: (result: Array) => void; - loading?: (loadOptions: LoadOptions) => void; - modified?: () => void; - modifying?: () => void; - inserted?: (values: Object, key: any) => void; - inserting?: (values: Object) => void; - updated?: (key: any, values: Object) => void; - updating?: (key: any, values: Object) => void; - removed?: (key: any) => void; - removing?: (key: any) => void; - } - export interface LoadOptions extends QueryOptions { - skip?: number; - take?: number; - sort?: any; - select?: any; - filter?: any; - group?: any; - expand?: any; - } - export class Store { - loaded: JQueryCallback; - loading: JQueryCallback; - modified: JQueryCallback; - modifying: JQueryCallback; - inserted: JQueryCallback; - inserting: JQueryCallback; - updated: JQueryCallback; - updating: JQueryCallback; - removed: JQueryCallback; - removing: JQueryCallback; - constructor(options?: StoreOptions); - key(): any; - keyOf(obj: any): any; - load(options?: LoadOptions): JQueryPromise; - createQuery(options?: QueryOptions): IQuery; - totalCount(options?: { - filter?: any[]; - group?: string[]; - }): JQueryPromise; - byKey(key: any, extraOptions?: { - expand?: string[] - }): JQueryPromise; - remove(key: any): JQueryPromise; - insert(values: any): JQueryPromise; - update(key: any, values: any): JQueryPromise; - } - export interface CustomStoreOptions extends StoreOptions { - load? (options?: LoadOptions): any; - byKey? (key: any): any; - insert? (values: any): any; - update? (key: any, values: any): any; - remove? (key: any): any; - totalCount? (options?: { - filter?: any[]; - group?: string[]; - }): any; - } - export class CustomStore extends Store { - constructor(options?: CustomStoreOptions); - } - export interface ArrayStoreOptions extends StoreOptions { - data?: Array - } - export class ArrayStore extends Store { - constructor(options?: Array); - constructor(options?: ArrayStoreOptions); - } - export interface LocalStoreOptions extends ArrayStoreOptions { - name: string; - } - export class LocalStore extends ArrayStore { - constructor(options?: string); - constructor(options?: LocalStoreOptions); - clear(): void; - } - export interface ODataStoreOptions extends StoreOptions { - url?: string; - name?: string; - keyType?: string; - jsonp?: boolean; - withCredentials?: boolean; - } - export class ODataStore extends Store { - constructor(options?: ODataStoreOptions); - } - export interface ODataContextOptions { - url: string; - jsonp?: boolean; - withCredentials?: boolean; - errorHandler?: ErrorHandler; - beforeSend?: () => any; - entities?: { - [entityAlias: string]: ODataStoreOptions; - }; - } - export class ODataContext { - constructor(options?: ODataContextOptions); - get(operationName: string, params: { [key: string]: any }): JQueryPromise>; - invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryPromise>; - objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; - } -} -declare module DevExpress.framework { - export interface dxViewOptions { - name: string; - title?: string; - layout?: string; - } - export class dxView extends Component { - constructor(options?: dxViewOptions); - } - export interface dxLayoutOptions { - name: string; - controller: string; - } - export class dxLayout extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxViewPlaceholderOptions { - viewName: string; - } - export class dxViewPlaceholder extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxTransitionOptions { - name: string; - type: string; - } - export class dxTransition extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxContentPlaceholderOptions { - name: string; - transition: string; - } - export class dxContentPlaceholder extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxContentOptions { - targetPlaceholder: string; - } - export class dxContent extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxCommandOptions extends ComponentOptions { - id: string; - action?: any; - icon?: string; - title?: string; - iconSrc?: string; - visible?: boolean; - } - export class dxCommand extends Component { - public beforeExecute: JQueryCallback; - public afterExecute: JQueryCallback; - constructor(element: JQuery, options?: dxCommandOptions); - constructor(element: Element, options?: dxCommandOptions); - execute(): void; - } - export class dxCommandContainer extends Component { - constructor(options: ComponentOptions); - constructor(element: JQuery, options?: ComponentOptions); - constructor(element: Element, options?: ComponentOptions); - } - export interface CommandMap { - [containerId: string]: { commands: any[]; defaults?: any; } - } - export class CommandMapping { - constructor(); - static defaultMapping: CommandMap; - mapCommands(containerId: string, commandMappings: any[]): CommandMapping; - unmapCommands(containerId: string, commandIds: string[]): void; - getCommandMappingForContainer(commandId: string, containerId: string): any; - load(config: CommandMap): CommandMapping; - } - interface IViewCache { - viewRemoved: JQueryCallback; - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class ViewCache implements IViewCache { - viewRemoved: JQueryCallback; - constructor(); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class NullViewCache implements IViewCache { - viewRemoved: JQueryCallback; - constructor(); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class CapacityViewCacheDecorator implements IViewCache { - viewRemoved: JQueryCallback; - constructor(options: { - size: number; - viewCache: IViewCache; - }); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class ConditionalViewCacheDecorator implements IViewCache { - viewRemoved: JQueryCallback; - constructor(options: { - filter: (key: string, viewInfo: any) => boolean; - viewCache: IViewCache; - }); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class HistoryDependentViewCacheDecorator implements IViewCache { - viewRemoved: JQueryCallback; - constructor(options: { - navigationManager: StackBasedNavigationManager; - viewCache: IViewCache; - }); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export interface IStorage { - getItem(key: string): any; - setItem(key: string, value: any): void; - removeItem(key: string): void; - } - export class MemoryKeyValueStorage implements IStorage { - constructor(); - getItem(key: string): any; - setItem(key: string, value: any): void; - removeItem(key: string): void; - } - export interface StateManagerOptions { - storage?: IStorage; - stateSources?: any[]; - } - export class StateManager { - public storage: IStorage; - public stateSources: any[]; - constructor(options?: StateManagerOptions); - addStateSource(stateSource: any): void; - removeStateSource(stateSource: any): void; - saveState(): void; - restoreState(): void; - clearState(): void; - } - export class Route { - constructor(pattern: string, defaults?: any, constraints?: any); - parse(url: string): any; - format(routeValues: any): string; - formatSegment(value: any): string; - parseSegment(): any; - } - export class MvcRouter { - constructor(); - register(pattern: string, defaults?: any, constraints?: any): void; - parse(uri: string): any; - format(obj: any): string; - } - interface BrowserAdapterOptions { - window: Window; - } - export class DefaultBrowserAdapter { - constructor(options?: BrowserAdapterOptions); - replaceState(uri: string): void; - pushState(uri: string): void; - createRootPage(): void; - getWindowName(): string; - setWindowName(windowName: string): void; - back(): void; - getHash(): string; - isRootPage(): boolean; - } - export class OldBrowserAdapter extends DefaultBrowserAdapter { } - export class HistorylessBrowserAdapter extends DefaultBrowserAdapter { } - export interface INavigationDevice { - init: Function; - setUri(uri: string): void; - getUri(): string; - back(): void; - } - export class StackBasedNavigationDevice extends HistoryBasedNavigationDevice implements INavigationDevice { - uriChanged: JQueryCallback; - constructor(options?: BrowserAdapterOptions); - } - export class HistoryBasedNavigationDevice implements INavigationDevice { - backInitiated: JQueryCallback; - init: Function; - setUri(uri: string): void; - getUri(): string; - back(): void; - } - export class NavigationStack { - public items: any[]; - public currentIndex: number; - public itemsRemoved: JQueryCallback; - constructor(); - currentItem(): any; - back(uri: string): void; - forward(): void; - navigate(uri: any, replaceCurrent?: boolean): any; - getPreviousItem(): any; - canBack(): boolean; - clear(): void; - } - export interface NavigationManagerOptions { - stateStorageKey?: string; - navigationDevice?: INavigationDevice; - keepPositionInStack?: boolean; - } - export interface INavigationManager { - navigating: JQueryCallback; - navigated: JQueryCallback; - navigatingBack: JQueryCallback; - navigationCanceled: JQueryCallback; - itemRemoved: JQueryCallback; - navigate(uri: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(): void; - back(alternate: any): void; - canBack(): boolean; - rootUri(): string; - currentItem(): any; - previousItem(): any; - saveState(): void; - removeState(): void; - restoreState(): void; - } - export class StackBasedNavigationManager extends HistoryBasedNavigationManager { - init(): JQueryPromise; - public currentStack: NavigationStack; - public navigationStacks: { - [key: string]: NavigationStack - }; - public navigating: JQueryCallback; - public navigated: JQueryCallback; - public navigatingBack: JQueryCallback; - public navigationCanceled: JQueryCallback; - public itemRemoved: JQueryCallback; - constructor(options?: NavigationManagerOptions); - navigate(uri: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - currentIndex(): number; - getItemByIndex(index: number): any; - clearHistory(): void; - } - export class HistoryBasedNavigationManager implements INavigationManager { - navigating: JQueryCallback; - navigated: JQueryCallback; - navigatingBack: JQueryCallback; - navigationCanceled: JQueryCallback; - itemRemoved: JQueryCallback; - constructor(options?: NavigationManagerOptions); - navigate(uri: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(): void; - back(alternate: any): void; - canBack(): boolean; - rootUri(): string; - currentItem(): any; - previousItem(): any; - saveState(): void; - removeState(): void; - restoreState(): void; - } - export module utils { - export function mergeCommands(destination: any, source: any): dxCommand[]; - } - export interface ApplicationOptions { - router?: MvcRouter; - ns?: Object; - namespace?: Object; - viewCache?: IViewCache; - viewCacheSize?: number; - disableViewCache?: boolean; - useViewTitleAsBackText?: boolean; - stateManager?: StateManager; - navigationManager?: StackBasedNavigationManager; - navigation?: dxCommandOptions[]; - commandMapping?: CommandMap; - } - export class Application { - public router: MvcRouter; - public namespace: any; - public components: any[]; - public viewCache: IViewCache; - public stateManager: StateManager; - public commandMapping: CommandMap; - public navigation: dxCommand[]; - public navigationManager: StackBasedNavigationManager; - public beforeViewSetup: JQueryCallback; - public afterViewSetup: JQueryCallback; - public viewShowing: JQueryCallback; - public viewShown: JQueryCallback; - public viewHidden: JQueryCallback; - public viewDisposing: JQueryCallback; - public viewDisposed: JQueryCallback; - public navigating: JQueryCallback; - public navigatingBack: JQueryCallback; - constructor(options?: ApplicationOptions); - init(): any; - navigate(uri?: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(): void; - canBack(): boolean; - saveState(): void; - clearState(): void; - restoreState(): void; - } - export function createActionExecutors(app: Application): { - [key: string]: { execute(e: any): void; } - }; -} -declare module DevExpress.framework.html { - export interface ILayoutController { - viewReleased: JQueryCallback; - init(options: InitLayoutControllerOptions): void; - activate(): void; - deactivate(): void; - showView(viewInfo: any, direction?: string): JQueryPromise; - } - export interface ILayoutControllerRegistration extends IDevice { - name: string; - controller: ILayoutController; - root?: boolean; - } - export var layoutControllers: Array; - export var layoutSets: Object; - export interface InitLayoutControllerOptions { - $viewPort?: JQuery; - $hiddenBag?: JQuery; - navigationManager?: framework.StackBasedNavigationManager; - } - export class DefaultLayoutController implements ILayoutController { - public viewReleased: JQueryCallback; - constructor(options?: { layoutTemplateName: string }); - init(options: InitLayoutControllerOptions): void; - activate(): void; - deactivate(): void; - showView(viewInfo: any, direction?: string): JQueryPromise; - } - export interface CommandManagerOptions { - globalCommands?: framework.dxCommand[]; - commandMapping?: framework.CommandMapping; - } - export class CommandManager { - public globalCommands: framework.dxCommand[]; - public commandMapping: framework.CommandMapping; - constructor(options?: CommandManagerOptions); - layoutCommands($markup: JQuery, extraCommands?: any): void; } - export interface ITemplateEngine { - applyTemplate(template: string, model: any): void; - applyTemplate(template: Element, model: any): void; - applyTemplate(template: JQuery, model: any): void; - } - export class KnockoutJSTemplateEngine implements ITemplateEngine { - constructor(); - applyTemplate(template: string, model: any): void; - applyTemplate(template: Element, model: any): void; - applyTemplate(template: JQuery, model: any): void; - } - export interface TransitionExecutorOptions { - type?: string; - source?: JQuery; - destination?: JQuery; - } - export class TransitionExecutor { - public container: JQuery; - constructor(container: JQuery, options: TransitionExecutorOptions); - finalize(): void; - exec(): JQueryPromise; - static create(container: JQuery, options: TransitionExecutorOptions): TransitionExecutor; - } - export interface ViewEngineOptions { - $root: JQuery; - device: IDevice; - commandManager?: CommandManager; - templateEngine?: ITemplateEngine; - dataOptionsAttributeName?: string; - } - export class ViewEngineBase { - public $root: JQuery; - public device: IDevice; - public commandManager: CommandManager; - public templateEngine: ITemplateEngine; - public dataOptionsAttributeName: string; - public viewSelecting: JQueryCallback; - public modelFromViewDataExtended: JQueryCallback; - constructor(options?: ViewEngineOptions); - init(): JQueryPromise; - findViewTemplate(viewName: string): JQuery; - afterViewSetup(viewInfo: any): void; - } - export class ViewEngine extends ViewEngineBase { - public layoutSelecting: JQueryCallback; - constructor(options?: ViewEngineOptions); - init(): JQueryPromise; - findLayoutTemplate(layoutName: string): JQuery; - } - export interface HtmlApplicationOptions extends framework.ApplicationOptions { - commandManager?: CommandManager; - templateEngine?: ITemplateEngine; - navigateToRootViewMode?: string; - layoutControllers?: Array - device?: IDevice; - layoutSet?: Array; - } - export class HtmlApplication extends framework.Application { - public viewEngine: ViewEngineBase; - public viewRendered: JQueryCallback; - public resolveLayoutController: JQueryCallback; - constructor(options?: HtmlApplicationOptions); - init(): any; - viewPort(): JQuery; - } -} -declare module DevExpress.ui { - export var themes: { - current(): string; - current(themeName: string): void; - }; - interface ViewportOptions { - allowPan?: boolean; - allowZoom?: boolean; - } - export interface ITemplate { - compile(html: string): any; - render(template: JQuery, data: any): any; - render(template: any, data: any): any; - } - class Template { - constructor(element: HTMLElement); - constructor(element: JQueryStatic); - render(container: HTMLElement): any; - render(container: JQueryStatic): any; - dispose(): void; - } - interface TemplateStatic { - new (element: HTMLElement): Template; - new (element: JQueryStatic): Template; - } - class TemplateProvider { - constructor(); - getTemplateClass(widget: any): TemplateStatic; - getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; - } - export function initViewport(options: ViewportOptions): void; - interface NotifyOptions { - message: string; - type?: string; - displayTime?: number; - hiddenAction: () => any; - } - export function notyfy(options: any): void; - export function notify(message: string, type?: string, displayTime?: number): void; - export module dialog { - interface Dialog { - show(): JQueryPromise; - hide(value?: any): void; - } - interface DialogButton { - text: string; - icon: string; - clickAction: () => any; - } - interface DialogOptions { - message: string; - title?: string; - } - export function custom(options: DialogOptions): Dialog; - export function custom(message: string, title?: string): Dialog; - export function alert(options: DialogOptions): JQueryPromise; - export function alert(message: string, title?: string): JQueryPromise; - export function confirm(options: DialogOptions): JQueryPromise; - export function confirm(message: string, title?: string): JQueryPromise; - } - export interface CollectionContainerWidgetOptions extends WidgetOptions { - items?: Array; - itemTemplate?: any; - itemRender?: Function; - itemClickAction?: any; - itemRenderedAction?: any; - noDataText?: string; - dataSource?: data.DataSource; - selectedIndex?: number; - itemSelectAction?: any; - itemHoldAction?: any; - itemHoldTimeout?: number; - } - export class CollectionContainerWidget extends Widget { - constructor(element: Element, options?: CollectionContainerWidgetOptions); - constructor(element: JQuery, options?: CollectionContainerWidgetOptions); - } - export interface WidgetOptions extends ComponentOptions { - contentReadyAction?: any; - width?: any; - height?: any; - visible?: boolean; - activeStateEnabled?: boolean; - } - export class Widget extends Component { - constructor(element: Element, options?: WidgetOptions); - constructor(element: JQuery, options?: WidgetOptions); - init(): void; - repaint(): void; - addTemplate(template: ITemplate): void; - } - export interface dxEditorOptions extends WidgetOptions { - value?: any; - valueChangeAction?: any; - } - export class dxEditor extends Widget { - constructor(element: Element, options?: dxEditorOptions); - constructor(element: JQuery, options?: dxEditorOptions); - } - export interface dxAutocompleteOptions extends dxDropDownEditorOptions { - minSearchLength?: number; - searchTimeout?: number; - placeholder?: string; - filterOperator?: string; - displayExpr?: string; - searchMode?: string; - dataSource?: data.DataSource; - items?: Array; - itemRender?: Function; - itemTemplate?: any; - } - export class dxAutocomplete extends dxDropDownEditor { - constructor(element: Element, options?: dxAutocompleteOptions); - constructor(element: JQuery, options?: dxAutocompleteOptions); - } - export interface dxButtonOptions extends WidgetOptions { - type?: string; - text?: string; - icon?: string; - iconSrc?: string; - clickAction?: any; - } - export class dxButton extends Widget { - constructor(element: Element, options?: dxButtonOptions); - constructor(element: JQuery, options?: dxButtonOptions); - } - export interface dxCheckBoxOptions extends dxEditorOptions { } - export class dxCheckBox extends dxEditor { - constructor(element: Element, options?: dxCheckBoxOptions); - constructor(element: JQuery, options?: dxCheckBoxOptions); - } - export interface dxCalendarOptions extends dxEditorOptions { - value?: Date; - min?: Date; - max?: Date; - firstDayOfWeek?: number; - } - export class dxCalendar extends dxEditor { - constructor(element: Element, options?: dxEditorOptions); - constructor(element: JQuery, options?: dxEditorOptions); - } - export interface dxDateBoxOptions extends dxTextEditorOptions { - format?: string; - useNativePicker?: boolean; - value?: Date; - type?: string; - min?: Date; - max?: Date; - useCalendar?: boolean; - formatString?: string; - closeOnValueChange?: boolean; - calendarOptions?: Object; - } - export class dxDateBox extends dxTextEditor { - constructor(element: Element, options?: dxDateBoxOptions); - constructor(element: JQuery, options?: dxDateBoxOptions); - } - export interface dxTextEditorOptions extends dxEditorOptions { - valueChangeEvent?: string; - placeholder?: string; - readOnly?: boolean; - focusInAction?: any; - focusOutAction?: any; - keyDownAction?: any; - keyPressAction?: any; - keyUpAction?: any; - changeAction?: any; - enterKeyAction?: any; - copyAction?: any; - pasteAction?: any; - cutAction?: any; - inputAction?: any; - showClearButton?: boolean; - mode?: string; - } - export class dxTextEditor extends dxEditor { - constructor(element: Element, options?: dxTextEditorOptions); - constructor(element: JQuery, options?: dxTextEditorOptions); - focus(): void; - blur(): void; - } - export interface dxListOptions extends CollectionContainerWidgetOptions { - pullRefreshEnabled?: boolean; - autoPagingEnabled?: boolean; - scrollingEnabled?: boolean; - showScrollbar?: boolean; - useNativeScrolling?: boolean; - grouped?: boolean; - editEnabled?: boolean; - showNextButton?: boolean; - groupTemplate?: string; - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - pageLoadingText?: string; - scrollAction?: any; - pullRefreshAction?: any; - pageLoadingAction?: any; - itemHoldAction?: any; - itemSwipeAction?: any; - itemHoldTimeout?: number; - groupRender? (groupData: any, groupIndex: number, groupElement: Element): any; - editConfig?: { - itemTemplate?: any; - itemRenderer? (itemData: any, itemIndex: number, itemElement: Element): any; - menuType?: string; - menuItems?: any[]; - deleteEnabled?: boolean; - deleteMode?: string; - selectionEnabled?: boolean; - selectionMode?: string; - selectionType?: string; - reorderEnabled?: boolean; - } - itemDeleteAction?: any; - selectedItems?: any[]; - itemSelectAction?: any; - itemUnselectAction?: any; - itemReorderAction?: any; - nextButtonText?: string; - selectionMode?: string; - } - export class dxList extends CollectionContainerWidget { - constructor(element: Element, options?: dxListOptions); - constructor(element: JQuery, options?: dxListOptions); - update(): JQueryPromise; - updateDimensions(): JQueryPromise; - refresh(): JQueryPromise; - reload(): JQueryPromise; - deleteItem(itemElement: JQuery): JQueryPromise; - deleteItem(itemElement: Element): JQueryPromise; - clearSelectedItems() : void; - isItemSelected(itemElement: JQuery): boolean; - isItemSelected(itemElement: Element): boolean; - selectItem(itemElement: JQuery): void; - selectItem(itemElement: Element): void; - unselectItem(itemElement: JQuery): void; - unselectItem(itemElement: Element): void; - reorderItem(itemElement: JQuery, toItemElement: JQuery): JQueryPromise; - reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; - getSelectedItems(): number[]; - clientHeight(): number; - scrollHeight(): number; - scrollBy(distance: number): void; - scrollTo(targetLocation: number): void; - scrollTop(): number; - } - export interface dxLoadPanelOptions extends dxOverlayOptions { - message?: string; - width?: number; - height?: number; - delay?: number; - showPane?: boolean; - showIndicator?: boolean; - indicatorSrc?: string; - } - export class dxLoadPanel extends dxOverlay { - constructor(element: Element, options?: dxLoadPanelOptions); - constructor(element: JQuery, options?: dxLoadPanelOptions); - hide(): void; - show(): void; - toggle(showing: boolean): void; - } - export interface dxLookupOptions extends dxEditorOptions { - dataSource?: data.DataSource; - displayValue?: string; - title?: string; - titleTemplate?: any; - valueExpr?: string; - displayExpr?: string; - placeholder?: string; - searchPlaceholder?: string; - searchEnabled?: boolean; - searchTimeout?: number; - minFilterLength?: number; - fullScreen?: boolean; - itemTemplate?: any; - itemRender?: Function; - showCancelButton?: boolean; - showClearButton?: boolean; - showDoneButton?: boolean; - showNextButton?: boolean; - doneButtonText?: string; - cancelButtonText?: string; - clearButtonText?: string; - nextButtonText?: string; - grouped?: boolean; - groupRender?: Function; - groupTemplate?: string; - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - pageLoadingText?: string; - noDataText?: string; - scrollAction?: any; - shading?: boolean; - closeOnOutsideClick?: boolean; - position?: any; - animation?: any; - shownAction?: any; - hiddenAction?: any; - popupWidth?: any; - popupHeight?: any; - autoPagingEnabled?: boolean; - useNativeScrolling?: boolean; - usePopover?: boolean; - openAction?: any; - closeAction?: any; - } - export class dxLookup extends dxEditor { - constructor(element: Element, options?: dxLookupOptions); - constructor(element: JQuery, options?: dxLookupOptions); - close(): void; - open(): void; - } - export interface dxMapOptions extends WidgetOptions { - location?: any; - width?: number; - height?: number; - zoom?: number; - mapType?: string; - provider?: string; - markers?: Array; - routes?: Array; - key?: string; - controls?: any; - mapReadyAction?: any; - autoAdjust?: boolean; - center?: any; - markerAddedAction?: any; - markerRemovedAction?: any; - markerIconSrc?: string; - routeAddedAction?: any; - routeRemovedAction?: any; - type?: string; - } - export class dxMap extends Widget { - constructor(element: Element, options?: dxMapOptions); - constructor(element: JQuery, options?: dxMapOptions); - addMarker(markerOptions: any, callback: Function): JQueryPromise; - removeMarker(marker: any): void; - addRoute(routeOptions: any, callback: Function): JQueryPromise; - removeRoute(route: any): void; - } - export interface dxNavBarOptions extends dxTabsOptions { } - export class dxNavBar extends dxTabs { - constructor(element: Element, options?: dxNavBarOptions); - constructor(element: JQuery, options?: dxNavBarOptions); - } - export interface dxNumberBoxOptions extends dxTextEditorOptions { - min?: number; - max?: number; - value?: number; - step?: number; - showSpinButtons?: boolean; - } - export class dxNumberBox extends dxTextEditor { - constructor(element: Element, options?: dxNumberBoxOptions); - constructor(element: JQuery, options?: dxNumberBoxOptions); - } - export interface dxOverlayOptions extends WidgetOptions { - activeStateEnabled?: boolean; - shading?: boolean; - closeOnOutsideClick?: boolean; - position?: any; - animation?: any; - showingAction?: any; - shownAction?: any; - hidingAction?: any; - hiddenAction?: any; - deferRendering?: boolean; - targetContainer?: any; - contentTemplate?: any; - } - export class dxOverlay extends Widget { - constructor(element: Element, options?: dxOverlayOptions); - constructor(element: JQuery, options?: dxOverlayOptions); - content(): JQuery; - hide(): void; - show(): void; - toggle(showing: boolean): void; - } - export interface dxPopupOptions extends dxOverlayOptions { - title?: string; - showTitle?: boolean; - fullScreen?: boolean; - cancelButton?: any; - doneButton?: any; - clearButton?: any; - titleTemplate?: any; - dragEnabled?: boolean; - } - export class dxPopup extends dxOverlay { - constructor(element: Element, options?: dxPopupOptions); - constructor(element: JQuery, options?: dxPopupOptions); - } - export interface dxPopoverOptions extends dxPopupOptions { - target?: any; - } - export class dxPopover extends dxPopup { - constructor(element: Element, options?: dxPopoverOptions); - constructor(element: JQuery, options?: dxPopoverOptions); - } - export interface dxTooltipOptions extends dxPopoverOptions { - target?: any; - } - export class dxTooltip extends dxPopover { - constructor(element: Element, options?: dxTooltipOptions); - constructor(element: JQuery, options?: dxTooltipOptions); - } - export interface dxRadioGroupOptions extends CollectionContainerWidgetOptions { - layout?: string; - name?: string; - value?: Object; - valueExpr?: string; - } - export class dxRadioGroup extends CollectionContainerWidget { - constructor(element: Element, options?: dxRadioGroupOptions); - constructor(element: JQuery, options?: dxRadioGroupOptions); - } - export interface dxRangeSliderOptions extends dxSliderOptions { - start?: number; - end?: number; - } - export class dxRangeSlider extends dxSlider { - constructor(element: Element, options?: dxRangeSliderOptions); - constructor(element: JQuery, options?: dxRangeSliderOptions); - } - export interface dxScrollableOptions extends ComponentOptions { - startAction?: any; - scrollAction?: any; - endAction?: any; - stopAction?: any; - inertiaAction?: any; - bounceAction?: any; - updateAction?: any; - bounceEnabled?: boolean; - direction?: string; - showScrollbar?: boolean; - useNative?: boolean; - } - export class dxScrollable extends Component { - constructor(element: Element, options?: dxScrollableOptions); - constructor(element: JQuery, options?: dxScrollableOptions); - update(): void; - content(): JQuery; - clientHeight(): number; - scrollHeight(): number; - clientWidth(): number; - scrollWidth(): number; - scrollLeft(): number; - scrollTop(): number; - scrollOffset(): Object; - scrollBy(distance: number): void; - scrollBy(distance: Object): void; - scrollTo(targetLocation: number): void; - scrollTo(targetLocation: Object): void; - } - export interface dxScrollViewOptions extends dxScrollableOptions { - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - reachBottomText?: string; - pullDownAction?: any; - reachBottomAction?: any; - } - export class dxScrollView extends dxScrollable { - constructor(element: Element, options?: dxScrollViewOptions); - constructor(element: JQuery, options?: dxScrollViewOptions); - release(preventReachBottom: boolean): JQueryPromise; - toggleLoading(showOrHide: boolean): void; - refresh(): void; - } - export interface dxSelectBoxOptions extends dxAutocompleteOptions { - fieldTemplate?: any; - displayValue?: string; - multiSelectEnabled?: boolean; - values?: any[]; - openAction?: any; - closeAction?: any; - } - export class dxSelectBox extends dxAutocomplete { - constructor(element: Element, options?: dxSelectBoxOptions); - constructor(element: JQuery, options?: dxSelectBoxOptions); - } - export interface dxSliderOptions extends dxEditorOptions { - min?: number; - max?: number; - step?: number; - showRange?: boolean; - label?: { - visible: boolean; - format?: any; - position?: string; - } - tooltip?: { - enabled?: boolean; - format?: any; - position?: string; - showMode?: string; - } - } - export class dxSlider extends dxEditor { - constructor(element: Element, options?: dxSliderOptions); - constructor(element: JQuery, options?: dxSliderOptions); - } - export interface dxTabsOptions extends CollectionContainerWidgetOptions { } - export class dxTabs extends CollectionContainerWidget { - constructor(element: Element, options?: dxTabsOptions); - constructor(element: JQuery, options?: dxTabsOptions); - } - export interface dxTextAreaOptions extends dxTextEditorOptions { - cols?: number; - rows?: number; - } - export class dxTextArea extends dxTextEditor { - constructor(element: Element, options?: dxTextAreaOptions); - constructor(element: JQuery, options?: dxTextAreaOptions); - } - export interface dxTextBoxOptions extends dxTextEditorOptions { - maxLength?: any; - } - export class dxTextBox extends dxTextEditor { - constructor(element: Element, options?: dxTextBoxOptions); - constructor(element: JQuery, options?: dxTextBoxOptions); - } - export interface dxToastOptions extends dxOverlayOptions { - message?: string; - type?: string; - displayTime?: number; - } - export class dxToast extends dxOverlay { - constructor(element: Element, options?: dxToastOptions); - constructor(element: JQuery, options?: dxToastOptions); - } - export interface dxToolbarOptions extends CollectionContainerWidgetOptions { - menuItemRender?: Function; - menuItemTemplate?: any; - submenuType?: string; - renderAs?: string; - } - export class dxToolbar extends CollectionContainerWidget { - constructor(element: Element, options?: dxToolbarOptions); - constructor(element: JQuery, options?: dxToolbarOptions); - } - export interface dxDropDownEditorOptions extends dxTextBoxOptions { - closeAction?: any; - openAction?: any; - } - export class dxDropDownEditor extends dxTextBox { - constructor(element: Element, options?: dxDropDownEditorOptions); - constructor(element: JQuery, options?: dxDropDownEditorOptions); - } - export interface dxLoadIndicatorOptions extends WidgetOptions { - indicatorSrc?: string; - } - export class dxLoadIndicator extends Widget { - constructor(element: Element, options?: dxLoadIndicatorOptions); - constructor(element: JQuery, options?: dxLoadIndicatorOptions); - } - export interface dxMultiViewOptions extends CollectionContainerWidgetOptions { - loop?: boolean; - swipeEnabled?: boolean; - animationEnabled?: boolean; - selectedIndex?: number; - } - export class dxMultiView extends CollectionContainerWidget { - constructor(element: Element, options?: dxMultiViewOptions); - constructor(element: JQuery, options?: dxMultiViewOptions); - } - export interface dxGalleryOptions extends CollectionContainerWidgetOptions { - activeStateEnabled?: boolean; - animationDuration?: number; - loop?: boolean; - swipeEnabled?: boolean; - indicatorEnabled?: boolean; - showIndicator?: boolean; - selectedIndex?: number; - slideshowDelay?: number; - showNavButtons?: boolean; - } - export class dxGallery extends CollectionContainerWidget { - constructor(element: Element, options?: dxGalleryOptions); - constructor(element: JQuery, options?: dxGalleryOptions); - goToItem(itemIndex?: number, animation?: boolean): JQueryPromise; - prevItem(animation?: boolean): JQueryPromise; - nextItem(animation?: boolean): JQueryPromise; - } - export interface dxActionSheetOptions extends CollectionContainerWidgetOptions { - usePopover?: boolean; - target?: any; - title?: string; - showTitle?: boolean; - cancelText?: string; - noDataText?: string; - cancelClickAction?: any; - showCancelButton?: boolean; - } - export class dxActionSheet extends CollectionContainerWidget { - constructor(element: Element, options?: dxActionSheetOptions); - constructor(element: JQuery, options?: dxActionSheetOptions); - toggle(): void; - show(): void; - hide(): void; - } - export interface dxDropDownMenuOptions extends WidgetOptions { - items?: Array; - itemClickAction?: any; - dataSource?: data.DataSource; - itemTemplate?: any; - itemRender?: Function; - buttonText?: string; - buttonIcon?: string; - buttonIconSrc?: string; - buttonClickAction?: any; - usePopover?: boolean; - } - export class dxDropDownMenu extends Widget { - constructor(element: Element, options?: dxDropDownMenuOptions); - constructor(element: JQuery, options?: dxDropDownMenuOptions); - } - export interface dxPanoramaOptions extends CollectionContainerWidgetOptions { - title?: string; - backgroundImage?: any; - } - export class dxPanorama extends CollectionContainerWidget { - constructor(element: Element, options?: dxPanoramaOptions); - constructor(element: JQuery, options?: dxPanoramaOptions); - } - export interface dxPivotOptions extends CollectionContainerWidgetOptions { } - export class dxPivot extends CollectionContainerWidget { - constructor(element: Element, options?: dxPivotOptions); - constructor(element: JQuery, options?: dxPivotOptions); - } - export interface dxSwitchOptions extends dxEditorOptions { - onText?: string; - offText?: string; - } - export class dxSwitch extends dxEditor { - constructor(element: Element, options?: dxSwitchOptions); - constructor(element: JQuery, options?: dxSwitchOptions); - } - export interface dxTileViewOptions extends CollectionContainerWidgetOptions { - bounceEnabled?: boolean; - showScrollbar?: boolean; - listHeight?: number; - baseItemWidth?: number; - baseItemHeight?: number; - itemMargin?: number; - } - export class dxTileView extends CollectionContainerWidget { - constructor(element: Element, options?: dxTileViewOptions); - constructor(element: JQuery, options?: dxTileViewOptions); - } - export interface dxSlideOutOptions extends CollectionContainerWidgetOptions { - activeStateEnabled?: boolean; - menuItemRender? (itemData: any, itemIndex: number, itemElement: Element): any; - menuItemTemplate?: any; - swipeEnabled?: boolean; - menuVisible?: boolean; - menuGrouped?: boolean; - menuGroupRender? (groupData: any, groupIndex: number, groupElement: Element): any; - menuGroupTemplate?: any; - } - export class dxSlideOut extends CollectionContainerWidget { - constructor(element: Element, options?: dxSlideOutOptions); - constructor(element: JQuery, options?: dxSlideOutOptions); - showMenu(): JQueryPromise; - hideMenu(): JQueryPromise; - toggleMenuVisibility(showing?: boolean): JQueryPromise; - } -} -interface JQuery { - dxAutocomplete(options?: DevExpress.ui.dxAutocompleteOptions): JQuery; - dxButton(options?: DevExpress.ui.dxButtonOptions): JQuery; - dxCheckBox(options?: DevExpress.ui.dxCheckBoxOptions): JQuery; - dxCalendar(options?: DevExpress.ui.dxCalendarOptions): JQuery; - dxDateBox(options?: DevExpress.ui.dxDateBoxOptions): JQuery; - dxTextEditor(options?: DevExpress.ui.dxTextEditorOptions): JQuery; - dxList(options?: DevExpress.ui.dxListOptions): JQuery; - dxLoadPanel(options?: DevExpress.ui.dxLoadPanelOptions): JQuery; - dxLookup(options?: DevExpress.ui.dxLookupOptions): JQuery; - dxMap(options?: DevExpress.ui.dxMapOptions): JQuery; - dxNavBar(options?: DevExpress.ui.dxNavBarOptions): JQuery; - dxNumberBox(options?: DevExpress.ui.dxNumberBoxOptions): JQuery; - dxOverlay(options?: DevExpress.ui.dxOverlayOptions): JQuery; - dxPopup(options?: DevExpress.ui.dxPopupOptions): JQuery; - dxPopover(options?: DevExpress.ui.dxPopoverOptions): JQuery; - dxTooltip(options?: DevExpress.ui.dxTooltipOptions): JQuery; - dxRadioGroup(options?: DevExpress.ui.dxRadioGroupOptions): JQuery; - dxRangeSlider(options?: DevExpress.ui.dxRangeSliderOptions): JQuery; - dxScrollable(options?: DevExpress.ui.dxScrollableOptions): JQuery; - dxScrollView(options?: DevExpress.ui.dxScrollViewOptions): JQuery; - dxSelectBox(options?: DevExpress.ui.dxSelectBoxOptions): JQuery; - dxSlider(options?: DevExpress.ui.dxSliderOptions): JQuery; - dxTabs(options?: DevExpress.ui.dxTabsOptions): JQuery; - dxTextArea(options?: DevExpress.ui.dxTextAreaOptions): JQuery; - dxTextBox(options?: DevExpress.ui.dxTextBoxOptions): JQuery; - dxToast(options?: DevExpress.ui.dxToastOptions): JQuery; - dxToolbar(options?: DevExpress.ui.dxToolbarOptions): JQuery; - dxDropDownEditor(options?: DevExpress.ui.dxDropDownEditorOptions): JQuery; - dxLoadIndicator(options?: DevExpress.ui.dxLoadIndicatorOptions): JQuery; - dxMultiView(options?: DevExpress.ui.dxMultiViewOptions): JQuery; - dxGallery(options?: DevExpress.ui.dxGalleryOptions): JQuery; - dxActionSheet(options?: DevExpress.ui.dxActionSheetOptions): JQuery; - dxDropDownMenu(options?: DevExpress.ui.dxDropDownMenuOptions): JQuery; - dxPanorama(options?: DevExpress.ui.dxPanoramaOptions): JQuery; - dxPivot(options?: DevExpress.ui.dxPivotOptions): JQuery; - dxSwitch(options?: DevExpress.ui.dxSwitchOptions): JQuery; - dxTileView(options?: DevExpress.ui.dxTileViewOptions): JQuery; - dxSlideOut(options?: DevExpress.ui.dxSlideOutOptions): JQuery; -} \ No newline at end of file diff --git a/devextreme/14.1/dx.webappjs-14.1-tests.ts b/devextreme/14.1/dx.webappjs-14.1-tests.ts deleted file mode 100644 index 63b203ed1..000000000 --- a/devextreme/14.1/dx.webappjs-14.1-tests.ts +++ /dev/null @@ -1,93 +0,0 @@ -/// - -module Test { - $('
').appendTo(document.body) - .dxDataGrid({ - allowColumnResizing: true, - allowColumnReordering: true, - cellClick: (clickedCell: Object) => { }, - rowClick: (clickedRow: Object) => { }, - columnChooser: { - enabled: true, - height: 180, - width: 400, - emptyPanelText: 'A place to hide the columns' - }, - columnAutoWidth: true, - columns: [ - 'author', 'title', 'year', 'genre', 'format', - { dataField: 'price', visible: false }, - { dataField: 'length', visible: false } - ], - dataSource: new DevExpress.data.DataSource({ - store: { - type: 'array', - data: [ - { id: 1, title: "The Catcher in the Rye", author: "J. D. Salinger", year: 1951, genre: "Bildungsroman", format: "paperback" }, - { id: 2, title: "The Hitchhiker's Guide to the Galaxy", author: "D. Adams", year: 1979, genre: "Comedy, sci-fi", format: "hardcover" }, - { id: 3, title: "Fahrenheit 451", author: "R. Bradbury", year: 1953, genre: "Dystopian novel", format: "paperback" }, - { id: 4, title: "Nineteen Eighty-Four", author: "G. Orwell", year: 1949, genre: "Dystopian novel, political fiction", format: "hardcover" }, - { id: 5, title: "Crime and Punishment", author: "F. Dostoyevsky", year: 1866, genre: "Philosophical novel", format: "paperback" } - ], - key: "id" - } - }), - customizeColumns: (columns: Array) => { }, - dataErrorOccurred: (error: Error) => { }, - disabled: false, - editing: { - editMode: 'batch', - editEnabled: true, - insertEnabled: true, - removeEnabled: true - }, - filterRow: { - visible: true, - showOperationChooser: false - }, - groupPanel: { - visible: true - }, - grouping: { - autoExpandAll: false - }, - height: () => { - return 200; - }, - hoverStateEnabled: true, - loadPanel: { - height: 150, - width: 400, - text: 'Data is loading...' - }, - noDataText: "It isn't the data you're looking for", - pager: { - showPageSizeSelector: true, - allowedPageSizes: [3, 5, 8] - }, - paging: { - pageSize: 8, - pageIndex: 19 - }, - rowAlternationEnabled: true, - rowPrepared: (rowElement: JQuery, rowInfo: Object) => { }, - rtlEnabled: false, - scrolling: { mode: 'infinite' }, - searchPanel: { - visible: true, - width: 250 - }, - selectedRowKeys: [1, 2, 4], - selection: { - mode: 'multiple', - allowSelectAll: false - }, - showColumnHeaders: true, - showColumnLines: true, - showRowLines: true, - sorting: { mode: 'multiple' }, - visible: true, - width: () => { return 400; }, - wordWrapEnabled: true - }); -} \ No newline at end of file diff --git a/devextreme/14.1/dx.webappjs-14.1.d.ts b/devextreme/14.1/dx.webappjs-14.1.d.ts deleted file mode 100644 index 908b816f9..000000000 --- a/devextreme/14.1/dx.webappjs-14.1.d.ts +++ /dev/null @@ -1,1648 +0,0 @@ -// Type definitions for WebAppJS 14.1.+ -// Project: http://js.devexpress.com/WebDevelopment/ -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module DevExpress { - export function abstract(): void; - export var rtlEnabled: boolean; - export var hardwareBackButton: JQueryCallback; - interface Endpoint { - local?: string; - production: string; - } - class EndpointSelector { - constructor(config: { [key: string]: Endpoint }); - urlFor(key: string): string; - } - export interface ActionOptions { - context?: Object; - component?: any; - beforeExecute? (e:ActionExecuteArgs): void; - afterExecute? (e:ActionExecuteArgs): void; - } - export interface ActionExecuteArgs { - action: any; - args: any[]; - context: any; - component: any; - cancel: boolean; - handled: boolean; - } - export class Action { - constructor(action?: any, config?: ActionOptions); - execute(): any; - } - export interface IDevice { - deviceType?: string; - platform?: string; - version?: Array; - phone?: boolean; - tablet?: boolean; - android?: boolean; - ios?: boolean; - win8?: boolean; - tizen?: boolean; - generic?: boolean; - } - export module devices { - export function orientation(): string; - export var orientationChanged: JQueryCallback; - export function real(): IDevice; - export function current(deviceOrName: string): IDevice; - export function current(deviceOrName: IDevice): IDevice; - } - export function registerComponent(name: string, componentClass: any): void; - export interface ComponentOptions { - disabled?: boolean; - } - export class Component { - constructor(element: Element, options?: ComponentOptions); - constructor(element: JQuery, options?: ComponentOptions); - disposing: JQueryCallback; - optionChanged: JQueryCallback; - instance(): Component; - beginUpdate(): void; - endUpdate(): void; - option(): any; - option(options: string): any; - option(options: string): T; - option(options: string, value: any): void; - option(options: { [key: string]: any }): void; - option(options?: any): any; - } - export interface DOMComponentOptions extends ComponentOptions { - rtlEnabled?: boolean; - } - export class DOMComponent extends Component { - constructor(element: HTMLElement, options?: DOMComponentOptions); - static defaultOptions(rule: { - device: any; - options: { [key: string]: any }; - }): void; - } -} -declare module DevExpress.data { - export interface DataError extends Error { - httpStatus?: number; - errorDetails?: any; - } - export interface ErrorHandler { (e: DataError): void; } - export interface EntityOptions { key: any; keyType: any; } - export interface Getter { (obj: any, options?: any): any; } - export interface Setter { (obj: any, value: any, options?: any): void; } - export interface QueryOptions { - errorHandler?: ErrorHandler; - requireTotalCount?: boolean; - } - export interface ODataQueryOptions extends QueryOptions { - adapter?: any; - } - interface IQuery { - enumerate(): JQueryPromise>; - count(): JQueryPromise; - slice(skip: number, take?: number): IQuery; - sortBy(field: string): IQuery; - sortBy(field: Getter): IQuery; - sortBy(field: { field: string; desc?: boolean }): IQuery; - sortBy(field: { field: Getter; desc?: boolean }): IQuery; - thenBy(field: string): IQuery; - thenBy(field: Getter): IQuery; - thenBy(field: { field: string; desc?: boolean }): IQuery; - thenBy(field: { field: Getter; desc?: boolean }): IQuery; - filter(field: string, operator: string, value: any): IQuery; - filter(field: string, value: any): IQuery; - filter(criteria: any[]): IQuery; - select(field: string): IQuery; - select(field: string[]): IQuery; - select(...field: string[]): IQuery; - select(field: Getter): IQuery; - select(field: Getter[]): IQuery; - select(...field: Getter[]): IQuery; - groupBy(field: string[]): IQuery; - groupBy(field: Getter[]): IQuery; - groupBy(field: { field: string; desc?: boolean }[]): IQuery; - groupBy(field: { field: Getter; desc?: boolean }[]): IQuery; - sum(getter?: string): JQueryPromise; - min(getter?: string): JQueryPromise; - max(getter?: string): JQueryPromise; - avg(getter?: string): JQueryPromise; - aggregate(step: number): JQueryPromise; - aggregate(seed: number, step: (accumulator: any, current: any) => any, finalize?: (accumulator: any) => any): JQueryPromise; - } - export interface ArrayQuery extends IQuery { - toArray(): Array; - } - export interface RemoteQuery extends IQuery { /*todo: exec() ? */ } - export function base64_encode(input: string): string; - export function base64_encode(input: any[]): string; - export function query(items?: any[]): IQuery; - export var queryImpl: { - remote: (url: string, queryOptions: QueryOptions) => RemoteQuery; - array: (iter: Array, queryOptions: QueryOptions) => ArrayQuery; - }; - export class Guid { - constructor(value?: string); - constructor(value?: any); - toString(): string; - valueOf(): string; - toJSON(): string; - } - export class EdmLiteral { - constructor(value: any); - valueOf(): any; - } - export module utils { - export function normalizeSortingInfo(info: string): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: string[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: Getter[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { field: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; dir?: string }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }): Array<{ selector: string; desc?: boolean }>; - export function normalizeSortingInfo(info: { selector: string; desc?: boolean }[]): Array<{ selector: string; desc?: boolean }>; - export function normalizeBinaryCriterion(criteria: Array): Array; - export function keysEqual(key1: any, key2: any): boolean; - export function keysEqual(keyExpr: any, key1: any, key2: any): boolean; - export function toComparable(value: Date, caseSensitive?: boolean): number; - export function toComparable(value: Guid, caseSensitive?: boolean): string; - export function toComparable(value: string, caseSensitive?: boolean): string; - export function compileGetter(): Getter; - export function compileGetter(expr: any[]): Getter; - export function compileGetter(expr: string): Getter; - export function compileGetter(expr: "this"): Getter; - export function compileGetter(expr: Getter): Getter; - export function compileSetter(expr: string): Setter; - export module odata { - export function sendRequest(request: JQueryXHR, requestOptions?: JQueryAjaxSettings): any; - export function serializePropName(propName: EdmLiteral): string; - export function serializePropName(propName: string): string; - export function serializeValue(value: Date): string; - export function serializeValue(value: Guid): string; - export function serializeValue(value: string): string; - export function serializeValue(value: "string"): string; - export function serializeValue(value: EdmLiteral): string; - export function serializeKey(key: any): string; - export function serializeKey(key: Date): string; - export function serializeKey(key: Guid): string; - export function serializeKey(key: string): string; - export function serializeKey(key: "string"): string; - export function serializeKey(key: EdmLiteral): string; - export var keyConverters: { - String(value: any): string; - Guid(value: any): Guid; - Int32(value: any): number; - Int64(value: any): EdmLiteral; - }; - } - } - export module queryAdapters { - export function odata(queryOptions: ODataQueryOptions): RemoteQuery; - } - export interface DataSourceOptions { - map? (item: any): any; - postProcess? (result: any[]): any; - pageSize: number; - paginate: boolean; - } - export class DataSource { - public changed: JQueryCallback; - public loadError: JQueryCallback; - public loadingChanged: JQueryCallback; - constructor(options?: Store); - constructor(options?: string); - constructor(options?: Array); - constructor(options?: { store: Store }); - constructor(options?: CustomStoreOptions); - constructor(options?: { store: Array }); - constructor(options?: { store: { type: string } }); - constructor(options?: { load(options?: LoadOptions): JQueryXHR; }); - constructor(options?: { load(options?: LoadOptions): Array; }); - constructor(options?: { load(options?: LoadOptions): JQueryPromise; }); - constructor(options?: DataSourceOptions); - loadOptions(): { [key: string]: any }; - items(): Array; - store(): data.Store; - isLastPage(): boolean; - pageIndex(newIndex?: number): number; - sort(expr: any[]): any[]; - group(expr: any[]): any[]; - filter(expr: any[]): any[]; - select(expr: string[]): string[]; - searchValue(value?: string): string; - searchOperation(op?: string): string; - searchExpr(selector: string): string; - key(): any; - isLoaded(): boolean; - isLoading(): boolean; - totalCount(): number; - load(): JQueryPromise; - dispose(): void; - } - export interface StoreOptions { - key?: any; - errorHandler?: ErrorHandler; - loaded?: (result: Array) => void; - loading?: (loadOptions: LoadOptions) => void; - modified?: () => void; - modifying?: () => void; - inserted?: (values: Object, key: any) => void; - inserting?: (values: Object) => void; - updated?: (key: any, values: Object) => void; - updating?: (key: any, values: Object) => void; - removed?: (key: any) => void; - removing?: (key: any) => void; - } - export interface LoadOptions extends QueryOptions { - skip?: number; - take?: number; - sort?: any; - select?: any; - filter?: any; - group?: any; - expand?: any; - } - export class Store { - loaded: JQueryCallback; - loading: JQueryCallback; - modified: JQueryCallback; - modifying: JQueryCallback; - inserted: JQueryCallback; - inserting: JQueryCallback; - updated: JQueryCallback; - updating: JQueryCallback; - removed: JQueryCallback; - removing: JQueryCallback; - constructor(options?: StoreOptions); - key(): any; - keyOf(obj: any): any; - load(options?: LoadOptions): JQueryPromise; - createQuery(options?: QueryOptions): IQuery; - totalCount(options?: { - filter?: any[]; - group?: string[]; - }): JQueryPromise; - byKey(key: any, extraOptions?: { - expand?: string[] - }): JQueryPromise; - remove(key: any): JQueryPromise; - insert(values: any): JQueryPromise; - update(key: any, values: any): JQueryPromise; - } - export interface CustomStoreOptions extends StoreOptions { - load? (options?: LoadOptions): any; - byKey? (key: any): any; - insert? (values: any): any; - update? (key: any, values: any): any; - remove? (key: any): any; - totalCount? (options?: { - filter?: any[]; - group?: string[]; - }): any; - } - export class CustomStore extends Store { - constructor(options?: CustomStoreOptions); - } - export interface ArrayStoreOptions extends StoreOptions { - data?: Array - } - export class ArrayStore extends Store { - constructor(options?: Array); - constructor(options?: ArrayStoreOptions); - } - export interface LocalStoreOptions extends ArrayStoreOptions { - name: string; - } - export class LocalStore extends ArrayStore { - constructor(options?: string); - constructor(options?: LocalStoreOptions); - clear(): void; - } - export interface ODataStoreOptions extends StoreOptions { - url?: string; - name?: string; - keyType?: string; - jsonp?: boolean; - withCredentials?: boolean; - } - export class ODataStore extends Store { - constructor(options?: ODataStoreOptions); - } - export interface ODataContextOptions { - url: string; - jsonp?: boolean; - withCredentials?: boolean; - errorHandler?: ErrorHandler; - beforeSend?: () => any; - entities?: { - [entityAlias: string]: ODataStoreOptions; - }; - } - export class ODataContext { - constructor(options?: ODataContextOptions); - get(operationName: string, params: { [key: string]: any }): JQueryPromise>; - invoke(operationName: string, params: { [key: string]: any }, httpMethod?: string): JQueryPromise>; - objectLink(entityAlias: string, key: any): { __metadata: { uri: string }; }; - } -} -declare module DevExpress.framework { - export interface dxViewOptions { - name: string; - title?: string; - layout?: string; - } - export class dxView extends Component { - constructor(options?: dxViewOptions); - } - export interface dxLayoutOptions { - name: string; - controller: string; - } - export class dxLayout extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxViewPlaceholderOptions { - viewName: string; - } - export class dxViewPlaceholder extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxTransitionOptions { - name: string; - type: string; - } - export class dxTransition extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxContentPlaceholderOptions { - name: string; - transition: string; - } - export class dxContentPlaceholder extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxContentOptions { - targetPlaceholder: string; - } - export class dxContent extends Component { - constructor(options?: dxLayoutOptions); - } - export interface dxCommandOptions extends ComponentOptions { - id: string; - action?: any; - icon?: string; - title?: string; - iconSrc?: string; - visible?: boolean; - } - export class dxCommand extends Component { - public beforeExecute: JQueryCallback; - public afterExecute: JQueryCallback; - constructor(element: JQuery, options?: dxCommandOptions); - constructor(element: Element, options?: dxCommandOptions); - execute(): void; - } - export class dxCommandContainer extends Component { - constructor(options: ComponentOptions); - constructor(element: JQuery, options?: ComponentOptions); - constructor(element: Element, options?: ComponentOptions); - } - export interface CommandMap { - [containerId: string]: { commands: any[]; defaults?: any; } - } - export class CommandMapping { - constructor(); - static defaultMapping: CommandMap; - mapCommands(containerId: string, commandMappings: any[]): CommandMapping; - unmapCommands(containerId: string, commandIds: string[]): void; - getCommandMappingForContainer(commandId: string, containerId: string): any; - load(config: CommandMap): CommandMapping; - } - interface IViewCache { - viewRemoved: JQueryCallback; - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class ViewCache implements IViewCache { - viewRemoved: JQueryCallback; - constructor(); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class NullViewCache implements IViewCache { - viewRemoved: JQueryCallback; - constructor(); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class CapacityViewCacheDecorator implements IViewCache { - viewRemoved: JQueryCallback; - constructor(options: { - size: number; - viewCache: IViewCache; - }); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class ConditionalViewCacheDecorator implements IViewCache { - viewRemoved: JQueryCallback; - constructor(options: { - filter: (key: string, viewInfo: any) => boolean; - viewCache: IViewCache; - }); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export class HistoryDependentViewCacheDecorator implements IViewCache { - viewRemoved: JQueryCallback; - constructor(options: { - navigationManager: StackBasedNavigationManager; - viewCache: IViewCache; - }); - setView(key: string, viewInfo: any): void; - removeView(key: string): any; - hasView(viewInfo: any): boolean; - getView(key: string): any; - clear(): void; - } - export interface IStorage { - getItem(key: string): any; - setItem(key: string, value: any): void; - removeItem(key: string): void; - } - export class MemoryKeyValueStorage implements IStorage { - constructor(); - getItem(key: string): any; - setItem(key: string, value: any): void; - removeItem(key: string): void; - } - export interface StateManagerOptions { - storage?: IStorage; - stateSources?: any[]; - } - export class StateManager { - public storage: IStorage; - public stateSources: any[]; - constructor(options?: StateManagerOptions); - addStateSource(stateSource: any): void; - removeStateSource(stateSource: any): void; - saveState(): void; - restoreState(): void; - clearState(): void; - } - export class Route { - constructor(pattern: string, defaults?: any, constraints?: any); - parse(url: string): any; - format(routeValues: any): string; - formatSegment(value: any): string; - parseSegment(): any; - } - export class MvcRouter { - constructor(); - register(pattern: string, defaults?: any, constraints?: any): void; - parse(uri: string): any; - format(obj: any): string; - } - interface BrowserAdapterOptions { - window: Window; - } - export class DefaultBrowserAdapter { - constructor(options?: BrowserAdapterOptions); - replaceState(uri: string): void; - pushState(uri: string): void; - createRootPage(): void; - getWindowName(): string; - setWindowName(windowName: string): void; - back(): void; - getHash(): string; - isRootPage(): boolean; - } - export class OldBrowserAdapter extends DefaultBrowserAdapter { } - export class HistorylessBrowserAdapter extends DefaultBrowserAdapter { } - export interface INavigationDevice { - init: Function; - setUri(uri: string): void; - getUri(): string; - back(): void; - } - export class StackBasedNavigationDevice extends HistoryBasedNavigationDevice implements INavigationDevice { - uriChanged: JQueryCallback; - constructor(options?: BrowserAdapterOptions); - } - export class HistoryBasedNavigationDevice implements INavigationDevice { - backInitiated: JQueryCallback; - init: Function; - setUri(uri: string): void; - getUri(): string; - back(): void; - } - export class NavigationStack { - public items: any[]; - public currentIndex: number; - public itemsRemoved: JQueryCallback; - constructor(); - currentItem(): any; - back(uri: string): void; - forward(): void; - navigate(uri: any, replaceCurrent?: boolean): any; - getPreviousItem(): any; - canBack(): boolean; - clear(): void; - } - export interface NavigationManagerOptions { - stateStorageKey?: string; - navigationDevice?: INavigationDevice; - keepPositionInStack?: boolean; - } - export interface INavigationManager { - navigating: JQueryCallback; - navigated: JQueryCallback; - navigatingBack: JQueryCallback; - navigationCanceled: JQueryCallback; - itemRemoved: JQueryCallback; - navigate(uri: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(): void; - back(alternate: any): void; - canBack(): boolean; - rootUri(): string; - currentItem(): any; - previousItem(): any; - saveState(): void; - removeState(): void; - restoreState(): void; - } - export class StackBasedNavigationManager extends HistoryBasedNavigationManager { - init(): JQueryPromise; - public currentStack: NavigationStack; - public navigationStacks: { - [key: string]: NavigationStack - }; - public navigating: JQueryCallback; - public navigated: JQueryCallback; - public navigatingBack: JQueryCallback; - public navigationCanceled: JQueryCallback; - public itemRemoved: JQueryCallback; - constructor(options?: NavigationManagerOptions); - navigate(uri: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - currentIndex(): number; - getItemByIndex(index: number): any; - clearHistory(): void; - } - export class HistoryBasedNavigationManager implements INavigationManager { - navigating: JQueryCallback; - navigated: JQueryCallback; - navigatingBack: JQueryCallback; - navigationCanceled: JQueryCallback; - itemRemoved: JQueryCallback; - constructor(options?: NavigationManagerOptions); - navigate(uri: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(): void; - back(alternate: any): void; - canBack(): boolean; - rootUri(): string; - currentItem(): any; - previousItem(): any; - saveState(): void; - removeState(): void; - restoreState(): void; - } - export module utils { - export function mergeCommands(destination: any, source: any): dxCommand[]; - } - export interface ApplicationOptions { - router?: MvcRouter; - ns?: Object; - namespace?: Object; - viewCache?: IViewCache; - viewCacheSize?: number; - disableViewCache?: boolean; - useViewTitleAsBackText?: boolean; - stateManager?: StateManager; - navigationManager?: StackBasedNavigationManager; - navigation?: dxCommandOptions[]; - commandMapping?: CommandMap; - } - export class Application { - public router: MvcRouter; - public namespace: any; - public components: any[]; - public viewCache: IViewCache; - public stateManager: StateManager; - public commandMapping: CommandMap; - public navigation: dxCommand[]; - public navigationManager: StackBasedNavigationManager; - public beforeViewSetup: JQueryCallback; - public afterViewSetup: JQueryCallback; - public viewShowing: JQueryCallback; - public viewShown: JQueryCallback; - public viewHidden: JQueryCallback; - public viewDisposing: JQueryCallback; - public viewDisposed: JQueryCallback; - public navigating: JQueryCallback; - public navigatingBack: JQueryCallback; - constructor(options?: ApplicationOptions); - init(): any; - navigate(uri?: any, options?: { - root?: boolean; - target?: string; - direction?: string; - }): void; - back(): void; - canBack(): boolean; - saveState(): void; - clearState(): void; - restoreState(): void; - } - export function createActionExecutors(app: Application): { - [key: string]: { execute(e: any): void; } - }; -} -declare module DevExpress.framework.html { - export interface ILayoutController { - viewReleased: JQueryCallback; - init(options: InitLayoutControllerOptions): void; - activate(): void; - deactivate(): void; - showView(viewInfo: any, direction?: string): JQueryPromise; - } - export interface ILayoutControllerRegistration extends IDevice { - name: string; - controller: ILayoutController; - root?: boolean; - } - export var layoutControllers: Array; - export var layoutSets: Object; - export interface InitLayoutControllerOptions { - $viewPort?: JQuery; - $hiddenBag?: JQuery; - navigationManager?: framework.StackBasedNavigationManager; - } - export class DefaultLayoutController implements ILayoutController { - public viewReleased: JQueryCallback; - constructor(options?: { layoutTemplateName: string }); - init(options: InitLayoutControllerOptions): void; - activate(): void; - deactivate(): void; - showView(viewInfo: any, direction?: string): JQueryPromise; - } - export interface CommandManagerOptions { - globalCommands?: framework.dxCommand[]; - commandMapping?: framework.CommandMapping; - } - export class CommandManager { - public globalCommands: framework.dxCommand[]; - public commandMapping: framework.CommandMapping; - constructor(options?: CommandManagerOptions); - layoutCommands($markup: JQuery, extraCommands?: any): void; } - export interface ITemplateEngine { - applyTemplate(template: string, model: any): void; - applyTemplate(template: Element, model: any): void; - applyTemplate(template: JQuery, model: any): void; - } - export class KnockoutJSTemplateEngine implements ITemplateEngine { - constructor(); - applyTemplate(template: string, model: any): void; - applyTemplate(template: Element, model: any): void; - applyTemplate(template: JQuery, model: any): void; - } - export interface TransitionExecutorOptions { - type?: string; - source?: JQuery; - destination?: JQuery; - } - export class TransitionExecutor { - public container: JQuery; - constructor(container: JQuery, options: TransitionExecutorOptions); - finalize(): void; - exec(): JQueryPromise; - static create(container: JQuery, options: TransitionExecutorOptions): TransitionExecutor; - } - export interface ViewEngineOptions { - $root: JQuery; - device: IDevice; - commandManager?: CommandManager; - templateEngine?: ITemplateEngine; - dataOptionsAttributeName?: string; - } - export class ViewEngineBase { - public $root: JQuery; - public device: IDevice; - public commandManager: CommandManager; - public templateEngine: ITemplateEngine; - public dataOptionsAttributeName: string; - public viewSelecting: JQueryCallback; - public modelFromViewDataExtended: JQueryCallback; - constructor(options?: ViewEngineOptions); - init(): JQueryPromise; - findViewTemplate(viewName: string): JQuery; - afterViewSetup(viewInfo: any): void; - } - export class ViewEngine extends ViewEngineBase { - public layoutSelecting: JQueryCallback; - constructor(options?: ViewEngineOptions); - init(): JQueryPromise; - findLayoutTemplate(layoutName: string): JQuery; - } - export interface HtmlApplicationOptions extends framework.ApplicationOptions { - commandManager?: CommandManager; - templateEngine?: ITemplateEngine; - navigateToRootViewMode?: string; - layoutControllers?: Array - device?: IDevice; - layoutSet?: Array; - } - export class HtmlApplication extends framework.Application { - public viewEngine: ViewEngineBase; - public viewRendered: JQueryCallback; - public resolveLayoutController: JQueryCallback; - constructor(options?: HtmlApplicationOptions); - init(): any; - viewPort(): JQuery; - } -} -declare module DevExpress.ui { - export var themes: { - current(): string; - current(themeName: string): void; - }; - interface ViewportOptions { - allowPan?: boolean; - allowZoom?: boolean; - } - export interface ITemplate { - compile(html: string): any; - render(template: JQuery, data: any): any; - render(template: any, data: any): any; - } - class Template { - constructor(element: HTMLElement); - constructor(element: JQueryStatic); - render(container: HTMLElement): any; - render(container: JQueryStatic): any; - dispose(): void; - } - interface TemplateStatic { - new (element: HTMLElement): Template; - new (element: JQueryStatic): Template; - } - class TemplateProvider { - constructor(); - getTemplateClass(widget: any): TemplateStatic; - getDefaultTemplate(widget: any): void; supportDefaultTemplate(): boolean; - } - export function initViewport(options: ViewportOptions): void; - interface NotifyOptions { - message: string; - type?: string; - displayTime?: number; - hiddenAction: () => any; - } - export function notyfy(options: any): void; - export function notify(message: string, type?: string, displayTime?: number): void; - export module dialog { - interface Dialog { - show(): JQueryPromise; - hide(value?: any): void; - } - interface DialogButton { - text: string; - icon: string; - clickAction: () => any; - } - interface DialogOptions { - message: string; - title?: string; - } - export function custom(options: DialogOptions): Dialog; - export function custom(message: string, title?: string): Dialog; - export function alert(options: DialogOptions): JQueryPromise; - export function alert(message: string, title?: string): JQueryPromise; - export function confirm(options: DialogOptions): JQueryPromise; - export function confirm(message: string, title?: string): JQueryPromise; - } - export interface CollectionContainerWidgetOptions extends WidgetOptions { - items?: Array; - itemTemplate?: any; - itemRender?: Function; - itemClickAction?: any; - itemRenderedAction?: any; - noDataText?: string; - dataSource?: data.DataSource; - selectedIndex?: number; - itemSelectAction?: any; - itemHoldAction?: any; - itemHoldTimeout?: number; - } - export class CollectionContainerWidget extends Widget { - constructor(element: Element, options?: CollectionContainerWidgetOptions); - constructor(element: JQuery, options?: CollectionContainerWidgetOptions); - } - export interface WidgetOptions extends ComponentOptions { - contentReadyAction?: any; - width?: any; - height?: any; - visible?: boolean; - activeStateEnabled?: boolean; - } - export class Widget extends Component { - constructor(element: Element, options?: WidgetOptions); - constructor(element: JQuery, options?: WidgetOptions); - init(): void; - repaint(): void; - addTemplate(template: ITemplate): void; - } - export interface dxEditorOptions extends WidgetOptions { - value?: any; - valueChangeAction?: any; - } - export class dxEditor extends Widget { - constructor(element: Element, options?: dxEditorOptions); - constructor(element: JQuery, options?: dxEditorOptions); - } - export interface dxAutocompleteOptions extends dxDropDownEditorOptions { - minSearchLength?: number; - searchTimeout?: number; - placeholder?: string; - filterOperator?: string; - displayExpr?: string; - searchMode?: string; - dataSource?: data.DataSource; - items?: Array; - itemRender?: Function; - itemTemplate?: any; - } - export class dxAutocomplete extends dxDropDownEditor { - constructor(element: Element, options?: dxAutocompleteOptions); - constructor(element: JQuery, options?: dxAutocompleteOptions); - } - export interface dxButtonOptions extends WidgetOptions { - type?: string; - text?: string; - icon?: string; - iconSrc?: string; - clickAction?: any; - } - export class dxButton extends Widget { - constructor(element: Element, options?: dxButtonOptions); - constructor(element: JQuery, options?: dxButtonOptions); - } - export interface dxCheckBoxOptions extends dxEditorOptions { } - export class dxCheckBox extends dxEditor { - constructor(element: Element, options?: dxCheckBoxOptions); - constructor(element: JQuery, options?: dxCheckBoxOptions); - } - export interface dxCalendarOptions extends dxEditorOptions { - value?: Date; - min?: Date; - max?: Date; - firstDayOfWeek?: number; - } - export class dxCalendar extends dxEditor { - constructor(element: Element, options?: dxEditorOptions); - constructor(element: JQuery, options?: dxEditorOptions); - } - export interface dxDateBoxOptions extends dxTextEditorOptions { - format?: string; - useNativePicker?: boolean; - value?: Date; - type?: string; - min?: Date; - max?: Date; - useCalendar?: boolean; - formatString?: string; - closeOnValueChange?: boolean; - calendarOptions?: Object; - } - export class dxDateBox extends dxTextEditor { - constructor(element: Element, options?: dxDateBoxOptions); - constructor(element: JQuery, options?: dxDateBoxOptions); - } - export interface dxTextEditorOptions extends dxEditorOptions { - valueChangeEvent?: string; - placeholder?: string; - readOnly?: boolean; - focusInAction?: any; - focusOutAction?: any; - keyDownAction?: any; - keyPressAction?: any; - keyUpAction?: any; - changeAction?: any; - enterKeyAction?: any; - copyAction?: any; - pasteAction?: any; - cutAction?: any; - inputAction?: any; - showClearButton?: boolean; - mode?: string; - } - export class dxTextEditor extends dxEditor { - constructor(element: Element, options?: dxTextEditorOptions); - constructor(element: JQuery, options?: dxTextEditorOptions); - focus(): void; - blur(): void; - } - export interface dxListOptions extends CollectionContainerWidgetOptions { - pullRefreshEnabled?: boolean; - autoPagingEnabled?: boolean; - scrollingEnabled?: boolean; - showScrollbar?: boolean; - useNativeScrolling?: boolean; - grouped?: boolean; - editEnabled?: boolean; - showNextButton?: boolean; - groupTemplate?: string; - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - pageLoadingText?: string; - scrollAction?: any; - pullRefreshAction?: any; - pageLoadingAction?: any; - itemHoldAction?: any; - itemSwipeAction?: any; - itemHoldTimeout?: number; - groupRender? (groupData: any, groupIndex: number, groupElement: Element): any; - editConfig?: { - itemTemplate?: any; - itemRenderer? (itemData: any, itemIndex: number, itemElement: Element): any; - menuType?: string; - menuItems?: any[]; - deleteEnabled?: boolean; - deleteMode?: string; - selectionEnabled?: boolean; - selectionMode?: string; - selectionType?: string; - reorderEnabled?: boolean; - } - itemDeleteAction?: any; - selectedItems?: any[]; - itemSelectAction?: any; - itemUnselectAction?: any; - itemReorderAction?: any; - nextButtonText?: string; - selectionMode?: string; - } - export class dxList extends CollectionContainerWidget { - constructor(element: Element, options?: dxListOptions); - constructor(element: JQuery, options?: dxListOptions); - update(): JQueryPromise; - updateDimensions(): JQueryPromise; - refresh(): JQueryPromise; - reload(): JQueryPromise; - deleteItem(itemElement: JQuery): JQueryPromise; - deleteItem(itemElement: Element): JQueryPromise; - clearSelectedItems() : void; - isItemSelected(itemElement: JQuery): boolean; - isItemSelected(itemElement: Element): boolean; - selectItem(itemElement: JQuery): void; - selectItem(itemElement: Element): void; - unselectItem(itemElement: JQuery): void; - unselectItem(itemElement: Element): void; - reorderItem(itemElement: JQuery, toItemElement: JQuery): JQueryPromise; - reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; - getSelectedItems(): number[]; - clientHeight(): number; - scrollHeight(): number; - scrollBy(distance: number): void; - scrollTo(targetLocation: number): void; - scrollTop(): number; - } - export interface dxLoadPanelOptions extends dxOverlayOptions { - message?: string; - width?: number; - height?: number; - delay?: number; - showPane?: boolean; - showIndicator?: boolean; - indicatorSrc?: string; - } - export class dxLoadPanel extends dxOverlay { - constructor(element: Element, options?: dxLoadPanelOptions); - constructor(element: JQuery, options?: dxLoadPanelOptions); - hide(): void; - show(): void; - toggle(showing: boolean): void; - } - export interface dxLookupOptions extends dxEditorOptions { - dataSource?: data.DataSource; - displayValue?: string; - title?: string; - titleTemplate?: any; - valueExpr?: string; - displayExpr?: string; - placeholder?: string; - searchPlaceholder?: string; - searchEnabled?: boolean; - searchTimeout?: number; - minFilterLength?: number; - fullScreen?: boolean; - itemTemplate?: any; - itemRender?: Function; - showCancelButton?: boolean; - showClearButton?: boolean; - showDoneButton?: boolean; - showNextButton?: boolean; - doneButtonText?: string; - cancelButtonText?: string; - clearButtonText?: string; - nextButtonText?: string; - grouped?: boolean; - groupRender?: Function; - groupTemplate?: string; - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - pageLoadingText?: string; - noDataText?: string; - scrollAction?: any; - shading?: boolean; - closeOnOutsideClick?: boolean; - position?: any; - animation?: any; - shownAction?: any; - hiddenAction?: any; - popupWidth?: any; - popupHeight?: any; - autoPagingEnabled?: boolean; - useNativeScrolling?: boolean; - usePopover?: boolean; - openAction?: any; - closeAction?: any; - } - export class dxLookup extends dxEditor { - constructor(element: Element, options?: dxLookupOptions); - constructor(element: JQuery, options?: dxLookupOptions); - close(): void; - open(): void; - } - export interface dxMapOptions extends WidgetOptions { - location?: any; - width?: number; - height?: number; - zoom?: number; - mapType?: string; - provider?: string; - markers?: Array; - routes?: Array; - key?: string; - controls?: any; - mapReadyAction?: any; - autoAdjust?: boolean; - center?: any; - markerAddedAction?: any; - markerRemovedAction?: any; - markerIconSrc?: string; - routeAddedAction?: any; - routeRemovedAction?: any; - type?: string; - } - export class dxMap extends Widget { - constructor(element: Element, options?: dxMapOptions); - constructor(element: JQuery, options?: dxMapOptions); - addMarker(markerOptions: any, callback: Function): JQueryPromise; - removeMarker(marker: any): void; - addRoute(routeOptions: any, callback: Function): JQueryPromise; - removeRoute(route: any): void; - } - export interface dxNavBarOptions extends dxTabsOptions { } - export class dxNavBar extends dxTabs { - constructor(element: Element, options?: dxNavBarOptions); - constructor(element: JQuery, options?: dxNavBarOptions); - } - export interface dxNumberBoxOptions extends dxTextEditorOptions { - min?: number; - max?: number; - value?: number; - step?: number; - showSpinButtons?: boolean; - } - export class dxNumberBox extends dxTextEditor { - constructor(element: Element, options?: dxNumberBoxOptions); - constructor(element: JQuery, options?: dxNumberBoxOptions); - } - export interface dxOverlayOptions extends WidgetOptions { - activeStateEnabled?: boolean; - shading?: boolean; - closeOnOutsideClick?: boolean; - position?: any; - animation?: any; - showingAction?: any; - shownAction?: any; - hidingAction?: any; - hiddenAction?: any; - deferRendering?: boolean; - targetContainer?: any; - contentTemplate?: any; - } - export class dxOverlay extends Widget { - constructor(element: Element, options?: dxOverlayOptions); - constructor(element: JQuery, options?: dxOverlayOptions); - content(): JQuery; - hide(): void; - show(): void; - toggle(showing: boolean): void; - } - export interface dxPopupOptions extends dxOverlayOptions { - title?: string; - showTitle?: boolean; - fullScreen?: boolean; - cancelButton?: any; - doneButton?: any; - clearButton?: any; - titleTemplate?: any; - dragEnabled?: boolean; - } - export class dxPopup extends dxOverlay { - constructor(element: Element, options?: dxPopupOptions); - constructor(element: JQuery, options?: dxPopupOptions); - } - export interface dxPopoverOptions extends dxPopupOptions { - target?: any; - } - export class dxPopover extends dxPopup { - constructor(element: Element, options?: dxPopoverOptions); - constructor(element: JQuery, options?: dxPopoverOptions); - } - export interface dxTooltipOptions extends dxPopoverOptions { - target?: any; - } - export class dxTooltip extends dxPopover { - constructor(element: Element, options?: dxTooltipOptions); - constructor(element: JQuery, options?: dxTooltipOptions); - } - export interface dxRadioGroupOptions extends CollectionContainerWidgetOptions { - layout?: string; - name?: string; - value?: Object; - valueExpr?: string; - } - export class dxRadioGroup extends CollectionContainerWidget { - constructor(element: Element, options?: dxRadioGroupOptions); - constructor(element: JQuery, options?: dxRadioGroupOptions); - } - export interface dxRangeSliderOptions extends dxSliderOptions { - start?: number; - end?: number; - } - export class dxRangeSlider extends dxSlider { - constructor(element: Element, options?: dxRangeSliderOptions); - constructor(element: JQuery, options?: dxRangeSliderOptions); - } - export interface dxScrollableOptions extends ComponentOptions { - startAction?: any; - scrollAction?: any; - endAction?: any; - stopAction?: any; - inertiaAction?: any; - bounceAction?: any; - updateAction?: any; - bounceEnabled?: boolean; - direction?: string; - showScrollbar?: boolean; - useNative?: boolean; - } - export class dxScrollable extends Component { - constructor(element: Element, options?: dxScrollableOptions); - constructor(element: JQuery, options?: dxScrollableOptions); - update(): void; - content(): JQuery; - clientHeight(): number; - scrollHeight(): number; - clientWidth(): number; - scrollWidth(): number; - scrollLeft(): number; - scrollTop(): number; - scrollOffset(): Object; - scrollBy(distance: number): void; - scrollBy(distance: Object): void; - scrollTo(targetLocation: number): void; - scrollTo(targetLocation: Object): void; - } - export interface dxScrollViewOptions extends dxScrollableOptions { - pullingDownText?: string; - pulledDownText?: string; - refreshingText?: string; - reachBottomText?: string; - pullDownAction?: any; - reachBottomAction?: any; - } - export class dxScrollView extends dxScrollable { - constructor(element: Element, options?: dxScrollViewOptions); - constructor(element: JQuery, options?: dxScrollViewOptions); - release(preventReachBottom: boolean): JQueryPromise; - toggleLoading(showOrHide: boolean): void; - refresh(): void; - } - export interface dxSelectBoxOptions extends dxAutocompleteOptions { - fieldTemplate?: any; - displayValue?: string; - multiSelectEnabled?: boolean; - values?: any[]; - openAction?: any; - closeAction?: any; - } - export class dxSelectBox extends dxAutocomplete { - constructor(element: Element, options?: dxSelectBoxOptions); - constructor(element: JQuery, options?: dxSelectBoxOptions); - } - export interface dxSliderOptions extends dxEditorOptions { - min?: number; - max?: number; - step?: number; - showRange?: boolean; - label?: { - visible: boolean; - format?: any; - position?: string; - } - tooltip?: { - enabled?: boolean; - format?: any; - position?: string; - showMode?: string; - } - } - export class dxSlider extends dxEditor { - constructor(element: Element, options?: dxSliderOptions); - constructor(element: JQuery, options?: dxSliderOptions); - } - export interface dxTabsOptions extends CollectionContainerWidgetOptions { } - export class dxTabs extends CollectionContainerWidget { - constructor(element: Element, options?: dxTabsOptions); - constructor(element: JQuery, options?: dxTabsOptions); - } - export interface dxTextAreaOptions extends dxTextEditorOptions { - cols?: number; - rows?: number; - } - export class dxTextArea extends dxTextEditor { - constructor(element: Element, options?: dxTextAreaOptions); - constructor(element: JQuery, options?: dxTextAreaOptions); - } - export interface dxTextBoxOptions extends dxTextEditorOptions { - maxLength?: any; - } - export class dxTextBox extends dxTextEditor { - constructor(element: Element, options?: dxTextBoxOptions); - constructor(element: JQuery, options?: dxTextBoxOptions); - } - export interface dxToastOptions extends dxOverlayOptions { - message?: string; - type?: string; - displayTime?: number; - } - export class dxToast extends dxOverlay { - constructor(element: Element, options?: dxToastOptions); - constructor(element: JQuery, options?: dxToastOptions); - } - export interface dxToolbarOptions extends CollectionContainerWidgetOptions { - menuItemRender?: Function; - menuItemTemplate?: any; - submenuType?: string; - renderAs?: string; - } - export class dxToolbar extends CollectionContainerWidget { - constructor(element: Element, options?: dxToolbarOptions); - constructor(element: JQuery, options?: dxToolbarOptions); - } - export interface dxDropDownEditorOptions extends dxTextBoxOptions { - closeAction?: any; - openAction?: any; - } - export class dxDropDownEditor extends dxTextBox { - constructor(element: Element, options?: dxDropDownEditorOptions); - constructor(element: JQuery, options?: dxDropDownEditorOptions); - } - export interface dxLoadIndicatorOptions extends WidgetOptions { - indicatorSrc?: string; - } - export class dxLoadIndicator extends Widget { - constructor(element: Element, options?: dxLoadIndicatorOptions); - constructor(element: JQuery, options?: dxLoadIndicatorOptions); - } - export interface dxMultiViewOptions extends CollectionContainerWidgetOptions { - loop?: boolean; - swipeEnabled?: boolean; - animationEnabled?: boolean; - selectedIndex?: number; - } - export class dxMultiView extends CollectionContainerWidget { - constructor(element: Element, options?: dxMultiViewOptions); - constructor(element: JQuery, options?: dxMultiViewOptions); - } - export interface dxGalleryOptions extends CollectionContainerWidgetOptions { - activeStateEnabled?: boolean; - animationDuration?: number; - loop?: boolean; - swipeEnabled?: boolean; - indicatorEnabled?: boolean; - showIndicator?: boolean; - selectedIndex?: number; - slideshowDelay?: number; - showNavButtons?: boolean; - } - export class dxGallery extends CollectionContainerWidget { - constructor(element: Element, options?: dxGalleryOptions); - constructor(element: JQuery, options?: dxGalleryOptions); - goToItem(itemIndex?: number, animation?: boolean): JQueryPromise; - prevItem(animation?: boolean): JQueryPromise; - nextItem(animation?: boolean): JQueryPromise; - } - export interface dxDataGridFilterDescriptions { - '='?: string; - '<>'?: string; - '<'?: string; - '<='?: string; - '>'?: string; - '>='?: string; - 'startswith'?: string; - 'contains'?: string; - 'notcontains'?: string; - 'endswith'?: string; - } - export interface dxDataGridColumn { - allowSorting?: boolean; - allowFiltering?: boolean; - allowHiding?: boolean; - allowEditing?: boolean; - allowGrouping?: boolean; - allowReordering?: boolean; - allowResizing?: boolean; - visible?: boolean; - dataField?: string; - dataType?: string; - calculateCellValue?: (rowData: {}) => any; - calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string) => Array; - caption?: string; - width?: any; cssClass?: string; - trueText?: string; - falseText?: string; - sortOrder?: string; - sortIndex?: number; - groupIndex?: number; - alignment?: string; - format?: string; - precision?: number; - customizeText?: (options: { value: any; valueText: string }) => string; - filterOperations?: dxDataGridFilterDescriptions; - selectedFilterOperation?: string; - cellTemplate?: any; headerCellTemplate?: any; editCellTemplate?: any; groupCellTemplate?: any; lookup?: { - dataSource?: any; valueExpr?: any; displayExpr?: any; }; - } - export interface dxDataGridOptions extends ui.WidgetOptions { - dataSource?: any; - dataErrorOccurred?: (errorObject: {}) => void; - showColumnHeaders?: boolean; - columnAutoWidth?: boolean; - noDataText?: string; - wordWrapEnabled?: boolean; - showColumnLines?: boolean; - showRowLines?: boolean; - rowAlternationEnabled?: boolean; - allowColumnReordering?: boolean; - allowColumnResizing?: boolean; - hoverStateEnabled?: boolean; - selectedItems?: Array; - columnChooser?: { - enabled?: boolean; - width?: number; - height?: number; - title?: string; - emptyPanelText?: string; - }; - selection?: { - mode?: string; - allowSelectAll?: boolean; - }; - sorting?: { - mode?: string; - ascendingText?: string; - descendingText?: string; - clearText?: string; - }; - searchPanel?: { - visible?: boolean; - width?: number; - placeholder?: string; - highlightSearchText?: boolean; - }; - grouping?: { - autoExpandAll?: boolean; - allowCollapsing?: boolean; - groupContinuesMessage?: string; - groupContinuedMessage?: string; - }; - groupPanel?: { - visible?: boolean; - emptyPanelText?: string; - allowColumnDragging?: boolean; - }; - filterRow?: { - visible?: boolean; - showOperationChooser?: boolean; - showAllText?: string; - resetOperationText?: string; - operationDescriptions?: dxDataGridFilterDescriptions; - }; - paging?: { - enabled?: boolean; - pageSize?: number; - pageIndex?: number; - }; - pager?: { - visible?: any; showPageSizeSelector?: boolean; - allowedPageSizes?: Array; - }; - editing?: { - editMode?: string; - insertEnabled?: boolean; - editEnabled?: boolean; - removeEnabled?: boolean; - texts?: { - editRow?: string; - saveRowChanges?: string; - cancelRowChanges?: string; - deleteRow?: string; - recoverRow?: string; - undeleteRow?: string; - confirmDeleteMessage?: string; - confirmDeleteTitle?: string; - } - }; - scrolling?: { - mode?: string; - preloadEnabled?: boolean; - useNativeScrolling?: boolean; - }; - loadPanel?: { - enabled?: boolean; - text?: string; - width?: number; - height?: number; - }; - stateStoring?: { - enabled?: boolean; - storageKey?: string; - type?: string; - customLoad?: () => any; - customSave?: (state: {}) => void; - }; - rowTemplate?: any; columns?: Array; - selectionChanged?: (options: {}) => void; - customizeColumns?: (columns: Array) => void; - rowClick?: (data: {}) => void; - cellClick?: (clickedCell: {}) => void; - cellHoverChanged?: (hoveredCell: {}) => void; - } - export class dxDataGrid extends Widget { - constructor(element: Element, options?: dxDataGridOptions); - constructor(element: JQuery, options?: dxDataGridOptions); - showColumnChooser: () => void; - hideColumnChooser: () => void; - beginCustomLoading: (messageText?: string) => void; - endCustomLoading: () => void; - startSelectionWithCheckboxes: () => void; - stopSelectionWithCheckboxes: () => void; - selectAll: () => void; - clearSelection: () => void; - getSelectedRowKeys: () => Array; - getSelectedRowsData: () => Array; - selectRows: (keys: Array) => void; - selectRowsByIndexes: (indexes: Array) => void; - searchByText: (text: string) => void; - insertRow: () => void; - editRow: (rowIndex: number) => void; - editCell: (rowIndex: number, columnIndex: number) => void; - removeRow: (rowIndex: number) => void; - saveEditData: () => void; - undeleteRow: (rowIndex: number) => void; - cancelEditData: () => void; - refresh: () => void; - filter: (expr: any) => void; - clearFilter: () => void; - keyOf: (data: {}) => any; - byKey: (key: any) => {}; - getDataByKeys: (rowKeys: Array) => Array<{}>; - pageIndex: (value: number) => number; - totalCount: () => number; - closeEditCell: () => void; - collapseAll: (groupIndex?: number) => void; - expandAll: (groupIndex?: number) => void; - addColumn: (options: any) => void; - columnOption: (columnIndex: number, optionName?: string, optionValue?: any) => {}; - isScrollbarVisible: () => boolean; - getTopVisibleRowData: () => {}; - } - export interface dxMenuOptions extends CollectionContainerWidgetOptions { - orientation?: string; - submenuDirection?: string; - showFirstSubmenuMode?: string; - enableHotTrack?: boolean; - allowSelection?: boolean; - allowSelectOnClick?: boolean; - selectedItem?: any; - itemSelectAction?: any; - cssClass?: string; - } - export interface dxContextMenuOptions extends CollectionContainerWidgetOptions { - showSubmenuMode?: string; - invokeOnlyFromCode?: boolean; - cssClass?: string; - enableHotTrack?: boolean; - allowSelection?: boolean; - allowSelectOnClick?: boolean; - selectedItem?: any; - itemSelectAction?: any; - animation?: any; - position?: any; - showingAction?: any; - submenuDirection?: string; - } - export class dxMenu extends CollectionContainerWidget { - constructor(element: Element, options?: dxMenuOptions); - constructor(element: JQuery, options?: dxMenuOptions); - } - export class dxContextMenu extends CollectionContainerWidget { - constructor(element: Element, options?: dxContextMenuOptions); - constructor(element: JQuery, options?: dxContextMenuOptions); - } - export interface dxColorPickerOptions extends dxDropDownEditorOptions { - editAlphaChannel?: boolean; - applyButtonText?: string; - cancelButtonText?: string; - } - export class dxColorPicker extends dxDropDownEditor { - constructor(element: Element, options?: dxColorPickerOptions); - constructor(element: JQuery, options?: dxColorPickerOptions); - } -} -interface JQuery { - dxAutocomplete(options?: DevExpress.ui.dxAutocompleteOptions): JQuery; - dxButton(options?: DevExpress.ui.dxButtonOptions): JQuery; - dxCheckBox(options?: DevExpress.ui.dxCheckBoxOptions): JQuery; - dxCalendar(options?: DevExpress.ui.dxCalendarOptions): JQuery; - dxDateBox(options?: DevExpress.ui.dxDateBoxOptions): JQuery; - dxTextEditor(options?: DevExpress.ui.dxTextEditorOptions): JQuery; - dxList(options?: DevExpress.ui.dxListOptions): JQuery; - dxLoadPanel(options?: DevExpress.ui.dxLoadPanelOptions): JQuery; - dxLookup(options?: DevExpress.ui.dxLookupOptions): JQuery; - dxMap(options?: DevExpress.ui.dxMapOptions): JQuery; - dxNavBar(options?: DevExpress.ui.dxNavBarOptions): JQuery; - dxNumberBox(options?: DevExpress.ui.dxNumberBoxOptions): JQuery; - dxOverlay(options?: DevExpress.ui.dxOverlayOptions): JQuery; - dxPopup(options?: DevExpress.ui.dxPopupOptions): JQuery; - dxPopover(options?: DevExpress.ui.dxPopoverOptions): JQuery; - dxTooltip(options?: DevExpress.ui.dxTooltipOptions): JQuery; - dxRadioGroup(options?: DevExpress.ui.dxRadioGroupOptions): JQuery; - dxRangeSlider(options?: DevExpress.ui.dxRangeSliderOptions): JQuery; - dxScrollable(options?: DevExpress.ui.dxScrollableOptions): JQuery; - dxScrollView(options?: DevExpress.ui.dxScrollViewOptions): JQuery; - dxSelectBox(options?: DevExpress.ui.dxSelectBoxOptions): JQuery; - dxSlider(options?: DevExpress.ui.dxSliderOptions): JQuery; - dxTabs(options?: DevExpress.ui.dxTabsOptions): JQuery; - dxTextArea(options?: DevExpress.ui.dxTextAreaOptions): JQuery; - dxTextBox(options?: DevExpress.ui.dxTextBoxOptions): JQuery; - dxToast(options?: DevExpress.ui.dxToastOptions): JQuery; - dxToolbar(options?: DevExpress.ui.dxToolbarOptions): JQuery; - dxDropDownEditor(options?: DevExpress.ui.dxDropDownEditorOptions): JQuery; - dxLoadIndicator(options?: DevExpress.ui.dxLoadIndicatorOptions): JQuery; - dxMultiView(options?: DevExpress.ui.dxMultiViewOptions): JQuery; - dxGallery(options?: DevExpress.ui.dxGalleryOptions): JQuery; - dxDataGrid(options?: DevExpress.ui.dxDataGridOptions): JQuery; - dxMenu(options?: DevExpress.ui.dxMenuOptions): JQuery; - dxContextMenu(options?: DevExpress.ui.dxContextMenuOptions): JQuery; - dxColorPicker(options?: DevExpress.ui.dxColorPickerOptions): JQuery; -} \ No newline at end of file diff --git a/devextreme/14.2/dx.devextreme-14.2.7.d.ts b/devextreme/14.2/dx.devextreme-14.2.7.d.ts deleted file mode 100644 index c8827de9c..000000000 --- a/devextreme/14.2/dx.devextreme-14.2.7.d.ts +++ /dev/null @@ -1,5813 +0,0 @@ -// Type definitions for DevExtreme 14.2.7 -// Project: http://js.devexpress.com/ -// Definitions by: DevExpress Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare module DevExpress { - /** A mixin that provides a capability to fire and subscribe to events. */ - export interface EventsMixin { - /** Subscribes to a specified event. */ - on(eventName: string, eventHandler: Function): T; - /** Subscribes to the specified events. */ - on(events: { [eventName: string]: Function; }): T; - /** Detaches all event handlers from the specified event. */ - off(eventName: string): Object; - /** Detaches a particular event handler from the specified event. */ - off(eventName: string, eventHandler: Function): T; - } - /** An object that serves as a namespace for the methods required to perform validation. */ - export module validationEngine { - export interface IValidator { - validate(): ValidatorValidationResult; - reset(): void; - } - export interface ValidatorValidationResult { - isValid: boolean; - name?: string; - value: any; - brokenRule: any; - validationRules: any[]; - } - export interface ValidationGroupValidationResult { - isValid: boolean; - brokenRules: any[]; - validators: IValidator[]; - } - export interface GroupConfig extends EventsMixin { - group: any; - validators: IValidator[]; - validate(): ValidationGroupValidationResult; - reset(): void; - } - /** Provides access to the object that represents the specified validation group. */ - export function getGroupConfig(group: any): GroupConfig - /** Provides access to the object that represents the default validation group. */ - export function getGroupConfig(): GroupConfig - /** Validates rules of the validators that belong to the specified validation group. */ - export function validateGroup(group: any): ValidationGroupValidationResult; - /** Validates rules of the validators that belong to the default validation group. */ - export function validateGroup(): ValidationGroupValidationResult; - /** Resets the values and validation result of the editors that belong to the specified validation group. */ - export function resetGroup(group: any): void; - /** Resets the values and validation result of the editors that belong to the default validation group. */ - export function resetGroup(): void; - /** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */ - export function validateModel(model: Object): ValidationGroupValidationResult; - /** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */ - export function registerModelForValidation(model: Object): void; - } - export var hardwareBackButton: JQueryCallback; - /** Processes the hardware back button click. */ - export function processHardwareBackButton(): void; - /** Specifies whether or not the entire application/site supports right-to-left representation. */ - export var rtlEnabled: boolean; - /** Registers a new component in the DevExpress.ui namespace, and a jQuery plugin and Knockout binding for the required component. */ - export function registerComponent(name: string, componentClass: Object): void; - /** Registers a new component in the specified namespace as a jQuery plugin, Angular directive and Knockout binding. */ - export function registerComponent(name: string, namespace: Object, componentClass: Object): void; - /** Requests that the browser call a specified function to update animation before the next repaint. */ - export function requestAnimationFrame(callback: Function): number; - /** Cancels an animation frame request scheduled with the requestAnimationFrame method. */ - export function cancelAnimationFrame(requestID: number): void; - /** Custom Knockout binding that links an HTML element with a specific action. */ - export class Action { } - /** Used to get URLs that vary in a locally running application and the application running on production. */ - export class EndpointSelector { - constructor(options: { - [key: string]: { - local?: string; - production?: string; - } - }); - /** Returns a local or a productional URL depending on how the application is currently running. */ - urlFor(key: string): string; - } - /** An object that serves as a namespace for the methods that are used to animate UI elements. */ - export module fx { - /** The animation object specifies the widget animation options. */ - export interface AnimationOptions { - /** A function called after animation is completed. */ - complete?: (element: JQuery, config: AnimationOptions) => void; - /** A number specifying wait time before animation execution. */ - delay?: number; - /** A number specifying the time in milliseconds spent on animation. */ - duration?: number; - /** A string specifying the type of an easing function used for animation. */ - easing?: string; - /** Specifies the initial widget animation state. */ - from?: any; - /** A function called before animation is started. */ - start?: (element: JQuery, config: AnimationOptions) => void; - /** Specifies the initial widget animation state. */ - to?: any; - /** A string value specifying the animation type. */ - type?: string; - /** Specifies the animation direction for the "slideIn" and "slideOut" animation types. */ - direction?: string; - } - /** Animates the specified element. */ - export function animate(element: HTMLElement, config: Object): Object; - /** Returns a value indicating whether the specified element is being animated. */ - export function isAnimating(element: HTMLElement): boolean; - /** Stops the animation. */ - export function stop(element: HTMLElement, jumpToEnd: boolean): void; - } - /** An object that serves as a namespace for the methods and events specifying information on the current device. */ - export module devices { - /** 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?: string; - /** 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; - /** 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?: string; - /** Indicates whether or not the device type is 'tablet'. */ - tablet?: boolean; - /** Indicates whether or not the device platform is Tizen. */ - tizen?: boolean; - /** Specifies an array with the major and minor versions of the device platform. */ - version?: Array; - /** Indicates whether or not the device platform is Windows8. */ - win8?: boolean; - } - export var orientationChanged: JQueryCallback; - /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ - export function current(deviceName: any): void; - /** Returns information about the current device. */ - export function current(): Device; - /** Returns the current device orientation. */ - export function orientation(): string; - /** Returns real information about the current device regardless of the value passed to the devices.current(deviceName) method. */ - export function real(): Device; - } - /** The position object specifies the widget positioning options. */ - export interface PositionOptions { - /** The target element position that the widget is positioned against. */ - at?: string; - /** The element within which the widget is positioned. */ - boundary?: Element; - /** A string value holding horizontal and vertical offset from the window's boundaries. */ - boundaryOffset?: string; - /** Specifies how to move the widget if it overflows the screen. */ - collision?: any; - /** The position of the widget to align against the target element. */ - my?: string; - /** The target element that the widget is positioned against. */ - of?: HTMLElement; - /** A string value holding horizontal and vertical offset in pixels, separated by a space (e.g., "5 -10"). */ - offset?: string; - } - export interface ComponentOptions { - /** A handler for the optionChanged event. */ - onOptionChanged?: Function; - /** A handler for the disposing event. */ - onDisposing?: Function; - } - /** A base class for all components and widgets. */ - export class Component { - constructor(options?: ComponentOptions) - /** Prevents the component from refreshing until the endUpdate method is called. */ - beginUpdate(): void; - /** Enables the component to refresh after the beginUpdate method call. */ - endUpdate(): void; - /** Returns an instance of this component class. */ - instance(): Component; - /** Sets one or more options of this component. */ - option(options: Object): void; - /** Returns the configuration options of this component. */ - option(): Object; - /** Gets the value of the specified configuration option of this component. */ - option(optionName: string): any; - /** Sets a value to the specified configuration option of this component. */ - option(optionName: string, optionValue: any): void; - } - export interface DOMComponentOptions extends ComponentOptions { - /** Specifies whether or not the current component supports a right-to-left representation. */ - rtlEnabled?: boolean; - } - /** A base class for all components. */ - export class DOMComponent extends Component { - constructor(element: JQuery, options?: DOMComponentOptions); - constructor(element: HTMLElement, options?: DOMComponentOptions); - /** Returns the root HTML element of the widget. */ - element(): JQuery; - /** Specifies the device-dependent default configuration options for this component. */ - static defaultOptions(rule: { - device?: any; - options?: any; - }): void; - } - export module data { - export interface ODataError extends Error { - httpStatus?: number; - errorDetails?: any; - } - export interface StoreOptions { - inserted?: (values: Object, key: any) => void; - inserting?: (values: Object) => void; - loaded?: (result: Array) => void; - loading?: (loadOptions: LoadOptions) => void; - modified?: () => void; - modifying?: () => void; - removed?: (key: any) => void; - removing?: (key: any) => void; - updated?: (key: any, values: Object) => void; - updating?: (key: any, values: Object) => void; - /** A handler for the modified event. */ - onModified?: () => void; - /** A handler for the modifying event. */ - onModifying?: () => void; - /** A handler for the removed event. */ - onRemoved?: (key: any) => void; - /** A handler for the removing event. */ - onRemoving?: (key: any) => void; - /** A handler for the updated event. */ - onUpdated?: (key: any, values: Object) => void; - /** A handler for the updating event. */ - onUpdating?: (key: any, values: Object) => void; - /** A handler for the loaded event. */ - onLoaded?: (result: Array) => void; - /** A handler for the loading event. */ - onLoading?: (loadOptions: LoadOptions) => void; - /** A handler for the inserted event. */ - onInserted?: (values: Object, key: any) => void; - /** A handler for the inserting event. */ - onInserting?: (values: Object) => void; - /** Specifies the function called when the Store causes an error. */ - errorHandler?: (e: Error) => void; - /** Specifies the key properties within the data associated with the Store. */ - key?: any; - } - export interface LoadOptions { - filter?: Object; - sort?: Object; - select?: Object; - expand?: Object; - group?: Object; - skip?: number; - take?: number; - userData?: Object; - requireTotalCount?: boolean; - } - /** The base class for all Stores. */ - export class Store implements EventsMixin { - inserted: JQueryCallback; - inserting: JQueryCallback; - loaded: JQueryCallback; - loading: JQueryCallback; - modified: JQueryCallback; - modifying: JQueryCallback; - removed: JQueryCallback; - removing: JQueryCallback; - updated: JQueryCallback; - updating: JQueryCallback; - constructor(options?: StoreOptions); - /** Returns the data item specified by the key. */ - byKey(key: any): JQueryPromise; - /** Adds an item to the data associated with this Store. */ - insert(values: Object): JQueryPromise; - /** Returns the key expression specified via the key configuration option. */ - key(): any; - /** Returns the key of the Store item that matches the specified object. */ - keyOf(obj: Object): any; - /** Starts loading the data. */ - load(obj?: LoadOptions): JQueryPromise; - /** Removes the data item specified by the key. */ - remove(key: any): JQueryPromise; - /** Obtains the total count of items that will be returned by the load() function. */ - totalCount(obj?: { - filter?: Object; - select?: Object; - group?: Object; - sort?: Object; - }): JQueryPromise; - /** Updates the data item specified by the key. */ - update(key: any, values: Object): JQueryPromise; - on(eventName: "removing", eventHandler: (key: any) => void): Store; - on(eventName: "removed", eventHandler: (key: any) => void): Store; - on(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; - on(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; - on(eventName: "inserting", eventHandler: (values: Object) => void): Store; - on(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; - on(eventName: "modifying", eventHandler: () => void): Store; - on(eventName: "modified", eventHandler: () => void): Store; - on(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; - on(eventName: "loaded", eventHandler: (result: Array) => void): Store; - on(eventName: string, eventHandler: Function): Store; - on(events: { [eventName: string]: Function; }): Store; - off(eventName: "removing"): Store; - off(eventName: "removed"): Store; - off(eventName: "updating"): Store; - off(eventName: "updated"): Store; - off(eventName: "inserting"): Store; - off(eventName: "inserted"): Store; - off(eventName: "modifying"): Store; - off(eventName: "modified"): Store; - off(eventName: "loading"): Store; - off(eventName: "loaded"): Store; - off(eventName: string): Store; - off(eventName: "removing", eventHandler: (key: any) => void): Store; - off(eventName: "removed", eventHandler: (key: any) => void): Store; - off(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; - off(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; - off(eventName: "inserting", eventHandler: (values: Object) => void): Store; - off(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; - off(eventName: "modifying", eventHandler: () => void): Store; - off(eventName: "modified", eventHandler: () => void): Store; - off(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; - off(eventName: "loaded", eventHandler: (result: Array) => void): Store; - off(eventName: string, eventHandler: Function): Store; - } - export interface ArrayStoreOptions extends StoreOptions { - /** Specifies the array associated with this Store. */ - data?: Array; - } - /** A Store accessing an in-memory array. */ - export class ArrayStore extends Store { - constructor(options?: ArrayStoreOptions); - /** Clears all data associated with the current ArrayStore. */ - clear(): void; - /** Creates the Query object for the underlying array. */ - createQuery(): Query; - } - interface Promise { - then(doneFn?: Function, failFn?: Function, progressFn?: Function): Promise; - } - export interface CustomStoreOptions extends StoreOptions { - /** The user implementation of the byKey(key, extraOptions) method. */ - byKey?: (key: any) => Promise; - /** - * User implementation of the byKey(key, extraOptions) method. - * @deprecated byKey.md - */ - lookup?: (key: any) => Promise; - /** The user implementation of the insert(values) method. */ - insert?: (values: Object) => Promise; - /** The user implementation of the load(options) method. */ - load?: (options?: LoadOptions) => Promise; - /** The user implementation of the remove(key) method. */ - remove?: (key: any) => Promise; - /** The user implementation of the totalCount(options) method. */ - totalCount?: () => Promise; - /** The user implementation of the update(key, values) method. */ - update?: (key: any, values: Object) => Promise; - } - /** A Store object that enables you to implement your own data access logic. */ - export class CustomStore extends Store { - constructor(options: CustomStoreOptions); - } - export interface DataSourceOptions { - /** Specifies data filtering conditions. */ - filter?: Object; - /** Specifies data grouping conditions. */ - group?: Object; - /** The item mapping function. */ - map?: (record: any) => any; - /** Specifies the maximum number of items the page can contain. */ - pageSize?: number; - /** Specifies whether a DataSource loads data by pages, or all items at once. */ - paginate?: boolean; - /** The data post processing function. */ - postProcess?: (data: any[]) => any[]; - /** Specifies a value by which the required items are searched. */ - searchExpr?: Object; - /** Specifies the comparison operation used to search for the required items. */ - searchOperation?: string; - /** Specifies the value to which the search expression is compared. */ - searchValue?: Object; - /** Specifies the initial select option value. */ - select?: Object; - /** An array of the strings that represent the names of the navigation properties to be loaded simultaneously with the OData store's entity. */ - expand?: Object; - /** Specifies the initial sort option value. */ - sort?: Object; - /** Specifies the underlying Store instance used to access data. */ - store?: any; - /** A handler for the changed event. */ - onChanged?: () => void; - /** A handler for the loadingChanged event. */ - onLoadingChanged?: (isLoading: boolean) => void; - /** A handler for the loadError event. */ - onLoadError?: (e?: Error) => void; - } - /** An object that provides access to a data web service or local data storage for collection container widgets. */ - export class DataSource implements EventsMixin { - constructor(options?: DataSourceOptions); - changed: JQueryCallback; - loadError: JQueryCallback; - loadingChanged: JQueryCallback; - /** Disposes all resources associated with this DataSource. */ - dispose(): void; - /** Returns the current filter option value. */ - filter(): Object; - /** Sets the filter option value. */ - filter(filterExpr: Object): void; - /** Returns the current group option value. */ - group(): Object; - /** Sets the group option value. */ - group(groupExpr: Object): void; - /** Indicates whether or not the current page contains fewer items than the number of items specified by the pageSize configuration option. */ - isLastPage(): boolean; - /** Indicates whether or not at least one load() method execution has successfully finished. */ - isLoaded(): boolean; - /** Indicates whether or not the DataSource is currently being loaded. */ - isLoading(): boolean; - /** Returns the array of items currently operated by the DataSource. */ - items(): Array; - /** Returns the key expression. */ - key(): any; - /** Starts loading data. */ - load(): JQueryPromise>; - /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ - loadOptions(): Object; - /** Returns the current pageSize option value. */ - pageSize(): number; - /** Sets the pageSize option value. */ - pageSize(value: number): void; - /** Specifies the index of the currently loaded page. */ - pageIndex(): number; - /** Specifies the index of the page to be loaded during the next load() method execution. */ - pageIndex(newIndex: number): void; - /** Returns the current paginate option value. */ - paginate(): boolean; - /** Sets the paginate option value. */ - paginate(value: boolean): void; - /** Returns the searchExpr option value. */ - searchExpr(): Object; - /** Sets the searchExpr option value. */ - searchExpr(expr: Object): void; - /** Returns the currently specified search operation. */ - searchOperation(): string; - /** Sets the current search operation. */ - searchOperation(op: string): void; - /** Returns the searchValue option value. */ - searchValue(): Object; - /** Sets the searchValue option value. */ - searchValue(value: Object): void; - /** Returns the current select option value. */ - select(): Object; - /** Sets the select option value. */ - select(expr: Object): void; - /** Returns the current sort option value. */ - sort(): Object; - /** Sets the sort option value. */ - sort(sortExpr: Object): void; - /** Returns the underlying Store instance. */ - store(): Store; - /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ - totalCount(): number; - on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; - on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; - on(eventName: "changed", eventHandler: () => void): DataSource; - on(eventName: string, eventHandler: Function): DataSource; - on(events: { [eventName: string]: Function; }): DataSource; - off(eventName: "loadingChanged"): DataSource; - off(eventName: "loadError"): DataSource; - off(eventName: "changed"): DataSource; - off(eventName: string): DataSource; - off(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; - off(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; - off(eventName: "changed", eventHandler: () => void): DataSource; - off(eventName: string, eventHandler: Function): DataSource; - } - /** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */ - export class EdmLiteral { - /** Returns a string representation of the value associated with this EdmLiteral object. */ - valueOf(): string; - } - /** An object used to generate and hold the GUID. */ - export class Guid { - /** Creates a new Guid instance that holds the specified GUID. */ - constructor(value: string); - /** Creates a new Guid instance holding the generated GUID. */ - constructor(); - /** Returns a string representation of the Guid instance. */ - toString(): string; - /** Returns a string representation of the Guid instance. */ - valueOf(): string; - } - export interface LocalStoreOptions extends ArrayStoreOptions { - /** Specifies the time (in miliseconds) after the change operation, before the data is flushed. */ - flushInterval?: number; - /** Specifies whether the data is flushed immediatelly after each change operation, or after the delay specified via the flushInterval option. */ - immediate?: boolean; - /** The unique identifier used to distinguish the data within the HTML5 Web Storage. */ - name?: string; - } - /** A Store providing access to the HTML5 Web Storage. */ - export class LocalStore extends ArrayStore { - constructor(options?: LocalStoreOptions); - /** Removes all data associated with this Store. */ - clear(): void; - } - export interface ODataContextOptions extends ODataStoreOptions { - /** Specifies the list of entities to be accessed via the ODataContext. */ - entities?: Object; - /** Specifies the function called if the ODataContext causes an error. */ - errorHandler?: (e: Error) => void; - } - /** Provides access to the entire OData service. */ - export class ODataContext { - constructor(options?: ODataContextOptions); - /** Initiates the specified WebGet service operation that returns a value. For the information on service operations, refer to the OData documentation. */ - get(operationName: string, params: Object): JQueryPromise; - /** Initiates the specified WebGet service operation that returns nothing. For the information on service operations, refer to the OData documentation. */ - invoke(operationName: string, params: Object, httpMethod: Object): JQueryPromise; - /** Return a special proxy object to describe the entity link. */ - objectLink(entityAlias: string, key: any): Object; - } - export interface ODataStoreOptions extends StoreOptions { - /** A function used to customize a web request before it is sent. */ - beforeSend?: (request: Object) => void; - /** Specifies whether the ODataStore uses the JSONP approach to access non-CORS-compatible remote services. */ - jsonp?: boolean; - /** Specifies the type of the ODataStore key property. The following key types are supported out of the box: String, Int32, Int64, and Guid. */ - keyType?: any; - /** Specifies the URL of the data service being accessed via the current ODataContext. */ - url?: string; - /** Specifies the version of the OData protocol used to interact with the data service. */ - version?: number; - /** Specifies the value of the withCredentials field of the underlying jqXHR object. */ - withCredentials?: boolean; - } - /** A Store providing access to a separate OData web service entity. */ - export class ODataStore extends Store { - constructor(options?: ODataStoreOptions); - /** Creates the Query object for the OData endpoint. */ - createQuery(loadOptions: Object): Object; - /** Returns the data item specified by the key. */ - byKey(key: any, extraOptions?: { expand?: Object }): JQueryPromise; - } - /** An universal chainable data query interface object. */ - export interface Query { - /** Calculates a custom summary for the items in the current Query. */ - aggregate(step: (accumulator: any, value: any) => any): JQueryPromise; - /** Calculates a custom summary for the items in the current Query. */ - aggregate(seed: any, step: (accumulator: any, value: any) => any, finalize: (result: any) => any): JQueryPromise; - /** Calculates the average item value for the current Query. */ - avg(getter: Object): JQueryPromise; - /** Finds the item with the maximum getter value. */ - max(getter: Object): JQueryPromise; - /** Finds the item with the maximum value in the Query. */ - max(): JQueryPromise; - /** Finds the item with the minimum value in the Query. */ - min(): JQueryPromise; - /** Finds the item with the minimum getter value. */ - min(getter: Object): JQueryPromise; - /** Calculates the average item value for the current Query, if each Query item has a numeric type. */ - avg(): JQueryPromise; - /** Returns the total count of items in the current Query. */ - count(): JQueryPromise; - /** Executes the Query. */ - enumerate(): JQueryPromise; - /** Filters the current Query data. */ - filter(criteria: Array): Query; - /** Groups the current Query data. */ - groupBy(getter: Object): Query; - /** Applies the specified transformation to each item. */ - select(getter: Object): Query; - /** Limits the data item count. */ - slice(skip: number, take?: number): Query; - /** Sorts current Query data. */ - sortBy(getter: Object, desc: boolean): Query; - /** Sorts current Query data. */ - sortBy(getter: Object): Query; - /** Calculates the sum of item getter values in the current Query. */ - sum(getter: Object): JQueryPromise; - /** Calculates the sum of item values in the current Query. */ - sum(): JQueryPromise; - /** Adds one more sorting condition to the current Query. */ - thenBy(getter: Object): Query; - /** Adds one more sorting condition to the current Query. */ - thenBy(getter: Object, desc: boolean): Query; - /** Returns the array of current Query items. */ - toArray(): Array; - } - /** The global data layer error handler. */ - export var errorHandler: (e: Error) => void; - /** Encodes the specified string or array of bytes to base64 encoding. */ - export function base64_encode(input: any): string; - /** Creates a Query instance. */ - export function query(array: Array): Query; - /** Creates a Query instance for accessing the remote service specified by a URL. */ - export function query(url: string, queryOptions: Object): Query; - /** This section describes the utility objects provided by the DevExtreme data layer. */ - export var utils: { - /** Compiles a getter function from the getter expression. */ - compileGetter(expr: any): Function; - /** Compiles a setter function from the setter expression. */ - compileSetter(expr: any): Function; - odata: { - /** Holds key value converters for OData. */ - keyConverters: { - String(value: any): string; - Int32(value: any): number; - Int64(value: any): EdmLiteral; - Guid(value: any): Guid; - Boolean(value: any): boolean; - Single(value: any): EdmLiteral; - Decimal(value: any): EdmLiteral; - }; - } - } - } - /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ - export module ui { - /** - * Sets parameters for the viewport meta tag. - * @deprecated Use the "DevExpress.utils.initMobileViewport" option instead. - */ - export function initViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; - export interface WidgetOptions extends DOMComponentOptions { - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** A Boolean value specifying whether or not the widget can respond to user interaction. */ - disabled?: boolean; - /** Specifies the height of the widget. */ - height?: any; - /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ - hoverStateEnabled?: boolean; - /** Specifies whether or not the widget can be focused. */ - focusStateEnabled?: boolean; - /** A Boolean value specifying whether or not the widget is visible. */ - visible?: boolean; - /** Specifies the width of the widget. */ - width?: any; - /** Specifies the widget tab index. */ - tabIndex?: number; - /** Specifies the text of the hint displayed for the widget. */ - hint?: string; - } - /** The base class for widgets. */ - export class Widget extends DOMComponent { - constructor(options?: WidgetOptions); - /** Redraws the widget. */ - repaint(): void; - /** Sets focus on the widget. */ - focus(): void; - } - export interface CollectionWidgetOptions extends WidgetOptions { - /** A data source used to fetch data to be displayed by the widget. */ - dataSource?: any; - itemClickAction?: any; - itemHoldAction?: Function; - /** The time period in milliseconds before the onItemHold event is raised. */ - itemHoldTimeout?: number; - itemRender?: any; - itemRenderedAction?: Function; - /** An array of items displayed by the widget. */ - items?: Array; - /** - * A function performed when a widget item is selected. - * @deprecated onSelectionChanged.md - */ - itemSelectAction?: Function; - /** The template to be used for rendering items. */ - itemTemplate?: any; - loopItemFocus?: boolean; - /** The text or HTML markup displayed by the widget if the item collection is empty. */ - noDataText?: string; - onContentReady?: any; - contentReadyAction?: any; - /** A handler for the itemClick event. */ - onItemClick?: any; - /** A handler for the itemContextMenu event. */ - onItemContextMenu?: Function; - /** A handler for the itemHold event. */ - onItemHold?: Function; - /** A handler for the itemRendered event. */ - onItemRendered?: Function; - /** A handler for the selectionChanged event. */ - onSelectionChanged?: Function; - /** The index of the currently selected widget item. */ - selectedIndex?: number; - /** The selected item object. */ - selectedItem?: Object; - /** An array of currently selected item objects. */ - selectedItems?: Array; - /** A handler for the itemDeleting event. */ - onItemDeleting?: Function; - /** A handler for the itemDeleted event. */ - onItemDeleted?: Function; - /** A handler for the itemReordered event. */ - onItemReordered?: Function; - } - /** The base class for widgets containing an item collection. */ - export class CollectionWidget extends Widget { - constructor(element: JQuery, options?: CollectionWidgetOptions); - constructor(element: HTMLElement, options?: CollectionWidgetOptions); - selectItem(itemElement: any): void; - unselectItem(itemElement: any): void; - deleteItem(itemElement: any): JQueryPromise; - isItemSelected(itemElement: any): boolean; - reorderItem(itemElement: any, toItemElement: any): JQueryPromise; - } - export interface DataExpressionMixinOptions { - /** A data source used to fetch data to be displayed by the widget. */ - dataSource?: any; - /** Specifies the name of the data source item field whose value is displayed by the widget. */ - displayExpr?: any; - /** Specifies the name of a data source item field whose value is held in the value configuration option. */ - valueExpr?: any; - itemRender?: any; - /** An array of items displayed by the widget. */ - items?: Array; - /** The template to be used for rendering items. */ - itemTemplate?: any; - /** The currently selected value in the widget. */ - value?: Object; - } - export interface EditorOptions extends WidgetOptions { - /** The currently specified value. */ - value?: Object; - /** A handler for the valueChanged event. */ - onValueChanged?: Function; - valueChangeAction?: Function; - /** A Boolean value specifying whether or not the widget is read-only. */ - readOnly?: boolean; - /** Holds the object that defines the error that occurred during validation. */ - validationError?: Object; - /** Specifies whether the editor's value is valid. */ - isValid?: boolean; - /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ - validationMessageMode?: string; - } - /** A base class for editors. */ - export class Editor extends Widget { - /** Resets the editor's value to undefined. */ - reset(): void; - } - /** An object that serves as a namespace for methods displaying a message in an application/site. */ - export var dialog: { - /** Creates an alert dialog message containing a single "OK" button. */ - alert(message: string, title: string): JQueryPromise; - /** Creates a confirm dialog that contains "Yes" and "No" buttons. */ - confirm(message: string, title: string): JQueryPromise; - /** Creates a custom dialog using the options specified by the passed configuration object. */ - custom(options: { title?: string; message?: string; buttons?: Array; }): { - show(): JQueryPromise; - hide(): void; - hide(value: any): void; - }; - }; - /** Creates a toast message. */ - export function notify(message: any, type: string, displayTime: number): void; - /** Creates a toast message. */ - export function notify(options: Object): void; - /** An object that serves as a namespace for the methods that work with DevExtreme CSS Themes. */ - export var themes: { - /** Returns the name of the currently applied theme. */ - current(): string; - /** Changes the current theme to the specified one. */ - current(themeName: string): void; - }; - /** Sets a specified template engine. */ - export function setTemplateEngine(name: string): void; - /** Sets a custom template engine defined via custom compile and render functions. */ - export function setTemplateEngine(options: Object): void; - /** An object that serves as a namespace for utility methods that can be helpful when working with the DevExtreme framework and UI widgets. */ - export var utils: { - /** Sets parameters for the viewport meta tag. */ - initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; - }; - } -} -declare module DevExpress.framework { - /** An object used to store information on the views displayed in an application. */ - export class ViewCache { - viewRemoved: JQueryCallback; - /** Removes all the viewInfo objects from the cache. */ - clear(): void; - /** Obtains a viewInfo object from the cache by the specified key. */ - getView(key: string): Object; - /** Checks whether or not a viewInfo object is contained in the view cache under the specified key. */ - hasView(key: string): boolean; - /** Removes a viewInfo object from the cache by the specified key. */ - removeView(key: string): Object; - /** Adds the specified viewInfo object to the cache under the specified key. */ - setView(key: string, viewInfo: Object): void; - } - export interface dxCommandOptions extends DOMComponentOptions { - action?: any; - /** Specifies an action performed when the execute() method of the command is called. */ - onExecute?: any; - /** Indicates whether or not the widget that displays this command is disabled. */ - disabled?: boolean; - /** Specifies the name of the icon shown inside the widget associated with this command. */ - icon?: string; - /** A URL pointing to the icon shown inside the widget associated with this command. */ - iconSrc?: string; - /** The identifier of the command. */ - id?: string; - /** Specifies the title of the widget associated with this command. */ - title?: string; - /** Specifies the type of the button, if the command is rendered as a dxButton widget. */ - type?: string; - /** A Boolean value specifying whether or not the widget associated with this command is visible. */ - visible?: boolean; - } - /** A markup component used to define markup options for a command. */ - export class dxCommand extends DOMComponent { - constructor(element: JQuery, options: dxCommandOptions); - constructor(options: dxCommandOptions); - /** Executes the action associated with this command. */ - execute(): void; - } - /** An object responsible for routing. */ - export class Router { - /** Adds a routing rule to the list of registered rules. */ - register(pattern: string, defaults?: Object, constraints?: Object): void; - /** Decodes the specified URI to an object using the registered routing rules. */ - parse(uri: string): Object; - /** Formats an object to a URI. */ - format(obj: Object): string; - } - export interface StateManagerOptions { - /** A storage to which the state manager saves the application state. */ - storage?: Object; - } - /** An object used to store the current application state. */ - export class StateManager { - constructor(options?: StateManagerOptions); - /** Adds an object that implements an interface of a state source to the state manager's collection of state sources. */ - addStateSource(stateSource: Object): void; - /** Removes a specified state source from the state manager's collection of state sources. */ - removeStateSource(stateSource: Object): void; - /** Saves the current application state. */ - saveState(): void; - /** Restores the application state that has been saved by the saveState() method to the state storage. */ - restoreState(): void; - /** Removes the application state that has been saved by the saveState() method to the state storage. */ - clearState(): void; - } - export module html { - export var layoutSets: Array; - export interface HtmlApplicationOptions { - /** Specifies where the commands that are defined in the application's views must be displayed. */ - commandMapping?: Object; - /** - * The name of the default layout used by the application. - * @deprecated navigationType.md - */ - defaultLayout?: string; - /** Specifies whether or not view caching is disabled. */ - disableViewCache?: boolean; - /** An array of layout controllers that should be used to show application views in the current navigation context. */ - layoutSet?: any; - /** Specifies whether the current application must behave as a mobile or web application. */ - mode?: string; - /** Specifies the object that represents a root namespace of the application. */ - namespace?: Object; - /** Specifies application behavior when the user navigates to a root view. */ - navigateToRootViewMode?: string; - /** An array of dxCommand configuration objects used to define commands available from the application's global navigation. */ - navigation?: Array; - /** A state manager to be used in the application. */ - stateManager?: StateManager; - /** Specifies the storage to be used by the application's state manager to store the application state. */ - stateStorage?: Object; - /** - * Specifies a strategy for choosing layouts for views in your application. - * @deprecated layoutSet.md - */ - navigationType?: string; - /** - * Specifies the object that represents the root namespace of the application. - * @deprecated namespace.md - */ - ns?: Object; - /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ - useViewTitleAsBackText?: boolean; - /** A custom view cache to be used in the application. */ - viewCache?: Object; - /** Specifies a limit for the views that can be cached. */ - viewCacheSize?: number; - /** Specifies options for the viewport meta tag of a mobile browser. */ - viewPort?: JQuery; - /** A custom router to be used in the application. */ - router?: Router; - } - /** An object used to manage views, as well as control the application life cycle. */ - export class HtmlApplication implements EventsMixin { - constructor(options: HtmlApplicationOptions); - afterViewSetup: JQueryCallback; - beforeViewSetup: JQueryCallback; - initialized: JQueryCallback; - navigating: JQueryCallback; - navigatingBack: JQueryCallback; - resolveLayoutController: JQueryCallback; - viewDisposed: JQueryCallback; - viewDisposing: JQueryCallback; - viewHidden: JQueryCallback; - viewRendered: JQueryCallback; - viewShowing: JQueryCallback; - viewShown: JQueryCallback; - /** Provides access to the ViewCache object. */ - viewCache: ViewCache; - /** An array of dxCommand components that are created based on the application's navigation option value. */ - navigation: Array; - /** Provides access to the StateManager object. */ - stateManager: StateManager; - /** Provides access to the Router object. */ - router: Router; - /** Navigates to the URI preceding the current one in the navigation history. */ - back(): void; - /** Returns a Boolean value indicating whether or not backwards navigation is currently possible. */ - canBack(): boolean; - /** Calls the clearState() method of the application's StateManager object. */ - clearState(): void; - /** Creates global navigation commands. */ - createNavigation(navigationConfig: Array): void; - /** Returns an HTML template of the specified view. */ - getViewTemplate(viewName: string): JQuery; - /** Returns a configuration object used to create a dxView component for a specified view. */ - getViewTemplateInfo(viewName: string): Object; - /** Adds a specified HTML template to a collection of view or layout templates. */ - loadTemplates(source: any): JQueryPromise; - /** Navigates to the specified URI. */ - navigate(uri?: any, options?: Object): void; - /** Renders navigation commands to the navigation command containers that are located in the layouts used in the application. */ - renderNavigation(): void; - /** Calls the restoreState() method of the application's StateManager object. */ - restoreState(): void; - /** Calls the saveState method of the application's StateManager object. */ - saveState(): void; - /** Provides access to the object that defines the current context to be considered when choosing an appropriate template for a view. */ - templateContext(): Object; - on(eventName: "initialized", eventHandler: () => void): HtmlApplication; - on(eventName: "afterViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "beforeViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "navigating", eventHandler: (e: { - currentUri: string; - uri: string; - cancel: boolean; - options: { - root: boolean; - target: string; - direction: string; - rootInDetailPane: boolean; - modal: boolean; - }; - }) => void): HtmlApplication; - on(eventName: "navigatingBack", eventHandler: (e: { - cancel: boolean; - isHardwareButton: boolean; - }) => void): HtmlApplication; - on(eventName: "resolveLayoutController", eventHandler: (e: { - viewInfo: Object; - layoutController: Object; - availableLayoutControllers: Array; - }) => void): HtmlApplication; - on(eventName: "viewDisposed", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewDisposing", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewHidden", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewRendered", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - on(eventName: "viewShowing", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - on(eventName: "viewShown", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - on(eventName: string, eventHandler: Function): HtmlApplication; - on(events: { [eventName: string]: Function; }): HtmlApplication; - off(eventName: "initialized"): HtmlApplication; - off(eventName: "afterViewSetup"): HtmlApplication; - off(eventName: "beforeViewSetup"): HtmlApplication; - off(eventName: "navigating"): HtmlApplication; - off(eventName: "navigatingBack"): HtmlApplication; - off(eventName: "resolveLayoutController"): HtmlApplication; - off(eventName: "viewDisposed"): HtmlApplication; - off(eventName: "viewDisposing"): HtmlApplication; - off(eventName: "viewHidden"): HtmlApplication; - off(eventName: "viewRendered"): HtmlApplication; - off(eventName: "viewShowing"): HtmlApplication; - off(eventName: "viewShown"): HtmlApplication; - off(eventName: string): HtmlApplication; - off(eventName: "initialized", eventHandler: () => void): HtmlApplication; - off(eventName: "afterViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "beforeViewSetup", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "navigating", eventHandler: (e: { - currentUri: string; - uri: string; - cancel: boolean; - options: { - root: boolean; - target: string; - direction: string; - rootInDetailPane: boolean; - modal: boolean; - }; - }) => void): HtmlApplication; - off(eventName: "navigatingBack", eventHandler: (e: { - cancel: boolean; - isHardwareButton: boolean; - }) => void): HtmlApplication; - off(eventName: "resolveLayoutController", eventHandler: (e: { - viewInfo: Object; - layoutController: Object; - availableLayoutControllers: Array; - }) => void): HtmlApplication; - off(eventName: "viewDisposed", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewDisposing", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewHidden", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewRendered", eventHandler: (e: { - viewInfo: Object; - }) => void): HtmlApplication; - off(eventName: "viewShowing", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - off(eventName: "viewShown", eventHandler: (e: { - viewInfo: Object; - direction: string; - }) => void): HtmlApplication; - off(eventName: string, eventHandler: Function): HtmlApplication; - } - } -} -declare module DevExpress.ui { - export interface dxValidatorOptions extends DOMComponentOptions { - /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ - validationRules?: Array; - /** Specifies the editor name to be used in the validation default messages. */ - name?: string; - /** An object that specifies what and when to validate and how to apply the validation result. */ - adapter?: Object; - /** Specifies the validation group the editor will be related to. */ - validationGroup?: string; - /** A handler for the validated event. */ - onValidated?: (params: validationEngine.ValidatorValidationResult) => void; - } - /** A widget that is used to validate the associated DevExtreme editors against the defined validation rules. */ - export class dxValidator extends DOMComponent implements validationEngine.IValidator { - constructor(element: JQuery, options?: dxValidatorOptions); - constructor(element: Element, options?: dxValidatorOptions); - /** Validates the value of the editor that is controlled by the current dxValidator object against the list of the specified validation rules. */ - validate(): validationEngine.ValidatorValidationResult; - /** Resets the value and validation result of the editor associated with the current dxValidator object. */ - reset(): void; - } - /** The widget that is used in the Knockout and Angular approaches to combine the editors to be validated. */ - export class dxValidationGroup extends DOMComponent { - constructor(element: JQuery); - constructor(element: Element); - /** Validates rules of the validators that belong to the current validation group. */ - validate(): validationEngine.ValidationGroupValidationResult; - /** Resets the value and validation result of the editors that are included to the current validation group. */ - reset(): void; - } - export interface dxValidationSummaryOptions extends CollectionWidgetOptions { - /** Specifies the validation group for which summary should be generated. */ - validationGroup?: string; - } - /** A widget for displaying the result of checking validation rules for editors. */ - export class dxValidationSummary extends CollectionWidget { - constructor(element: JQuery, options?: dxValidationSummaryOptions); - constructor(element: Element, options?: dxValidationSummaryOptions); - } - export interface dxTooltipOptions extends dxPopoverOptions { - } - /** A tooltip widget. */ - export class dxTooltip extends dxPopover { - constructor(element: JQuery, options?: dxTooltipOptions); - constructor(element: Element, options?: dxTooltipOptions); - } - export interface dxDropDownListOptions extends dxDropDownEditorOptions { - /** Returns the value currently displayed by the widget. */ - displayValue?: string; - /** The minimum number of characters that must be entered into the text box to begin a search. */ - minSearchLength?: number; - /** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */ - searchExpr?: Object; - /** Specifies the binary operation used to filter data. */ - searchMode?: string; - /** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */ - searchTimeout?: number; - /** A handler for the valueChanged event. */ - onValueChanged?: Function; - /** Specifies DOM event names that update a widget's value. */ - valueChangeEvent?: string; - /** Specifies whether or not the widget supports searching. */ - searchEnabled?: boolean; - /** Specifies whether or not the widget displays items by pages. */ - pagingEnabled?: boolean; - /** The text or HTML markup displayed by the widget if the item collection is empty. */ - noDataText?: string; - /** A handler for the selectionChanged event. */ - onSelectionChanged?: Function; - /** A handler for the itemClick event. */ - onItemClick?: Function; - onContentReady?: Function; - /** Specifies whether or not the widget supports the focused state and keyboard navigation. */ - focusStateEnabled?: boolean; - } - /** A base class for drop-down list widgets. */ - export class dxDropDownList extends dxDropDownEditor { - constructor(element: JQuery, options?: dxDropDownListOptions); - constructor(element: Element, options?: dxDropDownListOptions); - } - export interface dxToolbarOptions extends CollectionWidgetOptions { - menuItemRender?: any; - /** The template used to render menu items. */ - menuItemTemplate?: any; - /** Informs the widget about its location in a view HTML markup. */ - renderAs?: string; - } - /** A toolbar widget. */ - export class dxToolbar extends CollectionWidget { - constructor(element: JQuery, options?: dxToolbarOptions); - constructor(element: Element, options?: dxToolbarOptions); - } - export interface dxToastOptions extends dxOverlayOptions { - animation?: fx.AnimationOptions; - /** The time span in milliseconds during which the dxToast widget is visible. */ - displayTime?: number; - height?: any; - /** The dxToast message text. */ - message?: string; - position?: PositionOptions; - shading?: boolean; - /** Specifies the dxToast widget type. */ - type?: string; - width?: any; - closeOnBackButton?: boolean; - } - /** The toast message widget. */ - export class dxToast extends dxOverlay { - constructor(element: JQuery, options?: dxToastOptions); - constructor(element: Element, options?: dxToastOptions); - } - export interface dxTextEditorOptions extends EditorOptions { - /** A handler for the change event. */ - onChange?: Function; - changeAction?: Function; - /** A handler for the copy event. */ - onCopy?: Function; - copyAction?: Function; - /** A handler for the cut event. */ - onCut?: Function; - cutAction?: Function; - /** A handler for the enterKey event. */ - onEnterKey?: Function; - enterKeyAction?: Function; - /** A handler for the focusIn event. */ - onFocusIn?: Function; - focusInAction?: Function; - /** A handler for the focusOut event. */ - onFocusOut?: Function; - focusOutAction?: Function; - /** A handler for the input event. */ - onInput?: Function; - inputAction?: Function; - /** A handler for the keyDown event. */ - onKeyDown?: Function; - keyDownAction?: Function; - /** A handler for the keyPress event. */ - onKeyPress?: Function; - keyPressAction?: Function; - /** A handler for the keyUp event. */ - onKeyUp?: Function; - keyUpAction?: Function; - /** A handler for the paste event. */ - onPaste?: Function; - pasteAction?: Function; - /** The text displayed by the widget when the widget value is empty. */ - placeholder?: string; - /** Specifies whether to display the Clear button in the widget. */ - showClearButton?: boolean; - /** Specifies the current value displayed by the widget. */ - value?: any; - valueUpdateAction?: Function; - /** Specifies DOM event names that update a widget's value. */ - valueChangeEvent?: string; - valueUpdateEvent?: string; - /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ - spellcheck?: boolean; - /** Specifies HTML attributes applied to the inner input element of the widget. */ - attr?: Object; - /** The read-only option that holds the text displayed by the widget input element. */ - text?: string; - /** Specifies whether or not the widget supports the focused state and keyboard navigation. */ - focusStateEnabled?: boolean; - /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ - hoverStateEnabled?: boolean; - } - /** A base class for text editing widgets. */ - export class dxTextEditor extends Editor { - constructor(element: JQuery, options?: dxTextEditorOptions); - constructor(element: Element, options?: dxTextEditorOptions); - /** Removes focus from the input element. */ - blur(): void; - /** Sets focus to the input element representing the widget. */ - focus(): void; - } - export interface dxTextBoxOptions extends dxTextEditorOptions { - /** Specifies the maximum number of characters you can enter into the textbox. */ - maxLength?: any; - /** The "mode" attribute value of the actual HTML input element representing the text box. */ - mode?: string; - } - /** A single-line text box widget. */ - export class dxTextBox extends dxTextEditor { - constructor(element: JQuery, options?: dxTextBoxOptions); - constructor(element: Element, options?: dxTextBoxOptions); - } - export interface dxTextAreaOptions extends dxTextBoxOptions { - /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ - spellcheck?: boolean; - } - /** A widget used to display and edit multi-line text. */ - export class dxTextArea extends dxTextBox { - constructor(element: JQuery, options?: dxTextAreaOptions); - constructor(element: Element, options?: dxTextAreaOptions); - } - export interface dxTabsOptions extends CollectionWidgetOptions { - /** Specifies whether the widget enables an end-user to select only a single item or multiple items. */ - selectionMode?: string; - /** Specifies whether or not an end-user can scroll tabs by swiping. */ - scrollByContent?: boolean; - /** Specifies whether or not an end-user can scroll tabs. */ - scrollingEnabled?: boolean; - /** A Boolean value that specifies the availability of navigation buttons. */ - showNavButtons?: boolean; - } - /** A tab strip used to switch between pages. */ - export class dxTabs extends CollectionWidget { - constructor(element: JQuery, options?: dxTabsOptions); - constructor(element: Element, options?: dxTabsOptions); - } - export interface dxTabPanelOptions extends dxMultiViewOptions { - /** A handler for the titleClick event. */ - onTitleClick?: any; - /** A handler for the titleHold event. */ - onTitleHold?: Function; - /** A handler for the titleRendered event. */ - onTitleRendered?: Function; - titleTemplate?: any; - /** The template to be used for rendering an item title. */ - itemTitleTemplate?: any; - } - /** A widget used to display a view and to switch between several views by clicking the appropriate tabs. */ - export class dxTabPanel extends dxMultiView { - constructor(element: JQuery, options?: dxTabPanelOptions); - constructor(element: Element, options?: dxTabPanelOptions); - } - export interface dxSelectBoxOptions extends dxDropDownListOptions { - /** The template to be used for rendering the widget text field. */ - fieldTemplate?: any; - /** The text that is provided as a hint in the select box editor. */ - placeholder?: string; - /** Specifies whether or not the widget allows an end-user to enter a custom value. */ - fieldEditEnabled?: boolean; - } - /** A widget that allows you to select an item in a dropdown list. */ - export class dxSelectBox extends dxDropDownList { - constructor(element: JQuery, options?: dxSelectBoxOptions); - constructor(element: Element, options?: dxSelectBoxOptions); - } - export interface dxTagBoxOptions extends dxSelectBoxOptions { - /** Holds the list of selected values. */ - values?: Array; - } - /** A widget that allows you to select multiple items from a dropdown list. */ - export class dxTagBox extends dxSelectBox { - constructor(element: JQuery, options?: dxTagBoxOptions); - constructor(element: Element, options?: dxTagBoxOptions); - } - export interface dxScrollViewOptions extends dxScrollableOptions { - /** A handler for the pullDown event. */ - onPullDown?: Function; - pullDownAction?: Function; - /** Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. */ - pulledDownText?: string; - /** Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. */ - pullingDownText?: string; - /** A handler for the reachBottom event. */ - onReachBottom?: Function; - reachBottomAction?: Function; - /** Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. */ - reachBottomText?: string; - /** Specifies the text shown in the pullDown panel displayed when the content is being refreshed. */ - refreshingText?: string; - /** Returns a value indicating if the scrollView content is larger then the widget container. */ - isFull(): boolean; - /** Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. */ - refresh(): void; - /** Notifies the scroll view that data loading is finished. */ - release(preventScrollBottom: boolean): JQueryPromise; - /** Toggles the loading state of the widget. */ - toggleLoading(showOrHide: boolean): void; - } - /** A widget used to display scrollable content. */ - export class dxScrollView extends dxScrollable { - constructor(element: JQuery, options?: dxScrollViewOptions); - constructor(element: Element, options?: dxScrollViewOptions); - } - export interface dxScrollableLocation { - top?: number; - left?: number; - } - export interface dxScrollableOptions extends DOMComponentOptions { - /** A string value specifying the available scrolling directions. */ - direction?: string; - /** A Boolean value specifying whether or not the widget can respond to user interaction. */ - disabled?: boolean; - /** A handler for the scroll event. */ - onScroll?: Function; - scrollAction?: Function; - /** Specifies when the widget shows the scrollbar. */ - showScrollbar?: string; - /** A handler for the update event. */ - onUpdated?: Function; - updateAction?: Function; - /** Indicates whether to use native or simulated scrolling. */ - useNative?: boolean; - /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ - bounceEnabled?: boolean; - /** A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. */ - scrollByContent?: boolean; - /** A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar. */ - scrollByThumb?: boolean; - } - /** A widget used to display scrollable content. */ - export class dxScrollable extends DOMComponent { - constructor(element: JQuery, options?: dxScrollableOptions); - constructor(element: Element, options?: dxScrollableOptions); - /** Returns the height of the scrollable widget in pixels. */ - clientHeight(): number; - /** Returns the width of the scrollable widget in pixels. */ - clientWidth(): number; - /** An HTML element of the widget. */ - content(): JQuery; - /** Scrolls the widget content by the specified number of pixels. */ - scrollBy(distance: number): void; - /** Scrolls widget content by the specified number of pixels in horizontal and vertical directions. */ - scrollBy(distanceObject: dxScrollableLocation): void; - /** Returns the height of the scrollable content in pixels. */ - scrollHeight(): number; - /** Returns the current scroll position against the leftmost position. */ - scrollLeft(): number; - /** Returns how far the scrollable content is scrolled from the top and from the left. */ - scrollOffset(): dxScrollableLocation; - /** Scrolls widget content to the specified position. */ - scrollTo(targetLocation: number): void; - /** Scrolls widget content to a specified position. */ - scrollTo(targetLocation: dxScrollableLocation): void; - /** Scrolls widget content to the specified element. */ - scrollToElement(element: Element): void; - /** Returns the current scroll position against the topmost position. */ - scrollTop(): number; - /** Returns the width of the scrollable content in pixels. */ - scrollWidth(): number; - /** Updates the dimensions of the scrollable contents. */ - update(): void; - } - export interface dxRadioGroupOptions extends CollectionWidgetOptions { - /** Specifies the radio group layout. */ - layout?: string; - } - /** A widget that enables a user to select one item within a list of items represented by radio buttons. */ - export class dxRadioGroup extends CollectionWidget { - constructor(element: JQuery, options?: dxRadioGroupOptions); - constructor(element: Element, options?: dxRadioGroupOptions); - } - export interface dxPopupOptions extends dxOverlayOptions { - animation?: fx.AnimationOptions; - /** Specifies whether or not to allow a user to drag the popup window. */ - dragEnabled?: boolean; - /** A Boolean value specifying whether or not to display the widget in full-screen mode. */ - fullScreen?: boolean; - position?: PositionOptions; - /** A Boolean value specifying whether or not to display the title in the overlay window. */ - showTitle?: boolean; - /** The title in the overlay window. */ - title?: string; - /** A template to be used for rendering the widget title. */ - titleTemplate?: any; - width?: any; - /** Specifies items displayed on the top or bottom toolbar of the popup window. */ - buttons?: Array; - /** Specifies whether or not the widget displays the Close button. */ - showCloseButton?: boolean; - /** A handler for the titleRendered event. */ - onTitleRendered?: Function; - } - /** A widget that displays required content in a popup window. */ - export class dxPopup extends dxOverlay { - constructor(element: JQuery, options?: dxPopupOptions); - constructor(element: Element, options?: dxPopupOptions); - } - export interface dxPopoverOptions extends dxPopupOptions { - /** An object defining animation options of the widget. */ - animation?: fx.AnimationOptions; - /** Specifies the height of the widget. */ - height?: any; - /** An object defining widget positioning options. */ - position?: PositionOptions; - shading?: boolean; - /** A Boolean value specifying whether or not to display the title in the overlay window. */ - showTitle?: boolean; - /** The target element associated with a popover. */ - target?: any; - /** Specifies the width of the widget. */ - width?: any; - } - /** A widget that displays the required content in a popup window. */ - export class dxPopover extends dxPopup { - constructor(element: JQuery, options?: dxPopoverOptions); - constructor(element: Element, options?: dxPopoverOptions); - /** Displays the widget for the specified target element. */ - show(target?: any): JQueryPromise; - } - export interface dxOverlayOptions extends WidgetOptions { - /** An object that defines the animation options of the widget. */ - animation?: fx.AnimationOptions; - /** A Boolean value specifying whether or not the widget is closed if a user presses the Back hardware button. */ - closeOnBackButton?: boolean; - /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ - closeOnOutsideClick?: any; - /** A template to be used for rendering widget content. */ - contentTemplate?: any; - /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ - deferRendering?: boolean; - /** Specifies whether or not an end-user can drag the widget. */ - dragEnabled?: boolean; - /** The height of the widget in pixels. */ - height?: any; - /** A handler for the hidden event. */ - onHidden?: Function; - hiddenAction?: Function; - /** A handler for the hiding event. */ - onHiding?: Function; - hidingAction?: Function; - /** An object defining widget positioning options. */ - position?: PositionOptions; - /** A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ - shading?: boolean; - /** Specifies the shading color. */ - shadingColor?: string; - /** A handler for the showing event. */ - onShowing?: Function; - showingAction?: Function; - /** A handler for the shown event. */ - onShown?: Function; - shownAction?: Function; - /** A Boolean value specifying whether or not the widget is visible. */ - visible?: boolean; - /** The widget width in pixels. */ - width?: any; - } - /** A widget displaying the required content in an overlay window. */ - export class dxOverlay extends Widget { - constructor(element: JQuery, options?: dxOverlayOptions); - constructor(element: Element, options?: dxOverlayOptions); - /** An HTML element of the widget. */ - content(): JQuery; - /** Hides the widget. */ - hide(): JQueryPromise; - /** Recalculates the overlay's size and position. */ - repaint(): void; - /** Shows the widget. */ - show(): JQueryPromise; - /** Toggles the visibility of the widget. */ - toggle(showing: boolean): JQueryPromise; - /** A static method that specifies the default z-index for all overlay widgets. */ - static baseZIndex(zIndex: number): void; - } - export interface dxNumberBoxOptions extends dxTextEditorOptions { - /** The maximum value accepted by the number box. */ - max?: number; - /** The minimum value accepted by the number box. */ - min?: number; - /** Specifies whether or not to show spin buttons. */ - showSpinButtons?: boolean; - useTouchSpinButtons?: boolean; - /** Specifies by which value the widget value changes when a spin button is clicked. */ - step?: number; - /** The current number box value. */ - value?: number; - } - /** A textbox widget that enables a user to enter numeric values. */ - export class dxNumberBox extends dxTextEditor { - constructor(element: JQuery, options?: dxNumberBoxOptions); - constructor(element: Element, options?: dxNumberBoxOptions); - } - export interface dxNavBarOptions extends dxTabsOptions { - scrollingEnabled?: boolean; - } - /** A widget that contains items used to navigate through application views. */ - export class dxNavBar extends dxTabs { - constructor(element: JQuery, options?: dxNavBarOptions); - constructor(element: Element, options?: dxNavBarOptions); - } - export interface dxMultiViewOptions extends CollectionWidgetOptions { - /** Specifies whether or not to animate the displayed item change. */ - animationEnabled?: boolean; - /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ - loop?: boolean; - /** The index of the currently displayed item. */ - selectedIndex?: number; - /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ - swipeEnabled?: boolean; - } - /** A widget used to display a view and to switch between several views. */ - export class dxMultiView extends CollectionWidget { - constructor(element: JQuery, options?: dxMultiViewOptions); - constructor(element: Element, options?: dxMultiViewOptions); - } - export interface dxMapOptions extends WidgetOptions { - /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route. */ - autoAdjust?: boolean; - bounds?: { - northEast?: { - lat?: number; - lng?: number; - }; - southWest?: { - lat?: number; - lng?: number; - }; - /** An object, a string, or an array specifying the location displayed at the center of the widget. */ - center?: { - /** The latitude location displayed in the center of the widget. */ - lat?: number; - /** The longitude location displayed in the center of the widget. */ - lng?: number; - }; - /** A handler for the click event. */ - onClick?: any; - clickAction?: any; - /** Specifies whether or not map widget controls are available. */ - controls?: boolean; - /** Specifies the height of the widget. */ - height?: number; - /** A key used to authenticate the application within the required map provider. */ - key?: { - /** A key used to authenticate the application within the "Bing" map provider. */ - bing?: string; - /** A key used to authenticate the application within the "Google" map provider. */ - google?: string; - /** A key used to authenticate the application within the "Google Static" map provider. */ - googleStatic?: string; - } - /** - * An object, a string, or an array specifying the location displayed at the center of the widget. - * @deprecated center.md - */ - location?: { - lat?: number; - lng?: number; - }; - /** A handler for the markerAdded event. */ - onMarkerAdded?: Function; - markerAddedAction?: Function; - /** A URL pointing to the custom icon to be used for map markers. */ - markerIconSrc?: string; - /** A handler for the markerRemoved event. */ - onMarkerRemoved?: Function; - markerRemovedAction?: Function; - /** An array of markers displayed on a map. */ - markers?: Array; - /** The name of the current map data provider. */ - provider?: string; - /** A handler for the ready event. */ - onReady?: Function; - readyAction?: Function; - /** A handler for the routeAdded event. */ - onRouteAdded?: Function; - routeAddedAction?: Function; - /** A handler for the routeRemoved event. */ - onRouteRemoved?: Function; - routeRemovedAction?: Function; - /** An array of routes shown on the map. */ - routes?: Array; - /** The type of a map to display. */ - type?: string; - /** Specifies the width of the widget. */ - width?: number; - /** The zoom level of the map. */ - zoom?: number; - /** Adds a marker to the map. */ - addMarker(markerOptions: Object): JQueryPromise; - /** Adds a route to the map. */ - addRoute(options: Object): JQueryPromise; - /** Removes a marker from the map. */ - removeMarker(marker: Object): JQueryPromise; - /** Removes a route from the map. */ - removeRoute(route: any): JQueryPromise; - }; - } - /** An interactive map widget. */ - export class dxMap extends Widget { - constructor(element: JQuery, options?: dxMapOptions); - constructor(element: Element, options?: dxMapOptions); - } - export interface dxLookupOptions extends dxDropDownListOptions { - /** An object defining widget animation options. */ - animation?: fx.AnimationOptions; - autoPagingEnabled?: boolean; - /** The text displayed on the Cancel button. */ - cancelButtonText?: string; - /** The text displayed on the Clear button. */ - clearButtonText?: string; - /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlaying window. */ - closeOnOutsideClick?: any; - /** The text displayed on the Apply button. */ - applyButtonText?: string; - /** A Boolean value specifying whether or not to display the lookup in full-screen mode. */ - fullScreen?: boolean; - /** A Boolean value specifying whether or not to group widget items. */ - grouped?: boolean; - groupRender?: any; - /** The name of the template used to display a group header. */ - groupTemplate?: any; - /** The text displayed on the button used to load the next page from the data source. */ - nextButtonText?: string; - /** A handler for the pageLoading event. */ - onPageLoading?: Function; - pageLoadingAction?: Function; - /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ - pageLoadingText?: string; - /** The text displayed by the widget when nothing is selected. */ - placeholder?: string; - /** The height of the widget popup element. */ - popupHeight?: any; - /** The width of the widget popup element. */ - popupWidth?: any; - /** An object defining widget positioning options. */ - position?: PositionOptions; - /** Specifies the text displayed in the pullDown panel when the widget is pulled below the refresh threshold. */ - pulledDownText?: string; - /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ - pullingDownText?: string; - /** A handler for the pullRefresh event. */ - onPullRefresh?: Function; - pullRefreshAction?: Function; - /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ - pullRefreshEnabled?: boolean; - /** Specifies the text displayed in the pullDown panel while the widget is being refreshed. */ - refreshingText?: string; - /** A handler for the scroll event. */ - onScroll?: Function; - scrollAction?: Function; - /** A Boolean value specifying whether or not the search bar is visible. */ - searchEnabled?: boolean; - /** The text that is provided as a hint in the lookup's search bar. */ - searchPlaceholder?: string; - /** A Boolean value specifying whether or not the main screen is inactive while the lookup is active. */ - shading?: boolean; - /** Specifies whether to display the Cancel button in the lookup window. */ - showCancelButton?: boolean; - /** A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. */ - showNextButton?: boolean; - /** The title of the lookup window. */ - title?: string; - /** A template to be used for rendering the widget title. */ - titleTemplate?: any; - /** Specifies whether or not the widget uses native scrolling. */ - useNativeScrolling?: boolean; - /** Specifies whether or not to show lookup contents in a dxPopover widget. */ - usePopover?: boolean; - /** A handler for the valueChanged event. */ - onValueChanged?: Function; - contentReadyAction?: Function; - titleRender?: any; - /** A handler for the titleRendered event. */ - onTitleRendered?: Function; - /** Specifies whether or not the widget supports the focused state and keyboard navigation. */ - focusStateEnabled?: boolean; - } - /** A widget that allows a user to select predefined values from a lookup window. */ - export class dxLookup extends dxDropDownList { - constructor(element: JQuery, options?: dxLookupOptions); - constructor(element: Element, options?: dxLookupOptions); - /** This section lists the data source fields that are used in a default template for lookup drop-down items. */ - } - export interface dxLoadPanelOptions extends dxOverlayOptions { - /** An object defining the animation options of the widget. */ - animation?: fx.AnimationOptions; - /** The delay in milliseconds after which the load panel is displayed. */ - delay?: number; - /** The height of the widget. */ - height?: number; - /** A URL pointing to an image to be used as a load indicator. */ - indicatorSrc?: string; - /** The text displayed in the load panel. */ - message?: string; - /** A Boolean value specifying whether or not to show a load indicator. */ - showIndicator?: boolean; - /** A Boolean value specifying whether or not to show the pane behind the load indicator. */ - showPane?: boolean; - /** The width of the widget. */ - width?: number; - } - /** A widget used to indicate whether or not an element is loading. */ - export class dxLoadPanel extends dxOverlay { - constructor(element: JQuery, options?: dxLoadPanelOptions); - constructor(element: Element, options?: dxLoadPanelOptions); - } - export interface dxLoadIndicatorOptions extends WidgetOptions { - /** Specifies the path to an image used as the indicator. */ - indicatorSrc?: string; - } - /** The widget used to indicate the loading process. */ - export class dxLoadIndicator extends Widget { - constructor(element: JQuery, options?: dxLoadIndicatorOptions); - constructor(element: Element, options?: dxLoadIndicatorOptions); - } - export interface dxListOptions extends CollectionWidgetOptions { - /** A Boolean value specifying whether or not to load the next page from the data source when the list is scrolled to the bottom. */ - autoPagingEnabled?: boolean; - /** Specifies whether or not the widget displays items by pages. */ - pagingEnabled?: boolean; - /** An object used to set configuration options for the dxList's edit mode. */ - editConfig?: { - /** Specifies whether the list items can be deleted. */ - deleteEnabled?: boolean; - /** - * A mode specifying how to delete a list item. - * @deprecated deleteType.md - */ - deleteMode?: string; - /** Specifies the way a user can delete items from the list. */ - deleteType?: string; - itemRender?: any; - /** The template used to render list items in edit mode. */ - itemTemplate?: any; - /** Specifies the array of items for a context menu called for a list item. */ - menuItems?: Array; - /** Specifies whether an item context menu is shown when a user swipes or holds an item. */ - menuType?: string; - /** Specifies whether or not a user can reorder items. */ - reorderEnabled?: boolean; - /** Specifies whether the list items can be selected. */ - selectionEnabled?: boolean; - /** - * A mode specifying how to select a list item. - * @deprecated selectionType.md - */ - selectionMode?: string; - /** A type specifying how to select a list item. */ - selectionType?: string; - /** Specifies whether the item list represented by this widget is editable. */ - editEnabled?: boolean; - /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ - indicateLoading?: boolean; - }; - /** A Boolean value specifying whether or not to display a grouped list. */ - grouped?: boolean; - groupRender?: any; - /** The name of the template used to display a group header. */ - groupTemplate?: any; - onItemDeleting?: Function; - /** A handler for the itemDeleted event. */ - onItemDeleted?: Function; - itemDeleteAction?: Function; - /** A handler for the itemReordered event. */ - onItemReordered?: Function; - itemReorderAction?: Function; - /** A handler for the itemClick event. */ - onItemClick?: any; - /** A handler for the itemSwipe event. */ - onItemSwipe?: Function; - itemSwipeAction?: Function; - /** The text displayed on the button used to load the next page from the data source. */ - nextButtonText?: string; - /** A handler for the pageLoading event. */ - onPageLoading?: Function; - pageLoadingAction?: Function; - /** Specifies the text shown in the pullDown panel, which is displayed when the list is scrolled to the bottom. */ - pageLoadingText?: string; - /** Specifies the text displayed in the pullDown panel when the list is pulled below the refresh threshold. */ - pulledDownText?: string; - /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ - pullingDownText?: string; - /** A handler for the pullRefresh event. */ - onPullRefresh?: Function; - pullRefreshAction?: Function; - /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ - pullRefreshEnabled?: boolean; - /** Specifies the text displayed in the pullDown panel while the list is being refreshed. */ - refreshingText?: string; - /** A handler for the scroll event. */ - onScroll?: Function; - scrollAction?: Function; - /** A Boolean value specifying whether to enable or disable list scrolling. */ - scrollingEnabled?: boolean; - /** Specifies whether the list supports single item selection or multi-selection. */ - selectionMode?: string; - /** A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. */ - showNextButton?: boolean; - /** Specifies when the widget shows the scrollbar. */ - showScrollbar?: string; - /** Specifies whether or not the widget uses native scrolling. */ - useNativeScrolling?: boolean; - itemUnselectAction?: Function; - onItemContextMenu?: Function; - onItemHold?: Function; - /** Specifies whether or not an end-user can collapse groups. */ - collapsibleGroups?: boolean; - } - /** A list widget. */ - export class dxList extends CollectionWidget { - constructor(element: JQuery, options?: dxListOptions); - constructor(element: Element, options?: dxListOptions); - /** Returns the height of the widget in pixels. */ - clientHeight(): number; - /** Removes the specified item from the list. */ - deleteItem(itemIndex: any): JQueryPromise; - /** Removes the specified item from the list. */ - deleteItem(itemElement: Element): JQueryPromise; - /** Returns a Boolean value that indicates whether or not the specified item is selected. */ - isItemSelected(itemIndex: any): boolean; - /** Returns a Boolean value that indicates whether or not the specified item is selected. */ - isItemSelected(itemElement: Element): boolean; - /** - * Reloads list data. - * @deprecated Use the "reload" method instead. - */ - refresh(): void; - /** Reloads list data. */ - reload(): void; - /** Moves the specified item to the specified position in the list. */ - reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; - /** Moves the specified item to the specified position in the list. */ - reorderItem(itemIndex: any, toItemIndex: any): JQueryPromise; - /** Scrolls the list content by the specified number of pixels. */ - scrollBy(distance: number): void; - /** Returns the height of the list content in pixels. */ - scrollHeight(): number; - /** Scrolls list content to the specified position. */ - scrollTo(location: number): void; - /** Scrolls the list to the specified item. */ - scrollToItem(itemElement: Element): void; - /** Scrolls the list to the specified item. */ - scrollToItem(itemIndex: any): void; - /** Returns how far the list content is scrolled from the top. */ - scrollTop(): number; - /** Selects the specified item from the list. */ - selectItem(itemElement: Element): void; - /** Selects the specified item from the list. */ - selectItem(itemIndex: any): void; - /** Deselects the specified item from the list. */ - unselectItem(itemElement: Element): void; - /** Unselects the specified item from the list. */ - unselectItem(itemIndex: any): void; - /** - * Updates the widget scrollbar according to widget content size. - * @deprecated updateDimensions.md - */ - update(): JQueryPromise; - /** Updates the widget scrollbar according to widget content size. */ - updateDimensions(): JQueryPromise; - /** Expands the specified group. */ - expandGroup(groupIndex: number): JQueryPromise; - /** Collapses the specified group. */ - collapseGroup(groupIndex: number): JQueryPromise; - } - export interface dxGalleryOptions extends CollectionWidgetOptions { - /** The time, in milliseconds, spent on slide animation. */ - animationDuration?: number; - /** Specifies whether or not to animate the displayed item change. */ - animationEnabled?: boolean; - /** A Boolean value specifying whether or not to allow users to switch between items by clicking an indicator. */ - indicatorEnabled?: boolean; - /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ - loop?: boolean; - /** The index of the currently active gallery item. */ - selectedIndex?: number; - /** A Boolean value specifying whether or not to display an indicator that points to the selected gallery item. */ - showIndicator?: boolean; - /** A Boolean value that specifies the availability of the "Forward" and "Back" navigation buttons. */ - showNavButtons?: boolean; - /** The time interval in milliseconds, after which the gallery switches to the next item. */ - slideshowDelay?: number; - /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ - swipeEnabled?: boolean; - } - /** An image gallery widget. */ - export class dxGallery extends CollectionWidget { - constructor(element: JQuery, options?: dxGalleryOptions); - constructor(element: Element, options?: dxGalleryOptions); - /** Shows the specified gallery item. */ - goToItem(itemIndex: number, animation: boolean): JQueryPromise; - /** Shows the next gallery item. */ - nextItem(animation: boolean): JQueryPromise; - /** Shows the previous gallery item. */ - prevItem(animation: boolean): JQueryPromise; - } - export interface dxDropDownEditorOptions extends dxTextBoxOptions { - /** Specifies the current value displayed by the widget. */ - value?: Object; - /** A handler for the closed event. */ - onClosed?: Function; - /** A handler for the opened event. */ - onOpened?: Function; - /** Specifies whether or not the drop-down editor is displayed. */ - opened?: boolean; - closeAction?: Function; - openAction?: Function; - shownAction?: Function; - hiddenAction?: Function; - /** Specifies whether or not the widget allows an end-user to enter a custom value. */ - fieldEditEnabled?: boolean; - editEnabled?: boolean; - /** Specifies the way an end-user applies the selected value. */ - applyValueMode?: string; - /** Specifies whether or not the widget supports the focused state and keyboard navigation. */ - focusStateEnabled?: boolean; - } - /** A drop-down editor widget. */ - export class dxDropDownEditor extends dxTextBox { - constructor(element: JQuery, options?: dxDropDownEditorOptions); - constructor(element: Element, options?: dxDropDownEditorOptions); - /** Closes the drop-down editor. */ - close(): void; - /** Opens the drop-down editor. */ - open(): void; - /** Resets the widget's value to null. */ - reset(): void; - } - export interface dxDateBoxOptions extends dxTextEditorOptions { - /** A format used to display date/time information. */ - format?: string; - /** A Globalize format string specifying the date display format. */ - formatString?: string; - /** The last date that can be selected within the widget. */ - max?: Date; - /** The minimum date that can be selected within the widget. */ - min?: Date; - /** The text displayed by the widget when the widget value is not yet specified. This text is also used as a title of the date picker. */ - placeholder?: string; - /** Specifies whether or not a user can pick out a date using the drop-down calendar. */ - useCalendar?: boolean; - /** A Date object specifying the date and time currently selected using the date box. */ - value?: Date; - /** Specifies whether or not the widget uses the native HTML input element. */ - useNative?: boolean; - /** Specifies the interval between neighboring values in the popup list in minutes. */ - interval?: number; - } - /** A date box widget. */ - export class dxDateBox extends dxDropDownEditor { - constructor(element: JQuery, options?: dxDateBoxOptions); - constructor(element: Element, options?: dxDateBoxOptions); - } - export interface dxCheckBoxOptions extends EditorOptions { - checked?: boolean; - /** Specifies the widget state. */ - value?: boolean; - /** Specifies the text displayed by the check box. */ - text?: string; - } - /** A check box widget. */ - export class dxCheckBox extends Editor { - constructor(element: JQuery, options?: dxCheckBoxOptions); - constructor(element: Element, options?: dxCheckBoxOptions); - } - export interface dxCalendarOptions extends EditorOptions { - /** Specifies a date displayed on the current calendar page. */ - currentDate?: Date; - /** Specifies the first day of a week. */ - firstDayOfWeek?: number; - /** The latest date the widget allows to select. */ - max?: Date; - /** The earliest date the widget allows to select. */ - min?: Date; - } - /** A calendar widget. */ - export class dxCalendar extends Editor { - constructor(element: JQuery, options?: dxCalendarOptions); - constructor(element: Element, options?: dxCalendarOptions); - } - export interface dxButtonOptions extends WidgetOptions { - /** A handler for the click event. */ - onClick?: any; - clickAction?: any; - /** The name of an icon to be displayed on the button. */ - icon?: string; - /** A URL pointing to the image to be displayed on the button. */ - iconSrc?: string; - /** The text displayed on the button. */ - text?: string; - /** Specifies the button type. */ - type?: string; - /** Specifies the name of the validation group to be accessed in the click event handler. */ - validationGroup?: string; - } - /** A button widget. */ - export class dxButton extends Widget { - constructor(element: JQuery, options?: dxButtonOptions); - constructor(element: Element, options?: dxButtonOptions); - } - export interface dxBoxOptions extends CollectionWidget { - /** Specifies how widget items are aligned along the main direction. */ - align?: string; - /** Specifies the direction of item positioning in the widget. */ - direction?: string; - /** Specifies how widget items are aligned cross-wise. */ - crossAlign?: string; - } - /** A container widget used to arrange inner elements. */ - export class dxBox extends CollectionWidget { - constructor(element: JQuery, options?: dxBoxOptions); - constructor(element: Element, options?: dxBoxOptions); - } - export interface dxResponsiveBoxOptions extends CollectionWidgetOptions { - /** Specifies the collection of rows for the grid used to position layout elements. */ - rows?: Array; - /** Specifies the collection of columns for the grid used to position layout elements. */ - cols?: Array; - /** Specifies the function returning the screen factor depending on the screen width. */ - screenByWidth?: (width: number) => string; - /** Specifies the screen factor with which all elements are located in a single column. */ - singleColumnScreen?: string; - } - /** A widget used to build an adaptive markup that is dependent on screen resolution. */ - export class dxResponsiveBox extends CollectionWidget { - constructor(element: JQuery, options?: dxBoxOptions); - constructor(element: Element, options?: dxBoxOptions); - } - export interface dxAutocompleteOptions extends dxDropDownListOptions { - /** Specifies the current value displayed by the widget. */ - value?: string; - /** The minimum number of characters that must be entered into the text box to begin a search. */ - minSearchLength?: number; - /** Specifies the maximum count of items displayed by the widget. */ - maxItemCount?: number; - /** Specifies the currently selected item. */ - selectedItem?: Object; - } - /** A textbox widget that supports autocompletion. */ - export class dxAutocomplete extends dxDropDownList { - constructor(element: JQuery, options?: dxAutocompleteOptions); - constructor(element: Element, options?: dxAutocompleteOptions); - /** Opens the drop-down editor. */ - open(): void; - /** Closes the drop-down editor. */ - close(): void; - } - export interface dxAccordionOptions extends CollectionWidgetOptions { - /** A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel. */ - animationDuration?: number; - /** Specifies the height of the widget. */ - height?: any; - /** Specifies whether all items can be collapsed or whether at least one item must always be expanded. */ - collapsible?: boolean; - /** Specifies whether the widget can expand several items or only a single item at once. */ - multiple?: boolean; - /** The template to be used for rendering dxAccordion items. */ - itemTemplate?: any; - /** A handler for the itemTitleClick event. */ - onItemTitleClick?: any; - /** A handler for the itemTitleHold event. */ - onItemTitleHold?: Function; - /** The template to be used for rendering an item title. */ - itemTitleTemplate?: any; - /** The index number of the currently selected item. */ - selectedIndex?: number; - } - /** A widget that displays data source items on collapsible panels. */ - export class dxAccordion extends CollectionWidget { - constructor(element: JQuery, options?: dxAccordionOptions); - constructor(element: Element, options?: dxAccordionOptions); - /** Collapses the specified item. */ - collapseItem(index: number): JQueryPromise; - /** Expands the specified item. */ - expandItem(index: number): JQueryPromise; - } - export interface dxFileUploaderOptions extends EditorOptions { - /** A read-only option that holds a File instance representing the selected file. */ - value?: File; - /** Holds the File instances representing files selected in the widget. */ - values?: Array; - /** Specifies the text displayed on the button opening the file selection dialog. */ - buttonText?: string; - /** Specifies the text displayed on the area to which an end-user can drop a file. */ - labelText?: string; - /** Specifies the value passed to the name attribute of the underlying input element. */ - name?: string; - /** Specifies whether the widget enables an end-user to select a single file or multiple files. */ - multiple?: boolean; - /** Specifies a file type or several types accepted by the widget. */ - accept?: string; - } - /** A widget used to select and upload a file or multiple files. */ - export class dxFileUploader extends Editor { - constructor(element: JQuery, options?: dxFileUploaderOptions); - constructor(element: Element, options?: dxFileUploaderOptions); - } - export interface dxTrackBarOptions extends EditorOptions { - /** The minimum value the widget can accept. */ - min?: number; - /** The maximum value the widget can accept. */ - max?: number; - /** The current widget value. */ - value?: number; - } - /** A base class for track bar widgets. */ - export class dxTrackBar extends Editor { - constructor(element: JQuery, options?: dxTrackBarOptions); - constructor(element: Element, options?: dxTrackBarOptions); - } - export interface dxProgressBarOptions extends dxTrackBarOptions { - /** Specifies a format for the progress status. */ - statusFormat?: any; - /** Specifies whether or not the widget displays a progress status. */ - showStatus?: boolean; - /** A handler for the complete event. */ - onComplete?: Function; - } - /** A widget used to indicate progress. */ - export class dxProgressBar extends dxTrackBar { - constructor(element: JQuery, options?: dxProgressBarOptions); - constructor(element: Element, options?: dxProgressBarOptions); - } - export interface dxSliderOptions extends dxTrackBarOptions { - /** The slider step size. */ - step?: number; - /** The current slider value. */ - value?: number; - /** Specifies whether or not to highlight a range selected within the widget. */ - showRange?: boolean; - /** Specifies options for the slider tooltip. */ - tooltip?: { - /** Specifies whether or not the tooltip is enabled. */ - enabled?: boolean; - /** Specifies format for the tooltip. */ - format?: any; - /** Specifies whether the tooltip is located over or under the slider. */ - position?: string; - /** Specifies whether the widget always shows a tooltip or only when a pointer is over the slider. */ - showMode?: string; - }; - /** Specifies options for labels displayed at the min and max values. */ - label?: { - /** Specifies whether or not slider labels are visible. */ - visible?: boolean; - /** Specifies whether labels are located over or under the scale. */ - position?: string; - /** Specifies a format for labels. */ - format?: any; - }; - } - /** A widget that allows a user to select a numeric value within a given range. */ - export class dxSlider extends dxTrackBar { - constructor(element: JQuery, options?: dxSliderOptions); - constructor(element: Element, options?: dxSliderOptions); - } - export interface dxRangeSliderOptions extends dxSliderOptions { - /** The left edge of the interval currently selected using the range slider. */ - start?: number; - /** The right edge of the interval currently selected using the range slider. */ - end?: number; - } - /** A widget that enables a user to select a range of numeric values. */ - export class dxRangeSlider extends dxSlider { - constructor(element: JQuery, options?: dxRangeSliderOptions); - constructor(element: Element, options?: dxRangeSliderOptions); - } - export interface dxTileViewOptions extends CollectionWidgetOptions { - /** Specifies the height of the base tile view item. */ - baseItemHeight?: number; - /** Specifies the width of the base tile view item. */ - baseItemWidth?: number; - /** Specifies the height of the widget. */ - height?: any; - /** Specifies the distance in pixels between adjacent tiles. */ - itemMargin?: number; - listHeight?: any; - /** A Boolean value specifying whether or not to display a scrollbar. */ - showScrollbar?: boolean; - } - /** A widget displaying several blocks of data as tiles. */ - export class dxTileView extends CollectionWidget { - constructor(element: JQuery, options?: dxTileViewOptions); - constructor(element: Element, options?: dxTileViewOptions); - /** Returns the current scroll position of the widget content. */ - scrollPosition(): number; - } - export interface dxSwitchOptions extends EditorOptions { - /** Text displayed when the widget is in a disabled state. */ - offText?: string; - /** Text displayed when the widget is in an enabled state. */ - onText?: string; - /** A Boolean value specifying whether the current switch state is "On" or "Off". */ - value?: boolean; - } - /** A switch widget. */ - export class dxSwitch extends Editor { - constructor(element: JQuery, options?: dxSwitchOptions); - constructor(element: Element, options?: dxSwitchOptions); - } - export interface dxSlideOutOptions extends CollectionWidgetOptions { - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** A Boolean value specifying whether or not to display a grouped menu. */ - menuGrouped?: boolean; - menuGroupRender?: any; - /** The name of the template used to display a group header. */ - menuGroupTemplate?: any; - menuItemRender?: any; - /** The template used to render menu items. */ - menuItemTemplate?: any; - /** Specifies whether or not the slide-out menu is displayed. */ - menuVisible?: boolean; - /** Indicates whether the menu can be shown/hidden by swiping the widget's main panel. */ - swipeEnabled?: boolean; - /** A template to be used for rendering widget content. */ - contentTemplate?: any; - } - /** The widget that allows you to slide-out the current view to reveal an item list. */ - export class dxSlideOut extends CollectionWidget { - constructor(element: JQuery, options?: dxSlideOutOptions); - constructor(element: Element, options?: dxSlideOutOptions); - /** Hides the widget's slide-out menu. */ - hideMenu(): JQueryPromise; - /** Displays the widget's slide-out menu. */ - showMenu(): JQueryPromise; - /** Toggles the visibility of the widget's slide-out menu. */ - toggleMenuVisibility(showing: boolean): JQueryPromise; - } - export interface dxPivotOptions extends CollectionWidgetOptions { - /** The index of the currently active pivot item. */ - selectedIndex?: number; - /** A template to be used for rendering widget content. */ - contentTemplate?: any; - } - /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ - export class dxPivot extends CollectionWidget { - constructor(element: JQuery, options?: dxPivotOptions); - constructor(element: Element, options?: dxPivotOptions); - } - export interface dxPanoramaOptions extends CollectionWidgetOptions { - /** An object exposing options for setting a background image for the panorama. */ - backgroundImage?: { - /** Specifies the height of the panorama's background image. */ - height?: number; - /** Specifies the URL of the image that is used as the panorama's background image. */ - url?: string; - /** Specifies the width of the panorama's background image. */ - width?: number; - }; - /** The index of the currently active panorama item. */ - selectedIndex?: number; - /** Specifies the widget content title. */ - title?: string; - } - /** A widget displaying the required content in a long horizontal canvas that extends beyond the frames of the screen. */ - export class dxPanorama extends CollectionWidget { - constructor(element: JQuery, options?: dxDropDownEditorOptions); - constructor(element: Element, options?: dxDropDownEditorOptions); - } - export interface dxDropDownMenuOptions extends WidgetOptions { - /** A handler for the buttonClick event. */ - onButtonClick?: any; - buttonClickAction?: any; - /** The name of the icon to be displayed by the DropDownMenu button. */ - buttonIcon?: string; - /** A URL pointing to the image to be displayed by the DropDownMenu button. */ - buttonIconSrc?: string; - /** The text displayed in the DropDownMenu button. */ - buttonText?: string; - /** A data source used to fetch data to be displayed by the widget. */ - dataSource?: any; - /** A handler for the itemClick event. */ - onItemClick?: any; - itemClickAction?: any; - itemRender?: any; - /** An array of items displayed by the widget. */ - items?: Array; - /** The template to be used for rendering items. */ - itemTemplate?: any; - /** Specifies whether or not to show the drop down menu within a dxPopover widget. */ - usePopover?: boolean; - /** The width of the menu popup in pixels. */ - popupWidth?: any; - /** The height of the menu popup in pixels. */ - popupHeight?: any; - /** Specifies whether or not the drop-down menu is displayed. */ - opened?: boolean; - /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ - hoverStateEnabled?: boolean; - } - /** A drop-down menu widget. */ - export class dxDropDownMenu extends Widget { - constructor(element: JQuery, options?: dxDropDownEditorOptions); - constructor(element: Element, options?: dxDropDownEditorOptions); - /** This section lists the data source fields that are used in a default template for drop-down menu items. */ - /** Opens the drop-down menu. */ - open(): void; - /** Closes the drop-down menu. */ - close(): void; - } - export interface dxActionSheetOptions extends CollectionWidgetOptions { - cancelClickAction?: any; - /** A handler for the cancelClick event. */ - onCancelClick?: any; - /** The text displayed in the button that closes the action sheet. */ - cancelText?: string; - /** Specifies whether or not to display the Cancel button in action sheet. */ - showCancelButton?: boolean; - /** A Boolean value specifying whether or not the title of the action sheet is visible. */ - showTitle?: boolean; - /** Specifies the element the action sheet popover points at. */ - target?: any; - /** The title of the action sheet. */ - title?: string; - /** Specifies whether or not to show the action sheet within a dxPopover widget. */ - usePopover?: boolean; - /** A Boolean value specifying whether or not the dxActionSheet widget is visible. */ - visible?: boolean; - } - /** A widget consisting of a set of choices related to a certain task. */ - export class dxActionSheet extends CollectionWidget { - constructor(element: JQuery, options?: dxActionSheetOptions); - constructor(element: Element, options?: dxActionSheetOptions); - /** Hides the widget. */ - hide(): JQueryPromise; - /** Shows the widget. */ - show(): JQueryPromise; - /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ - toggle(showing: boolean): JQueryPromise; - } - export interface dxColorBoxOptions extends dxDropDownEditorOptions { - /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ - applyButtonText?: string; - applyValueMode?: string; - /** Specifies the text displayed on the button that cancels changes and closes the drop-down editor. */ - cancelButtonText?: string; - /** Specifies whether or not the widget value includes the alpha channel component. */ - editAlphaChannel?: boolean; - } - /** A widget used to specify a color value. */ - export class dxColorBox extends dxDropDownEditor { - constructor(element: JQuery, options?: dxColorBoxOptions); - constructor(element: Element, options?: dxColorBoxOptions); - } - export interface dxColorPickerOptions extends dxColorBoxOptions { } - /** - * A widget used to specify a color value. - * @deprecated Use the dxColorBox widget instead - */ - export class dxColorPicker extends dxColorBox { - constructor(element: JQuery, options?: dxColorPickerOptions); - constructor(element: Element, options?: dxColorPickerOptions); - } - export interface dxTreeViewOptions extends CollectionWidgetOptions { - /** Specifies whether a nested or plain array is used as a data source. */ - dataStructure?: string; - /** Specifies whether or not a user can expand all tree view items by the "*" hot key. */ - expandAllEnabled?: boolean; - /** - * An array of currently expanded item objects. - * @deprecated Use item.expanded field instead - */ - expandedItems?: Array; - /** Specifies whether or not a check box is displayed at each tree view item. */ - showCheckBoxes?: boolean; - /** Specifies whether or not to select nodes recursively. */ - selectNodesRecursive?: boolean; - /** Specifies whether the "Select All" check box is displayed over the tree view. */ - selectAllEnabled?: boolean; - /** Specifies the text displayed at the "Select All" check box. */ - selectAllText?: string; - /** Specifies the name of the data source item field used as a key. */ - keyExpr?: any; - /** Specifies the name of the data source item field whose value is displayed by the widget. */ - displayExpr?: any; - /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is selected. */ - selectedExpr?: any; - /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is expanded. */ - expandedExpr?: any; - /** Specifies the name of the data source item field that contains an array of nested items. */ - itemsExpr?: any; - /** Specifies the name of the data source item field that holds the key of the parent item. */ - parentIdExpr?: any; - disabledExpr?: any; - /** A string value specifying available scrolling directions. */ - scrollDirection?: string; - /** A handler for the itemSelected event. */ - onItemSelected?: Function; - /** A handler for the itemExpanded event. */ - onItemExpanded?: Function; - /** A handler for the itemCollapsed event. */ - onItemCollapsed?: Function; - } - /** A widget displaying specified data items as a tree. */ - export class dxTreeView extends CollectionWidget { - constructor(element: JQuery, options?: dxTreeViewOptions); - constructor(element: Element, options?: dxTreeViewOptions); - /** Updates the tree view scrollbars according to the current size of the widget content. */ - updateDimensions(): JQueryPromise; - /** Selects the specified item. */ - selectItem(itemElement: any): void; - /** Unselects the specified item. */ - unselectItem(itemElement: any): void; - /** Expands the specified item. */ - expandItem(itemElement: any): void; - /** Collapses the specified item. */ - collapseItem(itemElement: any): void; - /** Returns all nodes of the tree view. */ - getNodes(): Array; - /** Selects all widget items. */ - selectAll(): void; - /** Unselects all widget items. */ - unselectAll(): void; - } - export interface dxMenuBaseOptions extends CollectionWidgetOptions { - /** An object that defines the animation options of the widget. */ - animation?: fx.AnimationOptions; - /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ - activeStateEnabled?: boolean; - /** Specifies the name of the CSS class associated with the menu. */ - cssClass?: string; - /** Holds an array of menu items. */ - items?: Array; - /** Specifies whether or not an item becomes selected if an end-user clicks it. */ - selectionByClick?: boolean; - /** Specifies the selection mode supported by the menu. */ - selectionMode?: string; - /** Specifies the user interaction by which submenus are shown. */ - showSubmenuMode?: string; - /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ - hoverStateEnabled?: boolean; - } - export class dxMenuBase extends CollectionWidget { - constructor(element: JQuery, options?: dxMenuBaseOptions); - constructor(element: Element, options?: dxMenuBaseOptions); - /** Selects the specified item. */ - selectItem(itemElement: any): void; - /** Unselects the specified item. */ - unselectItem(itemElement: any): void; - } - export interface dxMenuOptions extends dxMenuBaseOptions { - firstSubMenuDirection?: string; - /** Specifies whether the menu has horizontal or vertical orientation. */ - orientation?: string; - /** Specifies by which user interaction the first-level submenu is shown. */ - showFirstSubmenuMode?: string; - showPopupMode?: string; - /** Specifies the direction at which the submenus are displayed. */ - submenuDirection?: string; - /** A handler for the submenuHidden event. */ - onSubmenuHidden?: Function; - submenuHiddenAction?: Function; - /** A handler for the submenuHiding event. */ - onSubmenuHiding?: Function; - submenuHidingAction?: Function; - /** A handler for the submenuShowing event. */ - onSubmenuShowing?: Function; - submenuShowingAction?: Function; - /** A handler for the submenuShown event. */ - onSubmenuShown?: Function; - submenuShownAction?: Function; - } - /** A menu widget. */ - export class dxMenu extends dxMenuBase { - constructor(element: JQuery, options?: dxMenuOptions); - constructor(element: Element, options?: dxMenuOptions); - } - export interface dxContextMenuOptions extends dxMenuBaseOptions { - direction?: string; - hiddenAction?: Function; - hidingAction?: Function; - /** Specifies whether the context menu can be called only from code or by user interaction as well. */ - invokeOnlyFromCode?: boolean; - /** A handler for the hidden event. */ - onHidden?: Function; - /** A handler for the hiding event. */ - onHiding?: Function; - /** A handler for the positioning event. */ - onPositioning?: Function; - /** A handler for the showing event. */ - onShowing?: Function; - /** A handler for the shown event. */ - onShown?: Function; - /** An object defining widget positioning options. */ - position?: PositionOptions; - positioningAction?: Function; - showingAction?: Function; - shownAction?: Function; - /** Specifies the direction at which submenus are displayed. */ - submenuDirection?: string; - /** The target element associated with a popover. */ - target?: any; - /** A Boolean value specifying whether or not the widget is visible. */ - visible?: boolean; - } - /** A context menu widget. */ - export class dxContextMenu extends dxMenuBase { - constructor(element: JQuery, options?: dxContextMenuOptions); - constructor(element: Element, options?: dxContextMenuOptions); - /** Toggles the visibility of the widget. */ - toggle(showing: boolean): JQueryPromise; - /** Shows the widget. */ - show(): JQueryPromise; - /** Hides the widget. */ - hide(): JQueryPromise; - } - export interface dxRemoteOperations { - /** Specifies whether or not filtering must be performed on the server side. */ - filtering?: boolean; - /** Specifies whether or not paging must be performed on the server side. */ - paging?: boolean; - /** Specifies whether or not sorting must be performed on the server side. */ - sorting?: boolean; - } - export interface dxDataGridColumn { - /** Specifies the content alignment within column cells. */ - alignment?: string; - /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ - allowEditing?: boolean; - /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row or search panel is visible. */ - allowFiltering?: boolean; - /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ - allowGrouping?: boolean; - /** Specifies whether or not a column can be hidden by a user. Setting this option makes sense only when the column chooser is visible. */ - allowHiding?: boolean; - /** Specifies whether or not a particular column can be used in column reordering. Setting this option makes sense only when the allowColumnReordering option is set to true. */ - allowReordering?: boolean; - /** Specifies whether or not a particular column can be resized by a user. Setting this option makes sense only when the allowColumnResizing option is true. */ - allowResizing?: boolean; - /** Specifies whether grid records can be sorted by a specific column at runtime. Setting this option makes sense only when the sorting mode differs from none. */ - allowSorting?: boolean; - /** Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this option makes sense only when grouping is allowed for this column. */ - autoExpandGroup?: boolean; - /** Specifies a callback function that returns a value to be displayed in a column cell. */ - calculateCellValue?: (rowData: Object) => string; - /** Specifies a callback function that defines filters for customary calculated grid cells. */ - calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string) => Array; - /** Specifies a caption for a column. */ - caption?: string; - /** Specifies a custom template for grid column cells. */ - cellTemplate?: any; - /** Specifies a CSS class to be applied to a column. */ - cssClass?: string; - /** Specifies a callback function that determines grouping values. */ - calculateGroupValue?: (rowData: Object) => string; - /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ - customizeText?: (cellInfo: { value: any; valueText: string }) => string; - /** Specifies the field of a data source that provides data for a column. */ - dataField?: string; - /** Specifies the required type of column values. */ - dataType?: string; - /** Specifies a custom template for the cell of a grid column when it is in an editing state. */ - editCellTemplate?: any; - /** Specifies whether HTML tags are displayed as plain text or applied to the values of the column. */ - encodeHtml?: boolean; - /** In a boolean column, replaces all false items with a specified text. */ - falseText?: string; - /** Specifies the set of available filter operations. */ - filterOperations?: Array; - /** Specifies a filter value for a column. */ - filterValue?: any; - /** Specifies a format for the values displayed in a column. */ - format?: string; - /** Specifies a custom template for the group cell of a grid column. */ - groupCellTemplate?: any; - /** Specifies the index of a column when grid records are grouped by the values of this column. */ - groupIndex?: number; - /** Specifies a custom template for the header of a grid column. */ - headerCellTemplate?: any; - /** Specifies options of a lookup column. */ - lookup?: { - /** Specifies whether or not a user can nullify values of a lookup column. */ - allowClearing?: boolean; - /** -Specifies the data source providing data for a lookup column. - */ - dataSource?: any; - /** Specifies the expression defining the data source field whose values must be displayed. */ - displayExpr?: any; - /** Specifies the expression defining the data source field whose values must be replaced. */ - valueExpr?: string; - }; - /** Specifies a precision for formatted values displayed in a column. */ - precision?: number; - /** Specifies a filter operation applied to a column. */ - selectedFilterOperation?: string; - /** Specifies whether or not the column displays its values by using editors. */ - showEditorAlways?: boolean; - /** Specifies whether or not to display the column when grid records are grouped by it. */ - showWhenGrouped?: boolean; - /** Specifies the index of a column when grid records are sorted by the values of this column. */ - sortIndex?: number; - /** Specifies the initial sort order of column values. */ - sortOrder?: string; - /** In a boolean column, replaces all true items with a specified text. */ - trueText?: string; - /** Specifies whether a column is visible or not. */ - visible?: boolean; - /** Specifies the sequence number of the column in the grid. */ - visibleIndex?: number; - /** Specifies a column width in pixels or percentages. */ - width?: any; - /** Specifies an array of validation rules to be checked when updating column cell values. */ - validationRules?: Array; - /** Specifies whether or not to display the header of a hidden column in the column chooser. */ - showInColumnChooser?: boolean; - /** Specifies the identifier of the column. */ - name?: string; - } - export interface dxDataGridOptions extends WidgetOptions { - /** Specifies whether the outer borders of the grid are visible or not. */ - showBorders?: boolean; - /** Indicates whether to show the error row for the grid. */ - errorRowEnabled?: boolean; - /** A handler for the rowValidating event. */ - onRowValidating?: (e: Object) => void; - initNewRow?: (e: { data: Object }) => void; - /** A handler for the initNewRow event. */ - onInitNewRow?: (e: { data: Object }) => void; - rowInserted?: (e: { data: Object; key: any }) => void; - /** A handler for the rowInserted event. */ - onRowInserted?: (e: { data: Object; key: any }) => void; - rowInserting?: (e: { data: Object; cancel: boolean }) => void; - /** A handler for the rowInserting event. */ - onRowInserting?: (e: { data: Object; cancel: boolean }) => void; - rowRemoved?: (e: { data: Object; key: any }) => void; - /** A handler for the rowRemoved event. */ - onRowRemoved?: (e: { data: Object; key: any }) => void; - rowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; - /** A handler for the rowRemoving event. */ - onRowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; - rowUpdated?: (e: { data: Object; key: any }) => void; - /** A handler for the rowUpdated event. */ - onRowUpdated?: (e: { data: Object; key: any }) => void; - rowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; - /** A handler for the rowUpdating event. */ - onRowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; - /** Enables a hint that appears when a user hovers the mouse pointer over a cell with truncated content. */ - cellHintEnabled?: boolean; - /** Specifies whether or not grid columns can be reordered by a user. */ - allowColumnReordering?: boolean; - /** Specifies whether or not grid columns can be resized by a user. */ - allowColumnResizing?: boolean; - cellClick?: any; - /** A handler for the cellClick event. */ - onCellClick?: any; - cellHoverChanged?: (e: Object) => void; - /** A handler for the cellHoverChanged event. */ - onCellHoverChanged?: (e: Object) => void; - cellPrepared?: (e: Object) => void; - /** A handler for the cellPrepared event. */ - onCellPrepared?: (e: Object) => void; - /** Specifies whether or not the width of grid columns depends on column content. */ - columnAutoWidth?: boolean; - /** Specifies the options of a column chooser. */ - columnChooser?: { - /** Specifies text displayed by the column chooser panel when it does not contain any columns. */ - emptyPanelText?: string; - /** Specifies whether a user can invoke the column chooser or not. */ - enabled?: boolean; - /** Specifies the height of the column chooser panel. */ - height?: number; - /** Specifies text displayed in the title of the column chooser panel. */ - title?: string; - /** Specifies the width of the column chooser panel. */ - width?: number; - }; - /** -An array of grid columns. - */ - columns?: Array; - onContentReady?: Function; - contentReadyAction?: Function; - /** Specifies a function that customizes grid columns after they are created. */ - customizeColumns?: (columns: Array) => void; - dataErrorOccurred?: (errorObject: Error) => void; - /** Specifies a data source for the grid. */ - dataSource?: any; - editingStart?: (e: { - data: Object; - key: any; - cancel: boolean; - column: dxDataGridColumn - }) => void; - /** A handler for the editingStart event. */ - onEditingStart?: (e: { - data: Object; - key: any; - cancel: boolean; - column: dxDataGridColumn - }) => void; - editorPrepared?: (e: Object) => void; - /** A handler for the editorPrepared event. */ - onEditorPrepared?: (e: Object) => void; - editorPreparing?: (e: Object) => void; - /** A handler for the editorPreparing event. */ - onEditorPreparing?: (e: Object) => void; - /** Contains options that specify how grid content can be changed. */ - editing?: { - /** Specifies whether or not grid records can be edited at runtime. */ - editEnabled?: boolean; - /** Specifies how grid values can be edited manually. */ - editMode?: string; - /** Specifies whether or not new records can be inserted into a grid. */ - insertEnabled?: boolean; - /** Specifies whether or not records can be deleted from a grid. */ - removeEnabled?: boolean; - /** Contains options that specify texts for editing-related grid controls. */ - texts?: { - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Save" button. Setting this option makes sense only when the editMode option is set to batch. */ - saveAllChanges?: string; - /** Specifies text for a cancel button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ - cancelRowChanges?: string; - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Revert" button. Setting this option makes sense only when the editMode option is set to batch. */ - cancelAllChanges?: string; - /** Specifies a message to be displayed by a confirmation window. Setting this option makes sense only when the edit mode is "row". */ - confirmDeleteMessage?: string; - /** Specifies text to be displayed in the title of a confirmation window. Setting this option makes sense only when the edit mode is "row". */ - confirmDeleteTitle?: string; - /** Specifies text for a button that deletes a row from a grid. Setting this option makes sense only when the removeEnabled option is set to true. */ - deleteRow?: string; - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Add" button. Setting this option makes sense only when the insertEnabled option is true. */ - addRow?: string; - /** Specifies text for a button that turns a row into the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ - editRow?: string; - /** - * Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the removeEnabled option is set to true. - * @deprecated Use the "undeleteRow" option instead. - */ - recoverRow?: string; - /** Specifies text for a save button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ - saveRowChanges?: string; - /** Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the removeEnabled option is set to true. */ - undeleteRow?: string; - }; - }; - /** Specifies filter row options. */ - filterRow?: { - /** Specifies when to apply a filter. */ - applyFilter?: string; - /** Specifies text for the hint that pops up when a user hovers the mouse pointer over the "Apply Filter" button. */ - applyFilterText?: string; - /** Specifies descriptions for filter operations. */ - operationDescriptions?: { - "=": string; - "<>": string; - "<": string; - "<=": string; - ">": string; - ">=": string; - "startswith": string; - "contains": string; - "notcontains": string; - "endswith": string; - }; - /** Specifies text for the reset operation in a filter list. */ - resetOperationText?: string; - /** Specifies text for the operation of clearing the applied filter when a select box is used. */ - showAllText?: string; - /** Specifies whether or not an icon that allows the user to choose a filter operation is visible. */ - showOperationChooser?: boolean; - /** Specifies whether the filter row is visible or not. */ - visible?: boolean; - }; - /** Specifies the behavior of grouped grid records. */ - grouping?: { - /** Specifies whether the user can collapse grouped records in a grid or not. */ - allowCollapsing?: boolean; - /** Specifies whether groups appear expanded or not. */ - autoExpandAll?: boolean; - /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ - groupContinuedMessage?: string; - /** -Specifies the message displayed in a group row when the corresponding group continues on the next page. - */ - groupContinuesMessage?: string; - }; - /** Specifies options that configure the group panel. */ - groupPanel?: { - /** Specifies whether columns can be dragged onto or from the group panel. */ - allowColumnDragging?: boolean; - /** Specifies text displayed by the group panel when it does not contain any columns. */ - emptyPanelText?: string; - /** Specifies whether the group panel is visible or not. */ - visible?: boolean; - }; - /** Specifies options configuring the load panel. */ - loadPanel?: { - /** Specifies whether to show the load panel or not. */ - enabled?: boolean; - /** Specifies the height of the load panel in pixels. */ - height?: number; - /** Specifies a URL pointing to an image to be used as a loading indicator. */ - indicatorSrc?: string; - /** Specifies whether or not a loading indicator must be displayed on the load panel. */ - showIndicator?: boolean; - /** Specifies whether or not the pane of the load panel must be displayed. */ - showPane?: boolean; - /** Specifies text displayed by the load panel. */ - text?: string; - /** Specifies the width of the load panel in pixels. */ - width?: number; - }; - /** Specifies text displayed when a grid does not contain any records. */ - noDataText?: string; - /** Specifies the options of a grid pager. */ - pager?: { - /** Specifies the page sizes that can be selected at runtime. */ - allowedPageSizes?: any; - /** Specifies whether to show the page size selector or not. */ - showPageSizeSelector?: boolean; - /** Specifies whether to show the pager or not. */ - visible?: any; - /** Specifies the text accompanying the page navigator. */ - infoText?: string; - /** Specifies whether or not to display the text accompanying the page navigator. This text is specified by the infoText option. */ - showInfo?: boolean; - /** Specifies whether or not to display buttons that switch the grid to the previous or next page. */ - showNavigationButtons?: boolean; - }; - /** Specifies paging options. */ - paging?: { - /** Specifies whether dxDataGrid loads data page by page or all at once. */ - enabled?: boolean; - /** Specifies the grid page that should be displayed by default. */ - pageIndex?: number; - /** Specifies the size of grid pages. */ - pageSize?: number; - }; - /** Specifies whether or not grid rows must be shaded in a different way. */ - rowAlternationEnabled?: boolean; - rowClick?: any; - /** A handler for the rowClick event. */ - onRowClick?: any; - rowPrepared?: (e: Object) => void; - /** A handler for the rowPrepared event. */ - onRowPrepared?: (e: Object) => void; - /** Specifies a custom template for grid rows. */ - rowTemplate?: any; - /** A configuration object specifying scrolling options. */ - scrolling?: { - /** Specifies the scrolling mode. */ - mode?: string; - /** Specifies whether or not a grid must preload pages adjacent to the current page when using virtual scrolling. */ - preloadEnabled?: boolean; - }; - /** Specifies options of the search panel. */ - searchPanel?: { - /** Specifies whether or not search strings in the located grid records should be highlighted. */ - highlightSearchText?: boolean; - /** Specifies text displayed by the search panel when no search string was typed. */ - placeholder?: string; - /** Specifies whether the search panel is visible or not. */ - visible?: boolean; - /** Specifies the width of the search panel in pixels. */ - width?: number; - /** Sets a search string for the search panel. */ - text?: string; - }; - /** Specifies the operations that must be performed on the server side. */ - remoteOperations?: any; - /** Allows you to sort groups according to the values of group summary items. */ - sortByGroupSummaryInfo?: Array<{ - /** Specifies the group summary item whose values must be used to sort groups. */ - summaryItem?: string; - /** Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied. */ - groupColumn?: string; - /** Specifies the sort order of group summary item values. */ - sortOrder?: string; - }>; - /** Allows you to build a master-detail interface in the grid. */ - masterDetail?: { - /** Enables an end-user to expand/collapse detail sections. */ - enabled?: boolean; - /** Specifies whether detail sections appear expanded or collapsed. */ - autoExpandAll?: boolean; - /** Specifies the template for detail sections. */ - template?: any; - }; - /** Specifies the keys of the records that must appear selected initially. */ - selectedRowKeys?: Array; - /** Specifies options of runtime selection. */ - selection?: { - /** Specifies whether the user can select all grid records at once. */ - allowSelectAll?: boolean; - /** Specifies the selection mode. */ - mode?: string; - }; - selectionChanged?: (e: { - currentSelectedRowKeys: Array; - currentDeselectedRowKeys: Array; - selectedRowKeys: Array; - selectedRowsData: Array; - }) => void; - /** A handler for the dataErrorOccured event. */ - onDataErrorOccurred?: (e: { error: Error }) => void; - /** A handler for the selectionChanged event. */ - onSelectionChanged?: (e: { - currentSelectedRowKeys: Array; - currentDeselectedRowKeys: Array; - selectedRowKeys: Array; - selectedRowsData: Array; - }) => void; - /** Specifies whether column headers are visible or not. */ - showColumnHeaders?: boolean; - /** Specifies whether or not vertical lines separating one grid column from another are visible. */ - showColumnLines?: boolean; - /** Specifies whether or not horizontal lines separating one grid row from another are visible. */ - showRowLines?: boolean; - /** Specifies options of runtime sorting. */ - sorting?: { - /** Specifies text for the context menu item that sets an ascending sort order in a column. */ - ascendingText?: string; - /** Specifies text for the context menu item that resets sorting settings for a column. */ - clearText?: string; - /** Specifies text for the context menu item that sets a descending sort order in a column. */ - descendingText?: string; - /** Specifies the runtime sorting mode. */ - mode?: string; - }; - /** Specifies options of state storing. */ - stateStoring?: { - /** Specifies a callback function that performs specific actions on state loading. */ - customLoad?: () => JQueryPromise; - /** Specifies a callback function that performs specific actions on state saving. */ - customSave?: (gridState: Object) => void; - /** Specifies whether or not a grid saves its state. */ - enabled?: boolean; - /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ - savingTimeout?: number; - /** Specifies a unique key to be used for storing the grid state. */ - storageKey?: string; - /** Specifies the type of storage to be used for state storing. */ - type?: string; - }; - /** Specifies the options of the grid summary. */ - summary?: { - /** Contains options that specify text patterns for summary items. */ - texts?: { - /** Specifies a pattern for the 'sum' summary items when they are displayed in the parent column. */ - sum?: string; - /** Specifies a pattern for the 'sum' summary items displayed in a group row or in any other column rather than the parent one. */ - sumOtherColumn?: string; - /** Specifies a pattern for the 'min' summary items when they are displayed in the parent column. */ - min?: string; - /** Specifies a pattern for the 'min' summary items displayed in a group row or in any other column rather than the parent one. */ - minOtherColumn?: string; - /** Specifies a pattern for the 'max' summary items when they are displayed in the parent column. */ - max?: string; - /** Specifies a pattern for the 'max' summary items displayed in a group row or in any other column rather than the parent one. */ - maxOtherColumn?: string; - /** Specifies a pattern for the 'avg' summary items when they are displayed in the parent column. */ - avg?: string; - /** Specifies a pattern for the 'avg' summary items displayed in a group row or in any other column rather than the parent one. */ - avgOtherColumn?: string; - /** Specifies a pattern for the 'count' summary items. */ - count?: string; - }; - /** Specifies items of the group summary. */ - groupItems?: Array<{ - /** Specifies the identifier of a summary item. */ - name?: string; - /** Specifies the column that provides data for a group summary item. */ - column?: string; - /** Customizes the text to be displayed in the summary item. */ - customizeText?: (itemInfo: { - value: any; - valueText: string; - }) => string; - /** Specifies a pattern for the summary item text. */ - displayFormat?: string; - /** Specifies a precision for the summary item value of a numeric format. */ - precision?: number; - /** Specifies whether or not a summary item must be displayed in the group footer. */ - showInGroupFooter?: boolean; - /** Specifies the column that must hold the summary item when this item is displayed in the group footer. */ - showInColumn?: string; - /** Specifies how to aggregate data for a summary item. */ - summaryType?: string; - /** Specifies a format for the summary item value. */ - valueFormat?: string; - }>; - /** Specifies items of the total summary. */ - totalItems?: Array<{ - /** Specifies the identifier of a summary item. */ - name?: string; - /** Specifies the alignment of a summary item. */ - alignment?: string; - /** Specifies the column that provides data for a summary item. */ - column?: string; - /** Specifies a CSS class to be applied to a summary item. */ - cssClass?: string; - /** Customizes the text to be displayed in the summary item. */ - customizeText?: (itemInfo: { - value: any; - valueText: string; - }) => string; - /** Specifies a pattern for the summary item text. */ - displayFormat?: string; - /** Specifies a precision for the summary item value of a numeric format. */ - precision?: number; - /** Specifies the column that must hold the summary item. */ - showInColumn?: string; - /** Specifies how to aggregate data for a summary item. */ - summaryType?: string; - /** Specifies a format for the summary item value. */ - valueFormat?: string; - }>; - /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ - calculateCustomSummary?: (options: { - component: dxDataGrid; - name?: string; - value: any; - totalValue: any; - summaryProcess: string - }) => void; - }; - /** Specifies whether text that does not fit into a column should be wrapped. */ - wordWrapEnabled?: boolean; - } - /** A data grid widget. */ - export class dxDataGrid extends Widget { - constructor(element: JQuery, options?: dxDataGridOptions); - constructor(element: Element, options?: dxDataGridOptions); - /** Ungroups grid records. */ - clearGrouping(): void; - /** Clears sorting settings of all grid columns at once. */ - clearSorting(): void; - /** Allows you to obtain a cell by its row index and the data field of its column. */ - getCellElement(rowIndex: number, dataField: string): any; - /** Allows you to obtain a cell by its row index and the visible index of its column. */ - getCellElement(rowIndex: number, visibleColumnIndex: number): any; - /** Returns the current state of the grid. */ - state(): Object; - /** Sets the grid state. */ - state(state: Object): void; - /** Allows you to obtain the row index by a data key. */ - getRowIndexByKey(key: any): number; - /** Allows you to obtain the data key by a row index. */ - getKeyByRowIndex(rowIndex: number): any; - /** Adds a new column to a grid. */ - addColumn(columnOptions: dxDataGridColumn): void; - /** Displays the load panel. */ - beginCustomLoading(messageText: string): void; - /** Discards changes made in a grid. */ - cancelEditData(): void; - /** Clears the filter applied to grid records from code. */ - clearFilter(): void; - /** Deselects all grid records. */ - clearSelection(): void; - /** Draws the cell being edited from the editing state. Use this method when the edit mode is batch. */ - closeEditCell(): void; - /** Collapses groups or master rows in a grid. */ - collapseAll(groupIndex?: number): void; - /** Returns the number of data columns in a grid. */ - columnCount(): number; - /** Returns the value of a specific column option. */ - columnOption(id: number, optionName: string): any; - /** Sets an option of a specific column. */ - columnOption(id: number, optionName: string, optionValue: any): void; - /** Returns the options of a column by an identifier. */ - columnOption(id: any): Object; - /** Sets several options of a column at once. */ - columnOption(id: any, options: Object): void; - /** Sets a specific cell into the editing state. */ - editCell(rowIndex: number, columnIndex: number): void; - /** Sets a specific row into the editing state. */ - editRow(rowIndex: number): void; - /** Hides the load panel. */ - endCustomLoading(): void; - /** Expands groups or master rows in a grid. */ - expandAll(groupIndex: number): void; - /** Allows you to find out whether a specific group or master row is expanded or collapsed. */ - isRowExpanded(key: any): boolean; - /** Allows you to expand a specific group or master row by its key. */ - expandRow(key: any): void; - /** Allows you to collapse a specific group or master row by its key. */ - collapseRow(key: any): void; - /** Applies a filter to grid records. */ - filter(filterExpr: Array): void; - /** Gets the keys of currently selected grid records. */ - getSelectedRowKeys(): Array; - /** Gets the data objects of currently selected grid records. */ - getSelectedRowsData(): Array; - /** Hides the column chooser panel. */ - hideColumnChooser(): void; - /** Adds a new data row to a grid. */ - insertRow(): void; - /** Returns the key corresponding to the passed data object. */ - keyOf(obj: Object): any; - /** Switches a grid to a specified page. */ - pageIndex(newIndex: number): void; - /** Gets the index of the current page. */ - pageIndex(): number; - /** Sets the page size. */ - pageSize(value: number): void; - /** Gets the current page size. */ - pageSize(): number; - /** - * Recovers a row deleted in the batch edit mode. - * @deprecated Use the "undeleteRow" method instead. - */ - recoverRow(rowIndex: number): void; - /** Refreshes grid data. */ - refresh(): void; - /** Removes a specific row from a grid. */ - removeRow(rowIndex: number): void; - /** Saves changes made in a grid. */ - saveEditData(): void; - /** -Searches grid records by a search string. - */ - searchByText(text: string): void; - /** Selects all grid records. */ - selectAll(): void; - deselectAll(): void; - /** Selects specific grid records. */ - selectRows(keys: Array, preserve: boolean): void; - /** Deselects specific grid records. */ - deselectRows(keys: Array): void; - /** Selects grid rows by indexes. */ - selectRowsByIndexes(indexes: Array): void; - /** Allows you to find out whether a row is selected or not. */ - isRowSelected(key: any): boolean; - /** Invokes the column chooser panel. */ - showColumnChooser(): void; - startSelectionWithCheckboxes(): boolean; - /** Returns the number of records currently held by a grid. */ - totalCount(): number; - /** Recovers a row deleted in the batch edit mode. */ - undeleteRow(rowIndex: number): void; - /** Allows you to obtain a data object by its key. */ - byKey(key: any): JQueryPromise; - /** Gets the value of a total summary item. */ - getTotalSummaryValue(summaryItemName: string): any; - } -} -declare module DevExpress.viz.charts { - /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ - export interface BaseSeries { - /** Provides information about the state of the series object. */ - fullState: number; - /** Returns the type of the series. */ - type: string; - /** Unselects all the selected points of the series. The points are displayed in an initial style. */ - clearSelection(): void; - /** - * Gets a point from the series point collection based on the specified argument. - * @deprecated getPointsByArg(pointArg).md - */ - getPointByArg(pointArg: any): Object; - /** Gets points from the series point collection based on the specified argument. */ - getPointsByArg(pointArg: any): Array; - /** Gets a point from the series point collection based on the specified point position. */ - getPointByPos(positionIndex: number): Object; - /** Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically. */ - select(): void; - /** Selects the specified point. The point is displayed in a 'selected' style. */ - selectPoint(point: BasePoint): void; - /** Deselects the specified point. The point is displayed in an initial style. */ - deselectPoint(point: BasePoint): void; - /** Returns an array of all points in the series. */ - getAllPoints(): Array; - /** Returns visible series points. */ - getVisiblePoints(): Array; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface BasePoint { - /** Provides information about the state of the point object. */ - fullState: number; - /** Returns the point's argument value that was set in the data source. */ - originalArgument: any; - /** Returns the point's value that was set in the data source. */ - originalValue: any; - /** Returns the tag of the point. */ - tag: string; - /** Deselects the point. */ - clearSelection(): void; - /** Gets the color of a particular point. */ - getColor(): string; - /** Hides the tooltip of the point. */ - hideTooltip(): void; - /** Provides information about the hover state of a point. */ - isHovered(): any; - /** Provides information about the selection state of a point. */ - isSelected(): any; - /** Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically. */ - select(): void; - /** Shows the tooltip of the point. */ - showTooltip(): void; - /** Allows you to obtain the label of a series point. */ - getLabel(): any; - /** Returns the series object to which the point belongs. */ - series: BaseSeries; - } - /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ - export interface ChartSeries extends BaseSeries { - /** Returns the name of the series pane. */ - pane: string; - /** Returns the name of the value axis of the series. */ - axis: string; - /** Returns the name of the series. */ - name: string; - /** Returns the tag of the series. */ - tag: string; - /** Hides a particular series. */ - hide(): void; - /** Provides information about the hover state of a series. */ - isHovered(): any; - /** Provides information about the selection state of a series. */ - isSelected(): any; - /** Provides information about the visibility state of a series. */ - isVisible(): boolean; - /** Makes a particular series visible. */ - show(): void; - selectPoint(point: ChartPoint): void; - deselectPoint(point: ChartPoint): void; - getAllPoints(): Array; - getVisiblePoints(): Array; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface ChartPoint extends BasePoint { - /** Contains the close value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalCloseValue: any; - /** Contains the high value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalHighValue: any; - /** Contains the low value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalLowValue: any; - /** Contains the first value of the point. This field is useful for points belonging to a series of the range area or range bar type only. */ - originalMinValue: any; - /** Contains the open value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ - originalOpenValue: any; - /** Contains the size of the bubble as it was set in the data source. This field is useful for points belonging to a series of the bubble type only. */ - size: any; - /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ - getBoundingRect(): { x: number; y: number; width: number; height: number; }; - series: ChartSeries; - } - /** This section describes the methods that can be used in code to manipulate the Label object. */ - export interface Label { - /** Gets the parameters of the label's minimum bounding rectangle (MBR). */ - getBoundingRect(): { x: number; y: number; width: number; height: number; }; - /** Hides the point label. */ - hide(): void; - /** Shows the point label. */ - show(): void; - } - export interface PieSeries extends BaseSeries { - selectPoint(point: PiePoint): void; - deselectPoint(point: PiePoint): void; - getAllPoints(): Array; - getVisiblePoints(): Array; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface PiePoint extends BasePoint { - /** Gets the percentage value of the specific point. */ - percent: any; - /** Provides information about the visibility state of a point. */ - isVisible(): boolean; - /** Makes a specific point visible. */ - show(): void; - /** Hides a specific point. */ - hide(): void; - series: PieSeries; - } - /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ - export interface PolarSeries extends BaseSeries { - /** Returns the name of the value axis of the series. */ - axis: string; - /** Returns the name of the series. */ - name: string; - /** Returns the tag of the series. */ - tag: string; - /** Hides a particular series. */ - hide(): void; - /** Provides information about the hover state of a series. */ - isHovered(): any; - /** Provides information about the selection state of a series. */ - isSelected(): any; - /** Provides information about the visibility state of a series. */ - isVisible(): boolean; - /** Makes a particular series visible. */ - show(): void; - selectPoint(point: PolarPoint): void; - deselectPoint(point: PolarPoint): void; - getAllPoints(): Array; - getVisiblePoints(): Array; - } - /** This section describes the methods that can be used in code to manipulate the Point object. */ - export interface PolarPoint extends BasePoint { - series: PolarSeries; - } - export interface Strip { - /** Specifies a color for a strip. */ - color?: string; - /** An object that defines the label configuration options of a strip. */ - label?: { - /** Specifies the text displayed in a strip. */ - text?: string; - }; - /** Specifies a start value for a strip. */ - startValue?: any; - /** Specifies an end value for a strip. */ - endValue?: any; - } - export interface BaseSeriesConfigLabel { - /** Specifies a format for arguments displayed by point labels. */ - argumentFormat?: string; - /** Specifies a precision for formatted point arguments displayed in point labels. */ - argumentPrecision?: number; - /** Specifies a background color for point labels. */ - backgroundColor?: string; - /** Specifies border options for point labels. */ - border?: viz.core.DashedBorder; - /** Specifies connector options for series point labels. */ - connector?: { - /** Specifies the color of label connectors. */ - color?: string; - /** Indicates whether or not label connectors are visible. */ - visible?: boolean; - /** Specifies the width of label connectors. */ - width?: number; - }; - /** Specifies a callback function that returns the text to be displayed by point labels. */ - customizeText?: (pointInfo: Object) => string; - /** Specifies font options for the text displayed in point labels. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed by point labels. */ - format?: string; - position?: string; - /** Specifies a precision for formatted point values displayed in point labels. */ - precision?: number; - /** Specifies the angle used to rotate point labels from their initial position. */ - rotationAngle?: number; - /** Specifies the visibility of point labels. */ - visible?: boolean; - } - export interface SeriesConfigLabel extends BaseSeriesConfigLabel { - /** Specifies whether or not to show a label when the point has a zero value. */ - showForZeroValues?: boolean; - } - export interface ChartSeriesConfigLabel extends SeriesConfigLabel { - /** Specifies how to align point labels relative to the corresponding data points that they represent. */ - alignment?: string; - /** Specifies how to shift point labels horizontally from their initial positions. */ - horizontalOffset?: number; - /** Specifies how to shift point labels vertically from their initial positions. */ - verticalOffset?: number; - /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ - percentPrecision?: number; - } - export interface BaseCommonSeriesConfig { - /** Specifies the data source field that provides arguments for series points. */ - argumentField?: string; - axis?: string; - /** An object defining the label configuration options for a series in the dxChart widget. */ - label?: ChartSeriesConfigLabel; - /** Specifies border options for point labels. */ - border?: viz.core.DashedBorder; - /** Specifies a series color. */ - color?: string; - /** Specifies the dash style of the series' line. */ - dashStyle?: string; - hoverMode?: string; - /** An object defining configuration options for a hovered series. */ - hoverStyle?: { - /** An object defining the border options for a hovered series. */ - border?: viz.core.DashedBorder; - /**

Sets a color for a series when it is hovered over.

*/ - color?: string; - /** Specifies the dash style for the line in a hovered series. */ - dashStyle?: string; - /** Specifies the hatching options to be applied when a series is hovered over. */ - hatching?: viz.core.Hatching; - /** Specifies the width of a line in a hovered series. */ - width?: number; - }; - /** Specifies whether a chart ignores null data points or not. */ - ignoreEmptyPoints?: boolean; - /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ - maxLabelCount?: number; - /** Specifies the minimal length of a displayed bar in pixels. */ - minBarSize?: number; - /** Specifies opacity for a series. */ - opacity?: number; - /** Specifies the series elements to highlight when the series is selected. */ - selectionMode?: string; - /** An object defining configuration options for a selected series. */ - selectionStyle?: { - /** An object defining the border options for a selected series. */ - border?: viz.core.DashedBorder; - /** Sets a color for a series when it is selected. */ - color?: string; - /** Specifies the dash style for the line in a selected series. */ - dashStyle?: string; - /** Specifies the hatching options to be applied when a series is selected. */ - hatching?: viz.core.Hatching; - /** Specifies the width of a line in a selected series. */ - width?: number; - }; - /** Specifies whether or not to show the series in the chart's legend. */ - showInLegend?: boolean; - /** Specifies the name of the stack where the values of the _stackedBar_ series must be located. */ - stack?: string; - /** Specifies the name of the data source field that provides data about a point. */ - tagField?: string; - /** Specifies the data source field that provides values for series points. */ - valueField?: string; - /** Specifies the visibility of a series. */ - visible?: boolean; - /** Specifies a line width. */ - width?: number; - /** Configures error bars. */ - valueErrorBar?: { - /** Specifies whether error bars must be displayed in full or partially. */ - displayMode?: string; - /** Specifies the data field that provides data for low error values. */ - lowValueField?: string; - /** Specifies the data field that provides data for high error values. */ - highValueField?: string; - /** Specifies how error bar values must be calculated. */ - type?: string; - /** Specifies the value to be used for generating error bars. */ - value?: number; - /** Specifies the color of error bars. */ - color?: string; - /** Specifies the opacity of error bars. */ - opacity?: number; - /** Specifies the length of the lines that indicate the error bar edges. */ - edgeLength?: number; - /** Specifies the width of the error bar line. */ - lineWidth?: number; - }; - } - export interface CommonPointOptions { - /** Specifies border options for points in the line and area series. */ - border?: viz.core.Border; - /** Specifies the points color. */ - color?: string; - /** Specifies what series points to highlight when a point is hovered over. */ - hoverMode?: string; - /** An object defining configuration options for a hovered point. */ - hoverStyle?: { - /** An object defining the border options for a hovered point. */ - border?: viz.core.Border; - /** Sets a color for a point when it is hovered over. */ - color?: string; - /** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */ - size?: number; - }; - /** Specifies what series points to highlight when a point is selected. */ - selectionMode?: string; - /** An object defining configuration options for a selected point. */ - selectionStyle?: { - /** An object defining the border options for a selected point. */ - border?: viz.core.Border; - /**

Sets a color for a point when it is selected.

*/ - color?: string; - /** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */ - size?: number; - }; - /** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */ - size?: number; - /** Specifies a symbol for presenting points of the line and area series. */ - symbol?: string; - visible?: boolean; - } - export interface ChartCommonPointOptions extends CommonPointOptions { - /** An object specifying the parameters of an image that is used as a point marker. */ - image?: { - /** Specifies the height of an image that is used as a point marker. */ - height?: any; - /** Specifies a URL leading to the image to be used as a point marker. */ - url?: any; - /** Specifies the width of an image that is used as a point marker. */ - width?: any; - }; - } - export interface PolarCommonPointOptions extends CommonPointOptions { - /** An object specifying the parameters of an image that is used as a point marker. */ - image?: { - /** Specifies the height of an image that is used as a point marker. */ - height?: number; - /** Specifies a URL leading to the image to be used as a point marker. */ - url?: string; - /** Specifies the width of an image that is used as a point marker. */ - width?: number; - }; - } - /** An object that defines configuration options for chart series. */ - export interface CommonSeriesConfig extends BaseCommonSeriesConfig { - /** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */ - closeValueField?: string; - /** Specifies a radius for bar corners. */ - cornerRadius?: number; - /** Specifies the data source field that provides a 'high' value for a _candleStick_ or _stock_ series. */ - highValueField?: string; - /** Specifies the color for the body (rectangle) of a _candleStick_ series. */ - innerColor?: string; - /** Specifies the data source field that provides a 'low' value for a _candleStick_ or _stock_ series. */ - lowValueField?: string; - /** Specifies the data source field that provides an 'open' value for a _candleStick_ or _stock_ series. */ - openValueField?: string; - /** Specifies the pane that will be used to display a series. */ - pane?: string; - /** An object defining configuration options for points in line-, scatter- and area-like series. */ - point?: ChartCommonPointOptions; - /** Specifies the data source field that provides values for one end of a range series. To set the data source field for the other end of the range series, use the rangeValue2Field property. */ - rangeValue1Field?: string; - /** Specifies the data source field that provides values for the second end of a range series. To set the data source field for the other end of the range series, use the rangeValue1Field property. */ - rangeValue2Field?: string; - /** Specifies reduction options for the stock or candleStick series. */ - reduction?: { - /** Specifies a color for the points whose reduction level price is lower in comparison to the value in the previous point. */ - color?: string; - /** Specifies for which price level (open, high, low or close) to enable reduction options in the series. */ - level?: string; - }; - /** Specifies the data source field that defines the size of bubbles. */ - sizeField?: string; - } - export interface CommonSeriesSettings extends CommonSeriesConfig { - /**

An object that specifies configuration options for all series of the area type in the chart.

*/ - area?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ - bar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the bubble type in the chart. */ - bubble?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _candleStick_ type in the chart. */ - candlestick?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _fullStackedArea_ type in the chart. */ - fullstackedarea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Full-Stacked Spline Area type in the chart. */ - fullstackedsplinearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _fullStackedBar_ type in the chart. */ - fullstackedbar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _fullStackedLine_ type in the chart. */ - fullstackedline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Full-Stacked Spline type in the chart. */ - fullstackedspline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _line_ type in the chart. */ - line?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _rangeArea_ type in the chart. */ - rangearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _rangeBar_ type in the chart. */ - rangebar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ - scatter?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _spline_ type in the chart. */ - spline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _splineArea_ type in the chart. */ - splinearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedArea_ type in the chart. */ - stackedarea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Stacked Spline Area type in the chart. */ - stackedsplinearea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ - stackedbar?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedLine_ type in the chart. */ - stackedline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the Stacked Spline type in the chart. */ - stackedspline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stepArea_ type in the chart. */ - steparea?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stepLine_ type in the chart. */ - stepline?: CommonSeriesConfig; - /** An object that specifies configuration options for all series of the _stock_ type in the chart. */ - stock?: CommonSeriesConfig; - /** Sets a series type. */ - type?: string; - } - export interface SeriesConfig extends CommonSeriesConfig { - /** Specifies the name that identifies the series. */ - name?: string; - /** Specifies data about a series. */ - tag?: any; - /** Sets the series type. */ - type?: string; - } - /** An object that defines configuration options for polar chart series. */ - export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { - /** Specifies whether or not to close the chart by joining the end point with the first point. */ - closed?: boolean; - label?: SeriesConfigLabel; - point?: PolarCommonPointOptions; - } - export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { - /** An object that specifies configuration options for all series of the area type in the chart. */ - area?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ - bar?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _line_ type in the chart. */ - line?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ - scatter?: CommonPolarSeriesConfig; - /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ - stackedbar?: CommonPolarSeriesConfig; - /** Sets a series type. */ - type?: string; - } - export interface PolarSeriesConfig extends CommonPolarSeriesConfig { - /** Specifies the name that identifies the series. */ - name?: string; - /** Specifies data about a series. */ - tag?: any; - /** Sets the series type. */ - type?: string; - } - export interface PieSeriesConfigLabel extends BaseSeriesConfigLabel { - /** Specifies how to shift labels from their initial position in a radial direction in pixels. */ - radialOffset?: number; - /** Specifies a precision for the percentage values displayed in labels. */ - percentPrecision?: number; - } - /** An object that defines configuration options for chart series. */ - export interface CommonPieSeriesConfig { - /** Specifies the data source field that provides arguments for series points. */ - argumentField?: string; - /** Specifies the required type for series arguments. */ - argumentType?: string; - /** An object defining the series border configuration options. */ - border?: viz.core.DashedBorder; - /** Specifies a series color. */ - color?: string; - /** Specifies the chart elements to highlight when a series is hovered over. */ - hoverMode?: string; - /** An object defining configuration options for a hovered series. */ - hoverStyle?: { - /** An object defining the border options for a hovered series. */ - border?: viz.core.DashedBorder; - /** Sets a color for the series when it is hovered over. */ - color?: string; - /** Specifies the hatching options to be applied when a point is hovered over. */ - hatching?: viz.core.Hatching; - }; - /** Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. */ - innerRadius?: number; - /** An object defining the label configuration options. */ - label?: PieSeriesConfigLabel; - /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ - maxLabelCount?: number; - /** Specifies a minimal size of a displayed pie segment. */ - minSegmentSize?: number; - /** Specifies the direction in which the dxPieChart's series points are located. */ - segmentsDirection?: string; - /**

Specifies the chart elements to highlight when the series is selected.

*/ - selectionMode?: string; - /** An object defining configuration options for the series when it is selected. */ - selectionStyle?: { - /** An object defining the border options for a selected series. */ - border?: viz.core.DashedBorder; - /** Sets a color for a series when it is selected. */ - color?: string; - /** Specifies the hatching options to be applied when a point is selected. */ - hatching?: viz.core.Hatching; - }; - /** Specifies chart segment grouping options. */ - smallValuesGrouping?: { - /** Specifies the name of the grouped chart segment. This name represents the segment in the chart legend. */ - groupName?: string; - /** Specifies the segment grouping mode. */ - mode?: string; - /** Specifies a threshold for segment values. */ - threshold?: number; - /** Specifies how many segments must not be grouped. */ - topCount?: number; - }; - /** Specifies a start angle for a pie chart in arc degrees. */ - startAngle?: number; - /**

Specifies the name of the data source field that provides data about a point.

*/ - tagField?: string; - /** Specifies the data source field that provides values for series points. */ - valueField?: string; - } - export interface PieSeriesConfig extends CommonPieSeriesConfig { - /** Sets the series type. */ - type?: string; - } - export interface SeriesTemplate { - /** Specifies a callback function that returns a series object with individual series settings. */ - customizeSeries?: (seriesName: string) => SeriesConfig; - /** Specifies a data source field that represents the series name. */ - nameField?: string; - } - export interface PolarSeriesTemplate { - /** Specifies a callback function that returns a series object with individual series settings. */ - customizeSeries?: (seriesName: string) => PolarSeriesConfig; - /** Specifies a data source field that represents the series name. */ - nameField?: string; - } - export interface ChartCommonConstantLineLabel { - /** Specifies font options for a constant line label. */ - font?: viz.core.Font; - /** Specifies the position of the constant line label relative to the chart plot. */ - position?: string; - /** Indicates whether or not to display labels for the axis constant lines. */ - visible?: boolean; - } - export interface PolarCommonConstantLineLabel { - /** Indicates whether or not to display labels for the axis constant lines. */ - visible?: boolean; - /** Specifies font options for a constant line label. */ - font?: viz.core.Font; - } - export interface ConstantLineStyle { - /** Specifies a color for a constant line. */ - color?: string; - /** Specifies a dash style for a constant line. */ - dashStyle?: string; - /** Specifies a constant line width in pixels. */ - width?: number; - } - export interface ChartCommonConstantLineStyle extends ConstantLineStyle { - /** An object defining constant line label options. */ - label?: ChartCommonConstantLineLabel; - /** Specifies the space between the constant line label and the left/right side of the constant line. */ - paddingLeftRight?: number; - /** Specifies the space between the constant line label and the top/bottom side of the constant line. */ - paddingTopBottom?: number; - } - export interface PolarCommonConstantLineStyle extends ConstantLineStyle { - /** An object defining constant line label options. */ - label?: PolarCommonConstantLineLabel; - } - export interface CommonAxisLabel { - /** Specifies font options for axis labels. */ - font?: viz.core.Font; - /** Specifies the spacing between an axis and its labels in pixels. */ - indentFromAxis?: number; - /** Indicates whether or not axis labels are visible. */ - visible?: boolean; - } - export interface ChartCommonAxisLabel extends CommonAxisLabel { - /** Specifies the label's position relative to the tick (grid line). */ - alignment?: string; - /** Specifies the overlap resolving algorithm to be applied to axis labels. */ - overlappingBehavior?: { - /** Specifies how to arrange axis labels. */ - mode?: string; - /** Specifies the angle used to rotate axis labels. */ - rotationAngle?: number; - /** Specifies the spacing that must be set between staggered rows when the 'stagger' algorithm is applied. */ - staggeringSpacing?: number; - }; - } - export interface PolarCommonAxisLabel extends CommonAxisLabel { - /** Specifies the overlap resolving algorithm to be applied to axis labels. */ - overlappingBehavior?: string; - } - export interface CommonAxisTitle { - /** Specifies font options for an axis title. */ - font?: viz.core.Font; - /** Specifies a margin for an axis title in pixels. */ - margin?: number; - } - export interface BaseCommonAxisSettings { - /** Specifies the color of the line that represents an axis. */ - color?: string; - /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ - discreteAxisDivisionMode?: string; - /** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */ - grid?: { - /** Specifies a color for grid lines. */ - color?: string; - /** Specifies an opacity for grid lines. */ - opacity?: number; - /** Indicates whether or not the grid lines of an axis are visible. */ - visible?: boolean; - /** Specifies the width of grid lines. */ - width?: number; - }; - /** Specifies the options of the minor grid. */ - minorGrid?: { - /** Specifies a color for the lines of the minor grid. */ - color?: string; - /** Specifies an opacity for the lines of the minor grid. */ - opacity?: number; - /** Indicates whether the minor grid is visible or not. */ - visible?: boolean; - /** Specifies a width for the lines of the minor grid. */ - width?: number; - }; - /** Indicates whether or not an axis is inverted. */ - inverted?: boolean; - /** Specifies the opacity of the line that represents an axis. */ - opacity?: number; - /** Indicates whether or not to set ticks/grid lines of a continuous axis of the 'date-time' type at the beginning of each date-time interval. */ - setTicksAtUnitBeginning?: boolean; - /** An object defining the configuration options for axis ticks. */ - tick?: { - /** Specifies ticks color. */ - color?: string; - /** Specifies tick opacity. */ - opacity?: number; - /** Indicates whether or not ticks are visible on an axis. */ - visible?: boolean; - }; - /** Specifies the options of the minor ticks. */ - minorTick?: { - /** Specifies a color for the minor ticks. */ - color?: string; - /** Specifies an opacity for the minor ticks. */ - opacity?: number; - /** Indicates whether or not the minor ticks are displayed on an axis. */ - visible?: boolean; - }; - /** Indicates whether or not the line that represents an axis in a chart is visible. */ - visible?: boolean; - /** Specifies the width of the line that represents an axis in the chart. */ - width?: number; - } - export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { - /** Specifies the appearance of all the widget's constant lines. */ - constantLineStyle?: ChartCommonConstantLineStyle; - /** An object defining the label configuration options that are common for all axes in the dxChart widget. */ - label?: ChartCommonAxisLabel; - /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ - maxValueMargin?: number; - /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ - minValueMargin?: number; - /** Specifies, in pixels, the space reserved for an axis. */ - placeholderSize?: number; - /** An object defining configuration options for strip style. */ - stripStyle?: { - /** An object defining the configuration options for a strip label style. */ - label?: { - /** Specifies font options for a strip label. */ - font?: viz.core.Font; - /** Specifies the label's position on a strip. */ - horizontalAlignment?: string; - /** Specifies a label's position on a strip. */ - verticalAlignment?: string; - }; - /** Specifies the spacing, in pixels, between the left/right strip border and the strip label. */ - paddingLeftRight?: number; - /** Specifies the spacing, in pixels, between the top/bottom strip borders and the strip label. */ - paddingTopBottom?: number; - }; - /** An object defining the title configuration options that are common for all axes in the dxChart widget. */ - title?: CommonAxisTitle; - /** Indicates whether or not to display series with indents from axis boundaries. */ - valueMarginsEnabled?: boolean; - } - export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { - /** Specifies the appearance of all the widget's constant lines. */ - constantLineStyle?: PolarCommonConstantLineStyle; - /** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */ - label?: PolarCommonAxisLabel; - /** An object defining configuration options for strip style. */ - stripStyle?: { - /** An object defining the configuration options for a strip label style. */ - label?: { - /** Specifies font options for a strip label. */ - font?: viz.core.Font; - }; - }; - } - export interface ChartConstantLineLabel extends ChartCommonConstantLineLabel { - /** Specifies the horizontal alignment of a constant line label. */ - horizontalAlignment?: string; - /** Specifies the vertical alignment of a constant line label. */ - verticalAlignment?: string; - /** Specifies the text to be displayed in a constant line label. */ - text?: string; - } - export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { - /** Specifies the text to be displayed in a constant line label. */ - text?: string; - } - export interface AxisLabel { - /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ - customizeHint?: (argument: { value: any; valueText: string }) => string; - /** Specifies a callback function that returns the text to be displayed in value axis labels. */ - customizeText?: (argument: { value: any; valueText: string }) => string; - /** Specifies a format for the text displayed by axis labels. */ - format?: string; - /** Specifies a precision for the formatted value displayed in the axis labels. */ - precision?: number; - } - export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel { } - export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel { } - export interface AxisTitle extends CommonAxisTitle { - /** Specifies the text for the value axis title. */ - text?: string; - } - export interface ChartConstantLineStyle extends ChartCommonConstantLineStyle { - /** An object defining constant line label options. */ - label?: ChartConstantLineLabel; - } - export interface ChartConstantLine extends ChartConstantLineStyle { - /** An object defining constant line label options. */ - label?: ChartConstantLineLabel; - /** Specifies a value to be displayed by a constant line. */ - value?: any; - } - export interface PolarConstantLine extends PolarCommonConstantLineStyle { - /** An object defining constant line label options. */ - label?: PolarConstantLineLabel; - /** Specifies a value to be displayed by a constant line. */ - value?: any; - } - export interface Axis { - /** Specifies a coefficient for dividing the value axis. */ - axisDivisionFactor?: number; - /** Specifies the order in which discrete values are arranged on the value axis. */ - categories?: Array; - /** Specifies the value to be raised to a power when generating ticks for a logarithmic axis. */ - logarithmBase?: number; - /** Specifies an interval between axis ticks/grid lines. */ - tickInterval?: any; - /** Specifies the interval between minor ticks. */ - minorTickInterval?: any; - /** Specifies the number of minor ticks between two neighboring major ticks. */ - minorTickCount?: number; - /** Specifies the required type of the value axis. */ - type?: string; - /** Specifies the pane on which the current value axis will be displayed. */ - pane?: string; - /** Specifies options for value axis strips. */ - strips?: Array; - } - export interface ChartAxis extends ChartCommonAxisSettings, Axis { - /** Defines an array of the value axis constant lines. */ - constantLines?: Array; - /** Specifies the appearance options for the constant lines of the value axis. */ - constantLineStyle?: ChartCommonConstantLineStyle; - /** Specifies options for value axis labels. */ - label?: ChartAxisLabel; - /** Specifies the maximum value on the value axis. */ - max?: any; - /** Specifies the minimum value on the value axis. */ - min?: any; - /** Specifies the position of the value axis on a chart. */ - position?: string; - /** Specifies the title for a value axis. */ - title?: AxisTitle; - } - export interface PolarAxis extends PolarCommonAxisSettings, Axis { - /** Defines an array of the value axis constant lines. */ - constantLines?: Array; - /** Specifies options for value axis labels. */ - label?: PolarAxisLabel; - } - export interface ArgumentAxis { - /** Specifies the desired type of axis values. */ - argumentType?: string; - /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ - hoverMode?: string; - } - export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { } - export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { - /** Specifies a start angle for the argument axis in degrees. */ - startAngle?: number; - /** Specifies whether or not to display the first point at the angle specified by the startAngle option. */ - firstPointOnStartAngle?: boolean; - /** Specifies the period of the argument values in the data source. */ - period?: number; - } - export interface ValueAxis { - /** Specifies the name of the value axis. */ - name?: string; - /** Specifies whether or not to indicate a zero value on the value axis. */ - showZero?: boolean; - /** Specifies the desired type of axis values. */ - valueType?: string; - } - export interface ChartValueAxis extends ChartAxis, ValueAxis { - /** Specifies the spacing, in pixels, between multiple value axes in a chart. */ - multipleAxesSpacing?: number; - /** Specifies the value by which the chart's value axes are synchronized. */ - synchronizedValue?: number; - } - export interface PolarValueAxis extends PolarAxis, ValueAxis { - /** Indicates whether to display series with indents from axis boundaries. */ - valueMarginsEnabled?: boolean; - /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ - maxValueMargin?: number; - /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ - minValueMargin?: number; - tick?: { - visible?: boolean; - } - } - export interface CommonPane { - /** Specifies a background color in a pane. */ - backgroundColor?: string; - /** Specifies the border options of a chart's pane. */ - border?: PaneBorder; - } - export interface Pane extends CommonPane { - /** Specifies the name of a pane. */ - name?: string; - } - export interface PaneBorder extends viz.core.DashedBorderWithOpacity { - /** Specifies the bottom border's visibility state in a pane. */ - bottom?: boolean; - /** Specifies the left border's visibility state in a pane. */ - left?: boolean; - /** Specifies the right border's visibility state in a pane. */ - right?: boolean; - /** Specifies the top border's visibility state in a pane. */ - top?: boolean; - } - export interface ChartAnimation extends viz.core.Animation { - /** Specifies the maximum series point count in the chart that the animation supports. */ - maxPointCountSupported?: number; - } - export interface BaseChartTooltip extends viz.core.Tooltip { - /** Specifies a format for arguments of the chart's series points. */ - argumentFormat?: string; - /** Specifies a precision for formatted arguments displayed in tooltips. */ - argumentPrecision?: number; - /** Specifies a precision for a percent value displayed in tooltips for stacked series and dxPieChart series. */ - percentPrecision?: number; - } - export interface BaseChartOptions extends viz.core.BaseWidgetOptions { - /** Specifies adaptive layout options. */ - adaptiveLayout?: { - /** Specifies the width of the widget container that is small enough for the layout to begin adapting. */ - width?: number; - /** Specifies the height of the widget container that is small enough for the layout to begin adapting. */ - height?: number; - /** Specifies whether or not point labels can be hidden when the layout is adapting. */ - keepLabels?: boolean; - }; - /** Specifies animation options. */ - animation?: ChartAnimation; - /** Specifies a callback function that returns an object with options for a specific point label. */ - customizeLabel?: (labelInfo: Object) => Object; - /** Specifies a callback function that returns an object with options for a specific point. */ - customizePoint?: (pointInfo: Object) => Object; - /** Specifies a data source for the chart. */ - dataSource?: any; - done?: Function; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** Specifies options of a dxChart's (dxPieChart's) legend. */ - legend?: core.BaseLegend; - /** Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels. */ - margin?: viz.core.Margins; - /** Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ - palette?: any; - /** A handler for the done event. */ - onDone?: (e: { - component: BaseChart; - element: Element; - }) => void; - /** A handler for the pointClick event. */ - onPointClick?: any; - pointClick?: any; - /** A handler for the pointHoverChanged event. */ - onPointHoverChanged?: (e: { - component: BaseChart; - element: Element; - target: TPoint; - }) => void; - pointHoverChanged?: (point: TPoint) => void; - /** A handler for the pointSelectionChanged event. */ - onPointSelectionChanged?: (e: { - component: BaseChart; - element: Element; - target: TPoint; - }) => void; - pointSelectionChanged?: (point: TPoint) => void; - /** Specifies whether a single point or multiple points can be selected in the chart. */ - pointSelectionMode?: string; - /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ - redrawOnResize?: boolean; - /** Specifies options for the dxChart and dxPieChart widget series. */ - series?: any; - /** Specifies the size of the widget in pixels. */ - size?: viz.core.Size; - /** Sets the name of the theme to be used in the chart. */ - theme?: string; - /** Specifies a title for the chart. */ - title?: { - /** Specifies font options for the title. */ - font?: viz.core.Font; - /** Specifies the title's horizontal position in the chart. */ - horizontalAlignment?: string; - /** Specifies a title's position on the chart in the vertical direction. */ - verticalAlignment?: string; - /** Specifies the distance between the title and surrounding chart elements in pixels. */ - margin?: viz.core.Margins; - /** Specifies the height of the space reserved for the title. */ - placeholderSize?: number; - /** Specifies a text for the chart's title. */ - text?: string; - }; - /** Specifies tooltip options. */ - tooltip?: BaseChartTooltip; - /** A handler for the tooltipShown event. */ - onTooltipShown?: (e: { - component: BaseChart; - element: Element; - }) => void; - /** A handler for the tooltipHidden event. */ - onTooltipHidden?: (e: { - component: BaseChart; - element: Element; - }) => void; - tooltipHidden?: (point: TPoint) => void; - tooltipShown?: (point: TPoint) => void; - } - /** A base class for all chart widgets included in the ChartJS library. */ - export class BaseChart extends viz.core.BaseWidget { - /** Deselects the chart's selected series. The series is displayed in an initial style. */ - clearSelection(): void; - /** Gets the current size of the widget. */ - getSize(): { width: number; height: number }; - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Hides all widget tooltips. */ - hideTooltip(): void; - /** Redraws a widget. */ - render(renderOptions?: { - force?: boolean; - animate?: boolean; - asyncSeriesRendering?: boolean; - }): void; - } - export interface AdvancedLegend extends core.BaseLegend { - /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ - customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; - /**

Specifies a callback function that returns the text to be displayed by legend items.

*/ - customizeText?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; - /** Specifies what series elements to highlight when a corresponding item in the legend is hovered over. */ - hoverMode?: string; - } - export interface AdvancedOptions extends BaseChartOptions { - /** A handler for the argumentAxisClick event. */ - onArgumentAxisClick?: any; - /** Specifies the color of the parent page element. */ - containerBackgroundColor?: string; - /** An object providing options for managing data from a data source. */ - dataPrepareSettings?: { - /** Specifies whether or not to validate the values from a data source. */ - checkTypeForAllData?: boolean; - /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ - convertToAxisDataType?: boolean; - /** Specifies how to sort the series points. */ - sortingMethod?: any; - }; - /** A handler for the legendClick event. */ - onLegendClick?: any; - /** A handler for the seriesClick event. */ - onSeriesClick?: any; - /** A handler for the seriesHoverChanged event. */ - onSeriesHoverChanged?: (e: { - component: BaseChart; - element: Element; - target: TSeries; - }) => void; - /** A handler for the seriesSelectionChanged event. */ - onSeriesSelectionChanged?: (e: { - component: BaseChart; - element: Element; - target: TSeries; - }) => void; - /** Specifies whether a single series or multiple series can be selected in the chart. */ - seriesSelectionMode?: string; - /** Specifies how the chart must behave when series point labels overlap. */ - resolveLabelOverlapping?: string; - } - export interface Legend extends AdvancedLegend { - /** Specifies whether the legend is located outside or inside the chart's plot. */ - position?: string; - } - export interface ChartTooltip extends BaseChartTooltip { - /** Specifies whether the tooltip must be located in the center of a bar or on its edge. Applies only to the Bar series. */ - location?: string; - /** Specifies the kind of information to display in a tooltip. */ - shared?: boolean; - } - export interface dxChartOptions extends AdvancedOptions { - /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ - equalBarWidth?: any; - adaptiveLayout?: { - keepLabels?: boolean; - }; - /** Indicates whether or not to synchronize value axes when they are displayed on a single pane. */ - synchronizeMultiAxes?: boolean; - /** Specifies whether or not to filter the series points depending on their quantity. */ - useAggregation?: boolean; - /** Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart. */ - adjustOnZoom?: boolean; - /** Specifies argument axis options for the dxChart widget. */ - argumentAxis?: ChartArgumentAxis; - argumentAxisClick?: any; - /** An object defining the configuration options that are common for all axes of the dxChart widget. */ - commonAxisSettings?: ChartCommonAxisSettings; - /** An object defining the configuration options that are common for all panes in the dxChart widget. */ - commonPaneSettings?: CommonPane; - /** An object defining the configuration options that are common for all series of the dxChart widget. */ - commonSeriesSettings?: CommonSeriesSettings; - /** An object that specifies the appearance options of the chart crosshair. */ - crosshair?: { - /** Specifies a color for the crosshair lines. */ - color?: string; - /** Specifies a dash style for the crosshair lines. */ - dashStyle?: string; - /** Specifies whether to enable the crosshair or not. */ - enabled?: boolean; - /** Specifies the opacity of the crosshair lines. */ - opacity?: number; - /** Specifies the width of the crosshair lines. */ - width?: number; - /** Specifies the appearance of the horizontal crosshair line. */ - horizontalLine?: CrosshaierWithLabel; - /** Specifies the appearance of the vertical crosshair line. */ - verticalLine?: CrosshaierWithLabel; - /** Specifies the options of the crosshair labels. */ - label?: { - /** Specifies a color for the background of the crosshair labels. */ - backgroundColor?: string; - /** Specifies whether the crosshair labels are visible or not. */ - visible?: boolean; - /** Specifies font options for the text of the crosshair labels. */ - font?: viz.core.Font; - } - }; - /** Specifies a default pane for the chart's series. */ - defaultPane?: string; - /** Specifies a coefficient determining the diameter of the largest bubble. */ - maxBubbleSize?: number; - /** Specifies the diameter of the smallest bubble measured in pixels. */ - minBubbleSize?: number; - /** Defines the dxChart widget's pane(s). */ - panes?: Array; - /** Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical. */ - rotated?: boolean; - /** Specifies the options of a chart's legend. */ - legend?: Legend; - /** Specifies options for dxChart widget series. */ - series?: Array; - legendClick?: any; - seriesClick?: any; - seriesHoverChanged?: (series: ChartSeries) => void; - seriesSelectionChanged?: (series: ChartSeries) => void; - /** Defines options for the series template. */ - seriesTemplate?: SeriesTemplate; - /** Specifies tooltip options. */ - tooltip?: ChartTooltip; - /** Specifies value axis options for the dxChart widget. */ - valueAxis?: Array; - /** Enables scrolling in your chart. */ - scrollingMode?: string; - /** Enables zooming in your chart. */ - zoomingMode?: string; - /** Specifies the settings of the scroll bar. */ - scrollBar?: { - /** Specifies whether the scroll bar is visible or not. */ - visible?: boolean; - /** Specifies the spacing between the scroll bar and the chart's plot in pixels. */ - offset?: number; - /** Specifies the color of the scroll bar. */ - color?: string; - /** Specifies the width of the scroll bar in pixels. */ - width?: number; - /** Specifies the opacity of the scroll bar. */ - opacity?: number; - /** Specifies the position of the scroll bar in the chart. */ - position?: string; - }; - } - /** A widget used to embed charts into HTML JS applications. */ - export class dxChart extends BaseChart { - constructor(element: JQuery, options?: dxChartOptions); - constructor(element: Element, options?: dxChartOptions); - /** Returns an array of all series in the chart. */ - getAllSeries(): Array; - /** Gets a series within the chart's series collection by the specified name (see the name option). */ - getSeriesByName(seriesName: string): ChartSeries; - /** Gets a series within the chart's series collection by its position number. */ - getSeriesByPos(seriesIndex: number): ChartSeries; - /** Sets the specified start and end values for the chart's argument axis. */ - zoomArgument(startValue: any, endValue: any): void; - } - interface CrosshaierWithLabel extends viz.core.DashedBorderWithOpacity { - /** Configures the label that belongs to the horizontal crosshair line. */ - label?: { - /** Specifies a color for the background of the label that belongs to the horizontal crosshair line. */ - backgroundColor?: string; - /** Specifies whether the label of the horizontal crosshair line is visible or not. */ - visible?: boolean; - /** Specifies font options for the text of the label that belongs to the horizontal crosshair line. */ - font?: viz.core.Font; - } - } - export interface PolarChartTooltip extends BaseChartTooltip { - /** Specifies the kind of information to display in a tooltip. */ - shared?: boolean; - } - export interface dxPolarChartOptions extends AdvancedOptions { - /** Specifies a value indicating whether all bars in a series must have the same angle, or may have different angles if any points in other series are missing. */ - equalBarWidth?: boolean; - /** Specifies adaptive layout options. */ - adaptiveLayout?: { - width?: number; - height?: number; - /** Specifies whether or not point labels can be hidden when the layout is adapting. */ - keepLabels?: boolean; - }; - /** Indicates whether or not to display a "spider web". */ - useSpiderWeb?: boolean; - /** Specifies argument axis options for the dxPolarChart widget. */ - argumentAxis?: PolarArgumentAxis; - /** An object defining the configuration options that are common for all axes of the dxPolarChart widget. */ - commonAxisSettings?: PolarCommonAxisSettings; - /** An object defining the configuration options that are common for all series of the dxPolarChart widget. */ - commonSeriesSettings?: CommonPolarSeriesSettings; - /** Specifies the options of a chart's legend. */ - legend?: AdvancedLegend; - /** Specifies options for dxPolarChart widget series. */ - series?: Array; - /** Defines options for the series template. */ - seriesTemplate?: PolarSeriesTemplate; - /** Specifies tooltip options. */ - tooltip?: PolarChartTooltip; - /** Specifies value axis options for the dxPolarChart widget. */ - valueAxis?: PolarValueAxis; - } - /** A chart widget displaying data in a polar coordinate system. */ - export class dxPolarChart extends BaseChart { - constructor(element: JQuery, options?: dxPolarChartOptions); - constructor(element: Element, options?: dxPolarChartOptions); - /** Returns an array of all series in the chart. */ - getAllSeries(): Array; - /** Gets a series within the chart's series collection by the specified name (see the name option). */ - getSeriesByName(seriesName: string): PolarSeries; - /** Gets a series within the chart's series collection by its position number. */ - getSeriesByPos(seriesIndex: number): PolarSeries; - } - export interface PieLegend extends core.BaseLegend { - /** Specifies what chart elements to highlight when a corresponding item in the legend is hovered over. */ - hoverMode?: string; - /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ - customizeHint?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; - /** Specifies a callback function that returns the text to be displayed by a legend item. */ - customizeText?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; - } - export interface dxPieChartOptions extends BaseChartOptions { - /** Specifies adaptive layout options. */ - adaptiveLayout?: { - /** Specifies whether or not point labels can be hidden when the layout is adapting. */ - keepLabels?: boolean; - }; - /** Specifies dxPieChart legend options. */ - legend?: PieLegend; - /** Specifies options for the series of the dxPieChart widget. */ - series?: Array; - /** Specifies the diameter of the pie. */ - diameter?: number; - /** A handler for the legendClick event. */ - onLegendClick?: any; - legendClick?: any; - /** Specifies how the chart must behave when series point labels overlap. */ - resolveLabelOverlapping?: string; - } - /** A circular chart widget for HTML JS applications. */ - export class dxPieChart extends BaseChart { - constructor(element: JQuery, options?: dxPieChartOptions); - constructor(element: Element, options?: dxPieChartOptions); - /** Provides access to the dxPieChart series. */ - getSeries(): PieSeries; - } -} -declare module DevExpress.viz.core { - export interface Border { - /** Sets a border color for a selected series. */ - color?: string; - /** Sets border visibility for a selected series. */ - visible?: boolean; - /** Sets a border width for a selected series. */ - width?: number; - } - export interface DashedBorder extends Border { - /** Specifies a dash style for the border of a selected series point. */ - dashStyle?: string; - } - export interface DashedBorderWithOpacity extends DashedBorder { - /** Specifies the opacity of the tooltip's border. */ - opacity?: number; - } - export interface Font { - /** Specifies the font color for a strip label. */ - color?: string; - /** Specifies the font family for a strip label. */ - family?: string; - /** Specifies the font opacity for a strip label. */ - opacity?: number; - /** Specifies the font size for a strip label. */ - size?: any; - /** Specifies the font weight for the text displayed in strips. */ - weight?: number; - } - export interface Hatching { - /** Specifies how to apply hatching to highlight a selected series. */ - direction?: string; - /** Specifies the opacity of hatching lines. */ - opacity?: number; - /** Specifies the distance between hatching lines in pixels. */ - step?: number; - /** Specifies the width of hatching lines in pixels. */ - width?: number; - } - export interface Margins { - /** Specifies the legend's bottom margin in pixels. */ - bottom?: number; - /** Specifies the legend's left margin in pixels. */ - left?: number; - /** Specifies the legend's right margin in pixels. */ - right?: number; - /** Specifies the legend's bottom margin in pixels. */ - top?: number; - } - export interface Size { - /** Specifies the width of the widget. */ - width?: number; - /** Specifies the height of the widget. */ - height?: number; - } - export interface Tooltip { - /** Specifies the length of the tooltip's arrow in pixels. */ - arrowLength?: number; - /** Specifies the appearance of the tooltip's border. */ - border?: viz.core.DashedBorderWithOpacity; - /** Specifies a color for the tooltip. */ - color?: string; - customizeText?: Function; - /** Specifies text and appearance of a particular set of tooltips. */ - customizeTooltip?: (arg: Object) => { color?: string; text?: string }; - /** Specifies whether or not the tooltip is enabled. */ - enabled?: boolean; - /** Specifies font options for the text displayed by the tooltip. */ - font?: Font; - /** Specifies a format for the text displayed by the tooltip. */ - format?: string; - /** Specifies the opacity of a tooltip. */ - opacity?: number; - /** Specifies a distance from the tooltip's left/right boundaries to the inner text in pixels. */ - paddingLeftRight?: number; - /** Specifies a distance from the tooltip's top/bottom boundaries to the inner text in pixels. */ - paddingTopBottom?: number; - /** Specifies a precision for formatted values displayed by the tooltip. */ - precision?: number; - /** Specifies options of the tooltip's shadow. */ - shadow?: { - /** Specifies the blur distance of the tooltip's shadow. */ - blur?: number; - /** Specifies the color of the tooltip's shadow. */ - color?: string; - /** Specifies the horizontal offset of the tooltip's shadow relative to the tooltip in pixels. */ - offsetX?: number; - /** Specifies the vertical offset of the tooltip's shadow relative to the tooltip in pixels. */ - offsetY?: number; - /** Specifies the opacity of the tooltip's shadow. */ - opacity?: number; - }; - } - export interface Animation { - /** Determines how long animation runs. */ - duration?: number; - /** Specifies the animation easing mode. */ - easing?: string; - /** Indicates whether or not animation is enabled. */ - enabled?: boolean; - } - export interface LoadingIndicator { - /** Specifies a color for the loading indicator background. */ - backgroundColor?: string; - /** Specifies font options for the loading indicator text. */ - font?: viz.core.Font; - /** Specifies whether to show the loading indicator or not. */ - show?: boolean; - /** Specifies a text to be displayed by the loading indicator. */ - text?: string; - } - export interface LegendBorder extends viz.core.DashedBorderWithOpacity { - /** Specifies a radius for the corners of the legend border. */ - cornerRadius?: number; - } - export interface BaseLegend { - /** Specifies the color of the legend's background. */ - backgroundColor?: string; - /** Specifies legend border settings. */ - border?: viz.core.LegendBorder; - /** Specifies how many columns must be taken to arrange legend items. */ - columnCount?: number; - /** Specifies the spacing between a pair of neighboring legend columns in pixels. */ - columnItemSpacing?: number; - /** Specifies whether or not item columns in the legend have an equal width. */ - equalColumnWidth?: boolean; - /** Specifies font options for legend items. */ - font?: viz.core.Font; - /** Specifies the legend's position on the map. */ - horizontalAlignment?: string; - /** Specifies the alignment of legend items. */ - itemsAlignment?: string; - /** Specifies the position of text relative to the item marker. */ - itemTextPosition?: string; - /** Specifies the distance between the legend and the container borders in pixels. */ - margin?: viz.core.Margins; - /** Specifies the size of item markers in the legend in pixels. */ - markerSize?: number; - /** Specifies whether to arrange legend items horizontally or vertically. */ - orientation?: string; - /** Specifies the spacing between the legend left/right border and legend items in pixels. */ - paddingLeftRight?: number; - /** Specifies the spacing between the legend top/bottom border and legend items in pixels. */ - paddingTopBottom?: number; - /** Specifies how many rows must be taken to arrange legend items. */ - rowCount?: number; - /** Specifies the spacing between a pair of neighboring legend rows in pixels. */ - rowItemSpacing?: number; - /** Specifies the legend's position on the map. */ - verticalAlignment?: string; - /** Specifies whether or not the legend is visible on the map. */ - visible?: boolean; - } - export interface BaseWidgetOptions { - drawn?: (widget: Object) => void; - /** A handler for the drawn event. */ - onDrawn?: (e: { - component: BaseWidget; - element: Element; - }) => void; - incidentOccured?: (incidentInfo: { - id: string; - type: string; - args: any; - text: string; - widget: string; - version: string; - }) => void; - /** A handler for the incidentOccurred event. */ - onIncidentOccurred?: ( - component: BaseWidget, - element: Element, - target: { - id: string; - type: string; - args: any; - text: string; - widget: string; - version: string; - } - ) => void; - /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ - pathModified?: boolean; - /** Specifies whether or not the widget supports right-to-left representation. */ - rtlEnabled?: boolean; - } - /** This section describes options and methods that are common to all widgets. */ - export class BaseWidget extends DOMComponent { - /** Returns the widget's SVG markup. */ - svg(): string; - } -} -declare module DevExpress.viz.gauges { - export interface BaseRangeContainer { - /** Specifies a range container's background color. */ - backgroundColor?: string; - /** Specifies the offset of the range container from an invisible scale line in pixels. */ - offset?: number; - /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ - palette?: any; - /** An array of objects representing ranges contained in the range container. */ - ranges?: Array<{ startValue: number; endValue: number; color: string }>; - /** Specifies a color of a range. */ - color?: string; - /** Specifies an end value of a range. */ - endValue?: number; - /** Specifies a start value of a range. */ - startValue?: number; - } - export interface ScaleTick { - /** Specifies the color of the scale's minor ticks. */ - color?: string; - /** Specifies an array of custom minor ticks. */ - customTickValues?: Array; - /** Specifies the length of the scale's minor ticks. */ - length?: number; - /** Indicates whether automatically calculated minor ticks are visible or not. */ - showCalculatedTicks?: boolean; - /** Specifies an interval between minor ticks. */ - tickInterval?: number; - /** Indicates whether scale minor ticks are visible or not. */ - visible?: boolean; - /** Specifies the width of the scale's minor ticks. */ - width?: number; - } - export interface ScaleMajorTick extends ScaleTick { - /** Specifies whether or not to expand the current major tick interval if labels overlap each other. */ - useTicksAutoArrangement?: boolean; - } - export interface BaseScaleLabel { - /** Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container. */ - useRangeColors?: boolean; - /** Specifies a callback function that returns the text to be displayed in scale labels. */ - customizeText?: (scaleValue: { value: number; valueText: string }) => string; - /** Specifies font options for the text displayed in the scale labels of the gauge. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed in scale labels. */ - format?: string; - /** Specifies a precision for the formatted value displayed in the scale labels. */ - precision?: number; - /** Specifies whether or not scale labels are visible on the gauge. */ - visible?: boolean; - } - export interface BaseScale { - /** Specifies the end value for the scale of the gauge. */ - endValue?: number; - /** Specifies whether or not to hide the first scale label. */ - hideFirstLabel?: boolean; - /** Specifies whether or not to hide the first major tick on the scale. */ - hideFirstTick?: boolean; - /** Specifies whether or not to hide the last scale label. */ - hideLastLabel?: boolean; - /** Specifies whether or not to hide the last major tick on the scale. */ - hideLastTick?: boolean; - /** Specifies common options for scale labels. */ - label?: BaseScaleLabel; - /** Specifies options of the gauge's major ticks. */ - majorTick?: ScaleMajorTick; - /** Specifies options of the gauge's minor ticks. */ - minorTick?: ScaleTick; - /** Specifies the start value for the scale of the gauge. */ - startValue?: number; - } - export interface BaseValueIndicator { - /** Specifies the type of subvalue indicators. */ - type?: string; - /** Specifies the background color for the indicator of the rangeBar type. */ - backgroundColor?: string; - /** Specifies the base value for the indicator of the rangeBar type. */ - baseValue?: number; - /** Specifies a color of the indicator. */ - color?: string; - /** Specifies the range bar size for an indicator of the rangeBar type. */ - size?: number; - text?: { - /** Specifies a callback function that returns the text to be displayed in an indicator. */ - customizeText?: (indicatedValue: { value: number; valueText: string }) => string; - font?: viz.core.Font; - /** Specifies a format for the text displayed in an indicator. */ - format?: string; - /** Specifies the range bar's label indent in pixels. */ - indent?: number; - /** Specifies a precision for the formatted value displayed by an indicator. */ - precision?: number; - }; - offset?: number; - length?: number; - width?: number; - /** Specifies the length of an arrow for the indicator of the textCloud type in pixels. */ - arrowLength?: number; - /** Sets the array of colors to be used for coloring subvalue indicators. */ - palette?: Array; - /** Specifies the distance between the needle and the center of a gauge for the indicator of a needle-like type. */ - indentFromCenter?: number; - /** Specifies the second color for the indicator of the twoColorNeedle type. */ - secondColor?: string; - /** Specifies the length of a twoNeedleColor type indicator tip as a percentage. */ - secondFraction?: number; - /** Specifies the spindle's diameter in pixels for the indicator of a needle-like type. */ - spindleSize?: number; - /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ - spindleGapSize?: number; - /** Specifies the orientation of the rangeBar indicator on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - /** Specifies the orientation of the rangeBar indicator on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - } - export interface SharedGaugeOptions { - /** Specifies animation options. */ - animation?: viz.core.Animation; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ - redrawOnResize?: boolean; - /** Specifies the size of the widget in pixels. */ - size?: viz.core.Size; - /** Specifies a subtitle for a gauge. */ - subtitle?: { - /** Specifies font options for the subtitle. */ - font?: viz.core.Font; - /** Specifies a text for the subtitle. */ - text?: string; - }; - /** Specifies the name of the theme to be applied. */ - theme?: string; - /** Specifies a title for a gauge. */ - title?: { - /** Specifies font options for the title. */ - font?: viz.core.Font; - /** Specifies a title's position on the gauge. */ - position?: string; - /** Specifies a text for the title. */ - text?: string; - }; - /** Specifies options for gauge tooltips. */ - tooltip?: viz.core.Tooltip; - } - export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { - /** Specifies the color of the parent page element. */ - containerBackgroundColor?: string; - /** Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option). */ - margin?: viz.core.Margins; - /** Specifies options of the gauge's range container. */ - rangeContainer?: BaseRangeContainer; - /** Specifies a gauge's scale options. */ - scale?: BaseScale; - /** Specifies the appearance options of subvalue indicators. */ - subvalueIndicator?: BaseValueIndicator; - /** Specifies a set of subvalues to be designated by the subvalue indicators. */ - subvalues?: Array; - /** Specifies the main value on a gauge. */ - value?: number; - /** Specifies the appearance options of the value indicator. */ - valueIndicator?: BaseValueIndicator; - } - /** A gauge widget. */ - export class dxBaseGauge extends viz.core.BaseWidget { - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws a widget. */ - render(): void; - /** Returns the main gauge value. */ - value(): number; - /** Updates a gauge value. */ - value(value: number): void; - /** Returns an array of gauge subvalues. */ - subvalues(): Array; - /** Updates gauge subvalues. */ - subvalues(subvalues: Array): void; - } - export interface LinearRangeContainer extends BaseRangeContainer { - /** Specifies the orientation of the range container on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - /** Specifies the orientation of a range container on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - /** Specifies the width of the range container's start and end boundaries in the dxLinearGauge widget. */ - width?: any; - /** Specifies an end width of a range container. */ - end?: number; - /** Specifies a start width of a range container. */ - start?: number; - } - export interface LinearScaleLabel extends BaseScaleLabel { - /** Specifies the spacing between scale labels and ticks. */ - indentFromTick?: number; - } - export interface LinearScale extends BaseScale { - /** Specifies the orientation of scale ticks on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - label?: LinearScaleLabel; - /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - } - export interface dxLinearGaugeOptions extends BaseGaugeOptions { - /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ - geometry?: { - /** Indicates whether to display the dxLinearGauge widget vertically or horizontally. */ - orientation?: string; - }; - /** Specifies gauge range container options. */ - rangeContainer?: LinearRangeContainer; - scale?: LinearScale; - } - /** A widget that represents a gauge with a linear scale. */ - export class dxLinearGauge extends dxBaseGauge { - constructor(element: JQuery, options?: dxLinearGaugeOptions); - constructor(element: Element, options?: dxLinearGaugeOptions); - } - export interface CircularRangeContainer extends BaseRangeContainer { - /** Specifies the orientation of the range container in the dxCircularGauge widget. */ - orientation?: string; - /** Specifies the range container's width in pixels. */ - width?: number; - } - export interface CircularScaleLabel extends BaseScaleLabel { - /** Specifies the spacing between scale labels and ticks. */ - indentFromTick?: number; - } - export interface CircularScale extends BaseScale { - label?: CircularScaleLabel; - /** Specifies the orientation of scale ticks. */ - orientation?: string; - } - export interface dxCircularGaugeOptions extends BaseGaugeOptions { - /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ - geometry?: { - /** Specifies the end angle of the circular gauge's arc. */ - endAngle?: number; - /** Specifies the start angle of the circular gauge's arc. */ - startAngle?: number; - }; - /** Specifies gauge range container options. */ - rangeContainer?: CircularRangeContainer; - scale?: CircularScale; - } - /** A widget that represents a gauge with a circular scale. */ - export class dxCircularGauge extends dxBaseGauge { - constructor(element: JQuery, options?: dxCircularGaugeOptions); - constructor(element: Element, options?: dxCircularGaugeOptions); - } - export interface dxBarGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { - /** Specifies a color for the remaining segment of the bar's track. */ - backgroundColor?: string; - /** Specifies a distance between bars in pixels. */ - barSpacing?: number; - /** Specifies a base value for bars. */ - baseValue?: number; - /** Specifies an end value for the gauge's invisible scale. */ - endValue?: number; - /** Defines the shape of the gauge's arc. */ - geometry?: { - /** Specifies the end angle of the bar gauge's arc. */ - endAngle?: number; - /** Specifies the start angle of the bar gauge's arc. */ - startAngle?: number; - }; - /** Specifies the options of the labels that accompany gauge bars. */ - label?: { - /** Specifies a color for the label connector text. */ - connectorColor?: string; - /** Specifies the width of the label connector in pixels. */ - connectorWidth?: number; - /** Specifies a callback function that returns a text for labels. */ - customizeText?: (barValue: { value: number; valueText: string }) => string; - /** Specifies font options for bar labels. */ - font?: viz.core.Font; - /** Specifies a format for bar labels. */ - format?: string; - /** Specifies the distance between the upper bar and bar labels in pixels. */ - indent?: number; - /** Specifies a precision for the formatted value displayed by labels. */ - precision?: number; - /** Specifies whether bar labels appear on a gauge or not. */ - visible?: boolean; - }; - /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ - palette?: string; - /** Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar. */ - relativeInnerRadius?: number; - /** Specifies a start value for the gauge's invisible scale. */ - startValue?: number; - /** Specifies the array of values to be indicated on a bar gauge. */ - values?: Array; - } - /** A circular bar widget. */ - export class dxBarGauge extends viz.core.BaseWidget { - constructor(element: JQuery, options?: dxBarGaugeOptions); - constructor(element: Element, options?: dxBarGaugeOptions); - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws the widget. */ - render(): void; - /** Returns an array of gauge values. */ - values(): Array; - /** Updates the values displayed by a gauge. */ - values(values: Array): void; - } -} -declare module DevExpress.viz.map { - /** This section describes the fields and methods that can be used in code to manipulate the Area object. */ - export interface Area { - /** Contains the element type. */ - type: string; - /** Return the value of an attribute. */ - attribute(name: string): any; - /** Provides information about the selection state of an area. */ - selected(): boolean; - /** Sets a new selection state for an area. */ - selected(state: boolean): void; - } - /** This section describes the fields and methods that can be used in code to manipulate the Markers object. */ - export interface Marker { - /** Contains the descriptive text accompanying the map marker. */ - text: string; - /** Contains the type of the element. */ - type: string; - /** Contains the URL of an image map marker. */ - url: string; - /** Contains the value of a bubble map marker. */ - value: number; - /** Contains the values of a pie map marker. */ - values: Array; - /** Returns the value of an attribute. */ - attribute(name: string): any; - /** Returns the coordinates of a specific marker. */ - coordinates(): Array; - /** Provides information about the selection state of a marker. */ - selected(): boolean; - /** Sets a new selection state for a marker. */ - selected(state: boolean): void; - } - export interface AreaSettings { - /** Specifies the width of the area border in pixels. */ - borderWidth?: number; - /** Specifies a color for the area border. */ - borderColor?: string; - click?: any; - /** Specifies a color for an area. */ - color?: string; - /** Specifies the function that customizes each area individually. */ - customize?: (areaInfo: Area) => AreaSettings; - /** Specifies a color for the area border when the area is hovered over. */ - hoveredBorderColor?: string; - /** Specifies the pixel-measured width of the area border when the area is hovered over. */ - hoveredBorderWidth?: number; - /** Specifies a color for an area when this area is hovered over. */ - hoveredColor?: string; - /** Specifies whether or not to change the appearance of an area when it is hovered over. */ - hoverEnabled?: boolean; - /** Configures area labels. */ - label?: { - /** Specifies the data field that provides data for area labels. */ - dataField?: string; - /** Enables area labels. */ - enabled?: boolean; - /** Specifies font options for area labels. */ - font?: viz.core.Font; - }; - /** Specifies the name of the palette or a custom range of colors to be used for coloring a map. */ - palette?: any; - /** Specifies the number of colors in a palette. */ - paletteSize?: number; - /** Allows you to paint areas with similar attributes in the same color. */ - colorGroups?: Array; - /** Specifies the field that provides data to be used for coloring areas. */ - colorGroupingField?: string; - /** Specifies a color for the area border when the area is selected. */ - selectedBorderColor?: string; - /** Specifies a color for an area when this area is selected. */ - selectedColor?: string; - /** Specifies the pixel-measured width of the area border when the area is selected. */ - selectedBorderWidth?: number; - selectionChanged?: (area: Area) => void; - /** Specifies whether single or multiple areas can be selected on a vector map. */ - selectionMode?: string; - } - export interface MarkerSettings { - /** Specifies a color for the marker border. */ - borderColor?: string; - /** Specifies the width of the marker border in pixels. */ - borderWidth?: number; - click?: any; - /** Specifies a color for a marker of the dot or bubble type. */ - color?: string; - /** Specifies the function that customizes each marker individually. */ - customize?: (markerInfo: Marker) => MarkerSettings; - font?: Object; - /** Specifies the pixel-measured width of the marker border when the marker is hovered over. */ - hoveredBorderWidth?: number; - /** Specifies a color for the marker border when the marker is hovered over. */ - hoveredBorderColor?: string; - /** Specifies a color for a marker of the dot or bubble type when this marker is hovered over. */ - hoveredColor?: string; - /** Specifies whether or not to change the appearance of a marker when it is hovered over. */ - hoverEnabled?: boolean; - /** Specifies marker label options. */ - label?: { - /** Enables marker labels. */ - enabled?: boolean; - /** Specifies font options for marker labels. */ - font?: viz.core.Font; - }; - /** Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if you use markers of the bubble type. */ - maxSize?: number; - /** Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if you use markers of the bubble type. */ - minSize?: number; - /** Specifies the opacity of markers. Setting this option makes sense only if you use markers of the bubble type. */ - opacity?: number; - /** Specifies the pixel-measured width of the marker border when the marker is selected. */ - selectedBorderWidth?: number; - /** Specifies a color for the marker border when the marker is selected. */ - selectedBorderColor?: string; - /** Specifies a color for a marker of the dot or bubble type when this marker is selected. */ - selectedColor?: string; - selectionChanged?: (marker: Marker) => void; - /** Specifies whether a single or multiple markers can be selected on a vector map. */ - selectionMode?: string; - /** Specifies the size of markers. Setting this option makes sense for any type of marker except bubble. */ - size?: number; - /** Specifies the type of markers to be used on the map. */ - type?: string; - /** Specifies the name of a palette or a custom set of colors to be used for coloring markers of the pie type. */ - palette?: any; - /** Allows you to paint markers with similar attributes in the same color. */ - colorGroups?: Array; - /** Specifies the field that provides data to be used for coloring markers. */ - colorGroupingField?: string; - /** Allows you to display bubbles with similar attributes in the same size. */ - sizeGroups?: Array; - /** Specifies the field that provides data to be used for sizing bubble markers. */ - sizeGroupingField?: string; - } - export interface dxVectorMapOptions extends viz.core.BaseWidgetOptions { - /** An object specifying options for the map areas. */ - areaSettings?: AreaSettings; - /** Specifies the options for the map background. */ - background?: { - /** Specifies a color for the background border. */ - borderColor?: string; - /** Specifies a color for the background. */ - color?: string; - }; - /** Specifies the positioning of a map in geographical coordinates. */ - bounds?: Array; - /** Specifies the options of the control bar. */ - controlBar?: { - /** Specifies a color for the outline of the control bar elements. */ - borderColor?: string; - /** Specifies a color for the inner area of the control bar elements. */ - color?: string; - /** Specifies whether or not to display the control bar. */ - enabled?: boolean; - /** Specifies the margin of the control bar in pixels. */ - margin?: number; - /** Specifies the position of the control bar. */ - horizontalAlignment?: string; - /** Specifies the position of the control bar. */ - verticalAlignment?: string; - }; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** Specifies a data source for the map area. */ - mapData?: any; - /** Specifies a data source for the map markers. */ - markers?: any; - /** An object specifying options for the map markers. */ - markerSettings?: MarkerSettings; - /** Specifies the size of the dxVectorMap widget. */ - size?: viz.core.Size; - /** Specifies the name of the theme to be applied. */ - theme?: Object; - /** Specifies tooltip options. */ - tooltip?: viz.core.Tooltip; - /** Configures map legends. */ - legends?: Array; - /** Specifies whether or not the map should respond when a user rolls the mouse wheel. */ - wheelEnabled?: boolean; - /** Specifies whether the map should respond to touch gestures. */ - touchEnabled?: boolean; - /** Disables the zooming capability. */ - zoomingEnabled?: boolean; - /** Specifies the geographical coordinates of the center for a map. */ - center?: Array; - centerChanged?: (center: Array) => void; - /** A handler for the centerChanged event. */ - onCenterChanged?: (e: { - center: Array; - component: dxVectorMap; - element: Element; - }) => void; - /** Specifies a number that is used to zoom a map initially. */ - zoomFactor?: number; - zoomFactorChanged?: (zoomFactor: number) => void; - /** A handler for the zoomFactorChanged event. */ - onZoomFactorChanged?: (e: { - zoomFactor: number; - component: dxVectorMap; - element: Element; - }) => void; - click?: any; - /** A handler for the click event. */ - onClick?: any; - /** A handler for the areaClick event. */ - onAreaClick?: any; - /** A handler for the areaSelectionChanged event. */ - onAreaSelectionChanged?: (e: { - target: Area; - component: dxVectorMap; - element: Element; - }) => void; - /** A handler for the markerClick event. */ - onMarkerClick?: any; - /** A handler for the markerSelectionChanged event. */ - onMarkerSelectionChanged?: (e: { - target: Marker; - component: dxVectorMap; - element: Element; - }) => void; - /** Disables the panning capability. */ - panningEnabled?: boolean; - } - export interface Legend extends viz.core.BaseLegend { - /** Specifies text for legend items. */ - customizeText?: (itemInfo: { start: number; end: number; index: number; color: string; size: number; }) => string; - /** Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item. */ - customizeHint?: (itemInfo: { start: number; end: number; index: number; color: string; size: number }) => string; - /** Specifies the source of data for the legend. */ - source?: string; - } - /** A vector map widget. */ - export class dxVectorMap extends viz.core.BaseWidget { - constructor(element: JQuery, options?: dxVectorMapOptions); - constructor(element: Element, options?: dxVectorMapOptions); - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws a widget. */ - render(): void; - /** Gets the current coordinates of the map center. */ - center(): Array; - /** Sets the coordinates of the map center. */ - center(centerCoordinates: Array): void; - /** Deselects all the selected areas on a map. The areas are displayed in their initial style after. */ - clearAreaSelection(): void; - /** Deselects all the selected markers on a map. The markers are displayed in their initial style after. */ - clearMarkerSelection(): void; - /** Deselects all the selected area and markers on a map at once. The areas and markers are displayed in their initial style after. */ - clearSelection(): void; - /** Converts client area coordinates into map coordinates. */ - convertCoordinates(x: number, y: number): Array; - /** Returns an array with all the map areas. */ - getAreas(): Array; - /** Returns an array with all the map markers. */ - getMarkers(): Array; - /** Gets the current coordinates of the map viewport. */ - viewport(): Array; - /** Sets the coordinates of the map viewport. */ - viewport(viewportCoordinates: Array): void; - /** Gets the current value of the map zoom factor. */ - zoomFactor(): number; - /** Sets the value of the map zoom factor. */ - zoomFactor(zoomFactor: number): void; - } -} -declare module DevExpress.viz.rangeSelector { - export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { - /** Specifies the options for the range selector's background. */ - background?: { - /** Specifies the background color for the dxRangeSelector. */ - color?: string; - /** Specifies image options. */ - image?: { - /** Specifies a location for the image in the background of a range selector. */ - location?: string; - /** Specifies the image's URL. */ - url?: string; - }; - /** Indicates whether or not the background (background color and/or image) is visible. */ - visible?: boolean; - }; - /** Specifies the dxRangeSelector's behavior options. */ - behavior?: { - /** Indicates whether or not you can swap sliders. */ - allowSlidersSwap?: boolean; - /** -Indicates whether or not animation is enabled. - */ - animationEnabled?: boolean; - /** Specifies when to call the onSelectedRangeChanged function. */ - callSelectedRangeChanged?: string; - /** Indicates whether or not an end user can specify the range using a mouse, without the use of sliders. */ - manualRangeSelectionEnabled?: boolean; - /** Indicates whether or not an end user can shift the selected range to the required location on a scale by clicking. */ - moveSelectedRangeByClick?: boolean; - /** Indicates whether to snap a slider to ticks. */ - snapToTicks?: boolean; - }; - /** Specifies the options required to display a chart as the range selector's background. */ - chart?: { - /** Specifies a coefficient for determining an indent from the bottom background boundary to the lowest chart point. */ - bottomIndent?: number; - /** An object defining the common configuration options for the chart’s series. */ - commonSeriesSettings?: viz.charts.CommonSeriesSettings; - /** An object providing options for managing data from a data source. */ - dataPrepareSettings?: { - /** Specifies whether or not to validate values from a data source. */ - checkTypeForAllData?: boolean; - /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ - convertToAxisDataType?: boolean; - /** Specifies how to sort series points. */ - sortingMethod?: any; - }; - /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ - equalBarWidth?: any; - /** An object defining the chart’s series. */ - series?: Array; - /** Defines options for the series template. */ - seriesTemplate?: viz.charts.SeriesTemplate; - /** Specifies a coefficient for determining an indent from the background's top boundary to the topmost chart point. */ - topIndent?: number; - /** Specifies whether or not to filter the series points depending on their quantity. */ - useAggregation?: boolean; - /** Specifies options for the chart's value axis. */ - valueAxis?: { - /** Indicates whether or not the chart's value axis must be inverted. */ - inverted?: boolean; - /** Specifies the value to be raised to a power when generating ticks for a logarithmic value axis. */ - logarithmBase?: number; - /** Specifies the maximum value of the chart's value axis. */ - max?: number; - /** Specifies the minimum value of the chart's value axis. */ - min?: number; - /** Specifies the type of the value axis. */ - type?: string; - /** Specifies the desired type of axis values. */ - valueType?: string; - }; - }; - /** Specifies the color of the parent page element. */ - containerBackgroundColor?: string; - /** Specifies a data source for the scale values and for the chart at the background. */ - dataSource?: any; - /** Specifies the data source field that provides data for the scale. */ - dataSourceField?: string; - /** Specifies the appearance of the loading indicator. */ - loadingIndicator?: viz.core.LoadingIndicator; - /** Specifies the blank space in pixels between the dxRangeSelector widget's extreme elements and the boundaries of the area provided for the widget (see size). */ - margin?: viz.core.Margins; - /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ - redrawOnResize?: boolean; - /** Specifies options of the range selector's scale. */ - scale?: { - /** Specifies the scale's end value. */ - endValue?: any; - /** Specifies common options for scale labels. */ - label?: { - /** Specifies a callback function that returns the text to be displayed in scale labels. */ - customizeText?: (scaleValue: { value: any; valueText: string; }) => string; - /** Specifies font options for the text displayed in the range selector's scale labels. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed in scale labels. */ - format?: string; - /** Specifies a precision for the formatted value displayed in the scale labels. */ - precision?: number; - /** Specifies a spacing between scale labels and the background bottom edge. */ - topIndent?: number; - /** Specifies whether or not the scale's labels are visible. */ - visible?: boolean; - }; - /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ - logarithmBase?: number; - /** Specifies an interval between major ticks. */ - majorTickInterval?: any; - /** Specifies options for the date-time scale's markers. */ - marker?: { - /** Defines the options that can be set for the text that is displayed by the scale markers. */ - label?: { - /** Specifies a callback function that returns the text to be displayed in scale markers. */ - customizeText?: (markerValue: { value: any; valueText: string }) => string; - /** Specifies a format for the text displayed in scale markers. */ - format?: string; - }; - /** Specifies the height of the marker's separator. */ - separatorHeight?: number; - /** Specifies the space between the marker label and the marker separator. */ - textLeftIndent?: number; - /** Specifies the space between the marker's label and the top edge of the marker's separator. */ - textTopIndent?: number; - /** Specified the indent between the marker and the scale lables. */ - topIndent?: number; - /** Indicates whether scale markers are visible. */ - visible?: boolean; - }; - /** Specifies the maximum range that can be selected. */ - maxRange?: any; - /** Specifies the number of minor ticks between neighboring major ticks. */ - minorTickCount?: number; - /** -Specifies an interval between minor ticks. - */ - minorTickInterval?: any; - /** Specifies the minimum range that can be selected. */ - minRange?: any; - /** Specifies the height of the space reserved for the scale in pixels. */ - placeholderHeight?: number; - /** Indicates whether or not to set ticks of a date-time scale at the beginning of each date-time interval. */ - setTicksAtUnitBeginning?: boolean; - /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ - showCustomBoundaryTicks?: boolean; - /** Indicates whether or not to show minor ticks on the scale. */ - showMinorTicks?: boolean; - /** Specifies the scale's start value. */ - startValue?: any; - /** Specifies options defining the appearance of scale ticks. */ - tick?: { - /** Specifies the color of scale ticks (both major and minor ticks). */ - color?: string; - /** Specifies the opacity of scale ticks (both major and minor ticks). */ - opacity?: number; - /** Specifies the width of the scale's ticks (both major and minor ticks). */ - width?: number; - }; - /** Specifies the type of the scale. */ - type?: string; - /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ - useTicksAutoArrangement?: boolean; - /** Specifies the type of values on the scale. */ - valueType?: string; - /** Specifies the order of arguments on a discrete scale. */ - categories?: Array; - }; - /** Specifies the range to be selected when displaying the dxRangeSelector. */ - selectedRange?: { - /** Specifies the start value of the range to be selected when displaying the dxRangeSelector widget on a page. */ - startValue?: any; - /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ - endValue?: any; - }; - selectedRangeChanged?: (selectedRange: { startValue: any; endValue: any; }) => void; - /** A handler for the selectedRangeChanged event. */ - onSelectedRangeChanged?: (e: { - startValue: any; - endValue: any; - component: dxRangeSelector; - element: Element; - }) => void; - /** Specifies the options of the range selector's shutters. */ - shutter?: { - /** Specifies shutter color. */ - color?: string; - /** Specifies the opacity of the color of shutters. */ - opacity?: number; - }; - /** Specifies in pixels the size of the dxRangeSelector widget. */ - size?: viz.core.Size; - /** Specifies the appearance of the range selector's slider handles. */ - sliderHandle?: { - /** Specifies the color of the slider handles. */ - color?: string; - /** Specifies the opacity of the slider handles. */ - opacity?: number; - /** Specifies the width of the slider handles. */ - width?: number; - }; - /** Defines the options of the range selector slider markers. */ - sliderMarker?: { - /** Specifies the color of the slider markers. */ - color?: string; - /** Specifies a callback function that returns the text to be displayed by slider markers. */ - customizeText?: (scaleValue: { value: any; valueText: any; }) => string; - /** Specifies font options for the text displayed by the range selector slider markers. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed in slider markers. */ - format?: string; - /** Specifies the color used for the slider marker text when the currently selected range does not match the minRange and maxRange values. */ - invalidRangeColor?: string; - /** Specifies the empty space between the marker's border and the marker’s text. */ - padding?: number; - /** Specifies in pixels the height and width of the space reserved for the range selector slider markers. */ - placeholderSize?: { - /** Specifies the height of the placeholder for the left and right slider markers. */ - height?: number; - /** Specifies the width of the placeholder for the left and right slider markers. */ - width?: { - /** Specifies the width of the left slider marker's placeholder. */ - left?: number; - /** Specifies the width of the right slider marker's placeholder. */ - right?: number; - }; - }; - /** Specifies a precision for the formatted value displayed in slider markers. */ - precision?: number; - /** Indicates whether or not the slider markers are visible. */ - visible?: boolean; - }; - /** Sets the name of the theme to be used by the range selector. */ - theme?: string; - } - /** A widget that allows end users to select a range of values on a scale. */ - export class dxRangeSelector extends viz.core.BaseWidget { - constructor(element: JQuery, options?: dxRangeSelectorOptions); - constructor(element: Element, options?: dxRangeSelectorOptions); - /** Displays the loading indicator. */ - showLoadingIndicator(): void; - /** Conceals the loading indicator. */ - hideLoadingIndicator(): void; - /** Redraws a widget. */ - render(skipChartAnimation?: boolean): void; - /** Returns the currently selected range. */ - getSelectedRange(): { startValue: any; endValue: any; }; - /** Sets a specified range. */ - setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; - } -} -declare module DevExpress.viz.sparklines { - export interface SparklineTooltip extends viz.core.Tooltip { - /** Specifies how a tooltip is horizontally aligned relative to the graph. */ - horizontalAlignment?: string; - /** Specifies how a tooltip is vertically aligned relative to the graph. */ - verticalAlignment?: string; - } - export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { - /** Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels. */ - margin?: viz.core.Margins; - /** Specifies the size of the widget. */ - size?: viz.core.Size; - /** Specifies the name of the theme to be applied. */ - theme?: string; - /** Specifies tooltip options. */ - tooltip?: SparklineTooltip; - } - /** Overridden by descriptions for particular widgets. */ - export class BaseSparkline extends viz.core.BaseWidget { - /** Redraws a widget. */ - render(): void; - } - export interface dxBulletOptions extends BaseSparkline { - /** Specifies a color for the bullet bar. */ - color?: string; - /** Specifies an end value for the invisible scale. */ - endScaleValue?: number; - /** Specifies whether or not to show the target line. */ - showTarget?: boolean; - /** Specifies whether or not to show the line indicating zero on the invisible scale. */ - showZeroLevel?: boolean; - /** Specifies a start value for the invisible scale. */ - startScaleValue?: number; - /** Specifies the value indicated by the target line. */ - target?: number; - /** Specifies a color for both the target and zero level lines. */ - targetColor?: string; - /** Specifies the width of the target line. */ - targetWidth?: number; - /** Specifies the primary value indicated by the bullet bar. */ - value?: number; - } - /** A bullet graph widget. */ - export class dxBullet extends BaseSparkline { - constructor(element: JQuery, options?: dxBulletOptions); - constructor(element: Element, options?: dxBulletOptions); - } - export interface dxSparklineOptions extends BaseSparklineOptions { - /** Specifies the data source field that provides arguments for a sparkline. */ - argumentField?: string; - /** Sets a color for the bars indicating negative values. Available for a sparkline of the bar type only. */ - barNegativeColor?: string; - /** Sets a color for the bars indicating positive values. Available for a sparkline of the bar type only. */ - barPositiveColor?: string; - /** Specifies a data source for the sparkline. */ - dataSource?: Array; - /** Sets a color for the boundary of both the first and last points on a sparkline. */ - firstLastColor?: string; - /** Specifies whether a sparkline ignores null data points or not. */ - ignoreEmptyPoints?: boolean; - /** Sets a color for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ - lineColor?: string; - /** Specifies a width for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ - lineWidth?: number; - /** Sets a color for the bars indicating the values that are less than the winloss threshold. Available for a sparkline of the winloss type only. */ - lossColor?: string; - /** Sets a color for the boundary of the maximum point on a sparkline. */ - maxColor?: string; - /** Sets a color for the boundary of the minimum point on a sparkline. */ - minColor?: string; - /** Sets a color for points on a sparkline. Available for the sparklines of the line- and area-like types. */ - pointColor?: string; - /** Specifies the diameter of sparkline points in pixels. Available for the sparklines of line- and area-like types. */ - pointSize?: number; - /** Specifies a symbol to use as a point marker on a sparkline. Available for the sparklines of the line- and area-like types. */ - pointSymbol?: string; - /** Specifies whether or not to indicate both the first and last values on a sparkline. */ - showFirstLast?: boolean; - /** Specifies whether or not to indicate both the minimum and maximum values on a sparkline. */ - showMinMax?: boolean; - /** Determines the type of a sparkline. */ - type?: string; - /** Specifies the data source field that provides values for a sparkline. */ - valueField?: string; - /** Sets a color for the bars indicating the values greater than a winloss threshold. Available for a sparkline of the winloss type only. */ - winColor?: string; - /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ - winlossThreshold?: number; - } - /** A sparkline widget. */ - export class dxSparkline extends BaseSparkline { - constructor(element: JQuery, options?: dxSparklineOptions); - constructor(element: Element, options?: dxSparklineOptions); - } -} -interface JQuery { - dxProgressBar(): JQuery; - dxProgressBar(options: "instance"): DevExpress.ui.dxProgressBar; - dxProgressBar(options: string): any; - dxProgressBar(options: string, ...params: any[]): any; - dxProgressBar(options: DevExpress.ui.dxProgressBarOptions): JQuery; - dxSlider(): JQuery; - dxSlider(options: "instance"): DevExpress.ui.dxSlider; - dxSlider(options: string): any; - dxSlider(options: string, ...params: any[]): any; - dxSlider(options: DevExpress.ui.dxSliderOptions): JQuery; - dxRangeSlider(): JQuery; - dxRangeSlider(options: "instance"): DevExpress.ui.dxRangeSlider; - dxRangeSlider(options: string): any; - dxRangeSlider(options: string, ...params: any[]): any; - dxRangeSlider(options: DevExpress.ui.dxRangeSliderOptions): JQuery; - dxFileUploader(): JQuery; - dxFileUploader(options: "instance"): DevExpress.ui.dxFileUploader; - dxFileUploader(options: string): any; - dxFileUploader(options: string, ...params: any[]): any; - dxFileUploader(options: DevExpress.ui.dxFileUploaderOptions): JQuery; - dxValidator(): JQuery; - dxValidator(options: "instance"): DevExpress.ui.dxValidator; - dxValidator(options: string): any; - dxValidator(options: string, ...params: any[]): any; - dxValidationGroup(): JQuery; - dxValidationGroup(options: "instance"): DevExpress.ui.dxValidationGroup; - dxValidationGroup(options: string): any; - dxValidationGroup(options: string, ...params: any[]): any; - dxValidationSummary(): JQuery; - dxValidationSummary(options: "instance"): DevExpress.ui.dxValidationSummary; - dxValidationSummary(options: string): any; - dxValidationSummary(options: string, ...params: any[]): any; - dxTooltip(): JQuery; - dxTooltip(options: "instance"): DevExpress.ui.dxTooltip; - dxTooltip(options: string): any; - dxTooltip(options: string, ...params: any[]): any; - dxTooltip(options: DevExpress.ui.dxTooltipOptions): JQuery; - dxDropDownList(): JQuery; - dxDropDownList(options: "instance"): DevExpress.ui.dxDropDownList; - dxDropDownList(options: string): any; - dxDropDownList(options: string, ...params: any[]): any; - dxDropDownList(options: DevExpress.ui.dxDropDownListOptions): JQuery; - dxToolbar(): JQuery; - dxToolbar(options: "instance"): DevExpress.ui.dxToolbar; - dxToolbar(options: string): any; - dxToolbar(options: string, ...params: any[]): any; - dxToolbar(options: DevExpress.ui.dxToolbarOptions): JQuery; - dxToast(): JQuery; - dxToast(options: "instance"): DevExpress.ui.dxToast; - dxToast(options: string): any; - dxToast(options: string, ...params: any[]): any; - dxToast(options: DevExpress.ui.dxToastOptions): JQuery; - dxTextEditor(): JQuery; - dxTextEditor(options: "instance"): DevExpress.ui.dxTextEditor; - dxTextEditor(options: string): any; - dxTextEditor(options: string, ...params: any[]): any; - dxTextEditor(options: DevExpress.ui.dxTextEditorOptions): JQuery; - dxTextBox(): JQuery; - dxTextBox(options: "instance"): DevExpress.ui.dxTextBox; - dxTextBox(options: string): any; - dxTextBox(options: string, ...params: any[]): any; - dxTextBox(options: DevExpress.ui.dxTextBoxOptions): JQuery; - dxTextArea(): JQuery; - dxTextArea(options: "instance"): DevExpress.ui.dxTextArea; - dxTextArea(options: string): any; - dxTextArea(options: string, ...params: any[]): any; - dxTextArea(options: DevExpress.ui.dxTextAreaOptions): JQuery; - dxTabs(): JQuery; - dxTabs(options: "instance"): DevExpress.ui.dxTabs; - dxTabs(options: string): any; - dxTabs(options: string, ...params: any[]): any; - dxTabs(options: DevExpress.ui.dxTabsOptions): JQuery; - dxTabPanel(): JQuery; - dxTabPanel(options: "instance"): DevExpress.ui.dxTabPanel; - dxTabPanel(options: string): any; - dxTabPanel(options: string, ...params: any[]): any; - dxTabPanel(options: DevExpress.ui.dxTabPanelOptions): JQuery; - dxSelectBox(): JQuery; - dxSelectBox(options: "instance"): DevExpress.ui.dxSelectBox; - dxSelectBox(options: string): any; - dxSelectBox(options: string, ...params: any[]): any; - dxSelectBox(options: DevExpress.ui.dxSelectBoxOptions): JQuery; - dxScrollView(): JQuery; - dxScrollView(options: "instance"): DevExpress.ui.dxScrollView; - dxScrollView(options: string): any; - dxScrollView(options: string, ...params: any[]): any; - dxScrollView(options: DevExpress.ui.dxScrollViewOptions): JQuery; - dxScrollable(): JQuery; - dxScrollable(options: "instance"): DevExpress.ui.dxScrollable; - dxScrollable(options: string): any; - dxScrollable(options: string, ...params: any[]): any; - dxScrollable(options: DevExpress.ui.dxScrollableOptions): JQuery; - dxRadioGroup(): JQuery; - dxRadioGroup(options: "instance"): DevExpress.ui.dxRadioGroup; - dxRadioGroup(options: string): any; - dxRadioGroup(options: string, ...params: any[]): any; - dxRadioGroup(options: DevExpress.ui.dxRadioGroupOptions): JQuery; - dxPopup(): JQuery; - dxPopup(options: "instance"): DevExpress.ui.dxPopup; - dxPopup(options: string): any; - dxPopup(options: string, ...params: any[]): any; - dxPopup(options: DevExpress.ui.dxPopupOptions): JQuery; - dxPopover(): JQuery; - dxPopover(options: "instance"): DevExpress.ui.dxPopover; - dxPopover(options: string): any; - dxPopover(options: string, ...params: any[]): any; - dxPopover(options: DevExpress.ui.dxPopoverOptions): JQuery; - dxOverlay(): JQuery; - dxOverlay(options: "instance"): DevExpress.ui.dxOverlay; - dxOverlay(options: string): any; - dxOverlay(options: string, ...params: any[]): any; - dxOverlay(options: DevExpress.ui.dxOverlayOptions): JQuery; - dxNumberBox(): JQuery; - dxNumberBox(options: "instance"): DevExpress.ui.dxNumberBox; - dxNumberBox(options: string): any; - dxNumberBox(options: string, ...params: any[]): any; - dxNumberBox(options: DevExpress.ui.dxNumberBoxOptions): JQuery; - dxNavBar(): JQuery; - dxNavBar(options: "instance"): DevExpress.ui.dxNavBar; - dxNavBar(options: string): any; - dxNavBar(options: string, ...params: any[]): any; - dxNavBar(options: DevExpress.ui.dxNavBarOptions): JQuery; - dxMultiView(): JQuery; - dxMultiView(options: "instance"): DevExpress.ui.dxMultiView; - dxMultiView(options: string): any; - dxMultiView(options: string, ...params: any[]): any; - dxMultiView(options: DevExpress.ui.dxMultiViewOptions): JQuery; - dxMap(): JQuery; - dxMap(options: "instance"): DevExpress.ui.dxMap; - dxMap(options: string): any; - dxMap(options: string, ...params: any[]): any; - dxMap(options: DevExpress.ui.dxMapOptions): JQuery; - dxLookup(): JQuery; - dxLookup(options: "instance"): DevExpress.ui.dxLookup; - dxLookup(options: string): any; - dxLookup(options: string, ...params: any[]): any; - dxLookup(options: DevExpress.ui.dxLookupOptions): JQuery; - dxLoadPanel(): JQuery; - dxLoadPanel(options: "instance"): DevExpress.ui.dxLoadPanel; - dxLoadPanel(options: string): any; - dxLoadPanel(options: string, ...params: any[]): any; - dxLoadPanel(options: DevExpress.ui.dxLoadPanelOptions): JQuery; - dxLoadIndicator(): JQuery; - dxLoadIndicator(options: "instance"): DevExpress.ui.dxLoadIndicator; - dxLoadIndicator(options: string): any; - dxLoadIndicator(options: string, ...params: any[]): any; - dxLoadIndicator(options: DevExpress.ui.dxLoadIndicatorOptions): JQuery; - dxList(): JQuery; - dxList(options: "instance"): DevExpress.ui.dxList; - dxList(options: string): any; - dxList(options: string, ...params: any[]): any; - dxList(options: DevExpress.ui.dxListOptions): JQuery; - dxGallery(): JQuery; - dxGallery(options: "instance"): DevExpress.ui.dxGallery; - dxGallery(options: string): any; - dxGallery(options: string, ...params: any[]): any; - dxGallery(options: DevExpress.ui.dxGalleryOptions): JQuery; - dxDropDownEditor(): JQuery; - dxDropDownEditor(options: "instance"): DevExpress.ui.dxDropDownEditor; - dxDropDownEditor(options: string): any; - dxDropDownEditor(options: string, ...params: any[]): any; - dxDropDownEditor(options: DevExpress.ui.dxDropDownEditorOptions): JQuery; - dxDateBox(): JQuery; - dxDateBox(options: "instance"): DevExpress.ui.dxDateBox; - dxDateBox(options: string): any; - dxDateBox(options: string, ...params: any[]): any; - dxDateBox(options: DevExpress.ui.dxDateBoxOptions): JQuery; - dxCheckBox(): JQuery; - dxCheckBox(options: "instance"): DevExpress.ui.dxCheckBox; - dxCheckBox(options: string): any; - dxCheckBox(options: string, ...params: any[]): any; - dxCheckBox(options: DevExpress.ui.dxCheckBoxOptions): JQuery; - dxBox(): JQuery; - dxBox(options: "instance"): DevExpress.ui.dxBox; - dxBox(options: string): any; - dxBox(options: string, ...params: any[]): any; - dxBox(options: DevExpress.ui.dxBoxOptions): JQuery; - dxButton(): JQuery; - dxButton(options: "instance"): DevExpress.ui.dxButton; - dxButton(options: string): any; - dxButton(options: string, ...params: any[]): any; - dxButton(options: DevExpress.ui.dxButtonOptions): JQuery; - dxCalendar(): JQuery; - dxCalendar(options: "instance"): DevExpress.ui.dxCalendar; - dxCalendar(options: string): any; - dxCalendar(options: string, ...params: any[]): any; - dxCalendar(options: DevExpress.ui.dxCalendarOptions): JQuery; - dxAccordion(): JQuery; - dxAccordion(options: "instance"): DevExpress.ui.dxAccordion; - dxAccordion(options: string): any; - dxAccordion(options: string, ...params: any[]): any; - dxAccordion(options: DevExpress.ui.dxAccordionOptions): JQuery; - dxAutocomplete(): JQuery; - dxAutocomplete(options: "instance"): DevExpress.ui.dxAutocomplete; - dxAutocomplete(options: string): any; - dxAutocomplete(options: string, ...params: any[]): any; - dxAutocomplete(options: DevExpress.ui.dxAutocompleteOptions): JQuery; - dxTileView(): JQuery; - dxTileView(options: "instance"): DevExpress.ui.dxTileView; - dxTileView(options: string): any; - dxTileView(options: string, ...params: any[]): any; - dxTileView(options: DevExpress.ui.dxTileViewOptions): JQuery; - dxSwitch(): JQuery; - dxSwitch(options: "instance"): DevExpress.ui.dxSwitch; - dxSwitch(options: string): any; - dxSwitch(options: string, ...params: any[]): any; - dxSwitch(options: DevExpress.ui.dxSwitchOptions): JQuery; - dxSlideOut(): JQuery; - dxSlideOut(options: "instance"): DevExpress.ui.dxSlideOut; - dxSlideOut(options: string): any; - dxSlideOut(options: string, ...params: any[]): any; - dxSlideOut(options: DevExpress.ui.dxSlideOutOptions): JQuery; - dxPivot(): JQuery; - dxPivot(options: "instance"): DevExpress.ui.dxPivot; - dxPivot(options: string): any; - dxPivot(options: string, ...params: any[]): any; - dxPivot(options: DevExpress.ui.dxPivotOptions): JQuery; - dxPanorama(): JQuery; - dxPanorama(options: "instance"): DevExpress.ui.dxPanorama; - dxPanorama(options: string): any; - dxPanorama(options: string, ...params: any[]): any; - dxPanorama(options: DevExpress.ui.dxPanoramaOptions): JQuery; - dxActionSheet(): JQuery; - dxActionSheet(options: "instance"): DevExpress.ui.dxActionSheet; - dxActionSheet(options: string): any; - dxActionSheet(options: string, ...params: any[]): any; - dxActionSheet(options: DevExpress.ui.dxActionSheetOptions): JQuery; - dxDropDownMenu(): JQuery; - dxDropDownMenu(options: "instance"): DevExpress.ui.dxDropDownMenu; - dxDropDownMenu(options: string): any; - dxDropDownMenu(options: string, ...params: any[]): any; - dxDropDownMenu(options: DevExpress.ui.dxDropDownMenuOptions): JQuery; - dxTreeView(): JQuery; - dxTreeView(options: "instance"): DevExpress.ui.dxTreeView; - dxTreeView(options: string): any; - dxTreeView(options: string, ...params: any[]): any; - dxTreeView(options: DevExpress.ui.dxTreeViewOptions): JQuery; - dxMenuBase(): JQuery; - dxMenuBase(options: "instance"): DevExpress.ui.dxMenuBase; - dxMenuBase(options: string): any; - dxMenuBase(options: string, ...params: any[]): any; - dxMenuBase(options: DevExpress.ui.dxMenuBaseOptions): JQuery; - dxMenu(): JQuery; - dxMenu(options: "instance"): DevExpress.ui.dxMenu; - dxMenu(options: string): any; - dxMenu(options: string, ...params: any[]): any; - dxMenu(options: DevExpress.ui.dxMenuOptions): JQuery; - dxContextMenu(): JQuery; - dxContextMenu(options: "instance"): DevExpress.ui.dxContextMenu; - dxContextMenu(options: string): any; - dxContextMenu(options: string, ...params: any[]): any; - dxContextMenu(options: DevExpress.ui.dxContextMenuOptions): JQuery; - dxColorBox(): JQuery; - dxColorBox(options: "instance"): DevExpress.ui.dxColorBox; - dxColorBox(options: string): any; - dxColorBox(options: string, ...params: any[]): any; - dxColorBox(options: DevExpress.ui.dxColorBoxOptions): JQuery; - dxDataGrid(): JQuery; - dxDataGrid(options: "instance"): DevExpress.ui.dxDataGrid; - dxDataGrid(options: string): any; - dxDataGrid(options: string, ...params: any[]): any; - dxDataGrid(options: DevExpress.ui.dxDataGridOptions): JQuery; - dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; - dxChart(methodName: string, ...params: any[]): any; - dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; - dxPieChart(options?: DevExpress.viz.charts.dxPieChartOptions): JQuery; - dxPieChart(methodName: string, ...params: any[]): any; - dxPieChart(methodName: "instance"): DevExpress.viz.charts.dxPieChart; - dxPolarChart(options?: DevExpress.viz.charts.dxPolarChartOptions): JQuery; - dxPolarChart(methodName: string, ...params: any[]): any; - dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; - dxLinearGauge(options?: DevExpress.viz.gauges.dxLinearGaugeOptions): JQuery; - dxLinearGauge(methodName: string, ...params: any[]): any; - dxLinearGauge(methodName: "instance"): DevExpress.viz.gauges.dxLinearGauge; - dxCircularGauge(options?: DevExpress.viz.gauges.dxCircularGaugeOptions): JQuery; - dxCircularGauge(methodName: string, ...params: any[]): any; - dxCircularGauge(methodName: "instance"): DevExpress.viz.gauges.dxCircularGauge; - dxBarGauge(options?: DevExpress.viz.gauges.dxBarGaugeOptions): JQuery; - dxBarGauge(methodName: string, ...params: any[]): any; - dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; - dxRangeSelector(options?: DevExpress.viz.rangeSelector.dxRangeSelectorOptions): JQuery; - dxRangeSelector(methodName: string, ...params: any[]): any; - dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; - dxVectorMap(options?: DevExpress.viz.map.dxVectorMapOptions): JQuery; - dxVectorMap(methodName: string, ...params: any[]): any; - dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; - dxBullet(options?: DevExpress.viz.sparklines.dxBulletOptions): JQuery; - dxBullet(methodName: string, ...params: any[]): any; - dxBullet(methodName: "instance"): DevExpress.viz.sparklines.dxBullet; - dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery; - dxSparkline(methodName: string, ...params: any[]): any; - dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline; -} \ No newline at end of file diff --git a/google-drive-realtime-api/google-drive-realtime-api-tests.ts b/google-drive-realtime-api/google-drive-realtime-api-tests.ts new file mode 100644 index 000000000..62578f42a --- /dev/null +++ b/google-drive-realtime-api/google-drive-realtime-api-tests.ts @@ -0,0 +1,196 @@ +/// + +// Don't use this as a reference. Use the examples at +// https://developers.google.com/google-apps/realtime/ +// To use the Realtime API effectively, I needed to read lots of the +// (well-written) documentation on the site, and to understand parts of +// realtime-client-utils.js +// which you can find in the tutorial section of the project's homepage. + +declare var $ : any; +interface JQuery { + [key: string]: any; +}; + +type CollabModel = gapi.drive.realtime.Model; +type CollabDoc = gapi.drive.realtime.Document; +interface CollaborativeObject extends gapi.drive.realtime.CollaborativeObject {} +interface CollaborativeList extends gapi.drive.realtime.CollaborativeList {} +interface CollaborativeMap extends gapi.drive.realtime.CollaborativeMap {} +interface IndexReference extends gapi.drive.realtime.IndexReference {} +interface CollaborativeString extends gapi.drive.realtime.CollaborativeString {} + +type CListOfCObj = CollaborativeList +type CObjOrStr = CollaborativeObject | string; +type CMapOfCObjOrStr = CollaborativeMap; + + +module GRealtime { + + + + + var default_loader_options : rtclient.LoaderOptions = { + // Your Application ID from the Google APIs Console. + appId: "YOUR_APP_ID", + + // This tells us if need to we automatically create a file after auth. + autoCreate: false, + + // Client ID from the console. + clientId: 'YOUR_CLIENT_ID.apps.googleusercontent.com', + + // The ID of the button to click to authorize. Must be a DOM element ID. + authButtonElementId: 'realtime-authorize-button', + + // The MIME type of newly created Drive Files. By default the application + // specific MIME type will be used: + // application/vnd.google-apps.drive-sdk. + //newFileMimeType: 'text/json', + newFileMimeType: 'text', + //newFileMimeType: null, // default + + // Function to be called to initialize custom Collaborative Objects types. + registerTypes: null, // No action + + defaultTitle: "Default default-doc-title", + + // The rest are only defaults + afterAuth: function() : void { + console.log("default afterAuth called") + }, + + initializeModel: function(rtmodel:CollabModel) : void { + console.log("default initializeModel called"); + }, + + onFileLoaded : function(rtdoc:CollabDoc) : void { + console.log("default onFileLoaded called"); + } + + }; + + export class MyRTLoader { + public loader_options : rtclient.LoaderOptions = $.extend({},default_loader_options); + private rtloader_client : rtclient.RealtimeLoader; + + // call after setting loader_options appropriately + authorize() { + this.rtloader_client = new rtclient.RealtimeLoader(this.loader_options); + this.rtloader_client.start(); + } + + createNew(title:string, callback: (file:any) => void) { + rtclient.createRealtimeFile(title, null, callback); + } + + loadAfterAuth(fileid:string) { + // use this as part of your afterAuth callback + rtclient.params.fileIds = fileid; + this.rtloader_client.load(); + } + } + + export class MyRealtimeDoc { + protected rtmodel: CollabModel; + protected rtdoc: CollabDoc; + private myRTLoader = new GRealtime.MyRTLoader(); + + newFile(title: string, + initializeModel: (x:CollabModel) => void, + onFileLoaded: (x:CollabDoc) => void) : void { + + var _afterAuth = () => { + this.myRTLoader.createNew(title, (file:rtclient.DriveAPIFileResource) => { + console.log(`\n\nThis is the createNew callback. New file's id: ${file.id}\n\n`); + $("#file-id-text-input").val(file.id); + this.myRTLoader.loadAfterAuth(file.id) + }) + } + + var _initializeModel = (model:CollabModel) => { + console.log("\n\nRTModel initialized for NEW document.\n\n"); + this.rtmodel = model; + if( initializeModel ) { + initializeModel(model); + } + } + + var _onFileLoaded = (doc:CollabDoc) => { + console.log("\n\nNEW document loaded.\n\n"); + this.rtmodel = doc.getModel(); + this.rtdoc = doc; + if( onFileLoaded ) { + onFileLoaded(doc); + } + } + + this.myRTLoader.loader_options.onFileLoaded = _onFileLoaded; + this.myRTLoader.loader_options.afterAuth = _afterAuth; + this.myRTLoader.loader_options.initializeModel = _initializeModel; + this.myRTLoader.authorize(); + } + + loadExisting(fileid: string, + onFileLoaded: (doc:CollabDoc) => void) : void { + + rtclient.params.fileIds = fileid; + + var _onFileLoaded = (doc:CollabDoc) => { + console.log("\n\nEXISTING document loaded.\n\n"); + this.rtdoc = doc; + this.rtmodel = doc.getModel(); + if( onFileLoaded ) { + onFileLoaded(doc); + } + }; + + this.myRTLoader.loader_options.onFileLoaded = _onFileLoaded; + //this.myRTLoader.loader_options.afterAuth = ... + this.myRTLoader.authorize(); + } + + createString() : CollaborativeString { return this.rtmodel.createString(""); } + + createList() : CollaborativeList { return this.rtmodel.createList(); } + + createMap() : CollaborativeMap { return this.rtmodel.createMap(); } + + addToPersistDocRoot(x:{pdata:any}, key:string) { + this.rtmodel.getRoot().set(key,x.pdata); + } + + bindString(istring:CollaborativeString, $textinput: JQuery) : gapi.drive.realtime.databinding.Binding { + return gapi.drive.realtime.databinding.bindString( + istring, + $textinput[0] ); + } + + + } + + // alternative to RealtimePSDoc.bindString + function registerLocalStringChangeListener( + x: CollaborativeString, + listener_or_callback: (e:Event) => void | EventListener) : void { + x.addEventListener(gapi.drive.realtime.EventType.TEXT_INSERTED, listener_or_callback); + x.addEventListener(gapi.drive.realtime.EventType.TEXT_DELETED, listener_or_callback); + } + +} + + +// Next example from https://developers.google.com/google-apps/realtime/model-events + +declare var doc : CollabDoc; +function displayObjectChangedEvent(evt:gapi.drive.realtime.ObjectChangedEvent) { + var events = evt.events; + var eventCount = evt.events.length; + for (var i = 0; i < eventCount; i++) { + console.log('Event type: ' + events[i].type); + console.log('Local event: ' + events[i].isLocal); + console.log('User ID: ' + events[i].userId); + console.log('Session ID: ' + events[i].sessionId); + } +} +doc.getModel().getRoot().addEventListener(gapi.drive.realtime.EventType.OBJECT_CHANGED, displayObjectChangedEvent); \ No newline at end of file diff --git a/google-drive-realtime-api/google-drive-realtime-api.d.ts b/google-drive-realtime-api/google-drive-realtime-api.d.ts new file mode 100644 index 000000000..95f239a34 --- /dev/null +++ b/google-drive-realtime-api/google-drive-realtime-api.d.ts @@ -0,0 +1,610 @@ +// Type definitions for Google Realtime API +// Project: https://developers.google.com/google-apps/realtime/ +// Definitions by: Dustin Wehr +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// This definition file is merge-compatible with ../gapi/gapi.d.ts + +// Note the occurrences of "INCOMPLETE". For some interfaces and object types, I have only included +// the properties and methods that I've actually used so-far, and will add more as they become useful to me. +// Or, maybe you want to complete them? + +// For Typescript newbs: To get shorter names, use e.g. +// type CollabModel = gapi.drive.realtime.Model; +// interface CollabList extends gapi.drive.realtime.CollaborativeList {} +// See section "Type Aliases" of http://www.typescriptlang.org/Content/TypeScript%20Language%20Specification.pdf + +// gapi is a global var introduced by https://apis.google.com/js/api.js +declare module gapi.drive.realtime { + + type GoogEventHandler = ((evt:ObjectChangedEvent) => void) | ((e:Event) => void) | EventListener; + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.Collaborator + export class Collaborator { + // The HTML color associated with this collaborator. When possible, collaborators are assigned unique colors. + color : string; + + // The display name for this collaborator. + displayName : string; + + // True if this collaborator is anonymous, false otherwise. + isAnonymous : boolean + + // True if this collaborator is the local user, false otherwise. + isMe : boolean; + + // The permission ID for this collaborator. This ID is stable for a given user and is compatible with the + // Drive API permissions APIs. Use the userId property for all other uses. + permissionId : string; + + // A URL that points to the profile photo for this collaborator, or to a generic profile photo for + // anonymous collaborators. + photoUrl : string; + + // The session ID for this collaborator. A single user may have multiple sessions if they have the same document + // open on multiple devices or in multiple browser tabs. + sessionId : string; + + // The user ID for this collaborator. This ID is stable for a given user and is compatible with most Google APIs + // except the Drive API permission APIs. For an ID which is compatible with the Drive API permission APIs, + // use the permissionId property. + userId : string; + + new (sessionId:string, userId:string, displayName:string, color:string, isMe:boolean, isAnonymous:boolean, + photoUrl:string, permissionId:string) : Collaborator; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.CollaborativeObject + export class CollaborativeObject { + // The id of this collaborative object. Read-only. + id:string; + + // The type of this collaborative object. For standard collaborative objects, + // see gapi.drive.realtime.CollaborrativeType for possible values; for custom collaborative objects, this value is + // application-defined. + // Addition: the possible values for standard objects are EditableString, List, and Map. + type:string; + + // Adds an event listener to the event target. The same handler can only be added once per the type. + // Even if you add the same handler multiple times using the same type then it will only be called once + // when the event is dispatched. + addEventListener(type:string, listener:GoogEventHandler, opt_capture?:boolean):void; + + // Removes all event listeners from this object. + removeAllEventListeners():void; + + // Removes an event listener from the event target. The handler must be the same object as the one added. + // If the handler has not been added then nothing is done. + removeEventListener(type:string, listener:GoogEventHandler, opt_capture?:boolean):void; + + // Returns a string representation of this collaborative object. + toString():string; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.IndexReference + export class IndexReference extends CollaborativeObject { + // (Categories of) the shift behavior of an index reference when the element it points at is deleted. + static DeleteMode:{ + SHIFT_AFTER_DELETE: string + SHIFT_BEFORE_DELETE: string + SHIFT_TO_INVALID: string + }; + + //The index of the current location the reference points to. Write to this property to change the referenced index. + index:number; + + // The behavior of this index reference when the element it points at is deleted. + // @return one of the elements of DeleteMode + deleteMode():string; + + // The object this reference points to. Read-only. + referencedObject():V; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.CollaborativeMap + export class CollaborativeMap extends CollaborativeObject { + size:string; + + static type:string; // equals "Map" + + // Removes all entries. + clear():void; + + // Removes the entry for the given key (if such an entry exists). + // @return the value that was mapped to this key, or null if there was no existing value. + delete(key:string):V; + + // Returns the value mapped to the given key. + get(key:string):V; + + // Checks if this map contains an entry for the given key. + has(key:string):boolean; + + // Returns whether this map is empty. + isEmpty():boolean; + + // Returns an array containing a copy of the items in this map. Modifications to the returned array do + // not modify this collaborative map. + // @return non-null Array of Arrays, where the inner arrays are tupples [string, V] + items():[string,V][]; + + // Returns an array containing a copy of the keys in this map. Modifications to the returned array + // do not modify this collaborative map. + keys():string[]; + + // Put the value into the map with the given key, overwriting an existing value for that key. + // @return the old map value, if any, that used to be mapped to the given key. + set(key:string, value:V):V; + + // Returns an array containing a copy of the values in this map. Modifications to the returned array + // do not modify this collaborative map. + values():V[]; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.CollaborativeString + export class CollaborativeString extends CollaborativeObject { + // The length of the string. Read only. + length:number; + + // The text of this collaborative string. Reading from this property is equivalent to calling getText(). Writing to this property is equivalent to calling setText(). + text:string; + + static type:string; // equals "EditableString" + + // Appends a string to the end of this one. + append(text:string):void; + + // Gets a string representation of the collaborative string. + getText():string; + + // Inserts a string into the collaborative string at a specific index. + insertString(index:number, text:string):void; + + // Creates an IndexReference at the given {@code index}. If {@code canBeDeleted} is set, then a delete + // over the index will delete the reference. Otherwise the reference will shift to the beginning of the deleted range. + registerReference(index:number, canBeDeleted:boolean):IndexReference; + + // Deletes the text between startIndex (inclusive) and endIndex (exclusive). + removeRange(startIndex:number, endIndex:number):void; + + // Sets the contents of this collaborative string. Note that this method performs a text diff between the + // current string contents and the new contents so that the string will be modified using the minimum number + // of text inserts and deletes possible to change the current contents to the newly-specified contents. + setText(text:string):void; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.CollaborativeList + export class CollaborativeList extends CollaborativeObject { + // The number of entries in the list. Assign to this field to reduce the size of the list. + // Note that the length given must be less than or equal to the current size. + // The length of a list cannot be extended in this way. + length:number; + + static type:string; // equals "List" + + // Returns a copy of the contents of this collaborative list as an array. + // Changes to the returned object will not affect the original collaborative list. + asArray():V[]; + + // Removes all values from the list. + clear():void; + + // Gets the value at the given index. + get(ind:number):V; + + //Returns the first index of the given value, or -1 if it cannot be found. + indexOf(value:V, opt_comparatorFn?:(x1:V, x2:V) => boolean):number; + + //Inserts an item into the list at a given index. + insert(index:number, value:V):void; + + // Inserts a list of items into the list at a given index. + insertAll(index:number, values:V[]):void; + + // Returns the last index of the given value, or -1 if it cannot be found. + lastIndexOf(value:V, opt_comparatorFn?:(x1:V, x2:V) => boolean):number; + + //Moves a single element in this list (at index) to immediately before destinationIndex. + //Both indices are with respect to the position of elements before the move. + //For example, given the list: ['A', 'B', 'C'] + //move(0, 0) is a no-op + //move(0, 1) is a no-op + //move(0, 2) yields ['B', 'A', 'C'] ('A' is moved to immediately before 'C') + //move(0, 3) yields ['B', 'C', 'A'] ('A' is moved to immediately before an imaginary element after the list end) + //move(1, 0) yields ['B', 'A', 'C'] ('B' is moved to immediately before 'A') + //move(1, 1) is a no-op + //move(1, 2) is a no-op + //move(1, 3) yields ['A', 'C', 'B'] ('B' is moved to immediately before an imaginary element after the list end) + move(index:number, destinationIndex:number):void; + + // Moves a single element in this list (at index) to immediately before destinationIndex in the list destination. + // Both indices are with respect to the position of elements before the move. + // If the provided destination is this list, this function is identical to move(index, destinationIndex). + moveToList(index:number, destination:CollaborativeList, destinationIndex:number):void; + + // Adds an item to the end of the list. + // @return the new length of the list + push(value:V):number; + + // Adds an array of values to the end of the list. + pushAll(values:V[]):void; + + // Creates an IndexReference at the given index. If canBeDeleted is true, then a delete over the index will delete + // the reference. Otherwise the reference will shift to the beginning of the deleted range. + registerReference(index:number, canBeDeleted:boolean):IndexReference>; + + // Removes the item at the given index from the list. + remove(index:number):void; + + // Removes the items between startIndex (inclusive) and endIndex (exclusive). + removeRange(startIndex:number, endIndex:number):void; + + // Removes the first instance of the given value from the list. + // @return whether the item was removed + removeValue(value:V):boolean; + + // Replaces items in the list with the given items, starting at the given index. + replaceRange(index:number, values:V[]):void; + + // Sets the item at the given index + set(index:number, value:V):void; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.Model + export class Model { + + // Returns the collaborative object with the given id. + // @return non-null Object + getObject: (id:string) => CollaborativeObject; + + // An estimate of the number of bytes used by data stored in the model. + bytesUsed:number; + + // True if the model can currently redo. + canRedo:boolean; + + // True if the model can currently undo. + canUndo:boolean; + + // Creates the native JS object for a given collaborative object type. + // @return non-null Object + createJsObject(typeName:string):any; + + // Adds an event listener to the event target. + // The same handler can only be added once per the type. Even if you add the same handler multiple times using the + // same type then it will only be called once when the event is dispatched. + addEventListener(type:string, listener:() => void | EventListener, opt_capture?:boolean):void; + + // Starts a compound operation. If a name is given, that name will be recorded in the mutation for use in revision + // history, undo menus, etc. When beginCompoundOperation() is called, all subsequent edits to the data model will + // be batched together in the undo stack and revision history until endCompoundOperation() is called. + // Compound operations may be nested inside other compound operations. + // If the root compound operation is undoable, all nested compound operations must be undoable as well. + // If the root compound operation is non-undoable, nested operations can be undoable, although the entire operation + // will obey the root's opt_isUndoable value. + // Note that the compound operation MUST start and end in the same synchronous execution block. If this invariant + // is violated, the data model will become invalid and all future changes will fail. + beginCompoundOperation(opt_name?:string, opt_isUndoable?:boolean):void; + + + // Creates and returns a new collaborative object. This can be used to create custom collaborative objects. + // For built in types, use the specific create* functions. + // @return non-null Object + create(ref:string|Function, ...var_args:any[]):any; + + // Creates a collaborative list. + createList(opt_initialValue?:Array):CollaborativeList; + + // Creates a collaborative map. + createMap(opt_initialValue?:Array<[string,T]>):CollaborativeMap; + + // Creates a collaborative string. + createString(opt_initialValue?:string):CollaborativeString; + + //Ends a compound operation. This method will throw an exception if no compound operation is in progress. + endCompoundOperation():void; + + // Returns the root of the object model. + getRoot():CollaborativeMap; + + // The mode of the document. If true, the document is read-only. If false, it is editable. + isReadOnly():boolean; + + // Redo the last thing the active collaborator undid. + redo():void; + + // Removes all event listeners from this object. + removeAllEventListeners():void; + + // Removes an event listener from the event target. The handler must be the same object as the one added. + // If the handler has not been added then nothing is done. + removeEventListener(type:string, listener:() => void | EventListener, opt_capture?:boolean):void; + + // The current server revision number for this model. The revision number begins at 1 (the initial empty model) + // and is incremented each time the model is changed on the server (either by the current session or any + // other collaborator). Because this revision number includes only changes that the server knows about, + // it is only updated while this client is connected to the Realtime API server and it does not include changes + // that have not yet been saved to the server. + serverRevision():number; + + // Serializes this data model to a JSON-based format which is compatible with the Realtime API's import/export + // REST API. The exported JSON can also be used with gapi.drive.realtime.loadFromJson to load an in-memory + // version of this data model which does not require a network connection. + // See https://developers.google.com/drive/v2/reference/realtime/update for more information. + toJson(opt_appId?:string, opt_revision?:number):string; + + // Undo the last thing the active collaborator did. + undo():void; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.BaseModelEvent + interface BaseModelEvent { + // Whether this event bubbles. + bubbles : boolean; + + // The list of names from the hierarchy of compound operations that initiated this event. + compoundOperationNames : string[]; + + // True if this event originated in the local session. + isLocal : boolean; + + // True if this event originated from a redo call. + isRedo : boolean; + + // True if this event originated from an undo call. + isUndo : boolean; + + // Prevents an event from performing its default action. In the Realtime API, this function is only present + // for compatibility with the DOM event interface and therefore it does nothing. + preventDefault() : void; + + // The id of the session that initiated this event. + sessionId : string; + + // The collaborative object that initiated this event. + target : CollaborativeObject; + + // The type of the event. + type : string; + + // The user id of the user that initiated this event. + userId : string; + + // Stops an event which bubbles from propagating to the target's parent. + stopPropagation() : void; + + /* Parameters: + target + gapi.drive.realtime.CollaborativeObject + The collaborative object that initiated the event. + Value must not be null. + + sessionId + string + The id of the session that initiated the event. + + userId + string + The user id of the user that initiated the event. + + compoundOperationNames + Array of string + The list of names from the hierarchy of compound operations that initiated the event. + Value must not be null. + isLocal + boolean + True if the event originated in the local session. + + isUndo + boolean + True if the event originated from an undo call. + + isRedo + boolean + True if the event originated from a redo call. + */ + new (target:CollaborativeObject, sessionId:string, userId:string, compoundOperationNames:string[], + isLocal:boolean, isUndo:boolean, isRedo:boolean) : BaseModelEvent; + } + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.ObjectChangedEvent + interface ObjectChangedEvent extends BaseModelEvent { + // parameters as in BaseModelEvent above except for addition of: + // events: + // Array of gapi.drive.realtime.BaseModelEvent + // The specific events that document the changes that occurred on the object. + // Value must not be null. + new (target:CollaborativeObject, sessionId:string, userId:string, compoundOperationNames:string[], + isLocal:boolean, isUndo:boolean, isRedo:boolean, events:BaseModelEvent[]) : ObjectChangedEvent; + + // The specific events that document the changes that occurred on the object. + events : BaseModelEvent[]; + } + + + // Complete + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.Document + export class Document { + // Whether the document is closed. Read-only; call close() to close the document. + isClosed : boolean; + + // Whether the document is stored in Google Drive. Read-only. + // This property is false for documents created using gapi.drive.realtime.newInMemoryDocument or + // gapi.drive.realtime.loadFromJson and true for all other documents. + isInGoogleDrive : boolean; + + // The approximate amount of time (in milliseconds) that changes have been waiting to be saved in Google Drive. + // If there are no unsaved changes or this is an in-memory document, this value is always 0. + // This value should remain low (for example, less than a few seconds) as long as the network is healthy and + // changes are being saved as quickly as they are generated. If the network is unreliable or down, or if changes + // are being made to the model more quickly than they can be saved, this value will continue to grow until the + // network catches up and the changes are successfully saved. + saveDelay : number; + + // Adds an event listener to the event target. The same handler can only be added once per the type. + // Even if you add the same handler multiple times using the same type then it will only be called once when + // the event is dispatched. + addEventListener(type:string, listener:GoogEventHandler, opt_capture?:boolean) : void; + + // Closes the document and disconnects from the server. + // After this function is called, event listeners will no longer fire and attempts to access the document, model, + // or model objects will throw a gapi.drive.realtime.DocumentClosedError. + // Calling this function after the document has been closed will have no effect. + close():void; + + // Gets an array of collaborators active in this session. Each collaborator is a jsMap with these fields: + // sessionId, userId, displayName, color, isMe, isAnonymous. + getCollaborators() : Collaborator[]; + + // Gets the collaborative model associated with this document. + // @return non-null Model + getModel():Model; + + // Removes all event listeners from this object. + removeAllEventListeners() : void; + + // Removes an event listener from the event target. The handler must be the same object as the one added. + // If the handler has not been added then nothing is done. + removeEventListener(type:string, listener:GoogEventHandler, opt_capture?:boolean) : void; + + // Saves a copy of this document to a new file. After this function is called, all changes to this document no + // longer affect the old document and are instead saved to the new file. + // The provided file ID must refer to a valid file in Drive which does not have any Realtime data for your app. + // This function can also be used on an in-memory file to convert it to a Drive-connected file. + saveAs(fileId:string) : void; + + } +} + + +declare module gapi.drive.realtime.databinding { + // COMPLETE + // https://developers.google.com/google-apps/realtime/reference/gapi.drive.realtime.databinding.Binding + export interface Binding { + // Throws gapi.drive.realtime.databinding.AlreadyBoundError If domElement has already been bound. + + // The collaborative object to bind. + collaborativeObject : CollaborativeObject; + + // The DOM element that the collaborative object is bound to. Value must not be null. + domElement : Element; + + // Unbinds the domElement from collaborativeObject. + unbind() : void; + } + + export function bindString(s:CollaborativeString, textinput:HTMLInputElement) : Binding +} + + +declare module gapi.drive.realtime.EventType { + export var TEXT_INSERTED: string + export var TEXT_DELETED: string + export var OBJECT_CHANGED: string +} + + +// rtclient is a global var introduced by realtime-client-utils.js +declare module rtclient { + // INCOMPLETE + export interface RealtimeLoader { + start():void; + load():void; + } + interface RealtimeLoaderFactory { + new (options:LoaderOptions) : RealtimeLoader; + } + + // *********************************** + // The remainder of this file types some (not all) things in realtime-client-utils.js, found here: + // https://developers.google.com/google-apps/realtime/realtime-quickstart + // and + // https://apis.google.com/js/api.js + // *********************************** + + + // Complete + export interface LoaderOptions { + // Your Application ID from the Google APIs Console. + appId: string; + + // Autocreate files right after auth automatically. + autoCreate: boolean; + + // Client ID from the console. + clientId: string; + + // The ID of the button to click to authorize. Must be a DOM element ID. + authButtonElementId: string; + + // The MIME type of newly created Drive Files. By default the application + // specific MIME type will be used: + // application/vnd.google-apps.drive-sdk. + newFileMimeType: string; + //newFileMimeType = null // default + + // Function to be called to initialize custom Collaborative Objects types. + registerTypes: () => void; + + // The name of newly created Drive files, if no title is specified. + defaultTitle: string; + + // Function to be called after authorization and before loading files. + afterAuth: () => void; + + // Function to be called when a Realtime model is first created. + initializeModel: (model:gapi.drive.realtime.Model) => void; + + // Function to be called every time a Realtime file is loaded. + onFileLoaded: (rtdoc:gapi.drive.realtime.Document) => void; + } + + // INCOMPLETE + export interface DriveAPIFileResource { + id: string; + } + + // INCOMPLETE + export interface ClientUtils { + // INCOMPLETE + params: { + // string containing one or more file ids separated by spaces. + fileIds : string + }; + RealtimeLoader : RealtimeLoaderFactory; + + /** + * Creates a new Realtime file. + * @param title {string} title of the newly created file. + * @param mimeType {string} the MIME type of the new file. + * @param callback {(file:DriveAPIFileResource) => void} the callback to call after creation. + */ + createRealtimeFile(title:string, mimeType:string, callback:(file:DriveAPIFileResource) => void) : void; + } + + export var RealtimeLoader : RealtimeLoaderFactory + + /** + * Creates a new Realtime file. + * @param title {string} title of the newly created file. + * @param mimeType {string} the MIME type of the new file. + * @param callback {(file:DriveAPIFileResource) => void} the callback to call after creation. + */ + export function createRealtimeFile(title:string, mimeType:string, callback:(file:DriveAPIFileResource) => void) : void +} + +// INCOMPLETE +declare module rtclient.params { + // string containing one or more file ids separated by spaces. + export var fileIds:string +} + diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index ecf319c83..2250527c3 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -65,7 +65,7 @@ declare module google.maps { getCenter(): LatLng; getDiv(): Element; getHeading(): number; - getMapTypeId(): MapTypeId; + getMapTypeId(): MapTypeId | string; getProjection(): Projection; getStreetView(): StreetViewPanorama; getTilt(): number; @@ -75,7 +75,7 @@ declare module google.maps { panToBounds(latLngBounds: LatLngBounds): void; setCenter(latlng: LatLng): void; setHeading(heading: number): void; - setMapTypeId(mapTypeId: MapTypeId): void; + setMapTypeId(mapTypeId: MapTypeId | string): void; setOptions(options: MapOptions): void; setStreetView(panorama: StreetViewPanorama): void; setTilt(tilt: number): void; @@ -133,7 +133,7 @@ declare module google.maps { /***** Controls *****/ export interface MapTypeControlOptions { - mapTypeIds?: MapTypeId[]; + mapTypeIds?: (MapTypeId | string)[]; position?: ControlPosition; style?: MapTypeControlStyle; } diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 43831c68a..c0bd00843 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -46,6 +46,7 @@ declare module jasmine { var clock: () => Clock; function any(aclass: any): Any; + function anything(): Any; function objectContaining(sample: any): ObjectContaining; function createSpy(name: string, originalFn?: Function): Spy; function createSpyObj(baseName: string, methodNames: any[]): any; diff --git a/jquery.dataTables/jquery.dataTables.d.ts b/jquery.dataTables/jquery.dataTables.d.ts index 50ff52edd..9a5ea2124 100755 --- a/jquery.dataTables/jquery.dataTables.d.ts +++ b/jquery.dataTables/jquery.dataTables.d.ts @@ -1617,20 +1617,21 @@ declare module DataTables { //#region "language-settings" + // these are all optional interface LanguageSettings { - emptyTable: string; - info: string; - infoEmpty: string; - infoFiltered: string; - infoPostFix: string; - thousands: string; - lengthMenu: string; - loadingRecords: string; - processing: string; - search: string; - zeroRecords: string; - paginate: LanguagePaginateSettings; - aria: LanguageAriaSettings; + emptyTable?: string; + info?: string; + infoEmpty?: string; + infoFiltered?: string; + infoPostFix?: string; + thousands?: string; + lengthMenu?: string; + loadingRecords?: string; + processing?: string; + search?: string; + zeroRecords?: string; + paginate?: LanguagePaginateSettings; + aria?: LanguageAriaSettings; } interface LanguagePaginateSettings { diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 6a7bc47c2..465323931 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -2455,6 +2455,14 @@ interface JQuery { */ triggerHandler(eventType: string, ...extraParameters: any[]): Object; + /** + * Execute all handlers attached to an element for an event. + * + * @param event A jQuery.Event object. + * @param extraParameters An array of additional parameters to pass along to the event handler. + */ + triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object; + /** * Remove a previously-attached event handler from the elements. * diff --git a/knex/knex.d.ts b/knex/knex.d.ts index c9a6ada4b..c4408aecb 100644 --- a/knex/knex.d.ts +++ b/knex/knex.d.ts @@ -41,6 +41,8 @@ declare module "knex" { fn: any; } + function Knex( config : Config ) : Knex; + // // QueryInterface // @@ -341,6 +343,9 @@ declare module "knex" { uuid(columnName: string): ColumnBuilder; comment(val: string): TableBuilder; specificType(columnName: string, type: string): ColumnBuilder; + primary(columnNames: string[]) : TableBuilder; + index(columnNames: string[], indexName?: string, indexType?: string) : TableBuilder; + unique(columnNames: string[], indexName?: string) : TableBuilder; } interface CreateTableBuilder extends TableBuilder { @@ -452,6 +457,5 @@ declare module "knex" { tableName?: string; } - var _: KnexStatic; - export = _; + export = Knex; } diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 2bd6a5118..dd5739500 100755 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -1980,7 +1980,7 @@ declare module L { /** * Returns the closest point from a point p on a segment p1 to p2. */ - export function closestPointOnSegment(p: Point, p1: Point, p2: Point): number; + export function closestPointOnSegment(p: Point, p1: Point, p2: Point): Point; /** * Clips the segment a to b by rectangular bounds (modifying the segment points diff --git a/moment/moment-node.d.ts b/moment/moment-node.d.ts index 13f1b9362..ba5fe85d1 100644 --- a/moment/moment-node.d.ts +++ b/moment/moment-node.d.ts @@ -465,7 +465,8 @@ declare module moment { max(moments: Moment[]): Moment; normalizeUnits(unit: string): string; - relativeTimeThreshold(threshold: string, limit: number): void; + relativeTimeThreshold(threshold: string): number|boolean; + relativeTimeThreshold(threshold: string, limit:number): boolean; /** * Constant used to enable explicit ISO_8601 format parsing. diff --git a/node-uuid/node-uuid.d.ts b/node-uuid/node-uuid.d.ts index b069e8f37..c4fa865e5 100644 --- a/node-uuid/node-uuid.d.ts +++ b/node-uuid/node-uuid.d.ts @@ -23,7 +23,7 @@ interface UUIDOptions { * (Number | Date) Time in milliseconds since unix Epoch. * Default: The current time is used. */ - msecs?: any + msecs?: number|Date /** * (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if msecs is unspecified. diff --git a/node/node.d.ts b/node/node.d.ts index 7043a2806..c4f778139 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -329,6 +329,14 @@ interface NodeBuffer { length: number; copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; readUInt8(offset: number, noAsset?: boolean): number; readUInt16LE(offset: number, noAssert?: boolean): number; readUInt16BE(offset: number, noAssert?: boolean): number; @@ -596,12 +604,19 @@ declare module "zlib" { export function createUnzip(options?: ZlibOptions): Unzip; export function deflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function deflateSync(buf: Buffer, options?: ZlibOptions): any; export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function deflateRawSync(buf: Buffer, options?: ZlibOptions): any; export function gzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function gzipSync(buf: Buffer, options?: ZlibOptions): any; export function gunzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function gunzipSync(buf: Buffer, options?: ZlibOptions): any; export function inflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function inflateSync(buf: Buffer, options?: ZlibOptions): any; export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function inflateRawSync(buf: Buffer, options?: ZlibOptions): any; export function unzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function unzipSync(buf: Buffer, options?: ZlibOptions): any; // Constants export var Z_NO_FLUSH: number; diff --git a/oclazyload/oclazyload-tests.ts b/oclazyload/oclazyload-tests.ts index 3879a564b..d3d3d6b11 100644 --- a/oclazyload/oclazyload-tests.ts +++ b/oclazyload/oclazyload-tests.ts @@ -1,23 +1,95 @@ /// -var lazyloader:Function = ()=>{}; +angular.module('app', ['oc.lazyLoad']).config(['$ocLazyLoadProvider', function ($ocLazyLoadProvider: oc.ILazyLoadProvider) { + $ocLazyLoadProvider.config({ + debug: true, + events: true, + modules: [{ + name: 'TestModule', + files: ['js/TestModule.js'] + }] + }) +}]); -var config1: oc.ILazyLoadConfig = { - asyncLoader: lazyloader -}; +angular.module('app').controller(['$ocLazyLoadProvider', function ($ocLazyLoad: oc.ILazyLoad) { + $ocLazyLoad.load('testModule.js'); -var config2:oc.ILazyLoadConfig = { - asyncLoader: lazyloader, - loadedModules: ['module1', 'module2'] -}; + $ocLazyLoad.load(['testModule.js', 'testModuleCtrl.js', 'testModuleService.js']); -var moduleConfig:oc.ILazyLoadModuleConfig = { - name:'testmodule', - files:['testmodule'] -} + $ocLazyLoad.load([ + 'testModule.js', + { + type: 'css', + path: 'testModuleCtrl' + }, + { + type: 'html', + path: 'testModuleCtrl.html' + }, + { + type: 'js', + path: 'testModuleCtrl' + }, + 'js!testModuleService', + 'less!testModuleLessFile' + ]); -var config2:oc.ILazyLoadConfig = { - asyncLoader: lazyloader, - loadedModules: ['module1', 'module2'], - modules: [moduleConfig] -}; + $ocLazyLoad.load([ + { + files: [ + 'testModule.js', + 'bower_components/bootstrap/dist/js/bootstrap.js' + ], + cache: false, + kjdf: false + }, + { + files: ['anotherModule.js'], + cache: true + } + ]); + + $ocLazyLoad.load( + [ + 'testModule.js', + 'bower_components/bootstrap/dist/js/bootstrap.js', + 'anotherModule.js' + ], + { + cache: false + }); + + $ocLazyLoad.load( + [ + 'partials/template1.html', + 'partials/template2.html' + ], + { + cache: false, + reconfig: true, + rerun: true, + serie: true, + insertBefore: '#load_css_before', + timeout: 5000 + }); + + $ocLazyLoad.setModuleConfig({ + files: [ + 'testModule.js' + ], + cache: true + }); + + var getConfig: oc.IModuleConfig = $ocLazyLoad.getModuleConfig('testModule'); + + var getModules: string[] = $ocLazyLoad.getModules(); + + var isLoaded: boolean = $ocLazyLoad.isLoaded([ + 'testModule1.js', + 'testModule2.js' + ]); + + $ocLazyLoad.inject('testModule'); + + $ocLazyLoad.toggleWatch(true); +}]); \ No newline at end of file diff --git a/oclazyload/oclazyload.d.ts b/oclazyload/oclazyload.d.ts index 22ac45f9d..1acf7e781 100644 --- a/oclazyload/oclazyload.d.ts +++ b/oclazyload/oclazyload.d.ts @@ -7,28 +7,143 @@ declare module oc { - interface ILazyLoadConfig { - asyncLoader:any; - loadedModules?:string[]; - modules?:ILazyLoadModuleConfig[]; - } - - interface ILazyLoadModuleConfig { - name:string; - files:string[]; - } - interface ILazyLoad { - load(module:any):ng.IPromise; - loadTemplateFile(url:string, config:ILazyLoadModuleConfig):ng.IPromise; - loadTemplateFile(urls:string[], config:ILazyLoadModuleConfig):ng.IPromise; - getModuleName(moduleName:string):string; - getModules():string[]; - getModuleConfig(name:string):ILazyLoadModuleConfig; - setModuleConfig(config:ILazyLoadModuleConfig):void; + /** + * Loads a module or a list of modules into Angular. + * + * @param module The name of a predefined module config object, or a module config object, or an array of either + * @param config Options to be used when loading the modules + */ + load(module: string|ITypedModuleConfig|IModuleConfig|(string|ITypedModuleConfig|IModuleConfig)[], config?: IOptionsConfig): ng.IPromise; + + /** + * Defines a module config object. + * @param config The module config object + * @returns The module config object that was passed in + */ + setModuleConfig(config: IModuleConfig): IModuleConfig; + + /** + * Gets the specified module config object. + * @param name The name of the module config object to get + */ + getModuleConfig(name: string): IModuleConfig; + + /** + * Gets the list of loaded module names. + */ + getModules(): string[]; + + /** + * Checks if a module name, or list of modules names, has been previously loaded into Angular. + */ + isLoaded(moduleName: string|string[]): boolean; + + /** + * Injects a module with the associated name into Angular. Useful for manual injection when loading through RequireJS, SystemJS, etc. Useful in + * conjunction with the toggleWatch() method. + */ + inject(moduleName: string|string[]): boolean; + + /** + * Enables or disables watching Angular for new modules. Useful in conjunction with the inject() method. Make sure to not keep the watch enabled + * indefinitely, or unexpected results may occur. + */ + toggleWatch(watch: boolean): void; + } + + interface ITypedModuleConfig extends IOptionsConfig { + /** + * The file extension, without the period. For example, 'html'. + */ + type: string; + + /** + * The file path, including file name. + */ + path: string; + } + + interface IModuleConfig extends IOptionsConfig { + /** + * The name of the module for easy retrieval later. + */ + name?: string; + + /** + * The list of files to be loaded for this module. + */ + files: string[]; + } + + interface IOptionsConfig extends ng.IRequestShortcutConfig { + /** + * If true, bypasses browser cache by appending a timestamp to URLs. Defaults to true. + */ + cache?: boolean; + + /** + * If true, a module config will be invoked each time the module is reloaded. Use with caution, as re-invoking configs can lead to unexpected results. + * Defaults to false. + */ + reconfig?: boolean; + + /** + * If true, a module run block will be invoked each time the module is reloaded. Use with caution, as re-invoking run blocks can lead to unexpected results. + * Defaults to false. + */ + rerun?: boolean; + + /** + * If true, will load files in a series, instead of in parallel. Defaults to false. + */ + serie?: boolean; + + /** + * If set, will insert files immediately before the provided CSS selector, instead of the default behavior of inserting files immediately before the + * last child of the element. Defaults to undefined. + */ + insertBefore?: string; } interface ILazyLoadProvider { - config(config:ILazyLoadConfig):void; + /** + * Configures the main service provider. + * @param config The configuration settings to use + */ + config(config: IProviderConfig): void; + } + + interface IProviderConfig { + /** + * If true, all errors will be logged to the console, in addition to rejecting a promise. Defaults to false. + */ + debug?: boolean; + + /** + * If true, an event will be broadcast whenever a module, component or file is loaded. Events that can be broadcast are: ocLazyLoad.moduleLoaded, + * ocLazyLoad.moduleReloaded, ocLazyLoad.componentLoaded, ocLazyLoad.fileLoaded. Defaults to false. + */ + events?: boolean; + + /** + * Predefines a set of module configurations for later use. A name must be provided for each module so that it can be retrieved later. + */ + modules?: IModuleConfig[]; + } +} + +declare module angular { + interface IAngularStatic { + /** + * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism. + * + * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved. + * + * @param name The name of the module to create or retrieve. + * @param requires The names of modules this module depends on, and/or ocLazyLoad module configurations. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration. + * @param configFn Optional configuration function for the module. + */ + module(name: string, requires?: (string|oc.IModuleConfig)[], configFn?: Function): IModule; } } \ No newline at end of file diff --git a/parse/parse-tests.ts b/parse/parse-tests.ts index c7cc6ff49..d373c064d 100644 --- a/parse/parse-tests.ts +++ b/parse/parse-tests.ts @@ -265,7 +265,9 @@ function test_user_acl_roles() { role.getRoles().add(role); role.save(); - Parse.User.logOut(); + Parse.User.logOut().then(function (data) { + // logged out + }); } function test_facebook_util() { @@ -397,4 +399,4 @@ function test_view() { var model = Parse.User.current(); var view = new Parse.View(); -} \ No newline at end of file +} diff --git a/parse/parse.d.ts b/parse/parse.d.ts index 9f8df5c3f..cb4fa8b2b 100644 --- a/parse/parse.d.ts +++ b/parse/parse.d.ts @@ -649,7 +649,7 @@ declare module Parse { static current(): User; static signUp(username: string, password: string, attrs: any, options?: ParseDefaultOptions): Promise; static logIn(username: string, password: string, options?: ParseDefaultOptions): Promise; - static logOut(): void; + static logOut(): Promise; static allowCustomUserClass(isAllowed: boolean): void; static become(sessionToken: string, options?: ParseDefaultOptions): Promise; static requestPasswordReset(email: string, options?: ParseDefaultOptions): Promise; diff --git a/passport-facebook/passport-facebook.d.ts b/passport-facebook/passport-facebook.d.ts index 855b033f5..b3adaf860 100644 --- a/passport-facebook/passport-facebook.d.ts +++ b/passport-facebook/passport-facebook.d.ts @@ -13,6 +13,10 @@ declare module 'passport-facebook' { interface Profile extends passport.Profile { gender: string; profileUrl: string; + username: string; + + _raw: string; + _json: any; } interface IStrategyOption { diff --git a/passport-google-oauth/passport-google-oauth-tests.ts b/passport-google-oauth/passport-google-oauth-tests.ts new file mode 100644 index 000000000..60fad97b4 --- /dev/null +++ b/passport-google-oauth/passport-google-oauth-tests.ts @@ -0,0 +1,38 @@ +/** + * Created by jcabresos on 4/19/2014. + */ +import passport = require('passport'); +import google = require('passport-google-oauth'); + +// just some test model +var User = { + findOrCreate(id:string, provider:string, callback:(err:any, user:any) => void): void { + callback(null, {username:'james'}); + } +} + +passport.use(new google.OAuthStrategy({ + consumerKey: process.env.GOOGLE_CONSUMER_KEY, + consumerSecret: process.env.GOOGLE_CONSUMER_SECRET, + callbackURL: process.env.PASSPORT_GOOGLE_CALLBACK_URL + }, + function(accessToken:string, refreshToken:string, profile:google.Profile, done:(error:any, user?:any) => void) { + User.findOrCreate(profile.id, profile.provider, function(err, user) { + if (err) { return done(err); } + done(null, user); + }); + }) +); + +passport.use(new google.OAuth2Strategy({ + clientID: process.env.GOOGLE_CLIENT_ID, + clientSecret: process.env.GOOGLE_CLIENT_SECRET, + callbackURL: process.env.PASSPORT_GOOGLE_CALLBACK_URL + }, + function(accessToken:string, refreshToken:string, profile:google.Profile, done:(error:any, user?:any) => void) { + User.findOrCreate(profile.id, profile.provider, function(err, user) { + if (err) { return done(err); } + done(null, user); + }); + }) +); diff --git a/passport-google-oauth/passport-google-oauth.d.ts b/passport-google-oauth/passport-google-oauth.d.ts new file mode 100644 index 000000000..27744021f --- /dev/null +++ b/passport-google-oauth/passport-google-oauth.d.ts @@ -0,0 +1,63 @@ +// Type definitions for passport-facebook 1.0.3 +// Project: https://github.com/jaredhanson/passport-facebook +// Definitions by: James Roland Cabresos +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'passport-google-oauth' { + + import passport = require('passport'); + import express = require('express'); + + interface Profile extends passport.Profile { + gender: string; + + _raw: string; + _json: any; + } + + interface IOAuthStrategyOption { + consumerKey: string; + consumerSecret: string; + callbackURL: string; + + reguestTokenURL?: string; + accessTokenURL?: string; + userAuthorizationURL?: string; + sessionKey?: string; + } + + class OAuthStrategy implements passport.Strategy { + constructor(options: IOAuthStrategyOption, + verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void); + name: string; + authenticate: (req: express.Request, options?: Object) => void; + } + + interface IOAuth2StrategyOption { + clientID: string; + clientSecret: string; + callbackURL: string; + + authorizationURL?: string; + tokenURL?: string; + + accessType?: string; + approval_prompt?: string; + prompt?: string; + loginHint?: string; + userID?: string; + hostedDomain?: string; + display?: string; + requestVisibleActions?: string; + openIDRealm?: string; + } + + class OAuth2Strategy implements passport.Strategy { + constructor(options: IOAuth2StrategyOption, + verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void); + name: string; + authenticate: (req: express.Request, options?: Object) => void; + } +} diff --git a/passport-twitter/passport-twitter-tests.ts b/passport-twitter/passport-twitter-tests.ts new file mode 100644 index 000000000..ae644dfa2 --- /dev/null +++ b/passport-twitter/passport-twitter-tests.ts @@ -0,0 +1,25 @@ +/** + * Created by jcabresos on 4/19/2014. + */ +import passport = require('passport'); +import twitter = require('passport-twitter'); + +// just some test model +var User = { + findOrCreate(id:string, provider:string, callback:(err:any, user:any) => void): void { + callback(null, {username:'james'}); + } +} + +passport.use(new twitter.Strategy({ + consumerKey: process.env.PASSPORT_TWITTER_CONSUMER_KEY, + consumerSecret: process.env.PASSPORT_TWITTER_CONSUMER_SECRET, + callbackURL: process.env.PASSPORT_TWITTER_CALLBACK_URL + }, + function(accessToken:string, refreshToken:string, profile:twitter.Profile, done:(error:any, user?:any) => void) { + User.findOrCreate(profile.id, profile.provider, function(err, user) { + if (err) { return done(err); } + done(null, user); + }); + }) +); diff --git a/passport-twitter/passport-twitter.d.ts b/passport-twitter/passport-twitter.d.ts new file mode 100644 index 000000000..cb43aad26 --- /dev/null +++ b/passport-twitter/passport-twitter.d.ts @@ -0,0 +1,42 @@ +// Type definitions for passport-facebook 1.0.3 +// Project: https://github.com/jaredhanson/passport-facebook +// Definitions by: James Roland Cabresos +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'passport-twitter' { + + import passport = require('passport'); + import express = require('express'); + + interface Profile extends passport.Profile { + gender: string; + username: string; + + _raw: string; + _json: any; + _accessLevel: string; + } + + interface IStrategyOption { + consumerKey: string; + consumerSecret: string; + callbackURL: string; + + reguestTokenURL?: string; + accessTokenURL?: string; + userAuthorizationURL?: string; + sessionKey?: string; + + userProfileURL?: string; + skipExtendedUserProfile?: boolean; + } + + class Strategy implements passport.Strategy { + constructor(options: IStrategyOption, + verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void); + name: string; + authenticate: (req: express.Request, options?: Object) => void; + } +} diff --git a/pluralize/pluralize-tests.ts b/pluralize/pluralize-tests.ts new file mode 100644 index 000000000..07d5a3dcc --- /dev/null +++ b/pluralize/pluralize-tests.ts @@ -0,0 +1,25 @@ +/// + +import pluralize = require('pluralize'); + +pluralize('test'); //=> "tests" +pluralize('test', 1); //=> "test" +pluralize('test', 5); //=> "tests" +pluralize('test', 1, true); //=> "1 test" +pluralize('test', 5, true); //=> "5 tests" + +pluralize.plural('regex'); //=> "regexes" +pluralize.addPluralRule(/gex$/i, 'gexii'); +pluralize.plural('regex'); //=> "regexii" + +pluralize.singular('singles'); //=> "single" +pluralize.addSingularRule(/singles$/i, 'singular'); +pluralize.singular('singles'); //=> "singular" + +pluralize.plural('irregular'); //=> "irregulars" +pluralize.addIrregularRule('irregular', 'regular'); +pluralize.plural('irregular'); //=> "regular" + +pluralize.plural('paper'); //=> "papers" +pluralize.addUncountableRule('paper'); +pluralize.plural('paper'); //=> "paper" \ No newline at end of file diff --git a/pluralize/pluralize.d.ts b/pluralize/pluralize.d.ts new file mode 100644 index 000000000..501a96b12 --- /dev/null +++ b/pluralize/pluralize.d.ts @@ -0,0 +1,65 @@ +// Type definitions for pluralize +// Project: https://www.npmjs.com/package/pluralize +// Definitions by: Syu Kato +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface PluralizeStatic { + /** + * Pluralize or singularize a word based on the passed in count. + * + * @param word + * @param count + * @param inclusive + */ + (word: string, count?: number, inclusive?: boolean): string; + + /** + * Pluralize a word based. + * + * @param word + */ + plural(word: string): string; + + /** + * Singularize a word based. + * + * @param word + */ + singular(word: string): string; + + /** + * Add a pluralization rule to the collection. + * + * @param rule + * @param replacement + */ + addPluralRule(rule: string|RegExp, replacemant: string): void; + + /** + * Add a singularization rule to the collection. + * + * @param rule + * @param replacement + */ + addSingularRule(rule: string|RegExp, replacemant: string): void; + + /** + * Add an irregular word definition. + * + * @param single + * @param plural + */ + addIrregularRule(single: string, plural: string): void; + + /** + * Add an uncountable word rule. + * + * @param word + */ + addUncountableRule(word: string|RegExp): void; +} + +declare module "pluralize" { + export = pluralize; +} +declare var pluralize: PluralizeStatic; \ No newline at end of file diff --git a/quixote/quixote-tests.ts b/quixote/quixote-tests.ts new file mode 100644 index 000000000..0f2d051f2 --- /dev/null +++ b/quixote/quixote-tests.ts @@ -0,0 +1,36 @@ +/// +/// + +function test_createFrame() { + var frame: QFrame; + before((done) => { + var options = { src: "" }; + frame = quixote.createFrame(options, done()); + }); +} + +function test_resetFrame() { + var frame: QFrame; + before((done) => { + var options = { src: "" }; + frame = quixote.createFrame(options, done()); + }); + + beforeEach(() => { + frame.reset(); + }); +} + +function test_removeFrame() { + var frame: QFrame; + before((done) => { + var options = { src: "" }; + frame = quixote.createFrame(options, done()); + }); + + after(function() { + frame.remove(); + }); +} + + diff --git a/quixote/quixote.d.ts b/quixote/quixote.d.ts new file mode 100644 index 000000000..37bc1eb0c --- /dev/null +++ b/quixote/quixote.d.ts @@ -0,0 +1,233 @@ +// Type definitions for quixote v0.7.0 +// Project: http://quixote-css.com/ +// Definitions by: Aleksandr Filatov +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface Quixote { + // Create a test iframe. This is a slow operation, so once you have a frame, it's best to use QFrame.reset() on it rather than creating a new frame for each test + createFrame(options: QuixoteFrameOptions, callback: (err: Error, loadedFrame: QFrame) => void): QFrame; +} + +interface QFrame { + // Reset the frame back to the state it was in immediately after you called quixote.createFrame() + reset(): void; + + // Remove the test frame entirely. + remove(): void; + + // Retrieve an element matching a selector. Throws an exception unless exactly one matching element is found + get(selector: string, nickname?: string): QElement; + + // Retrieve a list of elements matching a selector. If you want to ensure that exactly one element is retrieved, use frame.get() instead. + getAll(selector: string, nickname?: string): QElementList; + + // Create an element and append it to the frame's body. Throws an exception unless exactly one element is created. (But that one element may contain children.) + add(html: string, nickname?: string): QElement; + + // Provides access to descriptors for the frame's viewport (the part of the page that you can see in the frame, not including scrollbars) + viewport(): QElement; + + // Provides access to descriptors for the frame's page (everything you can see or scroll to, not including scrollbars) + page(): QElement; + + // Retrieves the frame's body element. + body(): QElement; + + // Changes the size of the frame. + resize(width: number, height: number): void; + + // Scroll the page so that top-left corner of the frame is as close as possible to an (x, y) coordinate. + scroll(x: number, y: number): void; + + // Determine the (x, y) coordinate of the top-left corner of the frame. This uses pageXOffset and pageYOffset under the covers. (On IE 8, it uses scrollLeft and scrollTop.) + getRawScrollPosition(x: number, y: number): Object; + + // Retrieve the underlying HTMLIFrameElement DOM element for the frame. + toDomElement(): HTMLIFrameElement; +} + +interface QElement { + // Compare the element's descriptors to a set of expected values and throw an exception if they don't match + assert(expected: ElementDescriptor, message?: string): void; + + // Compare the element's descriptors to a set of expected values. + diff(expected: ElementDescriptor): string; + + // Determine how the browser is actually rendering an element's style. This uses getComputedStyle() under the covers. (On IE 8, it uses currentStyle) + getRawStyle(property: string): string; + + // Determine where an element is displayed within the frame viewport, as computed by the browser + getRawPosition(): RawPositionObject; + + // Retrieve the underlying HTMLElement DOM element for the frame. + toDomElement(): HTMLElement; +} + +interface QElementList { + // Determine the number of elements in the list. + length(): number; + + // Retrieve an element from the list. Positive and negative indices are allowed. Throws an exception if the index is out of bounds. + at(index: number, nickname?: string): QElement; +} + +// Element positions and sizes are available on all QElement instances. +interface ElementDescriptor { + // The top edge of the element + top: PositionDescriptor; + + // The right edge of the element + right: PositionDescriptor; + + // The bottom edge of the element + bottom: PositionDescriptor; + + // The left edge of the element + left: PositionDescriptor; + + // Horizontal center: midway between the right and left edges. + center: PositionDescriptor; + + // Vertical middle: midway between the top and bottom edges. + middle: PositionDescriptor; + + // Width of the element. + width: SizeDescriptor; + + // Height of the element. + height: SizeDescriptor; +} + +// Viewport positions and sizes are available on QFrame.viewport() +interface ViewportDescriptor { + // The highest visible part of the page. + top: PositionDescriptor; + + // The rightmost visible part of the page. + right: PositionDescriptor; + + // The lowest visible part of the page. + bottom: PositionDescriptor; + + // The leftmost visible part of the page. + left: PositionDescriptor; + + // Horizontal center: midway between right and left + center: PositionDescriptor; + + // Vertical middle: midway between top and bottom. + middle: PositionDescriptor; + + // Width of the viewport. + width: SizeDescriptor; + + // Height of the viewport. + height: SizeDescriptor; +} + +// Page positions and sizes are available on QFrame.page(). +interface PageDescriptor { + // The top of the page. + top: PositionDescriptor; + + // The right side of the page. + right: PositionDescriptor; + + // The bottom of the page. + bottom: PositionDescriptor; + + // The left side of the page. + left: PositionDescriptor; + + // Horizontal center: midway between right and left. + center: PositionDescriptor; + + // Vertical middle: midway between top and bottom. + middle: PositionDescriptor; + + // Width of the page. + width: SizeDescriptor; + + // Height of the page. + height: SizeDescriptor; +} + +// Position descriptors represent an X or Y coordinate. The top-left corner of the page is (0, 0) and the values increase downward and to the right. +interface PositionDescriptor { + // Create a new descriptor that is further down the page or to the right. + plus(amount: SizeDescriptor): PositionDescriptor; + + // Create a new descriptor that is further down the page or to the right. + plus(amount: number): PositionDescriptor; + + // Create a new descriptor that is further down the page or to the right. + minus(amount: SizeDescriptor): PositionDescriptor; + + // Create a new descriptor that is further down the page or to the right. + minus(amount: number): PositionDescriptor; +} + +// Size descriptors represent width or height. +interface SizeDescriptor { + // Create a descriptor that's bigger than this one. + plus(amount: SizeDescriptor): SizeDescriptor; + + // Create a descriptor that's bigger than this one. + plus(amount: number): SizeDescriptor; + + // Create a descriptor that's smaller than this one. + minus(amount: SizeDescriptor): SizeDescriptor; + + // Create a descriptor that's smaller than this one. + minus(amount: number): SizeDescriptor; + + // Create a new descriptor that's a multiple or fraction of the size of this one. + times(multiple: number): SizeDescriptor; +} + +interface QuixoteFrameOptions { + // Width of the iframe. Defaults to a large value (see stability note below) + width?: number; + + // Height of the iframe. Defaults to a large value (see stability note below) + height?: number; + + // URL of an HTML document to load into the frame. Must be served from same domain as the enclosing test document, or you could get same-origin policy errors. Defaults to an empty document with (to enable standards-mode rendering) + src?: string; + + // URL of a CSS stylesheet to load into the frame. Defaults to loading nothing + stylesheet?: string; +} + +interface RawPositionObject { + // top edge + top: number; + + // right edge + right: number; + + // bottom edge + bottom: number; + + // left edge + left: number; + + // width (right edge minus left edge) + width: number; + + // height (bottom edge minus top edge) + height: number; +} + +declare var quixote: Quixote; + +declare module "quixote" { + + class Quixote { + constructor(); + + createFrame(options: QuixoteFrameOptions, callback: (err: Error, loadedFrame: QFrame) => void): QFrame; + } + + export = Quixote; +} \ No newline at end of file diff --git a/requirejs/require-tests.ts b/requirejs/require-tests.ts index a8cfdc87e..0f3cc8194 100644 --- a/requirejs/require-tests.ts +++ b/requirejs/require-tests.ts @@ -41,3 +41,11 @@ require(['main'], (main: any, $: any, _: any, Backbone: any) => { var recOne = require.config({ baseUrl: 'js' }); recOne(['core'], function (core: any) {/*some code*/}); +// Tests for 'module' magic module typings +// (Using 'module' only actually makes sense in an external module) + +import module = require('module'); + +var moduleConfig: any = module.config(); +var moduleId: string = module.id; +var moduleUri: string = module.uri; diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 47c754c60..21f9aeebb 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -29,6 +29,15 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +declare module 'module' { + var mod: { + config: () => any; + id: string; + uri: string; + } + export = mod; +} + interface RequireError extends Error { /** @@ -342,7 +351,7 @@ interface RequireDefine { * callback return module definition **/ (name: string, ready: Function): void; - + /** * Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms * to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object. diff --git a/unorm/unorm-tests.ts b/unorm/unorm-tests.ts new file mode 100644 index 000000000..6d2ba030d --- /dev/null +++ b/unorm/unorm-tests.ts @@ -0,0 +1,11 @@ +/// +import unorm = require("unorm"); + +function listNormalizations(raw: string) { + return [ + unorm.nfd(raw), + unorm.nfkd(raw), + unorm.nfc(raw), + unorm.nfkc(raw), + ]; +} diff --git a/unorm/unorm.d.ts b/unorm/unorm.d.ts new file mode 100644 index 000000000..b2f0bc577 --- /dev/null +++ b/unorm/unorm.d.ts @@ -0,0 +1,19 @@ +// Type definitions for unorm 1.3.3 +// Project: https://github.com/walling/unorm +// Definitions by: Christopher Brown +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module unorm { + interface Static { + nfd(str: string): string; + nfkd(str: string): string; + nfc(str: string): string; + nfkc(str: string): string; + } +} + +declare var unorm: unorm.Static; + +declare module "unorm" { + export = unorm; +} diff --git a/virtual-dom/virtual-dom-tests.ts b/virtual-dom/virtual-dom-tests.ts new file mode 100644 index 000000000..98d5f1642 --- /dev/null +++ b/virtual-dom/virtual-dom-tests.ts @@ -0,0 +1,33 @@ +/// +import virtual_dom = require("virtual-dom"); +import VNode = virtual_dom.VNode; +import h = virtual_dom.h; + +function renderAny(object: any): VNode { + if (object === undefined) { + return h('i.undefined', 'undefined'); + } + else if (object === null) { + return h('b.null', 'null'); + } + else if (Array.isArray(object)) { + return h('span.array', ['[', object.map(renderAny), ']']); + } + else if (typeof object === 'object') { + var object_children = Object.keys(object).map(key => { + var child = object[key]; + return h('div', [ + h('span.key', [key, ':']), + renderAny(child), + ]); + }); + return h('div.object', object_children); + } + else if (typeof object === 'number') { + return h('span.number', object.toString()); + } + else if (typeof object === 'boolean') { + return h('span.boolean', object.toString()); + } + return h('span.string', object.toString()); +} diff --git a/virtual-dom/virtual-dom.d.ts b/virtual-dom/virtual-dom.d.ts new file mode 100644 index 000000000..4902304a1 --- /dev/null +++ b/virtual-dom/virtual-dom.d.ts @@ -0,0 +1,132 @@ +// Type definitions for virtual-dom 2.0.1 +// Project: https://github.com/Matt-Esch/virtual-dom +// Definitions by: Christopher Brown +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module VirtualDOM { + interface VHook { + hook(node: Element, propertyName: string): void; + unhook(node: Element, propertyName: string): void; + } + + type EventHandler = (...args: any[]) => void; + + interface VProperties { + attributes?: {[index: string]: string}; + /** + I would like to use {[index: string]: string}, but then we couldn't use an + object literal when setting the styles, since TypeScript doesn't seem to + infer that {'fontSize': string; 'fontWeight': string;} is actually quite + assignable to the type { [index: string]: string; } + */ + style?: any; + /** + The relaxation on `style` above is the reason why we need `any` as an option + on the indexer type. + */ + [index: string]: any | string | boolean | number | VHook | EventHandler | {[index: string]: string | boolean | number}; + } + + interface VNode { + tagName: string; + properties: VProperties; + children: VTree[]; + key?: string; + namespace?: string; + count: number; + hasWidgets: boolean; + hasThunks: boolean; + hooks: any[]; + descendantHooks: any[]; + version: string; + type: string; // 'VirtualNode' + } + + interface VText { + text: string; + new(text: any): VText; + version: string; + type: string; // 'VirtualText' + } + + interface Widget { + type: string; // 'Widget' + init(): Element; + update(previous: Widget, domNode: Element): void; + destroy(node: Element): void; + } + + interface Thunk { + type: string; // 'Thunk' + vnode: VTree; + render(previous: VTree): VTree; + } + + type VTree = VText | VNode | Widget | Thunk; + + // enum VPatch { + // NONE = 0, + // VTEXT = 1, + // VNODE = 2, + // WIDGET = 3, + // PROPS = 4, + // ORDER = 5, + // INSERT = 6, + // REMOVE = 7, + // THUNK = 8 + // } + interface VPatch { + vNode: VNode; + patch: any; + new(type: number, vNode: VNode, patch: any): VPatch; + version: string; + /** + type is set to 'VirtualPatch' on the prototype, but overridden in the + constructor with a number. + */ + type: number; + } + + interface createProperties extends VProperties { + key?: string; + namespace?: string; + } + + type VChild = VTree[] | VTree | string[] | string; + + /** + create() calls either document.createElement() or document.createElementNS(), + for which the common denominator is Element (not HTMLElement). + */ + function create(vnode: VText, opts?: {document?: Document; warn?: boolean}): Text; + function create(vnode: VNode | Widget | Thunk, opts?: {document?: Document; warn?: boolean}): Element; + function h(tagName: string, properties: createProperties, children: string | VChild[]): VNode; + function h(tagName: string, children: string | VChild[]): VNode; + function diff(left: VTree, right: VTree): VPatch[]; + /** + patch() usually just returns rootNode after doing stuff to it, so we want + to preserve that type (though it will usually be just Element). + */ + function patch(rootNode: T, patches: VPatch[], renderOptions?: any): T; +} + +declare module "virtual-dom/h" { + // export = VirtualDOM.h; works just fine, but the DT checker doesn't like it + import h = VirtualDOM.h; + export = h; +} +declare module "virtual-dom/create-element" { + import create = VirtualDOM.create; + export = create; +} +declare module "virtual-dom/diff" { + import diff = VirtualDOM.diff; + export = diff; +} +declare module "virtual-dom/patch" { + import patch = VirtualDOM.patch; + export = patch; +} +declare module "virtual-dom" { + export = VirtualDOM; +} diff --git a/xml2js/xml2js.d.ts b/xml2js/xml2js.d.ts index 33ad64978..0dc03add7 100644 --- a/xml2js/xml2js.d.ts +++ b/xml2js/xml2js.d.ts @@ -64,7 +64,7 @@ declare module 'xml2js' { normalize?: boolean; normalizeTags?: boolean; strict?: boolean; - tagNameProcessors?: (name: string) => string; + tagNameProcessors?: [(name: string) => string]; trim?: boolean; validator?: Function; xmlns?: boolean; diff --git a/xmlbuilder/xmlbuilder-tests.ts b/xmlbuilder/xmlbuilder-tests.ts new file mode 100644 index 000000000..bebc5f4d8 --- /dev/null +++ b/xmlbuilder/xmlbuilder-tests.ts @@ -0,0 +1,44 @@ +/// + +import xmlbuilder = require('xmlbuilder'); +var xml = xmlbuilder.create; + +// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/comment.coffee +xml('comment', {}, {}, { headless: true }).comment('<>\'"&\t\n\r').end(); + +// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/instructions.coffee +xml('test17', { headless: true }).ins('pi', 'mypi').end(); + +xml('test17', { headless: true }).ins({ 'pi': 'mypi', 'pi2': 'mypi2', 'pi3': null }).end(); + +xml('test17', { headless: true }).ins(['pi', 'pi2']).end(); + +xml('test18', { headless: true }) + .ins('renderCache.subset', '"Verdana" 0 0 ISO-8859-1 4 268 67 "#(),-./') + .ins('pitarget', () => 'pivalue') + .end(); + +// https://github.com/oozcitak/xmlbuilder-js/blob/master/test/createxml.coffee +xml('root') + .ele('xmlbuilder') + .att('for', 'node-js') + .com('CoffeeScript is awesome.') + .nod('repo') + .att('type', 'git') + .txt('git://github.com/oozcitak/xmlbuilder-js.git') + .up() + .up() + .ele('test') + .att('escaped', 'chars <>\'"&\t\n\r') + .txt('complete 100%<>\'"&\t\n\r') + .up() + .ele('cdata') + .cdata('this is a test\nSecond line') + .up() + .ele('raw') + .raw('&<>&') + .up() + .ele('atttest', { 'att': 'val' }, 'text') + .up() + .ele('atttest', 'text') + .end(); diff --git a/xmlbuilder/xmlbuilder.d.ts b/xmlbuilder/xmlbuilder.d.ts new file mode 100644 index 000000000..6f13452c1 --- /dev/null +++ b/xmlbuilder/xmlbuilder.d.ts @@ -0,0 +1,89 @@ +// Type definitions for xmlbuilder +// Project: https://github.com/oozcitak/xmlbuilder-js +// Definitions by: Wallymathieu +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'xmlbuilder' { + export = xmlbuilder; + class XMLDocType { + clone(): XMLDocType; + element(name: string, value?: Object): XMLDocType; + attList(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; + entity(name: string, value: any): XMLDocType; + pEntity(name: string, value: any): XMLDocType; + notation(name: string, value: any): XMLDocType; + cdata(value: string): XMLDocType; + comment(value: string): XMLDocType; + instruction(target: string, value: any): XMLDocType; + root(): XMLDocType; + document(): any; + toString(options?: Object, level?: Number): string; + + ele(name: string, value?: Object): XMLDocType; + att(elementName: string, attributeName: string, attributeType: string, defaultValueType?: string, defaultValue?: any): XMLDocType; + ent(name: string, value: any): XMLDocType; + pent(name: string, value: any): XMLDocType; + not(name: string, value: any): XMLDocType; + dat(value: string): XMLDocType; + com(value: string): XMLDocType; + ins(target: string, value: any): XMLDocType; + up(): XMLDocType; + doc(): any; + } + + class XMLElementOrXMLNode { + // XMLElement: + clone(): XMLElementOrXMLNode; + attribute(name: any, value?: any): XMLElementOrXMLNode; + att(name: any, value?: any): XMLElementOrXMLNode; + removeAttribute(name: string): XMLElementOrXMLNode; + instruction(target: string, value: any): XMLElementOrXMLNode; + instruction(array: Array): XMLElementOrXMLNode; + instruction(obj: Object): XMLElementOrXMLNode; + ins(target: string, value: any): XMLElementOrXMLNode; + ins(array: Array): XMLElementOrXMLNode; + ins(obj: Object): XMLElementOrXMLNode; + a(name: any, value?: any): XMLElementOrXMLNode; + i(target: string, value: any): XMLElementOrXMLNode; + i(array: Array): XMLElementOrXMLNode; + i(obj: Object): XMLElementOrXMLNode; + toString(options?:Object, level?:Number): string; + // XMLNode: + element(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + ele(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + insertBefore(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + insertAfter(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + remove(): XMLElementOrXMLNode; + node(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + text(value: string): XMLElementOrXMLNode; + cdata(value: string): XMLElementOrXMLNode; + comment(value: string): XMLElementOrXMLNode; + raw(value: string): XMLElementOrXMLNode; + declaration(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; + doctype(pubID: string, sysID: string): XMLDocType; + up(): XMLElementOrXMLNode; + root(): XMLElementOrXMLNode; + document(): any; + end(options?: Object): string; + prev(): XMLElementOrXMLNode; + next(): XMLElementOrXMLNode; + nod(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + txt(value: string): XMLElementOrXMLNode; + dat(value: string): XMLElementOrXMLNode; + com(value: string): XMLElementOrXMLNode; + doc(): XMLElementOrXMLNode; + dec(version: string, encoding: string, standalone: boolean): XMLElementOrXMLNode; + dtd(pubID: string, sysID: string): XMLDocType; + e(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + n(name: any, attributes?: Object, text?: any): XMLElementOrXMLNode; + t(value: string): XMLElementOrXMLNode; + d(value: string): XMLElementOrXMLNode; + c(value: string): XMLElementOrXMLNode; + r(value: string): XMLElementOrXMLNode; + u(): XMLElementOrXMLNode; + } + + module xmlbuilder { + function create(name: string, xmldec?: Object, doctype?: any, options?: Object): XMLElementOrXMLNode; + } +}