From 4c7693c94dcb63654c8e1fe643f232300767eff7 Mon Sep 17 00:00:00 2001 From: Robert Baker Date: Thu, 28 May 2015 14:50:38 -0700 Subject: [PATCH 01/48] Fixed MDPalette definition. --- angular-material/angular-material.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index 06c1ecf25f..1517c295fd 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -150,8 +150,8 @@ declare module angular.material { A400?: string; A700?: string; contrastDefaultColor?: string; - contrastDarkColors?: string; - contrastStrongLightColors?: string; + contrastDarkColors?: string[]; + contrastLightColors?: string[]; } interface MDThemeHues { From cec0beaa1c72b9a0178541a82b74af384708bf98 Mon Sep 17 00:00:00 2001 From: Adam Kalman Date: Fri, 29 May 2015 14:17:17 -0700 Subject: [PATCH 02/48] 90296 add in map values definitions add in definitions for map values when used within a chain generated via _.chain or _(). --- lodash/lodash.d.ts | 569 ++++++++++++++++++++++++--------------------- 1 file changed, 302 insertions(+), 267 deletions(-) diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 84db97b2d0..cf7ab88511 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -13,27 +13,27 @@ declare module _ { * In addition to Lo-Dash methods, wrappers also have the following Array methods: * concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift * - * Chaining is supported in custom builds as long as the value method is implicitly or + * Chaining is supported in custom builds as long as the value method is implicitly or * explicitly included in the build. * * The chainable wrapper functions are: - * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, - * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, - * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, - * indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, - * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, - * remove, rest, reverse, shuffle, slice, sort, sortBy, splice, tap, throttle, times, + * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, + * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, + * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, + * indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, + * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, + * remove, rest, reverse, shuffle, slice, sort, sortBy, splice, tap, throttle, times, * toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip * * The non-chainable wrapper functions are: - * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, - * findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean, - * isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber, - * isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin, - * noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some, + * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, + * findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean, + * isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber, + * isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin, + * noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some, * sortedIndex, runInContext, template, unescape, uniqueId, and value * - * The wrapper functions first and last return wrapped values when n is provided, otherwise + * The wrapper functions first and last return wrapped values when n is provided, otherwise * they return unwrapped values. * * Explicit chaining can be enabled by using the _.chain method. @@ -56,14 +56,14 @@ declare module _ { support: Support; /** - * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby + * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby * (ERB). Change the following template settings to use alternative delimiters. **/ templateSettings: TemplateSettings; } /** - * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby + * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby * (ERB). Change the following template settings to use alternative delimiters. **/ interface TemplateSettings { @@ -108,7 +108,7 @@ declare module _ { argsObject: boolean; /** - * Detect if name or message properties of Error.prototype are enumerable by default. + * Detect if name or message properties of Error.prototype are enumerable by default. * (IE < 9, Safari < 5.1) **/ enumErrorProps: boolean; @@ -119,7 +119,7 @@ declare module _ { fastBind: boolean; /** - * Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera + * Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera * mobile browsers & avoided in Windows 8 apps). **/ funcDecomp: boolean; @@ -130,7 +130,7 @@ declare module _ { funcNames: boolean; /** - * Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, + * Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, * Safari < 5.1). **/ nonEnumArgs: boolean; @@ -138,7 +138,7 @@ declare module _ { /** * Detect if properties shadowing those on Object.prototype are non-enumerable. * - * In IE < 9 an objects own properties, shadowing non-enumerable ones, are made + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are made * non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). **/ nonEnumShadows: boolean; @@ -151,9 +151,9 @@ declare module _ { /** * Detect if Array#shift and Array#splice augment array-like objects correctly. * - * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice() - * functions that fail to remove the last element, value[0], of array-like objects even - * though the length property is set to 0. The shift() method is buggy in IE 8 compatibility + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice() + * functions that fail to remove the last element, value[0], of array-like objects even + * though the length property is set to 0. The shift() method is buggy in IE 8 compatibility * mode, while splice() is buggy regardless of mode in IE < 9 and buggy in compatibility mode * in IE 9. **/ @@ -162,7 +162,7 @@ declare module _ { /** * Detect lack of support for accessing string characters by index. * - * IE < 8 can't access characters by index and IE 8 can only access characters by index on + * IE < 8 can't access characters by index and IE 8 can only access characters by index on * string literals. **/ unindexedChars: boolean; @@ -232,8 +232,8 @@ declare module _ { //_.tap interface LoDashStatic { /** - * Invokes interceptor with the value as the first argument and then returns value. The - * purpose of this method is to "tap into" a method chain in order to perform operations on + * Invokes interceptor with the value as the first argument and then returns value. The + * purpose of this method is to "tap into" a method chain in order to perform operations on * intermediate results within the chain. * @param value The value to provide to interceptor * @param interceptor The function to invoke. @@ -254,7 +254,7 @@ declare module _ { /********* * Arrays * **********/ - + //_.chunk interface LoDashStatic { /** @@ -271,7 +271,7 @@ declare module _ { **/ chunk(array: List, size?: number): T[][]; } - + interface LoDashArrayWrapper { /** * @see _.chunk @@ -338,10 +338,10 @@ declare module _ { //_.findIndex interface LoDashStatic { /** - * This method is like _.find except that it returns the index of the first element that passes + * This method is like _.find except that it returns the index of the first element that passes * the callback check, instead of the element itself. * @param array The array to search. - * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be + * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be * used to create a ".pluck" or ".where" style callback, respectively. * @param thisArg The this binding of callback. * @return Returns the index of the found element, else -1. @@ -393,7 +393,7 @@ declare module _ { /** * This method is like _.findIndex except that it iterates over elements of a collection from right to left. * @param array The array to search. - * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be + * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be * used to create a ".pluck" or ".where" style callback, respectively. * @param thisArg The this binding of callback. * @return Returns the index of the found element, else -1. @@ -443,12 +443,12 @@ declare module _ { //_.first interface LoDashStatic { /** - * Gets the first element or first n elements of an array. If a callback is provided - * elements at the beginning of the array are returned as long as the callback returns - * truey. The callback is bound to thisArg and invoked with three arguments; (value, + * Gets the first element or first n elements of an array. If a callback is provided + * elements at the beginning of the array are returned as long as the callback returns + * truey. The callback is bound to thisArg and invoked with three arguments; (value, * index, array). * - * If a property name is provided for callback the created "_.pluck" style callback + * If a property name is provided for callback the created "_.pluck" style callback * will return the property value of the given element. * * If an object is provided for callback the created "_.where" style callback will return ] @@ -769,15 +769,15 @@ declare module _ { //_.flatten interface LoDashStatic { /** - * Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the - * array will only be flattened a single level. If a callback is provided each element of - * the array is passed through the callback before flattening. The callback is bound to + * Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the + * array will only be flattened a single level. If a callback is provided each element of + * the array is passed through the callback before flattening. The callback is bound to * thisArg and invoked with three arguments; (value, index, array). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param array The array to flatten. * @param shallow If true then only flatten one level, optional, default = false. @@ -936,8 +936,8 @@ declare module _ { //_.indexOf interface LoDashStatic { /** - * Gets the index at which the first occurrence of value is found using strict equality - * for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex + * Gets the index at which the first occurrence of value is found using strict equality + * for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex * will run a faster binary search. * @param array The array to search. * @param value The value to search for. @@ -995,15 +995,15 @@ declare module _ { //_.initial interface LoDashStatic { /** - * Gets all but the last element or last n elements of an array. If a callback is provided - * elements at the end of the array are excluded from the result as long as the callback - * returns truey. The callback is bound to thisArg and invoked with three arguments; + * Gets all but the last element or last n elements of an array. If a callback is provided + * elements at the end of the array are excluded from the result as long as the callback + * returns truey. The callback is bound to thisArg and invoked with three arguments; * (value, index, array). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param array The array to query. * @param n Leaves this many elements behind, optional. @@ -1086,7 +1086,7 @@ declare module _ { //_.intersection interface LoDashStatic { /** - * Creates an array of unique values present in all provided arrays using strict + * Creates an array of unique values present in all provided arrays using strict * equality for comparisons, i.e. ===. * @param arrays The arrays to inspect. * @return Returns an array of composite values. @@ -1102,14 +1102,14 @@ declare module _ { //_.last interface LoDashStatic { /** - * Gets the last element or last n elements of an array. If a callback is provided - * elements at the end of the array are returned as long as the callback returns truey. + * Gets the last element or last n elements of an array. If a callback is provided + * elements at the end of the array are returned as long as the callback returns truey. * The callback is bound to thisArg and invoked with three arguments; (value, index, array). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param array The array to query. * @return Returns the last element(s) of array. @@ -1191,8 +1191,8 @@ declare module _ { //_.lastIndexOf interface LoDashStatic { /** - * Gets the index at which the last occurrence of value is found using strict equality - * for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the + * Gets the index at which the last occurrence of value is found using strict equality + * for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the * end of the collection. * @param array The array to search. * @param value The value to search for. @@ -1216,7 +1216,7 @@ declare module _ { //_.pull interface LoDashStatic { /** - * Removes all provided values from the given array using strict equality for comparisons, + * Removes all provided values from the given array using strict equality for comparisons, * i.e. ===. * @param array The array to modify. * @param values The values to remove. @@ -1237,8 +1237,8 @@ declare module _ { //_.range interface LoDashStatic { /** - * Creates an array of numbers (positive and/or negative) progressing from start up - * to but not including end. If start is less than stop a zero-length range is created + * Creates an array of numbers (positive and/or negative) progressing from start up + * to but not including end. If start is less than stop a zero-length range is created * unless a negative step is specified. * @param start The start of the range. * @param end The end of the range. @@ -1262,14 +1262,14 @@ declare module _ { //_.remove interface LoDashStatic { /** - * Removes all elements from an array that the callback returns truey for and returns - * an array of removed elements. The callback is bound to thisArg and invoked with three + * Removes all elements from an array that the callback returns truey for and returns + * an array of removed elements. The callback is bound to thisArg and invoked with three * arguments; (value, index, array). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param array The array to modify. * @param callback The function called per iteration. @@ -1325,19 +1325,19 @@ declare module _ { //_.rest interface LoDashStatic { /** - * The opposite of _.initial this method gets all but the first element or first n elements of - * an array. If a callback function is provided elements at the beginning of the array are excluded - * from the result as long as the callback returns truey. The callback is bound to thisArg and + * The opposite of _.initial this method gets all but the first element or first n elements of + * an array. If a callback function is provided elements at the beginning of the array are excluded + * from the result as long as the callback returns truey. The callback is bound to thisArg and * invoked with three arguments; (value, index, array). * - * If a property name is provided for callback the created "_.pluck" style callback will return + * If a property name is provided for callback the created "_.pluck" style callback will return * the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return true + * + * If an object is provided for callback the created "_.where" style callback will return true * for elements that have the properties of the given object, else false. * @param array The array to query. - * @param {(Function|Object|number|string)} [callback=1] The function called per element or the number - * of elements to exclude. If a property name or object is provided it will be used to create a + * @param {(Function|Object|number|string)} [callback=1] The function called per element or the number + * of elements to exclude. If a property name or object is provided it will be used to create a * ".pluck" or ".where" style callback, respectively. * @param {*} [thisArg] The this binding of callback. * @return Returns a slice of array. @@ -1547,15 +1547,15 @@ declare module _ { //_.sortedIndex interface LoDashStatic { /** - * Uses a binary search to determine the smallest index at which a value should be inserted - * into a given sorted array in order to maintain the sort order of the array. If a callback - * is provided it will be executed for value and each element of array to compute their sort + * Uses a binary search to determine the smallest index at which a value should be inserted + * into a given sorted array in order to maintain the sort order of the array. If a callback + * is provided it will be executed for value and each element of array to compute their sort * ranking. The callback is bound to thisArg and invoked with one argument; (value). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param array The sorted list. * @param value The value to determine its index within `list`. @@ -1617,7 +1617,7 @@ declare module _ { //_.union interface LoDashStatic { /** - * Creates an array of unique values, in order, of the provided arrays using strict + * Creates an array of unique values, in order, of the provided arrays using strict * equality for comparisons, i.e. ===. * @param arrays The arrays to inspect. * @return Returns an array of composite values. @@ -1633,16 +1633,16 @@ declare module _ { //_.uniq interface LoDashStatic { /** - * Creates a duplicate-value-free version of an array using strict equality for comparisons, - * i.e. ===. If the array is sorted, providing true for isSorted will use a faster algorithm. - * If a callback is provided each element of array is passed through the callback before - * uniqueness is computed. The callback is bound to thisArg and invoked with three arguments; + * Creates a duplicate-value-free version of an array using strict equality for comparisons, + * i.e. ===. If the array is sorted, providing true for isSorted will use a faster algorithm. + * If a callback is provided each element of array is passed through the callback before + * uniqueness is computed. The callback is bound to thisArg and invoked with three arguments; * (value, index, array). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param array Array to remove duplicates from. * @param isSorted True if `array` is already sorted, optiona, default = false. @@ -1969,7 +1969,7 @@ declare module _ { * @param whereValue _.where style callback **/ unique( - whereValue: W): LoDashArrayWrapper; + whereValue: W): LoDashArrayWrapper; } //_.without @@ -2023,12 +2023,12 @@ declare module _ { xor( ...others: List[]): LoDashArrayWrapper; } - + //_.zip interface LoDashStatic { /** - * Creates an array of grouped elements, the first of which contains the first - * elements of the given arrays, the second of which contains the second elements + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements * of the given arrays, and so on. * @param arrays Arrays to process. * @return A new array of grouped elements. @@ -2066,8 +2066,8 @@ declare module _ { //_.zipObject interface LoDashStatic { /** - * Creates an object composed from arrays of keys and values. Provide either a single - * two dimensional array, i.e. [[key1, value1], [key2, value2]] or two arrays, one of + * Creates an object composed from arrays of keys and values. Provide either a single + * two dimensional array, i.e. [[key1, value1], [key2, value2]] or two arrays, one of * keys and one of corresponding values. * @param keys The array of keys. * @param values The array of values. @@ -2092,10 +2092,10 @@ declare module _ { //_.at interface LoDashStatic { /** - * Creates an array of elements from the specified indexes, or keys, of the collection. + * Creates an array of elements from the specified indexes, or keys, of the collection. * Indexes may be specified as individual arguments or as arrays of indexes. * @param collection The collection to iterate over. - * @param indexes The indexes of collection to retrieve, specified as individual indexes or + * @param indexes The indexes of collection to retrieve, specified as individual indexes or * arrays of indexes. * @return A new array of elements corresponding to the provided indexes. **/ @@ -2142,7 +2142,7 @@ declare module _ { //_.contains interface LoDashStatic { /** - * Checks if a given value is present in a collection using strict equality for comparisons, + * Checks if a given value is present in a collection using strict equality for comparisons, * i.e. ===. If fromIndex is negative, it is used as the offset from the end of the collection. * @param collection The collection to iterate over. * @param target The value to check for. @@ -2218,15 +2218,15 @@ declare module _ { //_.countBy interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of collection through the callback. The corresponding value of each key is the number - * of times the key was returned by the callback. The callback is bound to thisArg and + * Creates an object composed of keys generated from the results of running each element + * of collection through the callback. The corresponding value of each key is the number + * of times the key was returned by the callback. The callback is bound to thisArg and * invoked with three arguments; (value, index|key, collection). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -2304,14 +2304,14 @@ declare module _ { //_.every interface LoDashStatic { /** - * Checks if the given callback returns truey value for all elements of a collection. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, + * Checks if the given callback returns truey value for all elements of a collection. + * The callback is bound to thisArg and invoked with three arguments; (value, index|key, * collection). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -2465,14 +2465,14 @@ declare module _ { //_.filter interface LoDashStatic { /** - * Iterates over elements of a collection, returning an array of all elements the - * callback returns truey for. The callback is bound to thisArg and invoked with three + * Iterates over elements of a collection, returning an array of all elements the + * callback returns truey for. The callback is bound to thisArg and invoked with three * arguments; (value, index|key, collection). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -2677,17 +2677,17 @@ declare module _ { //_.find interface LoDashStatic { /** - * Iterates over elements of a collection, returning the first element that the callback - * returns truey for. The callback is bound to thisArg and invoked with three arguments; + * Iterates over elements of a collection, returning the first element that the callback + * returns truey for. The callback is bound to thisArg and invoked with three arguments; * (value, index|key, collection). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param collection Searches for a value in this list. - * @param callback The function called per iteration. + * @param callback The function called per iteration. * @param thisArg The this binding of callback. * @return The found element, else undefined. **/ @@ -2930,10 +2930,10 @@ declare module _ { //_.findLast interface LoDashStatic { /** - * This method is like _.find except that it iterates over elements of a collection from + * This method is like _.find except that it iterates over elements of a collection from * right to left. * @param collection Searches for a value in this list. - * @param callback The function called per iteration. + * @param callback The function called per iteration. * @param thisArg The this binding of callback. * @return The found element, else undefined. **/ @@ -3032,8 +3032,8 @@ declare module _ { //_.forEach interface LoDashStatic { /** - * Iterates over elements of a collection, executing the callback for each element. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, + * Iterates over elements of a collection, executing the callback for each element. + * The callback is bound to thisArg and invoked with three arguments; (value, index|key, * collection). Callbacks may exit iteration early by explicitly returning false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -3139,7 +3139,7 @@ declare module _ { //_.forEachRight interface LoDashStatic { /** - * This method is like _.forEach except that it iterates over elements of a + * This method is like _.forEach except that it iterates over elements of a * collection from right to left. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -3232,14 +3232,14 @@ declare module _ { //_.groupBy interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of a collection through the callback. The corresponding value of each key is an array - * of the elements responsible for generating the key. The callback is bound to thisArg + * Creates an object composed of keys generated from the results of running each element + * of a collection through the callback. The corresponding value of each key is an array + * of the elements responsible for generating the key. The callback is bound to thisArg * and invoked with three arguments; (value, index|key, collection). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -3361,15 +3361,15 @@ declare module _ { //_.indexBy interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of the collection through the given callback. The corresponding value of each key is - * the last element responsible for generating the key. The callback is bound to thisArg + * Creates an object composed of keys generated from the results of running each element + * of the collection through the given callback. The corresponding value of each key is + * the last element responsible for generating the key. The callback is bound to thisArg * and invoked with three arguments; (value, index|key, collection). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -3425,9 +3425,9 @@ declare module _ { //_.invoke interface LoDashStatic { /** - * Invokes the method named by methodName on each element in the collection returning - * an array of the results of each invoked method. Additional arguments will be provided - * to each invoked method. If methodName is a function it will be invoked for, and this + * Invokes the method named by methodName on each element in the collection returning + * an array of the results of each invoked method. Additional arguments will be provided + * to each invoked method. If methodName is a function it will be invoked for, and this * bound to, each element in the collection. * @param collection The collection to iterate over. * @param methodName The name of the method to invoke. @@ -3482,14 +3482,14 @@ declare module _ { //_.map interface LoDashStatic { /** - * Creates an array of values by running each element in the collection through the callback. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, + * Creates an array of values by running each element in the collection through the callback. + * The callback is bound to thisArg and invoked with three arguments; (value, index|key, * collection). * - * If a property name is provided for callback the created "_.pluck" style callback will return + * If a property name is provided for callback the created "_.pluck" style callback will return * the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return true + * If an object is provided for callback the created "_.where" style callback will return true * for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -3624,15 +3624,15 @@ declare module _ { //_.max interface LoDashStatic { /** - * Retrieves the maximum value of a collection. If the collection is empty or falsey -Infinity is - * returned. If a callback is provided it will be executed for each value in the collection to - * generate the criterion by which the value is ranked. The callback is bound to thisArg and invoked + * Retrieves the maximum value of a collection. If the collection is empty or falsey -Infinity is + * returned. If a callback is provided it will be executed for each value in the collection to + * generate the criterion by which the value is ranked. The callback is bound to thisArg and invoked * with three arguments; (value, index, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will return the + * + * If a property name is provided for callback the created "_.pluck" style callback will return the * property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return true for + * If an object is provided for callback the created "_.where" style callback will return true for * elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -3735,15 +3735,15 @@ declare module _ { //_.min interface LoDashStatic { /** - * Retrieves the minimum value of a collection. If the collection is empty or falsey - * Infinity is returned. If a callback is provided it will be executed for each value - * in the collection to generate the criterion by which the value is ranked. The callback + * Retrieves the minimum value of a collection. If the collection is empty or falsey + * Infinity is returned. If a callback is provided it will be executed for each value + * in the collection to generate the criterion by which the value is ranked. The callback * is bound to thisArg and invoked with three arguments; (value, index, collection). * - * If a property name is provided for callback the created "_.pluck" style callback + * If a property name is provided for callback the created "_.pluck" style callback * will return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will + * If an object is provided for callback the created "_.where" style callback will * return true for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -3889,10 +3889,10 @@ declare module _ { //_.reduce interface LoDashStatic { /** - * Reduces a collection to a value which is the accumulated result of running each - * element in the collection through the callback, where each successive callback execution - * consumes the return value of the previous execution. If accumulator is not provided the - * first element of the collection will be used as the initial accumulator value. The callback + * Reduces a collection to a value which is the accumulated result of running each + * element in the collection through the callback, where each successive callback execution + * consumes the return value of the previous execution. If accumulator is not provided the + * first element of the collection will be used as the initial accumulator value. The callback * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -4148,7 +4148,7 @@ declare module _ { //_.reduceRight interface LoDashStatic { /** - * This method is like _.reduce except that it iterates over elements of a collection from + * This method is like _.reduce except that it iterates over elements of a collection from * right to left. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -4259,13 +4259,13 @@ declare module _ { //_.reject interface LoDashStatic { /** - * The opposite of _.filter this method returns the elements of a collection that + * The opposite of _.filter this method returns the elements of a collection that * the callback does not return truey for. * - * If a property name is provided for callback the created "_.pluck" style callback + * If a property name is provided for callback the created "_.pluck" style callback * will return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will + * If an object is provided for callback the created "_.where" style callback will * return true for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -4404,7 +4404,7 @@ declare module _ { //_.shuffle interface LoDashStatic { /** - * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. + * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. * See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. * @param collection The collection to shuffle. * @return Returns a new shuffled collection. @@ -4439,7 +4439,7 @@ declare module _ { //_.size interface LoDashStatic { /** - * Gets the size of the collection by returning collection.length for arrays and array-like + * Gets the size of the collection by returning collection.length for arrays and array-like * objects or the number of own enumerable properties for objects. * @param collection The collection to inspect. * @return collection.length @@ -4469,14 +4469,14 @@ declare module _ { //_.some interface LoDashStatic { /** - * Checks if the callback returns a truey value for any element of a collection. The function - * returns as soon as it finds a passing value and does not iterate over the entire collection. + * Checks if the callback returns a truey value for any element of a collection. The function + * returns as soon as it finds a passing value and does not iterate over the entire collection. * The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection). * - * If a property name is provided for callback the created "_.pluck" style callback will return + * If a property name is provided for callback the created "_.pluck" style callback will return * the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return true for + * If an object is provided for callback the created "_.where" style callback will return true for * elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -4644,15 +4644,15 @@ declare module _ { //_.sortBy interface LoDashStatic { /** - * Creates an array of elements, sorted in ascending order by the results of running each - * element in a collection through the callback. This method performs a stable sort, that - * is, it will preserve the original sort order of equal elements. The callback is bound + * Creates an array of elements, sorted in ascending order by the results of running each + * element in a collection through the callback. This method performs a stable sort, that + * is, it will preserve the original sort order of equal elements. The callback is bound * to thisArg and invoked with three arguments; (value, index|key, collection). * - * If a property name is provided for callback the created "_.pluck" style callback will + * If a property name is provided for callback the created "_.pluck" style callback will * return the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return + * If an object is provided for callback the created "_.where" style callback will return * true for elements that have the properties of the given object, else false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -4763,7 +4763,7 @@ declare module _ { //_.where interface LoDashStatic { /** - * Performs a deep comparison of each element in a collection to the given properties + * Performs a deep comparison of each element in a collection to the given properties * object, returning an array of all elements that have equivalent property values. * @param collection The collection to iterate over. * @param properties The object of property values to filter by. @@ -4802,7 +4802,7 @@ declare module _ { //_.after interface LoDashStatic { /** - * Creates a function that executes func, with the this binding and arguments of the + * Creates a function that executes func, with the this binding and arguments of the * created function, only after being called n times. * @param n The number of times the function must be called before func is executed. * @param func The function to restrict. @@ -4823,7 +4823,7 @@ declare module _ { //_.bind interface LoDashStatic { /** - * Creates a function that, when called, invokes func with the this binding of thisArg + * Creates a function that, when called, invokes func with the this binding of thisArg * and prepends any additional bind arguments to those provided to the bound function. * @param func The function to bind. * @param thisArg The this binding of func. @@ -4848,11 +4848,11 @@ declare module _ { //_.bindAll interface LoDashStatic { /** - * Binds methods of an object to the object itself, overwriting the existing method. Method - * names may be specified as individual arguments or as arrays of method names. If no method + * Binds methods of an object to the object itself, overwriting the existing method. Method + * names may be specified as individual arguments or as arrays of method names. If no method * names are provided all the function properties of object will be bound. * @param object The object to bind and assign the bound methods to. - * @param methodNames The object method names to bind, specified as individual method names + * @param methodNames The object method names to bind, specified as individual method names * or arrays of method names. * @return object **/ @@ -4871,9 +4871,9 @@ declare module _ { //_.bindKey interface LoDashStatic { /** - * Creates a function that, when called, invokes the method at object[key] and prepends any - * additional bindKey arguments to those provided to the bound function. This method differs - * from _.bind by allowing bound functions to reference methods that will be redefined or don't + * Creates a function that, when called, invokes the method at object[key] and prepends any + * additional bindKey arguments to those provided to the bound function. This method differs + * from _.bind by allowing bound functions to reference methods that will be redefined or don't * yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern. * @param object The object the method belongs to. * @param key The key of the method. @@ -4898,9 +4898,9 @@ declare module _ { //_.compose interface LoDashStatic { /** - * Creates a function that is the composition of the provided functions, where each function - * consumes the return value of the function that follows. For example, composing the functions - * f(), g(), and h() produces f(g(h())). Each function is executed with the this binding of the + * Creates a function that is the composition of the provided functions, where each function + * consumes the return value of the function that follows. For example, composing the functions + * f(), g(), and h() produces f(g(h())). Each function is executed with the this binding of the * composed function. * @param funcs Functions to compose. * @return The new composed function. @@ -4918,9 +4918,9 @@ declare module _ { //_.createCallback interface LoDashStatic { /** - * Produces a callback bound to an optional thisArg. If func is a property name the created - * callback will return the property value for a given element. If func is an object the created - * callback will return true for elements that contain the equivalent object properties, + * Produces a callback bound to an optional thisArg. If func is a property name the created + * callback will return the property value for a given element. If func is an object the created + * callback will return true for elements that contain the equivalent object properties, * otherwise it will return false. * @param func The value to convert to a callback. * @param thisArg The this binding of the created callback. @@ -4962,9 +4962,9 @@ declare module _ { //_.curry interface LoDashStatic { /** - * Creates a function which accepts one or more arguments of func that when invoked either - * executes func returning its result, if all func arguments have been provided, or returns - * a function that accepts one or more of the remaining func arguments, and so on. The arity + * Creates a function which accepts one or more arguments of func that when invoked either + * executes func returning its result, if all func arguments have been provided, or returns + * a function that accepts one or more of the remaining func arguments, and so on. The arity * of func can be specified if func.length is not sufficient. * @param func The function to curry. * @param arity The arity of func. @@ -4985,13 +4985,13 @@ declare module _ { //_.debounce interface LoDashStatic { /** - * Creates a function that will delay the execution of func until after wait milliseconds have - * elapsed since the last time it was invoked. Provide an options object to indicate that func - * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls + * Creates a function that will delay the execution of func until after wait milliseconds have + * elapsed since the last time it was invoked. Provide an options object to indicate that func + * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls * to the debounced function will return the result of the last func call. * - * Note: If leading and trailing options are true func will be called on the trailing edge of - * the timeout only if the the debounced function is invoked more than once during the wait + * Note: If leading and trailing options are true func will be called on the trailing edge of + * the timeout only if the the debounced function is invoked more than once during the wait * timeout. * @param func The function to debounce. * @param wait The number of milliseconds to delay. @@ -5036,7 +5036,7 @@ declare module _ { //_.defer interface LoDashStatic { /** - * Defers executing the func function until the current call stack has cleared. Additional + * Defers executing the func function until the current call stack has cleared. Additional * arguments will be provided to func when it is invoked. * @param func The function to defer. * @param args Arguments to invoke the function with. @@ -5057,7 +5057,7 @@ declare module _ { //_.delay interface LoDashStatic { /** - * Executes the func function after wait milliseconds. Additional arguments will be provided + * Executes the func function after wait milliseconds. Additional arguments will be provided * to func when it is invoked. * @param func The function to delay. * @param wait The number of milliseconds to delay execution. @@ -5082,10 +5082,10 @@ declare module _ { //_.memoize interface LoDashStatic { /** - * Creates a function that memoizes the result of func. If resolver is provided it will be - * used to determine the cache key for storing the result based on the arguments provided to - * the memoized function. By default, the first argument provided to the memoized function is - * used as the cache key. The func is executed with the this binding of the memoized function. + * Creates a function that memoizes the result of func. If resolver is provided it will be + * used to determine the cache key for storing the result based on the arguments provided to + * the memoized function. By default, the first argument provided to the memoized function is + * used as the cache key. The func is executed with the this binding of the memoized function. * The result cache is exposed as the cache property on the memoized function. * @param func Computationally expensive function that will now memoized results. * @param resolver Hash function for storing the result of `fn`. @@ -5099,8 +5099,8 @@ declare module _ { //_.once interface LoDashStatic { /** - * Creates a function that is restricted to execute func once. Repeat calls to the function - * will return the value of the first call. The func is executed with the this binding of the + * Creates a function that is restricted to execute func once. Repeat calls to the function + * will return the value of the first call. The func is executed with the this binding of the * created function. * @param func Function to only execute once. * @return The new restricted function. @@ -5111,8 +5111,8 @@ declare module _ { //_.partial interface LoDashStatic { /** - * Creates a function that, when called, invokes func with any additional partial arguments - * prepended to those provided to the new function. This method is similar to _.bind except + * Creates a function that, when called, invokes func with any additional partial arguments + * prepended to those provided to the new function. This method is similar to _.bind except * it does not alter the this binding. * @param func The function to partially apply arguments to. * @param args Arguments to be partially applied. @@ -5126,7 +5126,7 @@ declare module _ { //_.partialRight interface LoDashStatic { /** - * This method is like _.partial except that partial arguments are appended to those provided + * This method is like _.partial except that partial arguments are appended to those provided * to the new function. * @param func The function to partially apply arguments to. * @param args Arguments to be partially applied. @@ -5140,12 +5140,12 @@ declare module _ { //_.throttle interface LoDashStatic { /** - * Creates a function that, when executed, will only call the func function at most once per - * every wait milliseconds. Provide an options object to indicate that func should be invoked - * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled + * Creates a function that, when executed, will only call the func function at most once per + * every wait milliseconds. Provide an options object to indicate that func should be invoked + * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled * function will return the result of the last func call. * - * Note: If leading and trailing options are true func will be called on the trailing edge of + * Note: If leading and trailing options are true func will be called on the trailing edge of * the timeout only if the the throttled function is invoked more than once during the wait timeout. * @param func The function to throttle. * @param wait The number of milliseconds to throttle executions to. @@ -5176,8 +5176,8 @@ declare module _ { //_.wrap interface LoDashStatic { /** - * Creates a function that provides value to the wrapper function as its first argument. - * Additional arguments provided to the function are appended to those provided to the + * Creates a function that provides value to the wrapper function as its first argument. + * Additional arguments provided to the function are appended to those provided to the * wrapper function. The wrapper is executed with the this binding of the created function. * @param value The value to wrap. * @param wrapper The wrapper function. @@ -5195,9 +5195,9 @@ declare module _ { //_.assign interface LoDashStatic { /** - * Assigns own enumerable properties of source object(s) to the destination object. Subsequent - * sources will overwrite property assignments of previous sources. If a callback is provided - * it will be executed to produce the assigned values. The callback is bound to thisArg and + * Assigns own enumerable properties of source object(s) to the destination object. Subsequent + * sources will overwrite property assignments of previous sources. If a callback is provided + * it will be executed to produce the assigned values. The callback is bound to thisArg and * invoked with two arguments; (objectValue, sourceValue). * @param object The destination object. * @param s1-8 The source object(s) @@ -5387,9 +5387,9 @@ declare module _ { //_.clone interface LoDashStatic { /** - * Creates a clone of value. If deep is true nested objects will also be cloned, otherwise - * they will be assigned by reference. If a callback is provided it will be executed to produce - * the cloned values. If the callback returns undefined cloning will be handled by the method + * Creates a clone of value. If deep is true nested objects will also be cloned, otherwise + * they will be assigned by reference. If a callback is provided it will be executed to produce + * the cloned values. If the callback returns undefined cloning will be handled by the method * instead. The callback is bound to thisArg and invoked with one argument; (value). * @param value The value to clone. * @param deep Specify a deep clone. @@ -5407,13 +5407,13 @@ declare module _ { //_.cloneDeep interface LoDashStatic { /** - * Creates a deep clone of value. If a callback is provided it will be executed to produce the - * cloned values. If the callback returns undefined cloning will be handled by the method instead. + * Creates a deep clone of value. If a callback is provided it will be executed to produce the + * cloned values. If the callback returns undefined cloning will be handled by the method instead. * The callback is bound to thisArg and invoked with one argument; (value). * - * Note: This method is loosely based on the structured clone algorithm. Functions and DOM nodes - * are not cloned. The enumerable properties of arguments objects and objects created by constructors - * other than Object are cloned to plain Object objects. + * Note: This method is loosely based on the structured clone algorithm. Functions and DOM nodes + * are not cloned. The enumerable properties of arguments objects and objects created by constructors + * other than Object are cloned to plain Object objects. * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. * @param value The value to clone. * @param callback The function to customize cloning values. @@ -5429,8 +5429,8 @@ declare module _ { //_.defaults interface LoDashStatic { /** - * Assigns own enumerable properties of source object(s) to the destination object for all - * destination properties that resolve to undefined. Once a property is set, additional defaults + * Assigns own enumerable properties of source object(s) to the destination object for all + * destination properties that resolve to undefined. Once a property is set, additional defaults * of the same property will be ignored. * @param object The destination object. * @param sources The source objects. @@ -5451,7 +5451,7 @@ declare module _ { //_.findKey interface LoDashStatic { /** - * This method is like _.findIndex except that it returns the key of the first element that + * This method is like _.findIndex except that it returns the key of the first element that * passes the callback check, instead of the element itself. * @param object The object to search. * @param callback The function called per iteration. @@ -5514,8 +5514,8 @@ declare module _ { //_.forIn interface LoDashStatic { /** - * Iterates over own and inherited enumerable properties of an object, executing the callback for - * each property. The callback is bound to thisArg and invoked with three arguments; (value, key, + * Iterates over own and inherited enumerable properties of an object, executing the callback for + * each property. The callback is bound to thisArg and invoked with three arguments; (value, key, * object). Callbacks may exit iteration early by explicitly returning false. * @param object The object to iterate over. * @param callback The function called per iteration. @@ -5548,7 +5548,7 @@ declare module _ { //_.forInRight interface LoDashStatic { /** - * This method is like _.forIn except that it iterates over elements of a collection in the + * This method is like _.forIn except that it iterates over elements of a collection in the * opposite order. * @param object The object to iterate over. * @param callback The function called per iteration. @@ -5581,8 +5581,8 @@ declare module _ { //_.forOwn interface LoDashStatic { /** - * Iterates over own enumerable properties of an object, executing the callback for each - * property. The callback is bound to thisArg and invoked with three arguments; (value, key, + * Iterates over own enumerable properties of an object, executing the callback for each + * property. The callback is bound to thisArg and invoked with three arguments; (value, key, * object). Callbacks may exit iteration early by explicitly returning false. * @param object The object to iterate over. * @param callback The function called per iteration. @@ -5615,7 +5615,7 @@ declare module _ { //_.forOwnRight interface LoDashStatic { /** - * This method is like _.forOwn except that it iterates over elements of a collection in the + * This method is like _.forOwn except that it iterates over elements of a collection in the * opposite order. * @param object The object to iterate over. * @param callback The function called per iteration. @@ -5647,7 +5647,7 @@ declare module _ { //_.functions interface LoDashStatic { /** - * Creates a sorted array of property names of all enumerable properties, own and inherited, of + * Creates a sorted array of property names of all enumerable properties, own and inherited, of * object that have function values. * @param object The object to inspect. * @return An array of property names that have function values. @@ -5675,7 +5675,7 @@ declare module _ { //_.has interface LoDashStatic { /** - * Checks if the specified object property exists and is a direct property, instead of an + * Checks if the specified object property exists and is a direct property, instead of an * inherited property. * @param object The object to check. * @param property The property to check for. @@ -5747,14 +5747,14 @@ declare module _ { //_.isEmpty interface LoDashStatic { /** - * Checks if value is empty. Arrays, strings, or arguments objects with a length of 0 and objects + * Checks if value is empty. Arrays, strings, or arguments objects with a length of 0 and objects * with no own enumerable properties are considered "empty". * @param value The value to inspect. * @return True if the value is empty, else false. **/ isEmpty(value?: any[]|Dictionary|string|any): boolean; } - + //_.isError interface LoDashStatic { /** @@ -5770,9 +5770,9 @@ declare module _ { //_.isEqual interface LoDashStatic { /** - * Performs a deep comparison between two values to determine if they are equivalent to each - * other. If a callback is provided it will be executed to compare values. If the callback - * returns undefined comparisons will be handled by the method instead. The callback is bound to + * Performs a deep comparison between two values to determine if they are equivalent to each + * other. If a callback is provided it will be executed to compare values. If the callback + * returns undefined comparisons will be handled by the method instead. The callback is bound to * thisArg and invoked with two arguments; (a, b). * @param a The value to compare. * @param b The other value to compare. @@ -5792,7 +5792,7 @@ declare module _ { /** * Checks if value is, or can be coerced to, a finite number. * - * Note: This is not the same as native isFinite which will return true for booleans and empty + * Note: This is not the same as native isFinite which will return true for booleans and empty * strings. See http://es5.github.io/#x15.1.2.5. * @param value The value to check. * @return True if the value is finite, else false. @@ -5815,7 +5815,7 @@ declare module _ { /** * Checks if value is NaN. * - * Note: This is not the same as native isNaN which will return true for undefined and other + * Note: This is not the same as native isNaN which will return true for undefined and other * non-numeric values. See http://es5.github.io/#x15.1.2.4. * @param value The value to check. * @return True if the value is NaN, else false. @@ -5848,7 +5848,7 @@ declare module _ { //_.isObject interface LoDashStatic { /** - * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, + * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, * new Number(0), and new String('')) * @param value The value to check. * @return True if the value is an object, else false. @@ -5917,19 +5917,22 @@ declare module _ { interface LoDashStatic { /** * Creates an object with the same keys as object and values generated by running each own - * enumerable property of object through the callback. The callback is bound to thisArg and - * invoked with three arguments; (value, key, object). + * enumerable property of object through iteratee. The iteratee function is bound to thisArg + * and invoked with three arguments: (value, key, object). * - * If a property name is provided for callback the created "_.pluck" style callback will return + * If a property name is provided iteratee the created "_.property" style callback returns * the property value of the given element. * - * If an object is provided for callback the created "_.where" style callback will return true + * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns + * true for elements that have a matching property value, else false;. + * + * If an object is provided for iteratee the created "_.matches" style callback returns true * for elements that have the properties of the given object, else false. * - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg `this` object in `iterator`, optional. - * @return Returns a new object with values of the results of each callback execution. + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @param {Object} [thisArg] The `this` binding of `iteratee`. + * @return {Object} Returns the new mapped object. */ mapValues(obj: Dictionary, callback: ObjectIterator, thisArg?: any): Dictionary; mapValues(obj: Dictionary, where: Dictionary): Dictionary; @@ -5937,14 +5940,46 @@ declare module _ { mapValues(obj: T, callback: ObjectIterator, thisArg?: any): T; } + interface LoDashObjectWrapper { + /** + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function + */ + mapValues(callback: ObjectIterator, thisArg?: any): LoDashObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> + */ + mapValues(pluck: string): LoDashObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * TResult has to extend Dictionary<> for this to return true. + * TResultValueType is the type of the properties on TResult. + * T should be a Dictionary> + */ + mapValues>(pluck: string, where: TResult): LoDashArrayWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> + */ + mapValues(where: Dictionary): LoDashArrayWrapper; + } + //_.merge interface LoDashStatic { /** - * Recursively merges own enumerable properties of the source object(s), that don't resolve - * to undefined into the destination object. Subsequent sources will overwrite property - * assignments of previous sources. If a callback is provided it will be executed to produce - * the merged values of the destination and source properties. If the callback returns undefined - * merging will be handled by the method instead. The callback is bound to thisArg and invoked + * Recursively merges own enumerable properties of the source object(s), that don't resolve + * to undefined into the destination object. Subsequent sources will overwrite property + * assignments of previous sources. If a callback is provided it will be executed to produce + * the merged values of the destination and source properties. If the callback returns undefined + * merging will be handled by the method instead. The callback is bound to thisArg and invoked * with two arguments; (objectValue, sourceValue). * @param object The destination object. * @param s1-8 The source object(s) @@ -5995,10 +6030,10 @@ declare module _ { //_.omit interface LoDashStatic { /** - * Creates a shallow clone of object excluding the specified properties. Property names may be - * specified as individual arguments or as arrays of property names. If a callback is provided - * it will be executed for each property of object omitting the properties the callback returns - * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, + * Creates a shallow clone of object excluding the specified properties. Property names may be + * specified as individual arguments or as arrays of property names. If a callback is provided + * it will be executed for each property of object omitting the properties the callback returns + * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, * object). * @param object The source object. * @param keys The properties to omit. @@ -6048,7 +6083,7 @@ declare module _ { //_.pairs interface LoDashStatic { /** - * Creates a two dimensional array of an object's key-value pairs, + * Creates a two dimensional array of an object's key-value pairs, * i.e. [[key1, value1], [key2, value2]]. * @param object The object to inspect. * @return Aew array of key-value pairs. @@ -6066,10 +6101,10 @@ declare module _ { //_.picks interface LoDashStatic { /** - * Creates a shallow clone of object composed of the specified properties. Property names may be - * specified as individual arguments or as arrays of property names. If a callback is provided - * it will be executed for each property of object picking the properties the callback returns - * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, + * Creates a shallow clone of object composed of the specified properties. Property names may be + * specified as individual arguments or as arrays of property names. If a callback is provided + * it will be executed for each property of object picking the properties the callback returns + * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, * object). * @param object Object to strip unwanted key/value pairs. * @param keys Property names to pick @@ -6098,10 +6133,10 @@ declare module _ { //_.transform interface LoDashStatic { /** - * An alternative to _.reduce this method transforms object to a new accumulator object which is - * the result of running each of its elements through a callback, with each callback execution - * potentially mutating the accumulator object. The callback is bound to thisArg and invoked with - * four arguments; (accumulator, value, key, object). Callbacks may exit iteration early by + * An alternative to _.reduce this method transforms object to a new accumulator object which is + * the result of running each of its elements through a callback, with each callback execution + * potentially mutating the accumulator object. The callback is bound to thisArg and invoked with + * four arguments; (accumulator, value, key, object). Callbacks may exit iteration early by * explicitly returning false. * @param collection The collection to iterate over. * @param callback The function called per iteration. @@ -6198,10 +6233,10 @@ declare module _ { //_.parseInt interface LoDashStatic { /** - * Converts the given value into an integer of the specified radix. If radix is undefined or 0 a + * Converts the given value into an integer of the specified radix. If radix is undefined or 0 a * radix of 10 is used unless the value is a hexadecimal, in which case a radix of 16 is used. * - * Note: This method avoids differences in native ES3 and ES5 parseInt implementations. See + * Note: This method avoids differences in native ES3 and ES5 parseInt implementations. See * http://es5.github.io/#E. * @param value The value to parse. * @param radix The radix used to interpret the value to parse. @@ -6265,8 +6300,8 @@ declare module _ { //_.random interface LoDashStatic { /** - * Produces a random number between min and max (inclusive). If only one argument is provided a - * number between 0 and the given number will be returned. If floating is truey or either min or + * Produces a random number between min and max (inclusive). If only one argument is provided a + * number between 0 and the given number will be returned. If floating is truey or either min or * max are floats a floating-point number will be returned instead of an integer. * @param max The maximum possible value. * @param floating Specify returning a floating-point number. @@ -6285,8 +6320,8 @@ declare module _ { //_.result interface LoDashStatic { /** - * Resolves the value of property on object. If property is a function it will be invoked with - * the this binding of object and its result returned, else the property value is returned. If + * Resolves the value of property on object. If property is a function it will be invoked with + * the this binding of object and its result returned, else the property value is returned. If * object is falsey then undefined is returned. * @param object The object to inspect. * @param property The property to get the value of. @@ -6308,10 +6343,10 @@ declare module _ { //_.template interface LoDashStatic { /** - * A micro-templating method that handles arbitrary delimiters, preserves whitespace, and + * A micro-templating method that handles arbitrary delimiters, preserves whitespace, and * correctly escapes quotes within interpolated code. * - * Note: In the development build, _.template utilizes sourceURLs for easier debugging. See + * Note: In the development build, _.template utilizes sourceURLs for easier debugging. See * http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl * * For more information on precompiling templates see: @@ -6352,7 +6387,7 @@ declare module _ { //_.times interface LoDashStatic { /** - * Executes the callback n times, returning an array of the results of each callback execution. + * Executes the callback n times, returning an array of the results of each callback execution. * The callback is bound to thisArg and invoked with one argument; (index). * @param n The number of times to execute the callback. * @param callback The function called per iteration. @@ -6367,7 +6402,7 @@ declare module _ { //_.unescape interface LoDashStatic { /** - * The inverse of _.escape this method converts the HTML entities &, <, >, ", and + * The inverse of _.escape this method converts the HTML entities &, <, >, ", and * ' in string to their corresponding characters. * @param string The string to unescape. * @return The unescaped string. @@ -6385,7 +6420,7 @@ declare module _ { **/ uniqueId(prefix?: string): string; } - + //_.noop interface LoDashStatic { /** @@ -6411,7 +6446,7 @@ declare module _ { */ create(prototype: Object, properties?: Object): Object; } - + interface ListIterator { (value: T, index: number, collection: T[]): TResult; } From fa52db59121913b35e9641a0f73ccc3ffba58840 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Fri, 29 May 2015 17:42:46 -0400 Subject: [PATCH 03/48] Allow optional fs-extra#mkdirs options object --- fs-extra/fs-extra-tests.ts | 4 ++++ fs-extra/fs-extra.d.ts | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/fs-extra/fs-extra-tests.ts b/fs-extra/fs-extra-tests.ts index 939821b6da..0919ef1b08 100644 --- a/fs-extra/fs-extra-tests.ts +++ b/fs-extra/fs-extra-tests.ts @@ -58,9 +58,13 @@ fs.createFile(file, errorCallback); fs.createFileSync(file); fs.mkdirs(dir, errorCallback); +fs.mkdirs(dir, {}, errorCallback); fs.mkdirsSync(dir); +fs.mkdirsSync(dir, {}); fs.mkdirp(dir, errorCallback); +fs.mkdirp(dir, {}, errorCallback); fs.mkdirpSync(dir); +fs.mkdirpSync(dir, {}); fs.outputFile(file, data, errorCallback); fs.outputFileSync(file, data); diff --git a/fs-extra/fs-extra.d.ts b/fs-extra/fs-extra.d.ts index 5b1ecf0b99..852956a71b 100644 --- a/fs-extra/fs-extra.d.ts +++ b/fs-extra/fs-extra.d.ts @@ -52,8 +52,10 @@ declare module "fs-extra" { export function mkdirs(dir: string, callback?: (err: Error) => void): void; export function mkdirp(dir: string, callback?: (err: Error) => void): void; - export function mkdirsSync(dir: string): void; - export function mkdirpSync(dir: string): void; + export function mkdirs(dir: string, options?: MkdirOptions, callback?: (err: Error) => void): void; + export function mkdirp(dir: string, options?: MkdirOptions, callback?: (err: Error) => void): void; + export function mkdirsSync(dir: string, options?: MkdirOptions): void; + export function mkdirpSync(dir: string, options?: MkdirOptions): void; export function outputFile(file: string, data: any, callback?: (err: Error) => void): void; export function outputFileSync(file: string, data: any): void; @@ -171,6 +173,11 @@ declare module "fs-extra" { flag?: string; } + export interface MkdirOptions { + fs?: any; + mode?: number; + } + export interface ReadStreamOptions { flags?: string; encoding?: string; From 18fdbd98c7343f8c9fb54199adb40f60ace91484 Mon Sep 17 00:00:00 2001 From: Adam Kalman Date: Fri, 29 May 2015 14:52:58 -0700 Subject: [PATCH 04/48] 90296 add and fix tests add in a test for the new code, and make all the tests pass. --- lodash/lodash-tests.ts | 2 ++ lodash/lodash.d.ts | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 6a48e20c16..a265eda3bd 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -143,6 +143,8 @@ result = _('test').value(); result = _([1, 2, 3]).value(); result = <_.Dictionary>_(<{ [index: string]: string; }>{ 'key1': 'test1', 'key2': 'test2' }).value(); +result = <_.Dictionary>_({ a: 1, b: 2}).mapValues(function(num: number) { return num * 2; }).value(); + // /************* // * Arrays * // *************/ diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index d06a993f9b..81fd2c661f 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6121,12 +6121,10 @@ declare module _ { /** * @see _.mapValues - * TResult is the type of the property specified by pluck. - * TResult has to extend Dictionary<> for this to return true. - * TResultValueType is the type of the properties on TResult. - * T should be a Dictionary> + * TResult is the type of the properties on the object specified by pluck. + * T should be a Dictionary>> */ - mapValues>(pluck: string, where: TResult): LoDashArrayWrapper>; + mapValues(pluck: string, where: Dictionary): LoDashArrayWrapper>; /** * @see _.mapValues From beac5c03fee9705314cdf6162a19d8edc7288849 Mon Sep 17 00:00:00 2001 From: FalloutPL Date: Mon, 1 Jun 2015 01:58:49 +0200 Subject: [PATCH 05/48] Missing id for Client interface It`s exposed in: https://github.com/Automattic/socket.io/blob/master/lib/client.js#L28 --- socket.io/socket.io.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/socket.io/socket.io.d.ts b/socket.io/socket.io.d.ts index ac5381f09f..3f3c042fe1 100644 --- a/socket.io/socket.io.d.ts +++ b/socket.io/socket.io.d.ts @@ -91,5 +91,6 @@ declare module SocketIO { interface Client { conn: any; request: any; + id: string; } } From a6e165ec11d827fe22550c9af868b29e67b9e5b7 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Mon, 1 Jun 2015 11:53:49 -0400 Subject: [PATCH 06/48] Add _.mapObject --- underscore/underscore-tests.ts | 4 ++++ underscore/underscore.d.ts | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/underscore/underscore-tests.ts b/underscore/underscore-tests.ts index 60c1708d0a..d530a43343 100644 --- a/underscore/underscore-tests.ts +++ b/underscore/underscore-tests.ts @@ -182,6 +182,10 @@ _.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'name'); _.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'name', 'age'); _.omit({ name: 'moe', age: 50, userid: 'moe1' }, ['name', 'age']); +_.mapObject({ a: 1, b: 2 }, val => val * 2) === _.mapObject({ a: 2, b: 4 }, _.identity); +_.mapObject({ a: 1, b: 2 }, (val, key, o) => o[key] * 2) === _.mapObject({ a: 2, b: 4}, _.identity); +_.mapObject({ x: "string 1", y: "string 2" }, 'length') === _.mapObject({ x: "string 1", y: "string 2"}, _.property('length')); + var iceCream = { flavor: "chocolate" }; _.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }); diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 03088bffda..653d3ea074 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -1170,6 +1170,31 @@ interface UnderscoreStatic { * @return List of all the values on `object`. **/ values(object: any): any[]; + + /** + * Like map, but for objects. Transform the value of each property in turn. + * @param object The object to transform + * @param iteratee The function that transforms property values + * @param context The optional context (value of `this`) to bind to + * @return a new _.Dictionary of property values + */ + mapObject(object: _.Dictionary, iteratee: (val: T, key: string, object: _.Dictionary) => U, context?: any): _.Dictionary; + + /** + * Like map, but for objects. Transform the value of each property in turn. + * @param object The object to transform + * @param iteratee The function that tranforms property values + * @param context The optional context (value of `this`) to bind to + */ + mapObject(object: any, iteratee: (val: any, key: string, object: any) => T, context?: any): _.Dictionary; + + /** + * Like map, but for objects. Retrieves a property from each entry in the object, as if by _.property + * @param object The object to transform + * @param iteratee The property name to retrieve + * @param context The optional context (value of `this`) to bind to + */ + mapObject(object: any, iteratee: string, context?: any): _.Dictionary; /** * Convert an object into a list of [key, value] pairs. From b0371ddc3fdb94af90655e55f5f26d0bd3c3c039 Mon Sep 17 00:00:00 2001 From: Robert Baker Date: Mon, 1 Jun 2015 14:41:33 -0700 Subject: [PATCH 07/48] Changed the MDPalette definition to use a union. --- angular-material/angular-material.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts index 1517c295fd..1383b0beb5 100644 --- a/angular-material/angular-material.d.ts +++ b/angular-material/angular-material.d.ts @@ -150,8 +150,8 @@ declare module angular.material { A400?: string; A700?: string; contrastDefaultColor?: string; - contrastDarkColors?: string[]; - contrastLightColors?: string[]; + contrastDarkColors?: string|string[]; + contrastLightColors?: string|string[]; } interface MDThemeHues { From 499811255bde78f457a50f1595746b90ca17131b Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Tue, 2 Jun 2015 01:34:08 -0400 Subject: [PATCH 08/48] initial commit --- node-calendar/.gitignore | 4 + node-calendar/node-calendar-tests.ts | 126 +++++++++++++ node-calendar/node-calendar.d.ts | 271 +++++++++++++++++++++++++++ node-calendar/package.json | 14 ++ 4 files changed, 415 insertions(+) create mode 100644 node-calendar/.gitignore create mode 100644 node-calendar/node-calendar-tests.ts create mode 100755 node-calendar/node-calendar.d.ts create mode 100755 node-calendar/package.json diff --git a/node-calendar/.gitignore b/node-calendar/.gitignore new file mode 100644 index 0000000000..76136c9e9a --- /dev/null +++ b/node-calendar/.gitignore @@ -0,0 +1,4 @@ +*.js +tsconfig.json +node_modules +.settings \ No newline at end of file diff --git a/node-calendar/node-calendar-tests.ts b/node-calendar/node-calendar-tests.ts new file mode 100644 index 0000000000..5a4a40a466 --- /dev/null +++ b/node-calendar/node-calendar-tests.ts @@ -0,0 +1,126 @@ +/// +/// + +import node_calendar = require('node-calendar'); + +var cal = new node_calendar.Calendar(node_calendar.SUNDAY); + +assert(cal.getfirstweekday() == node_calendar.SUNDAY); + +cal.setfirstweekday(node_calendar.MONDAY); + +assert(cal.getfirstweekday() == node_calendar.MONDAY); + +assert(node_calendar.MONDAY == 0); +assert(node_calendar.TUESDAY == 1); +assert(node_calendar.WEDNESDAY == 2); +assert(node_calendar.THURSDAY == 3); +assert(node_calendar.FRIDAY == 4); +assert(node_calendar.SATURDAY == 5); +assert(node_calendar.SUNDAY == 6); + +assert(node_calendar.day_name[node_calendar.MONDAY] == 'Monday'); +assert(node_calendar.day_name[node_calendar.TUESDAY] == 'Tuesday'); +assert(node_calendar.day_name[node_calendar.WEDNESDAY] == 'Wednesday'); +assert(node_calendar.day_name[node_calendar.THURSDAY] == 'Thursday'); +assert(node_calendar.day_name[node_calendar.FRIDAY] == 'Friday'); +assert(node_calendar.day_name[node_calendar.SATURDAY] == 'Saturday'); +assert(node_calendar.day_name[node_calendar.SUNDAY] == 'Sunday'); + +assert(node_calendar.day_abbr[node_calendar.MONDAY] == 'Mon'); +assert(node_calendar.day_abbr[node_calendar.TUESDAY] == 'Tue'); +assert(node_calendar.day_abbr[node_calendar.WEDNESDAY] == 'Wed'); +assert(node_calendar.day_abbr[node_calendar.THURSDAY] == 'Thu'); +assert(node_calendar.day_abbr[node_calendar.FRIDAY] == 'Fri'); +assert(node_calendar.day_abbr[node_calendar.SATURDAY] == 'Sat'); +assert(node_calendar.day_abbr[node_calendar.SUNDAY] == 'Sun'); + +assert(node_calendar.JANUARY == 1); +assert(node_calendar.FEBRUARY == 2); +assert(node_calendar.MARCH == 3); +assert(node_calendar.APRIL == 4); +assert(node_calendar.MAY == 5); +assert(node_calendar.JUNE == 6); +assert(node_calendar.JULY == 7); +assert(node_calendar.AUGUST == 8); +assert(node_calendar.SEPTEMBER == 9); +assert(node_calendar.OCTOBER == 10); +assert(node_calendar.NOVEMBER == 11); +assert(node_calendar.DECEMBER == 12); + +assert(node_calendar.month_name[0] == ''); +assert(node_calendar.month_name[node_calendar.JANUARY] == 'January'); +assert(node_calendar.month_name[node_calendar.FEBRUARY] == 'February'); +assert(node_calendar.month_name[node_calendar.MARCH] == 'March'); +assert(node_calendar.month_name[node_calendar.APRIL] == 'April'); +assert(node_calendar.month_name[node_calendar.MAY] == 'May'); +assert(node_calendar.month_name[node_calendar.JUNE] == 'June'); +assert(node_calendar.month_name[node_calendar.JULY] == 'July'); +assert(node_calendar.month_name[node_calendar.AUGUST] == 'August'); +assert(node_calendar.month_name[node_calendar.SEPTEMBER] == 'September'); +assert(node_calendar.month_name[node_calendar.OCTOBER] == 'October'); +assert(node_calendar.month_name[node_calendar.NOVEMBER] == 'November'); +assert(node_calendar.month_name[node_calendar.DECEMBER] == 'December'); + +assert(node_calendar.month_abbr[0] == ''); +assert(node_calendar.month_abbr[node_calendar.JANUARY] == 'Jan'); +assert(node_calendar.month_abbr[node_calendar.FEBRUARY] == 'Feb'); +assert(node_calendar.month_abbr[node_calendar.MARCH] == 'Mar'); +assert(node_calendar.month_abbr[node_calendar.APRIL] == 'Apr'); +assert(node_calendar.month_abbr[node_calendar.MAY] == 'May'); +assert(node_calendar.month_abbr[node_calendar.JUNE] == 'Jun'); +assert(node_calendar.month_abbr[node_calendar.JULY] == 'Jul'); +assert(node_calendar.month_abbr[node_calendar.AUGUST] == 'Aug'); +assert(node_calendar.month_abbr[node_calendar.SEPTEMBER] == 'Sep'); +assert(node_calendar.month_abbr[node_calendar.OCTOBER] == 'Oct'); +assert(node_calendar.month_abbr[node_calendar.NOVEMBER] == 'Nov'); +assert(node_calendar.month_abbr[node_calendar.DECEMBER] == 'Dec'); + +cal.itermonthdates(2015, node_calendar.JANUARY).forEach(assertIsDate); +cal.itermonthdays(2014, node_calendar.FEBRUARY).forEach(assertIsNumber); +cal.itermonthdays2(2013, node_calendar.MARCH).forEach(assertDayOfWeekMonth); +cal.iterweekdays().forEach(assertIsNumber); + +assertMonthGrid(cal.monthdatescalendar(2012, node_calendar.APRIL), assertIsDate); +assertMonthGrid(cal.monthdays2calendar(2011, node_calendar.MAY), assertDayOfWeekMonth); +assertMonthGrid(cal.monthdayscalendar(2010, node_calendar.JUNE), assertIsNumber); + +assertYearGrid(cal.yeardatescalendar(2009, 3), assertIsDate); +assertYearGrid(cal.yeardays2calendar(2008, 2), assertDayOfWeekMonth); +assertYearGrid(cal.yeardayscalendar(2007, 4), assertIsNumber); + +function assertIsDate(d: Date) { + assert(d instanceof Date, 'Should be a date'); +} + +function assertIsNumber(n: number) { + assert(typeof n == 'number', 'Should be a number'); +} + +function assertDayOfWeekMonth(d: IDayOfWeekMonth) { + assert(d instanceof Array, 'Day of weak/month should be an array'); + assert(d.length == 2, 'Day of weak/month array should contain 2 items'); + assert(typeof d[0] == 'number', 'Day of month should be a number'); + assert(typeof d[1] == 'number', 'Day of week should be a number'); +} + +function assertWeekRow(row: IWeekRow, assertItemType: (item: T) => void) { + row.forEach(assertItemType); +} + +function assertMonthGrid(grid: IMonthGrid, assertItemType: (item: T) => void) { + grid.forEach(wr => assertWeekRow(wr, assertItemType)); +} + +function assertMonthRow(row: IMonthRow, assertItemType: (item: T) => void) { + row.forEach(mg => assertMonthGrid(mg, assertItemType)); +} + +function assertYearGrid(grid: IYearGrid, assertItemType: (item: T) => void) { + grid.forEach(mr => assertMonthRow(mr, assertItemType)); +} + +function assert(condition: boolean, msg?: string): void { + if (condition) return; + throw new Error(msg); +} \ No newline at end of file diff --git a/node-calendar/node-calendar.d.ts b/node-calendar/node-calendar.d.ts new file mode 100755 index 0000000000..a1c3f0500a --- /dev/null +++ b/node-calendar/node-calendar.d.ts @@ -0,0 +1,271 @@ +// Type definitions for node-calendar v0.1.4 +// Project: https://www.npmjs.com/package/node-calendar +// Definitions by: Luzian Zagadinow +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface IDayOfWeekMonth extends Array { + /** dayOfMonth */ + 0: number; + + /** dayOfWeek */ + 1: number; +} + +interface IWeekRow extends Array { + [dayIndex: number]: T; +} + +interface IMonthGrid extends Array> { + [weekRowIndex: number]: IWeekRow; +} + +interface IMonthRow extends Array> { + [monthColumnIndex: number]: IMonthGrid; +} + +interface IYearGrid extends Array>{ + [monthRowIndex: number]: IMonthRow; +} + +/** + * This module allows you to output calendars like the Unix cal program, and provides + * additional useful functions related to the calendar. By default, these calendars + * have Monday as the first day of the week, and Sunday as the last (the European + * convention). Use setfirstweekday() to set the first day of the week to Sunday + * (6) or to any other weekday. Parameters that specify dates are given as integers. + */ +declare module 'node-calendar' { + /** 0 */ + export var MONDAY: number; + + /** 1 */ + export var TUESDAY: number; + + /** 2 */ + export var WEDNESDAY: number; + + /** 3 */ + export var THURSDAY: number; + + /** 4 */ + export var FRIDAY: number; + + /** 5 */ + export var SATURDAY: number; + + /** 6 */ + export var SUNDAY: number; + + + /** 1 */ + export var JANUARY: number; + + /** 2 */ + export var FEBRUARY: number; + + /** 3 */ + export var MARCH: number; + + /** 4 */ + export var APRIL:number; + + /** 5 */ + export var MAY: number; + + /** 6 */ + export var JUNE: number; + + /** 7 */ + export var JULY: number; + + /** 8 */ + export var AUGUST: number; + + /** 9 */ + export var SEPTEMBER: number; + + /** 10 */ + export var OCTOBER: number; + + /** 11 */ + export var NOVEMBER: number; + + /** 12 */ + export var DECEMBER: number; + + /** + * [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ] + */ + export var day_name: string[]; + + /** + * [ 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun' ] + */ + export var day_abbr: string[]; + + /** + * [ '', 'January', 'February', 'March', + * 'April', 'May', 'June', 'July', 'August', + * 'September', 'October', 'November', 'December' ] + */ + export var month_name: string[]; + + /** + * [ '', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + * 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ] + */ + export var month_abbr: string[]; + + /** + * Base calendar class. This class doesn't do any formatting. It simply provides + * data to subclasses. + */ + export class Calendar { + /** + * @param {number} firstweekday + * Numerical day of the week the calendar weeks should start. + * (0=MON, 1=TUE, ...) Default: 0 + */ + constructor(firstweekday?: number); + + /** + * Numerical day of the week the calendar weeks should start. + * (0=MON, 1=TUE, ...) + * + * @method getfirstweekday + */ + getfirstweekday(): number; + + /** + * Numerical day of the week the calendar weeks should start. + * (0=MON, 1=TUE, ...) + * + * @param {number} firstweekday + * Numerical day of the week the calendar weeks should start. + * (0=MON, 1=TUE, ...) Default: 0 + */ + setfirstweekday(firstweekday: number): void; + + /** + * One week of weekday numbers starting with the configured first one. + */ + iterweekdays(): number[]; + + /** + * Dates for one month. The array will contain Date values and will always + * iterate through complete weeks, so it will yield dates outside the + * specified month. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} month + * Month for which the calendar should be generated. + */ + itermonthdates(year: number, month: number): Date[]; + + /** + * Like itermonthdates(), but will yield day numbers. For days outside + * the specified month the day number is 0. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} month + * Month for which the calendar should be generated. + */ + itermonthdays(year: number, month: number): number[]; + + /** + * Like itermonthdates(), but will yield [day number, weekday number] + * arrays. For days outside the specified month the day number is 0. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} month + * Month for which the calendar should be generated. + */ + itermonthdays2(year: number, month: number): IDayOfWeekMonth[]; + + /** + * A matrix (array of array) representing a month's calendar. + * Each row represents a week; week entries are Date values. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} month + * Month for which the calendar should be generated. + */ + monthdatescalendar(year: number, month: number): IMonthGrid; + + /** + * A matrix representing a month's calendar. Each row represents a week; + * days outside this month are zero. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} month + * Month for which the calendar should be generated. + */ + monthdayscalendar(year: number, month: number): IMonthGrid; + + /** + * Return a matrix representing a month's calendar. Each row represents + * a week; week entries are [day number, weekday number] arrays. Day numbers + * outside this month are zero. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} month + * Month for which the calendar should be generated. + */ + monthdays2calendar(year: number, month: number): IMonthGrid; + + /** + * The specified year ready for formatting. The return value is an array + * of month rows. Each month row contains up to width months. Each month + * contains between 4 and 6 weeks and each week contains 1-7 days. Days + * are Date objects. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} width + * The number of months to include in each row. Default: 3 + */ + yeardatescalendar(year: number, width?: number): IYearGrid; + + /** + * the specified year ready for formatting (similar to yeardatescalendar()). + * Entries in the week arrays are day numbers. Day numbers outside this + * month are zero. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} width + * The number of months to include in each row. Default: 3 + */ + yeardayscalendar(year: number, width?: number): IYearGrid; + + /** + * The specified year ready for formatting (similar to yeardatescalendar()). + * Entries in the week arrays are [day number, weekday number] arrays. + * Day numbers outside this month are zero. + * + * @param {number} year + * Year for which the calendar should be generated. + * @param {number} width + * The number of months to include in each row. Default: 3 + */ + yeardays2calendar(year: number, width?: number): IYearGrid; + } + + // Undocumented + //export function isleap(year: number): boolean; + //export function leapdays(beginYear: number, endYear: number): number; + //export function monthrange(year: number, month: number): number[]; + //export function weekday(year: number, month: number, day: number): number; + //export function timegm(dateParams: number[]): number; + //export function IllegalLocaleError(): Error; + //export function IllegalDayError(): Error; + //export function IllegalMonthError(): Error; + //export function IllegalTimeError(): Error; + //export function IllegalWeekdayError(): Error; +} \ No newline at end of file diff --git a/node-calendar/package.json b/node-calendar/package.json new file mode 100755 index 0000000000..8cc162a957 --- /dev/null +++ b/node-calendar/package.json @@ -0,0 +1,14 @@ +{ + "name": "node-calendar.d.ts", + "version": "0.0.1", + "description": "Type definitions for node-calendar v0.1.4", + "main": "node-calendar-tests", + "scripts": { + "test": "node node-calendar-tests" + }, + "author": "Luzian Zagadinow (https://github.com/luzianz)", + "license": "MIT", + "dependencies": { + "node-calendar": "^0.1.4" + } +} \ No newline at end of file From 78deea6ba8f69456d58dcc14099136f73bc7b715 Mon Sep 17 00:00:00 2001 From: Basarat Ali Syed Date: Tue, 2 Jun 2015 17:28:20 +1000 Subject: [PATCH 09/48] Syntax for modernComponent Is this test valid @pspeter3? Regarding : https://github.com/Asana/typed-react/commit/9008be2f41c56bdd975213a08c97f1847333b15d --- react/react-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/react/react-tests.ts b/react/react-tests.ts index 2802a34cdf..64b59e1950 100644 --- a/react/react-tests.ts +++ b/react/react-tests.ts @@ -150,6 +150,8 @@ var classicComponent: React.ClassicComponent = React.render(classicElement, container); var domComponent: React.DOMComponent = React.render(domElement, container); +var modernComponent = + React.render(React.createElement(ModernComponent, props), container); // Other Top-Level API var unmounted: boolean = React.unmountComponentAtNode(container); From 7026f99eebbca5fe5d35741538a54e089b83f97b Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Tue, 2 Jun 2015 11:03:45 +0200 Subject: [PATCH 10/48] Add UNSTARTED to PlayerState See docs: https://developers.google.com/youtube/iframe_api_reference --- youtube/youtube.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube/youtube.d.ts b/youtube/youtube.d.ts index d7e52ae17a..0add84b793 100644 --- a/youtube/youtube.d.ts +++ b/youtube/youtube.d.ts @@ -150,10 +150,11 @@ declare module YT { } export enum PlayerState { + UNSTARTED, BUFFERING, CUED, ENDED, PAUSED, PLAYING } -} \ No newline at end of file +} From 9a8c66d5ac920c19a21fb70cb100eaf3e560d1b0 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Tue, 2 Jun 2015 11:24:36 +0200 Subject: [PATCH 11/48] Fix indentation --- youtube/youtube.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube/youtube.d.ts b/youtube/youtube.d.ts index 0add84b793..30580053f1 100644 --- a/youtube/youtube.d.ts +++ b/youtube/youtube.d.ts @@ -150,7 +150,7 @@ declare module YT { } export enum PlayerState { - UNSTARTED, + UNSTARTED, BUFFERING, CUED, ENDED, From d4873ce3f5a4f19a5d88dbca32b8a0daea8385a4 Mon Sep 17 00:00:00 2001 From: Dave Keen Date: Tue, 2 Jun 2015 15:45:34 +0200 Subject: [PATCH 12/48] rx: added missing 'pairs' definition --- rx/rx-lite.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rx/rx-lite.d.ts b/rx/rx-lite.d.ts index 82221d6338..c5034c3b7a 100644 --- a/rx/rx-lite.d.ts +++ b/rx/rx-lite.d.ts @@ -589,6 +589,8 @@ declare module Rx { merge(scheduler: IScheduler, sources: Observable[]): Observable; merge(scheduler: IScheduler, sources: IPromise[]): Observable; + pairs(obj: { [key: string]: T }, scheduler?: IScheduler): Observable<[string, T]>; + zip(first: Observable, sources: Observable[], resultSelector: (item1: T1, ...right: T2[]) => TResult): Observable; zip(first: Observable, sources: IPromise[], resultSelector: (item1: T1, ...right: T2[]) => TResult): Observable; zip(source1: Observable, source2: Observable, resultSelector: (item1: T1, item2: T2) => TResult): Observable; From 36bc838e4f30c1ccdd5a9530db5ba03f8f331b5d Mon Sep 17 00:00:00 2001 From: jpsfs Date: Tue, 2 Jun 2015 15:03:30 +0100 Subject: [PATCH 13/48] Add missing jasmine-jquery matchers and comments. --- jasmine-jquery/jasmine-jquery-tests.ts | 4 + jasmine-jquery/jasmine-jquery.d.ts | 248 ++++++++++++++++++++++++- 2 files changed, 250 insertions(+), 2 deletions(-) diff --git a/jasmine-jquery/jasmine-jquery-tests.ts b/jasmine-jquery/jasmine-jquery-tests.ts index ef6d8cc795..f6542c2167 100644 --- a/jasmine-jquery/jasmine-jquery-tests.ts +++ b/jasmine-jquery/jasmine-jquery-tests.ts @@ -39,6 +39,10 @@ describe("Jasmine jQuery extension", () => { expect($('').focus()).toBeFocused(); //expect($form).toHandle("submit") //expect($form).toHandleWith("submit", yourSubmitCallback) + expect($('
')).toBeInDOM(); + expect($('
')).toContainElement('span.some-class'); + expect($('

    header

    ')).toContainHtml('
      '); + expect($('

        header

        ')).toContainText('header') }); it("Handles HTML Fixtures", () => { diff --git a/jasmine-jquery/jasmine-jquery.d.ts b/jasmine-jquery/jasmine-jquery.d.ts index e1ed6c3c0d..dcff2d12c9 100644 --- a/jasmine-jquery/jasmine-jquery.d.ts +++ b/jasmine-jquery/jasmine-jquery.d.ts @@ -81,39 +81,283 @@ declare module jasmine { } interface Matchers { + /** + * Check if DOM element has class. + * + * @param className Name of the class to check. + * + * @example + * // returns true + * expect($('
        ')).toHaveClass("some-class") + */ toHaveClass(className: string): boolean; - toHaveCss(css): boolean; + + /** + * Check if DOM element has the given CSS properties. + * + * @param css Object containing the properties (and values) to check. + * + * @example + * // returns true + * expect($('
        ')).toHaveCss({display: "none", margin: "10px"}) + * + * @example + * // returns true + * expect($('
        ')).toHaveCss({margin: "10px"}) + */ + toHaveCss(css: Object): boolean; + + /** + * Checks if DOM element is visible. + * Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero. + */ toBeVisible(): boolean; + /** + * Check if DOM element is hidden. + * Elements can be hidden for several reasons: + * - They have a CSS display value of none ; + * - They are form elements with type equal to hidden. + * - Their width and height are explicitly set to 0. + * - An ancestor element is hidden, so the element is not shown on the page. + */ toBeHidden(): boolean; + + /** + * Only for tags that have checked attribute + * + * @example + * // returns true + * expect($('')).toBeSelected() + */ toBeSelected(): boolean; + + /** + * Only for tags that have checked attribute + * @example + * // returns true + * expect($('')).toBeChecked() + */ toBeChecked(): boolean; + + /** + * Checks for child DOM elements or text + */ toBeEmpty(): boolean; + + /** + * Checks if element exists in or out the DOM. + */ toExist(): boolean; + + /** + * Checks if array has the given length. + * + * @param length Expected length + */ toHaveLength(length: number): boolean; + + /** + * Check if DOM element contains an attribute and, optionally, if the value of the attribute is equal to the expected one. + * + * @param attributeName Name of the attribute to check + * @param expectedAttributeValue Expected attribute value + */ toHaveAttr(attributeName: string, expectedAttributeValue?): boolean; + + /** + * Check if DOM element contains a property and, optionally, if the value of the property is equal to the expected one. + * + * @param propertyName Property name to check + * @param expectedPropertyValue Expected property value + */ toHaveProp(propertyName: string, expectedPropertyValue?): boolean; + + /** + * Check if DOM element has the given Id + * + * @param Id Expected identifier + */ toHaveId(id: string): boolean; + + /** + * Check if DOM element has the specified HTML. + * + * @example + * // returns true + * expect($('
        ')).toHaveHtml('') + */ toHaveHtml(html: string): boolean; + + /** + * Check if DOM element contains the specified HTML. + * + * @example + * // returns true + * expect($('

          header

          ')).toContainHtml('
            ') + */ //toContainHtml(html: string): boolean; + + /** + * Check if DOM element has the given Text. + * @param text Accepts a string or regular expression + * + * @example + * // returns true + * expect($('
            some text
            ')).toHaveText('some text') + */ toHaveText(text: string): boolean; + /** + * Check if DOM element contains the specified text. + * + * @example + * // returns true + * expect($('

              header

              ')).toContainText('header') + */ //toContainText(text: string): boolean; + + /** + * Check if DOM element has the given value. + * This can only be applied for element on with jQuery val() can be called. + * + * @example + * // returns true + * expect($('')).toHaveValue('some text') + */ toHaveValue(value): boolean; + + /** + * Check if DOM element has the given data. + * This can only be applied for element on with jQuery data(key) can be called. + * + */ toHaveData(key, expectedValue): boolean; toBe(selector: JQuery): boolean; + + /** + * Check if DOM element is matched by the given selector. + * + * @example + * // returns true + * expect($('
              ')).toContain('some-class') + */ toContain(selector: JQuery): boolean; + + /** + * Check if DOM element exists inside the given parent element. + * + * @example + * // returns true + * expect($('
              ')).toContainElement('span.some-class') + */ + toContainElement(selector: string): boolean; + + /** + * Check to see if the set of matched elements matches the given selector + * + * @example + * expect($('').addClass('js-something')).toBeMatchedBy('.js-something') + * + * @returns {Boolean} true if DOM contains the element + */ toBeMatchedBy(selector: string): boolean; + + /** + * Only for tags that have disabled attribute + * @example + * // returns true + * expect('').toBeDisabled() + */ toBeDisabled(): boolean; + + /** + * Check if DOM element is focused + * @example + * // returns true + * expect($('').focus()).toBeFocused() + */ toBeFocused(): boolean; - toHandle(event): boolean; + + /** + * Checks if DOM element handles event. + * + * @example + * // returns true + * expect($form).toHandle("submit") + */ + toHandle(eventName: string): boolean; + + /** + * Assigns a callback to an event of the DOM element. + * + * @param eventName Name of the event to assign the callback to. + * @param eventHandler Callback function to be assigned. + * + * @example + * expect($form).toHandleWith("submit", yourSubmitCallback) + */ toHandleWith(eventName: string, eventHandler): boolean; + /** + * Checks if event was triggered. + */ toHaveBeenTriggered(): boolean; + + /** + * Checks if the event has been triggered on selector. + * @param selector Selector that should have triggered the event. + */ toHaveBeenTriggeredOn(selector: string): boolean; + + /** + * Checks if the event has been triggered on selector. + * @param selector Selector that should have triggered the event. + * @param args Extra arguments to be passed to jQuery events functions. + */ toHaveBeenTriggeredOnAndWith(selector: string, ...args: any[]): boolean; + + /** + * Checks if event propagation has been prevented. + */ toHaveBeenPrevented(): boolean; + + /** + * Checks if event propagation has been prevented on element with selector. + * + * @param selector Selector that should have prevented the event. + */ toHaveBeenPreventedOn(selector: string): boolean; + + /** + * Checks if event propagation has been stopped. + * + * @example + * // returns true + * var spyEvent = spyOnEvent('#some_element', 'click') + * $('#some_element').click(function (event){event.stopPropagation();}) + * $('#some_element').click() + * expect(spyEvent).toHaveBeenStopped() + */ toHaveBeenStopped(): boolean; + + /** + * Checks if event propagation has been stopped by an element with the given selector. + * @param selector Selector of the element that should have stopped the event propagation. + * + * @example + * // returns true + * $('#some_element').click(function (event){event.stopPropagation();}) + * $('#some_element').click() + * expect('click').toHaveBeenStoppedOn('#some_element') + */ toHaveBeenStoppedOn(selector: string): boolean; + + /** + * Checks to see if the matched element is attached to the DOM. + * @example + * expect($('#id-name')[0]).toBeInDOM() + */ + toBeInDOM(): boolean; + } interface JQueryEventSpy { From e8ac76dbcf18f24ae50b8ac05aa8375952aabf6f Mon Sep 17 00:00:00 2001 From: Sobit Akhmedov Date: Tue, 2 Jun 2015 19:03:21 +0200 Subject: [PATCH 14/48] add optional() method to Validator interface --- express-validator/express-validator.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/express-validator/express-validator.d.ts b/express-validator/express-validator.d.ts index 7fc04f70ee..428c90afd0 100644 --- a/express-validator/express-validator.d.ts +++ b/express-validator/express-validator.d.ts @@ -150,6 +150,10 @@ declare module ExpressValidator { * Will work against Visa, MasterCard, American Express, Discover, Diners Club, and JCB card numbering formats */ isCreditCard(): Validator; + /** + * Check an input only when the input exists + */ + optional(): Validator; } interface Sanitizer { From bf1d9d8b44bd7d0ad2b2a5e57f188916798c17db Mon Sep 17 00:00:00 2001 From: tomtheisen Date: Tue, 2 Jun 2015 10:35:36 -0700 Subject: [PATCH 15/48] Update select2 events Update select2 events based on documentation at http://select2.github.io/select2/ --- select2/select2.d.ts | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/select2/select2.d.ts b/select2/select2.d.ts index b1f21f6647..0b4543596f 100644 --- a/select2/select2.d.ts +++ b/select2/select2.d.ts @@ -76,6 +76,10 @@ interface Select2JQueryEventObject extends JQueryEventObject { val: any; added: any; removed: any; + choice: { + id: any; + text: string; + }; } interface JQuery { @@ -84,6 +88,26 @@ interface JQuery { on(events: "change", selector?: string, data?: any, handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; on(events: "change", selector?: string, handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; on(events: "change", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-opening", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-open", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-close", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-highlight", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-selecting", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-removing", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-removed", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-loaded", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-focus", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-blur", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-opening", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-open", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-close", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-highlight", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-selecting", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-removing", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-removed", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-loaded", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-focus", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; + on(events: "select2-blur", handler?: (eventObject: Select2JQueryEventObject) => any): JQuery; select2(): JQuery; select2(it: IdTextPair): JQuery; @@ -141,9 +165,9 @@ interface JQuery { /** * Notifies Select2 that a drag and drop sorting operation has finished */ - select2(method: 'onSortEnd'): JQuery; + select2(method: 'onSortEnd'): JQuery; select2(method: string): any; select2(method: string, value: any, trigger?: boolean): any; select2(options: Select2Options): JQuery; -} +} From 5dcc9e204702eaaa40e6f09d99e74c74fb026a56 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Tue, 2 Jun 2015 13:22:40 -0700 Subject: [PATCH 16/48] Add `angular.merge` function This is new API in Angular 1.4: https://docs.angularjs.org/api/ng/function/angular.merge --- angularjs/angular.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 009af202a8..0e54c2aea8 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -249,6 +249,16 @@ declare module angular { isString(value: any): boolean; isUndefined(value: any): boolean; lowercase(str: string): string; + + /** + * Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2). + * + * Unlike extend(), merge() recursively descends into object properties of source objects, performing a deep copy. + * + * @param dst Destination object. + * @param src Source object(s). + */ + merge(dst: any, ...src: any[]): any; /** * 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. From 8ab53b38cfdf61e7dc75cf960f427a68bd996664 Mon Sep 17 00:00:00 2001 From: Justin Lan Date: Tue, 2 Jun 2015 21:15:02 -0700 Subject: [PATCH 17/48] Fix some errors in the d3 definitions == Interval.offset() == Should take a number not a Date as the second parameter (https://github.com/mbostock/d3/wiki/Time-Intervals#interval_offset) == svg.line.defined() and svg.area.defined() == In two places setter signature for defined() wasn't listed. == svg.symbol()'s index parameter is optional == https://github.com/mbostock/d3/wiki/SVG-Shapes#_symbol --- d3/d3.d.ts | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index 495999bb80..2fa1493b7f 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -13,7 +13,7 @@ declare module d3 { * Find the first element that matches the given selector string. */ export function select(selector: string): Selection; - + /** * Create a selection from the given node reference. */ @@ -86,7 +86,7 @@ declare module d3 { attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Update; /** - * Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match. + * Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match. * * @param name The class list to query. */ @@ -476,7 +476,7 @@ declare module d3 { attr(obj: { [key: string]: Primitive | ((datum: Datum, index: number) => Primitive) }): Selection; /** - * Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match. + * Returns true if the first node in this selection has the given class list. If multiple classes are specified (i.e., "foo bar"), then returns true only if all classes match. * * @param name The class list to query. */ @@ -928,20 +928,20 @@ declare module d3 { */ export function mouse(container: EventTarget): [number, number]; - /** + /** * Given a container element and a touch identifier, determine the x and y coordinates of the touch. * @param container the container element (e.g., an SVG element) * @param identifier the given touch identifier */ export function touch(container: EventTarget, identifer: number): [number, number]; - /** + /** * Given a container element, a list of touches, and a touch identifier, determine the x and y coordinates of the touch. * @param container the container element (e.g., an SVG element) * @param identifier the given touch identifier */ export function touch(container: EventTarget, touches: TouchList, identifer: number): [number, number]; - + /** * Given a container element and an optional list of touches, return the position of every touch relative to the container. * @param container the container element @@ -1024,7 +1024,7 @@ declare module d3 { * Return the min and max simultaneously. */ export function extent(array: number[]): [number, number]; - + /** * Return the min and max simultaneously. */ @@ -1172,7 +1172,7 @@ declare module d3 { * Calls the function for each key and value pair in the map. The 'this' context is the map itself. */ forEach(func: (key: string, value: T) => any): void; - + /** * Is this map empty? */ @@ -1495,6 +1495,8 @@ declare module d3 { clamp(): boolean; clamp(clamp: boolean): Linear; + nice(count?: number): Linear; + ticks(count?: number): number[]; tickFormat(count?: number, format?: string): (n: number) => string; @@ -1637,7 +1639,7 @@ declare module d3 { export function category20b(): Ordinal; export function category20c(): Ordinal; export function category20c(): Ordinal; - + interface Ordinal { (x: Domain): Range; @@ -1728,7 +1730,7 @@ declare module d3 { range(start: Date, stop: Date, step?: number): Date[]; - offset(date: Date, step: Date): Date; + offset(date: Date, step: number): Date; utc: { (d: Date): Date; @@ -1741,7 +1743,7 @@ declare module d3 { range(start: Date, stop: Date, step?: number): Date[]; - offset(date: Date, step: Date): Date; + offset(date: Date, step: number): Date; } } @@ -1768,7 +1770,7 @@ declare module d3 { export function wednesdayOfYear(d: Date): number; export function fridayOfYear(d: Date): number; export function saturdayOfYear(d: Date): number; - + export function format(specifier: string): Format; export module format { @@ -1935,7 +1937,7 @@ declare module d3 { minorStep(): [number, number]; minorStep(step: [number, number]): Graticule; - + precision(): number; precision(precision: number): Graticule; } @@ -2281,7 +2283,7 @@ declare module d3 { tension(tension: number): Area; defined(): (d: T, i: number) => boolean; - defined(): (d: T, i: number) => boolean; + defined(defined: (d: T, i: number) => boolean): Area; } module area { @@ -2332,7 +2334,7 @@ declare module d3 { tension(tension: number): Radial; defined(): (d: T, i: number) => boolean; - defined(): (d: T, i: number) => boolean; + defined(defined: (d: T, i: number) => boolean): Radial; } } @@ -2388,7 +2390,7 @@ declare module d3 { export function symbol(): Symbol; interface Symbol { - (d: T, i: number): string; + (d: T, i?: number): string; type(): (d: T, i: number) => string; type(type: string): Symbol; @@ -2647,7 +2649,7 @@ declare module d3 { parseRows(string: string, accessor: (row: string[], index: number) => T): T[]; format(rows: Object[]): string; - + formatRows(rows: string[][]): string; } @@ -3284,4 +3286,4 @@ interface TouchList { } declare module 'd3' { export = d3; -} \ No newline at end of file +} From fb0ecf0c33fb167532c5351eb97ae6b7268d2311 Mon Sep 17 00:00:00 2001 From: Igor Kriklivets Date: Wed, 3 Jun 2015 11:34:16 +0300 Subject: [PATCH 18/48] Update to 14.2.7 version --- devextreme/dx.devextreme.d.ts | 804 ++++++++++++++++++++-------------- 1 file changed, 473 insertions(+), 331 deletions(-) diff --git a/devextreme/dx.devextreme.d.ts b/devextreme/dx.devextreme.d.ts index 36e3bb6159..f2b6a90485 100644 --- a/devextreme/dx.devextreme.d.ts +++ b/devextreme/dx.devextreme.d.ts @@ -1,4 +1,4 @@ -// Type definitions for DevExtreme 14.2+ +// Type definitions for DevExtreme 14.2.7 // Project: http://js.devexpress.com/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -21,6 +21,7 @@ declare module DevExpress { export module validationEngine { export interface IValidator { validate(): ValidatorValidationResult; + reset(): void; } export interface ValidatorValidationResult { isValid: boolean; @@ -38,6 +39,7 @@ declare module DevExpress { 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 @@ -47,6 +49,10 @@ declare module DevExpress { 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. */ @@ -245,6 +251,7 @@ declare module DevExpress { filter?: Object; sort?: Object; select?: Object; + expand?: Object; group?: Object; skip?: number; take?: number; @@ -265,7 +272,7 @@ declare module DevExpress { updating: JQueryCallback; constructor(options?: StoreOptions); /** Returns the data item specified by the key. */ - byKey(key: any, extraOptions?: Object): JQueryPromise; + 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. */ @@ -340,7 +347,7 @@ declare module DevExpress { byKey?: (key: any) => Promise; /** * User implementation of the byKey(key, extraOptions) method. - * @deprecated Use "byKey" instead + * @deprecated byKey.md */ lookup?: (key: any) => Promise; /** The user implementation of the insert(values) method. */ @@ -379,6 +386,8 @@ declare module DevExpress { 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. */ @@ -535,6 +544,8 @@ declare module DevExpress { 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 { @@ -657,7 +668,7 @@ declare module DevExpress { items?: Array; /** * A function performed when a widget item is selected. - * @deprecated Use the 'onSelectionChanged' option instead + * @deprecated onSelectionChanged.md */ itemSelectAction?: Function; /** The template to be used for rendering items. */ @@ -713,11 +724,11 @@ declare module DevExpress { /** The template to be used for rendering items. */ itemTemplate?: any; /** The currently selected value in the widget. */ - value?: any; + value?: Object; } export interface EditorOptions extends WidgetOptions { /** The currently specified value. */ - value?: any; + value?: Object; /** A handler for the valueChanged event. */ onValueChanged?: Function; valueChangeAction?: Function; @@ -729,6 +740,8 @@ declare module DevExpress { isValid?: boolean; /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ validationMessageMode?: string; + /** Resets the editor's value to undefined. */ + reset(): void; } /** A base class for editors. */ export class Editor extends Widget { } @@ -817,6 +830,24 @@ declare module DevExpress.framework { /** 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 { @@ -824,7 +855,7 @@ declare module DevExpress.framework { commandMapping?: Object; /** * The name of the default layout used by the application. - * @deprecated Use the "navigationType" option instead. + * @deprecated navigationType.md */ defaultLayout?: string; /** Specifies whether or not view caching is disabled. */ @@ -839,14 +870,18 @@ declare module DevExpress.framework { 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 Use the "layoutSet" option instead. + * @deprecated layoutSet.md */ navigationType?: string; /** * Specifies the object that represents the root namespace of the application. - * @deprecated Use the "namespace" option instead. + * @deprecated namespace.md */ ns?: Object; /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ @@ -879,13 +914,15 @@ declare module DevExpress.framework { 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; - /** Removes the application state that has been saved by the saveState() method to the state storage. */ + /** Calls the clearState() method of the application's StateManager object. */ clearState(): void; /** Creates global navigation commands. */ createNavigation(navigationConfig: Array): void; @@ -899,9 +936,9 @@ declare module DevExpress.framework { 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; - /** Restores the application state that has been saved by the saveState() method to the state storage, and applies it to the application. */ + /** Calls the restoreState() method of the application's StateManager object. */ restoreState(): void; - /** Saves the current application state. */ + /** 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; @@ -1039,6 +1076,8 @@ declare module DevExpress.ui { 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 { @@ -1046,6 +1085,8 @@ declare module DevExpress.ui { 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. */ @@ -1082,6 +1123,15 @@ declare module DevExpress.ui { 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 { @@ -1160,12 +1210,19 @@ declare module DevExpress.ui { /** Specifies the current value displayed by the widget. */ value?: any; valueUpdateAction?: Function; - valueChangeAction?: 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 { @@ -1197,6 +1254,8 @@ declare module DevExpress.ui { 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. */ @@ -1216,8 +1275,9 @@ declare module DevExpress.ui { onTitleHold?: Function; /** A handler for the titleRendered event. */ onTitleRendered?: Function; - /** A template to be used for rendering the widget title. */ 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 { @@ -1230,32 +1290,16 @@ declare module DevExpress.ui { /** 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. */ - editEnabled?: boolean; + 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); - /** Closes the drop-down editor. */ - close(): void; - /** Opens the drop-down editor. */ - open(): void; } export interface dxTagBoxOptions extends dxSelectBoxOptions { /** Holds the list of selected values. */ values?: Array; - /** Holds the last selected value. */ - value?: any; - /** A handler for the valueChanged event. */ - onValueChanged?: (e: { - component: dxTagBox; - element: JQuery; - model: Object; - value: Object; - values: Object; - itemData: Object; - jQueryEvent: JQueryEventObject; - }) => void; } /** A widget that allows you to select multiple items from a dropdown list. */ export class dxTagBox extends dxSelectBox { @@ -1310,6 +1354,12 @@ declare module DevExpress.ui { 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 { @@ -1369,6 +1419,8 @@ declare module DevExpress.ui { 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; } @@ -1396,6 +1448,8 @@ declare module DevExpress.ui { 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. */ @@ -1449,13 +1503,15 @@ declare module DevExpress.ui { 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 to show spin buttons. */ + /** 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. */ @@ -1468,7 +1524,9 @@ declare module DevExpress.ui { constructor(element: JQuery, options?: dxNumberBoxOptions); constructor(element: Element, options?: dxNumberBoxOptions); } - export interface dxNavBarOptions extends dxTabsOptions { } + 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); @@ -1526,7 +1584,7 @@ declare module DevExpress.ui { } /** * An object, a string, or an array specifying the location displayed at the center of the widget. - * @deprecated Use the 'center' option instead + * @deprecated center.md */ location?: { lat?: number; @@ -1586,8 +1644,8 @@ declare module DevExpress.ui { 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 Done button. */ - doneButtonText?: string; + /** 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. */ @@ -1597,8 +1655,6 @@ declare module DevExpress.ui { groupTemplate?: any; /** The text displayed on the button used to load the next page from the data source. */ nextButtonText?: string; - /** The text or HTML markup displayed by the widget if there are no items satisfying the specified search condition. */ - noDataText?: string; /** A handler for the pageLoading event. */ onPageLoading?: Function; pageLoadingAction?: Function; @@ -1634,8 +1690,6 @@ declare module DevExpress.ui { shading?: boolean; /** Specifies whether to display the Cancel button in the lookup window. */ showCancelButton?: boolean; - /** Specifies whether to display the Done button in the lookup window. */ - showDoneButton?: 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. */ @@ -1649,10 +1703,11 @@ declare module DevExpress.ui { /** A handler for the valueChanged event. */ onValueChanged?: Function; contentReadyAction?: Function; - onContentReady?: 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 { @@ -1703,7 +1758,7 @@ declare module DevExpress.ui { deleteEnabled?: boolean; /** * A mode specifying how to delete a list item. - * @deprecated Use the "deleteType" option instead. + * @deprecated deleteType.md */ deleteMode?: string; /** Specifies the way a user can delete items from the list. */ @@ -1721,14 +1776,14 @@ declare module DevExpress.ui { selectionEnabled?: boolean; /** * A mode specifying how to select a list item. - * @deprecated Use the "selectionType" option instead. + * @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 load panel during data loading. */ + /** 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. */ @@ -1736,6 +1791,7 @@ declare module DevExpress.ui { 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; @@ -1774,8 +1830,8 @@ declare module DevExpress.ui { 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; - /** A Boolean value specifying if the widget scrollbar is visible. */ - showScrollbar?: boolean; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; /** Specifies whether or not the widget uses native scrolling. */ useNativeScrolling?: boolean; itemUnselectAction?: Function; @@ -1831,7 +1887,7 @@ declare module DevExpress.ui { unselectItem(itemIndex: any): void; /** * Updates the widget scrollbar according to widget content size. - * @deprecated Use the "updateDimensions" method instead. + * @deprecated updateDimensions.md */ update(): JQueryPromise; /** Updates the widget scrollbar according to widget content size. */ @@ -1844,6 +1900,8 @@ declare module DevExpress.ui { 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. */ @@ -1871,16 +1929,25 @@ declare module DevExpress.ui { 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 window is displayed. */ + /** 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 { @@ -1890,12 +1957,10 @@ declare module DevExpress.ui { close(): void; /** Opens the drop-down editor. */ open(): void; + /** Resets the widget's value to null. */ + reset(): void; } export interface dxDateBoxOptions extends dxTextEditorOptions { - /** A dxCalendar configuration object used to initialize the drop-down calendar. */ - calendarOptions?: dxCalendarOptions; - /** Specifies whether or not to close the drop-down calendar when widget value has been changed. */ - closeOnValueChange?: boolean; /** A format used to display date/time information. */ format?: string; /** A Globalize format string specifying the date display format. */ @@ -1906,7 +1971,7 @@ declare module DevExpress.ui { 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 via the drop-down calendar. */ + /** 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; @@ -1916,7 +1981,7 @@ declare module DevExpress.ui { interval?: number; } /** A date box widget. */ - export class dxDateBox extends dxTextEditor { + export class dxDateBox extends dxDropDownEditor { constructor(element: JQuery, options?: dxDateBoxOptions); constructor(element: Element, options?: dxDateBoxOptions); } @@ -1990,12 +2055,14 @@ declare module DevExpress.ui { /** Specifies the screen factor with which all elements are located in a single column. */ singleColumnScreen?: string; } - /** A widget used to build an adaptive markup dependent on screen resolution. */ + /** 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. */ @@ -2041,21 +2108,11 @@ declare module DevExpress.ui { /** Expands the specified item. */ expandItem(index: number): JQueryPromise; } - export interface dxFileUploaderFile { - /** Specifies the selected file name. */ - name?: string; - /** Specifies the selected file size in bytes. */ - size?: number; - /** Specifies the MIME type of the selected file. */ - type?: string; - /** Specifies the date and time of the last selected file modification. */ - lastModifiedDate?: Date; - } export interface dxFileUploaderOptions extends EditorOptions { - /** An object that holds the selected file data. */ - value?: dxFileUploaderFile; - /** Holds data of the files selected in the widget. */ - values?: Array; + /** 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. */ @@ -2093,7 +2150,7 @@ declare module DevExpress.ui { /** A handler for the complete event. */ onComplete?: Function; } - /** A widget used to indicate a progress. */ + /** A widget used to indicate progress. */ export class dxProgressBar extends dxTrackBar { constructor(element: JQuery, options?: dxProgressBarOptions); constructor(element: Element, options?: dxProgressBarOptions); @@ -2175,7 +2232,7 @@ declare module DevExpress.ui { constructor(element: JQuery, options?: dxSwitchOptions); constructor(element: Element, options?: dxSwitchOptions); } - export interface dxSlideoutOptions extends CollectionWidgetOptions { + 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. */ @@ -2190,11 +2247,13 @@ declare module DevExpress.ui { 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 dxSlideOut widget allows you to slide-out the current view to reveal an item list. */ + /** 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); + 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. */ @@ -2205,6 +2264,8 @@ declare module DevExpress.ui { 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 { @@ -2257,12 +2318,20 @@ declare module DevExpress.ui { 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; @@ -2270,7 +2339,7 @@ declare module DevExpress.ui { onCancelClick?: any; /** The text displayed in the button that closes the action sheet. */ cancelText?: string; - /** Specifies whether to display the Cancel button in action sheet. */ + /** 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; @@ -2297,14 +2366,11 @@ declare module DevExpress.ui { export interface dxColorBoxOptions extends dxDropDownEditorOptions { /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ applyButtonText?: string; - /** Specifies whether the widget value is updated after the Apply button is clicked or immediately after a color is selected in the palette. */ 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; - /** The color currently selected by the widget. */ - value?: string; } /** A widget used to specify a color value. */ export class dxColorBox extends dxDropDownEditor { @@ -2323,7 +2389,12 @@ declare module DevExpress.ui { export interface dxTreeViewOptions extends CollectionWidgetOptions { /** Specifies whether a nested or plain array is used as a data source. */ dataStructure?: string; - /** An array of currently expanded item objects. */ + /** 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; @@ -2345,6 +2416,7 @@ declare module DevExpress.ui { 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. */ @@ -2370,6 +2442,10 @@ declare module DevExpress.ui { 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. */ @@ -2386,6 +2462,8 @@ declare module DevExpress.ui { 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); @@ -2402,8 +2480,6 @@ declare module DevExpress.ui { /** Specifies by which user interaction the first-level submenu is shown. */ showFirstSubmenuMode?: string; showPopupMode?: string; - /** Specifies by which user interaction secondary-level submenus are shown. */ - showSubmenuMode?: string; /** Specifies the direction at which the submenus are displayed. */ submenuDirection?: string; /** A handler for the submenuHidden event. */ @@ -2445,8 +2521,6 @@ declare module DevExpress.ui { positioningAction?: Function; showingAction?: Function; shownAction?: Function; - /** Specifies by which user interaction the context menu is shown. */ - showSubmenuMode?: string; /** Specifies the direction at which submenus are displayed. */ submenuDirection?: string; /** The target element associated with a popover. */ @@ -2458,6 +2532,12 @@ declare module DevExpress.ui { 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. */ @@ -2973,9 +3053,7 @@ Specifies the message displayed in a group row when the corresponding group cont /** Specifies whether text that does not fit into a column should be wrapped. */ wordWrapEnabled?: boolean; } - /** -A data grid widget. - */ + /** A data grid widget. */ export class dxDataGrid extends Widget { constructor(element: JQuery, options?: dxDataGridOptions); constructor(element: Element, options?: dxDataGridOptions); @@ -3070,6 +3148,7 @@ 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. */ @@ -3100,8 +3179,13 @@ declare module DevExpress.viz.charts { 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. */ + /** + * 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. */ @@ -3239,8 +3323,6 @@ declare module DevExpress.viz.charts { } /** This section describes the methods that can be used in code to manipulate the Point object. */ export interface PolarPoint extends BasePoint { - /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ - getBoundingRect(): Object; series: PolarSeries; } export interface Strip { @@ -3624,8 +3706,6 @@ declare module DevExpress.viz.charts { tagField?: string; /** Specifies the data source field that provides values for series points. */ valueField?: string; - /** Specifies the required type for series values. */ - valueType?: string; } export interface PieSeriesConfig extends CommonPieSeriesConfig { /** Sets the series type. */ @@ -3648,8 +3728,12 @@ declare module DevExpress.viz.charts { 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; } @@ -3865,6 +3949,8 @@ declare module DevExpress.viz.charts { 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; } @@ -4285,6 +4371,10 @@ declare module DevExpress.viz.charts { 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. */ @@ -4375,7 +4465,7 @@ declare module DevExpress.viz.core { /** Specifies a color for the tooltip. */ color?: string; customizeText?: Function; - /** Allows you to change the appearance of particular tooltips. */ + /** 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; @@ -4575,52 +4665,49 @@ declare module DevExpress.viz.gauges { /** Specifies the start value for the scale of the gauge. */ startValue?: number; } - export interface BaseSubvalueIndicator { - /** Specifies the length of an arrow for the subvalue indicator of the textCloud type in pixels. */ - arrowLength?: number; - /** Specifies the color of a subvalue indicator. */ - color?: string; - /** Specifies the length for a subvalue indicator of the triangleMarker type in pixels. */ - length?: number; - /** Sets the array of colors to be used for coloring the subvalue indicators. */ - palette?: Array; - /** Specifies the appearance of the text displayed in a subvalue indicator of the textCloud type. */ - text?: Object; - /** Specifies a callback function that returns the text to be displayed in a subvalue indicator of the textCloud type. */ - customizeText?: (indicatedSubvalue: { value: number; valueText: string }) => string; - /** Specifies font options for the text displayed by a subvalue indicator of the textCloud type. */ - font?: viz.core.Font; - /** Specifies a format for the text displayed in a subvalue indicator of the textCloud type. */ - format?: string; - /** Specifies a precision for the formatted value displayed in a subvalue indicator of the textCloud type. */ - precision?: number; - /** Overriden by descriptions for specific widgets. */ - type?: string; - /** Specifies the width for a subvalue indicator of the triangleMarker type in pixels. */ - width?: number; - } export interface BaseValueIndicator { - /** Specifies the background color for the value indicator of the rangeBar type. */ + /** 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 value indicator of the rangeBar type. */ + /** Specifies the base value for the indicator of the rangeBar type. */ baseValue?: number; - /** Specifies the color of the value indicator. */ + /** Specifies a color of the indicator. */ color?: string; - /** Specifies the range bar size for a value indicator of the rangeBar type. */ + /** Specifies the range bar size for an indicator of the rangeBar type. */ size?: number; - /** Specifies the appearance of the text displayed in a value indicator of the rangeBar type. */ text?: { - /** Specifies a callback function that returns the text to be displayed in a value indicator of the rangeBar type. */ + /** Specifies a callback function that returns the text to be displayed in an indicator. */ customizeText?: (indicatedValue: { value: number; valueText: string }) => string; - /** Specifies font options for the text displayed by a value indicator of the rangeBar type. */ font?: viz.core.Font; - /** Specifies a format for the text displayed in a value indicator of the rangeBar type. */ + /** 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 a value indicator of the rangeBar type. */ + /** 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. */ @@ -4662,7 +4749,7 @@ declare module DevExpress.viz.gauges { /** Specifies a gauge's scale options. */ scale?: BaseScale; /** Specifies the appearance options of subvalue indicators. */ - subvalueIndicator?: BaseSubvalueIndicator; + subvalueIndicator?: BaseValueIndicator; /** Specifies a set of subvalues to be designated by the subvalue indicators. */ subvalues?: Array; /** Specifies the main value on a gauge. */ @@ -4710,28 +4797,6 @@ declare module DevExpress.viz.gauges { /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ verticalOrientation?: string; } - export interface LinearSubvalueIndicator extends BaseSubvalueIndicator { - /** Specifies the orientation of the subvalue indicators on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - /** Specifies the distance between a subvalue indicator and an invisible scale line in pixels. */ - offset?: number; - /** Specifies the orientation of the subvalue indicators on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - } - export interface LinearValueIndicator extends BaseValueIndicator { - /** Specifies the orientation of the rangeBar value indicator on a vertically oriented dxLinearGauge widget. */ - horizontalOrientation?: string; - /** Specifies the length of a value indicator in pixels. */ - length?: number; - /** Specifies the distance between a value indicator and an invisible scale line. */ - offset?: number; - /** Specifies the type of the value indicator. */ - type?: string; - /** Specifies the orientation of the rangeBar value indicator on a horizontally oriented dxLinearGauge widget. */ - verticalOrientation?: string; - /** Specifies the width of a value indicator in pixels. */ - width?: number; - } export interface dxLinearGaugeOptions extends BaseGaugeOptions { /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ geometry?: { @@ -4741,8 +4806,6 @@ declare module DevExpress.viz.gauges { /** Specifies gauge range container options. */ rangeContainer?: LinearRangeContainer; scale?: LinearScale; - subvalueIndicator?: LinearSubvalueIndicator; - valueIndicator?: LinearValueIndicator; } /** A widget that represents a gauge with a linear scale. */ export class dxLinearGauge extends dxBaseGauge { @@ -4764,28 +4827,6 @@ declare module DevExpress.viz.gauges { /** Specifies the orientation of scale ticks. */ orientation?: string; } - export interface CircularSubvalueIndicator extends BaseSubvalueIndicator { - /** Specifies the distance between a subvalue indicator and an invisible scale line in pixels. */ - offset?: number; - } - export interface CircularValueIndicator extends BaseValueIndicator { - /** Specifies the distance between the needle and the center of a gauge for the value indicator of needle-like types. */ - indentFromCenter?: number; - /** Specifies the distance between the value indicator and the invisible scale line. */ - offset?: number; - /** Specifies the second color for the value indicator of the twoColorNeedle type. */ - secondColor?: string; - /** Specifies the length of a twoNeedleColor type value indicator tip as a percentage. */ - secondFraction?: number; - /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ - spindleGapSize?: number; - /** Specifies the spindle's diameter in pixels for the value indicator of a needle-like type. */ - spindleSize?: number; - /** Specifies the value indicator type. */ - type?: string; - /** Specifies, in pixels, the width for a value indicator of a needle-like type. */ - width?: number; - } export interface dxCircularGaugeOptions extends BaseGaugeOptions { /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ geometry?: { @@ -4797,8 +4838,6 @@ declare module DevExpress.viz.gauges { /** Specifies gauge range container options. */ rangeContainer?: CircularRangeContainer; scale?: CircularScale; - subvalueIndicator?: CircularSubvalueIndicator; - valueIndicator?: CircularValueIndicator; } /** A widget that represents a gauge with a circular scale. */ export class dxCircularGauge extends dxBaseGauge { @@ -5478,165 +5517,268 @@ declare module DevExpress.viz.sparklines { } } interface JQuery { - dxProgressBar(options?: DevExpress.ui.dxProgressBarOptions): JQuery; - dxProgressBar(methodName: string, ...params: any[]): any; - dxProgressBar(methodName: "instance"): DevExpress.ui.dxProgressBar; - dxSlider(options?: DevExpress.ui.dxSliderOptions): JQuery; - dxSlider(methodName: string, ...params: any[]): any; - dxSlider(methodName: "instance"): DevExpress.ui.dxSlider; - dxRangeSlider(options?: DevExpress.ui.dxRangeSliderOptions): JQuery; - dxRangeSlider(methodName: string, ...params: any[]): any; - dxRangeSlider(methodName: "instance"): DevExpress.ui.dxRangeSlider; - dxFileUploader(options?: DevExpress.ui.dxFileUploaderOptions): JQuery; - dxFileUploader(methodName: string, ...params: any[]): any; - dxFileUploader(methodName: "instance"): DevExpress.ui.dxFileUploader; + 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(methodName: string, ...params: any[]): any; - dxValidator(methodName: "instance"): DevExpress.ui.dxValidator; - dxValidatonGroup(): JQuery; - dxValidatonGroup(methodName: string, ...params: any[]): any; - dxValidatonGroup(methodName: "instance"): DevExpress.ui.dxValidationGroup; + 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(methodName: string, ...params: any[]): any; - dxValidationSummary(methodName: "instance"): DevExpress.ui.dxValidationSummary; - dxTooltip(options?: DevExpress.ui.dxTooltipOptions): JQuery; - dxTooltip(methodName: string, ...params: any[]): any; - dxTooltip(methodName: "instance"): DevExpress.ui.dxTooltip; - dxDropDownList(options?: DevExpress.ui.dxDropDownListOptions): JQuery; - dxDropDownList(methodName: string, ...params: any[]): any; - dxDropDownList(methodName: "instance"): DevExpress.ui.dxDropDownList; - dxToolbar(options?: DevExpress.ui.dxToolbarOptions): JQuery; - dxToolbar(methodName: string, ...params: any[]): any; - dxToolbar(methodName: "instance"): DevExpress.ui.dxToolbar; - dxToast(options?: DevExpress.ui.dxToastOptions): JQuery; - dxToast(methodName: string, ...params: any[]): any; - dxToast(methodName: "instance"): DevExpress.ui.dxToast; - dxTextEditor(options?: DevExpress.ui.dxTextEditorOptions): JQuery; - dxTextEditor(methodName: string, ...params: any[]): any; - dxTextEditor(methodName: "instance"): DevExpress.ui.dxTextEditor; - dxTextBox(options?: DevExpress.ui.dxTextBoxOptions): JQuery; - dxTextBox(methodName: string, ...params: any[]): any; - dxTextBox(methodName: "instance"): DevExpress.ui.dxTextBox; - dxTextArea(options?: DevExpress.ui.dxTextAreaOptions): JQuery; - dxTextArea(methodName: string, ...params: any[]): any; - dxTextArea(methodName: "instance"): DevExpress.ui.dxTextArea; - dxTabs(options?: DevExpress.ui.dxTabsOptions): JQuery; - dxTabs(methodName: string, ...params: any[]): any; - dxTabs(methodName: "instance"): DevExpress.ui.dxTabs; - dxTabPanel(options?: DevExpress.ui.dxTabPanelOptions): JQuery; - dxTabPanel(methodName: string, ...params: any[]): any; - dxTabPanel(methodName: "instance"): DevExpress.ui.dxTabPanel; - dxSelectBox(options?: DevExpress.ui.dxSelectBoxOptions): JQuery; - dxSelectBox(methodName: string, ...params: any[]): any; - dxSelectBox(methodName: "instance"): DevExpress.ui.dxSelectBox; - dxScrollView(options?: DevExpress.ui.dxScrollViewOptions): JQuery; - dxScrollView(methodName: string, ...params: any[]): any; - dxScrollView(methodName: "instance"): DevExpress.ui.dxScrollView; - dxScrollable(options?: DevExpress.ui.dxScrollableOptions): JQuery; - dxScrollable(methodName: string, ...params: any[]): any; - dxScrollable(methodName: "instance"): DevExpress.ui.dxScrollable; - dxRadioGroup(options?: DevExpress.ui.dxRadioGroupOptions): JQuery; - dxRadioGroup(methodName: string, ...params: any[]): any; - dxRadioGroup(methodName: "instance"): DevExpress.ui.dxRadioGroup; - dxPopup(options?: DevExpress.ui.dxPopupOptions): JQuery; - dxPopup(methodName: string, ...params: any[]): any; - dxPopup(methodName: "instance"): DevExpress.ui.dxPopup; - dxPopover(options?: DevExpress.ui.dxPopoverOptions): JQuery; - dxPopover(methodName: string, ...params: any[]): any; - dxPopover(methodName: "instance"): DevExpress.ui.dxPopover; - dxOverlay(options?: DevExpress.ui.dxOverlayOptions): JQuery; - dxOverlay(methodName: string, ...params: any[]): any; - dxOverlay(methodName: "instance"): DevExpress.ui.dxOverlay; - dxNumberBox(options?: DevExpress.ui.dxNumberBoxOptions): JQuery; - dxNumberBox(methodName: string, ...params: any[]): any; - dxNumberBox(methodName: "instance"): DevExpress.ui.dxNumberBox; - dxNavBar(options?: DevExpress.ui.dxNavBarOptions): JQuery; - dxNavBar(methodName: string, ...params: any[]): any; - dxNavBar(methodName: "instance"): DevExpress.ui.dxNavBar; - dxMultiView(options?: DevExpress.ui.dxMultiViewOptions): JQuery; - dxMultiView(methodName: string, ...params: any[]): any; - dxMultiView(methodName: "instance"): DevExpress.ui.dxMultiView; - dxMap(options?: DevExpress.ui.dxMapOptions): JQuery; - dxMap(methodName: string, ...params: any[]): any; - dxMap(methodName: "instance"): DevExpress.ui.dxMap; - dxLookup(options?: DevExpress.ui.dxLookupOptions): JQuery; - dxLookup(methodName: string, ...params: any[]): any; - dxLookup(methodName: "instance"): DevExpress.ui.dxLookup; - dxLoadPanel(options?: DevExpress.ui.dxLoadPanelOptions): JQuery; - dxLoadPanel(methodName: string, ...params: any[]): any; - dxLoadPanel(methodName: "instance"): DevExpress.ui.dxLoadPanel; - dxLoadIndicator(options?: DevExpress.ui.dxLoadIndicatorOptions): JQuery; - dxLoadIndicator(methodName: string, ...params: any[]): any; - dxLoadIndicator(methodName: "instance"): DevExpress.ui.dxLoadIndicator; - dxList(options?: DevExpress.ui.dxListOptions): JQuery; - dxList(methodName: string, ...params: any[]): any; - dxList(methodName: "instance"): DevExpress.ui.dxList; - dxGallery(options?: DevExpress.ui.dxGalleryOptions): JQuery; - dxGallery(methodName: string, ...params: any[]): any; - dxGallery(methodName: "instance"): DevExpress.ui.dxGallery; - dxDropDownEditor(options?: DevExpress.ui.dxDropDownEditorOptions): JQuery; - dxDropDownEditor(methodName: string, ...params: any[]): any; - dxDropDownEditor(methodName: "instance"): DevExpress.ui.dxDropDownEditor; - dxDateBox(options?: DevExpress.ui.dxDateBoxOptions): JQuery; - dxDateBox(methodName: string, ...params: any[]): any; - dxDateBox(methodName: "instance"): DevExpress.ui.dxDateBox; - dxCheckBox(options?: DevExpress.ui.dxCheckBoxOptions): JQuery; - dxCheckBox(methodName: string, ...params: any[]): any; - dxCheckBox(methodName: "instance"): DevExpress.ui.dxCheckBox; - dxBox(options?: DevExpress.ui.dxBoxOptions): JQuery; - dxBox(methodName: string, ...params: any[]): any; - dxBox(methodName: "instance"): DevExpress.ui.dxBox; - dxButton(options?: DevExpress.ui.dxButtonOptions): JQuery; - dxButton(methodName: string, ...params: any[]): any; - dxButton(methodName: "instance"): DevExpress.ui.dxButton; - dxCalendar(options?: DevExpress.ui.dxCalendarOptions): JQuery; - dxCalendar(methodName: string, ...params: any[]): any; - dxCalendar(methodName: "instance"): DevExpress.ui.dxCalendar; - dxAccordion(options?: DevExpress.ui.dxAccordionOptions): JQuery; - dxAccordion(methodName: string, ...params: any[]): any; - dxAccordion(methodName: "instance"): DevExpress.ui.dxAccordion; - dxAutocomplete(options?: DevExpress.ui.dxAutocompleteOptions): JQuery; - dxAutocomplete(methodName: string, ...params: any[]): any; - dxAutocomplete(methodName: "instance"): DevExpress.ui.dxAutocomplete; - dxTileView(options?: DevExpress.ui.dxTileViewOptions): JQuery; - dxTileView(methodName: string, ...params: any[]): any; - dxTileView(methodName: "instance"): DevExpress.ui.dxTileView; - dxSwitch(options?: DevExpress.ui.dxSwitchOptions): JQuery; - dxSwitch(methodName: string, ...params: any[]): any; - dxSwitch(methodName: "instance"): DevExpress.ui.dxSwitch; - dxSlideOut(options?: DevExpress.ui.dxSlideoutOptions): JQuery; - dxSlideOut(methodName: string, ...params: any[]): any; - dxSlideOut(methodName: "instance"): DevExpress.ui.dxSlideOut; - dxPivot(options?: DevExpress.ui.dxPivotOptions): JQuery; - dxPivot(methodName: string, ...params: any[]): any; - dxPivot(methodName: "instance"): DevExpress.ui.dxPivot; - dxPanorama(options?: DevExpress.ui.dxPanoramaOptions): JQuery; - dxPanorama(methodName: string, ...params: any[]): any; - dxPanorama(methodName: "instance"): DevExpress.ui.dxPanorama; - dxActionSheet(options?: DevExpress.ui.dxActionSheetOptions): JQuery; - dxActionSheet(methodName: string, ...params: any[]): any; - dxActionSheet(methodName: "instance"): DevExpress.ui.dxActionSheet; - dxDropDownMenu(options?: DevExpress.ui.dxDropDownMenuOptions): JQuery; - dxDropDownMenu(methodName: string, ...params: any[]): any; - dxDropDownMenu(methodName: "instance"): DevExpress.ui.dxDropDownMenu; - dxTreeView(options?: DevExpress.ui.dxTreeViewOptions): JQuery; - dxTreeView(methodName: string, ...params: any[]): any; - dxTreeView(methodName: "instance"): DevExpress.ui.dxTreeView; - dxMenuBase(options?: DevExpress.ui.dxMenuBaseOptions): JQuery; - dxMenuBase(methodName: string, ...params: any[]): any; - dxMenuBase(methodName: "instance"): DevExpress.ui.dxMenuBase; - dxMenu(options?: DevExpress.ui.dxMenuOptions): JQuery; - dxMenu(methodName: string, ...params: any[]): any; - dxMenu(methodName: "instance"): DevExpress.ui.dxMenu; - dxContextMenu(options?: DevExpress.ui.dxContextMenuOptions): JQuery; - dxContextMenu(methodName: string, ...params: any[]): any; - dxContextMenu(methodName: "instance"): DevExpress.ui.dxContextMenu; - dxColorBox(options?: DevExpress.ui.dxColorBoxOptions): JQuery; - dxColorBox(methodName: string, ...params: any[]): any; - dxColorBox(methodName: "instance"): DevExpress.ui.dxColorBox; - dxDataGrid(options?: DevExpress.ui.dxDataGridOptions): JQuery; - dxDataGrid(methodName: string, ...params: any[]): any; - dxDataGrid(methodName: "instance"): DevExpress.ui.dxDataGrid; + 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; From 8636f410705b4dc1a68ac9a9526a5256db872f2d Mon Sep 17 00:00:00 2001 From: Igor Kriklivets Date: Wed, 3 Jun 2015 12:19:16 +0300 Subject: [PATCH 19/48] Fix for previous commit --- devextreme/dx.devextreme.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/devextreme/dx.devextreme.d.ts b/devextreme/dx.devextreme.d.ts index f2b6a90485..a1d361f540 100644 --- a/devextreme/dx.devextreme.d.ts +++ b/devextreme/dx.devextreme.d.ts @@ -740,11 +740,12 @@ declare module DevExpress { isValid?: boolean; /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ validationMessageMode?: string; - /** Resets the editor's value to undefined. */ - reset(): void; } /** A base class for editors. */ - export class Editor extends Widget { } + 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. */ From 45c923a5f8426b93b07dfab456004879001a3cf7 Mon Sep 17 00:00:00 2001 From: Eik Date: Wed, 3 Jun 2015 14:11:42 +0200 Subject: [PATCH 20/48] Corrected an issue that didn't allow me to use an extended PageableCollection in a Marionette.compositeView. --- backbone.paginator/backbone.paginator.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone.paginator/backbone.paginator.d.ts b/backbone.paginator/backbone.paginator.d.ts index 6eb560cc8a..eb0a719626 100644 --- a/backbone.paginator/backbone.paginator.d.ts +++ b/backbone.paginator/backbone.paginator.d.ts @@ -52,7 +52,7 @@ declare module Backbone { type PageableGetPageOptions = CollectionFetchOptions|Silenceable; - class PageableCollection extends Collection{ + class PageableCollection extends Collection{ fullCollection: Collection; mode: string; From 5fdac5f3478e1691eca2f33a8db19454bb7d9f0c Mon Sep 17 00:00:00 2001 From: Josh Petersen Date: Wed, 3 Jun 2015 09:34:42 -0400 Subject: [PATCH 21/48] added definitions and tests for project xlsx https://github.com/SheetJS/js-xlsx --- xlsx/xlsx-tests.ts | 26 +++++++++ xlsx/xlsx.d.ts | 136 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 xlsx/xlsx-tests.ts create mode 100644 xlsx/xlsx.d.ts diff --git a/xlsx/xlsx-tests.ts b/xlsx/xlsx-tests.ts new file mode 100644 index 0000000000..7a40546264 --- /dev/null +++ b/xlsx/xlsx-tests.ts @@ -0,0 +1,26 @@ +/// +import xlsx = require('xlsx'); + +var options:xlsx.IParsingOptions = { + cellDates:true +}; + +var workbook = xlsx.readFile('test.xlsx', options); +var otherworkbook = xlsx.readFile('test.xlsx', {type: 'file'}); + +console.log(workbook.Props.Author); + +var firstsheet:string = workbook.SheetNames[0]; + +var firstworksheet = workbook.Sheets[firstsheet]; + +console.log(firstworksheet["A1"]); + +interface tester { + name:string; + age: number; +} + +var jsonvalues:tester[] = xlsx.utils.sheet_to_json(firstworksheet); +var csv = xlsx.utils.sheet_to_csv(firstworksheet); +var formulae = xlsx.utils.sheet_to_formulae(firstworksheet); diff --git a/xlsx/xlsx.d.ts b/xlsx/xlsx.d.ts new file mode 100644 index 0000000000..16df800dda --- /dev/null +++ b/xlsx/xlsx.d.ts @@ -0,0 +1,136 @@ +// Type definitions for xlsx +// Project: https://github.com/SheetJS/js-xlsx +// Definitions by: themauveavenger +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'xlsx' { + + export function readFile(filename:string, opts?:IParsingOptions):IWorkBook; + export function read(data:any, opts?:IParsingOptions):IWorkBook; + export var utils:IUtils; + + export interface IProperties { + LastAuthor?:string + Author?:string; + CreatedDate?:Date; + ModifiedDate?:Date + Application?:string; + AppVersion?:string; + Company?:string; + DocSecurity?:string; + Manager?:string; + HyperlinksChanged?: boolean; + SharedDoc?:boolean; + LinksUpToDate?:boolean; + ScaleCrop?:boolean; + Worksheets?:number; + SheetNames?:string[]; + } + + export interface IParsingOptions { + cellFormula?:boolean; + cellHTML?:boolean; + cellNF?:boolean; + cellStyles?:boolean; + cellDates?:boolean; + sheetStubs?:boolean; + sheetRows?:number; + bookDeps?:boolean; + bookFiles?:boolean; + bookProps?:boolean; + bookSheets?:boolean; + bookVBA?:boolean; + password?:string; + + /** + * Possible options: 'binary', 'base64', 'buffer', 'file' + */ + type?:string; + } + + export interface IWorkBook { + /** + * A dictionary of the worksheets in the workbook. + * Use SheetNames to reference these. + */ + Sheets:{[sheet:string]:IWorkSheet}; + + /** + * ordered list of the sheet names in the workbook + */ + SheetNames:string[]; + + /** + * an object storing the standard properties. wb.Custprops stores custom properties. + * Since the XLS standard properties deviate from the XLSX standard, XLS parsing stores core properties in both places. + */ + Props:IProperties; + } + + /** + * object representing the worksheet + */ + export interface IWorkSheet { + [cell:string]:IWorkSheetCell; + } + + export interface IWorkSheetCell { + /** + * The Excel Data Type of the cell. + * b Boolean, n Number, e error, s String, d Date + */ + t: string; + + /** + * The raw value of the cell. + */ + v: string; + + /** + * rich text encoding (if applicable) + */ + r?: string; + + /** + * HTML rendering of the rich text (if applicable) + */ + h?: string; + + /** + * formatted text (if applicable) + */ + w?: string; + + /** + * cell formula (if applicable) + */ + f?: string; + + /** + * comments associated with the cell ** + */ + c?: string; + + /** + * number format string associated with the cell (if requested) + */ + z?: string; + + /** + * cell hyperlink object (.Target holds link, .tooltip is tooltip) + */ + l?: string; + + /** + * the style/theme of the cell (if applicable) + */ + s?: string; + } + + export interface IUtils { + sheet_to_json(worksheet:IWorkSheet|IWorkBook):T[]; + sheet_to_csv(worksheet:IWorkSheet):any; + sheet_to_formulae(worksheet:IWorkSheet):any; + } + +} From c8436fbe1eb00d52f7ed123311a64d5bded7ee87 Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Wed, 3 Jun 2015 10:29:07 -0400 Subject: [PATCH 22/48] removed extraneous files --- node-calendar/.gitignore | 4 ---- node-calendar/package.json | 14 -------------- 2 files changed, 18 deletions(-) delete mode 100644 node-calendar/.gitignore delete mode 100755 node-calendar/package.json diff --git a/node-calendar/.gitignore b/node-calendar/.gitignore deleted file mode 100644 index 76136c9e9a..0000000000 --- a/node-calendar/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.js -tsconfig.json -node_modules -.settings \ No newline at end of file diff --git a/node-calendar/package.json b/node-calendar/package.json deleted file mode 100755 index 8cc162a957..0000000000 --- a/node-calendar/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "node-calendar.d.ts", - "version": "0.0.1", - "description": "Type definitions for node-calendar v0.1.4", - "main": "node-calendar-tests", - "scripts": { - "test": "node node-calendar-tests" - }, - "author": "Luzian Zagadinow (https://github.com/luzianz)", - "license": "MIT", - "dependencies": { - "node-calendar": "^0.1.4" - } -} \ No newline at end of file From 4ad9034a401094b53bb01ae1ed113b401f128e43 Mon Sep 17 00:00:00 2001 From: Olivier Foissac Date: Wed, 3 Jun 2015 18:57:03 +0200 Subject: [PATCH 23/48] * Add comments from https://developers.google.com/maps/documentation/javascript/3.19/reference on MarkerOptions, Symbol, SymbolPath, InfoWindow, InfoWindowOptions, LatLng, Point. * Add missing interface google.maps.Icon. --- googlemaps/google.maps-tests.ts | 13 +- googlemaps/google.maps.d.ts | 212 ++++++++++++++++++++++++++++++-- 2 files changed, 214 insertions(+), 11 deletions(-) diff --git a/googlemaps/google.maps-tests.ts b/googlemaps/google.maps-tests.ts index 1079f78b2a..23931850db 100644 --- a/googlemaps/google.maps-tests.ts +++ b/googlemaps/google.maps-tests.ts @@ -104,4 +104,15 @@ var removePropertyEvent: google.maps.Data.RemovePropertyEvent = { feature: feature, name: "test", oldValue: {} -}; \ No newline at end of file +}; + + +/***** Overlays *****/ + +var icon: google.maps.Icon = { + anchor: new google.maps.Point(16, 16), + origin: new google.maps.Point(0, 0), + scaledSize: new google.maps.Size(32, 32), + size: new google.maps.Size(32, 32), + url: "dummy" +} \ No newline at end of file diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index fe4e7459cd..ecf319c83b 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -397,23 +397,86 @@ declare module google.maps { } export interface MarkerOptions { + /** Which animation to play when marker is added to a map. */ animation?: Animation; + /** + * If true, the marker receives mouse and touch events. + * @default true + */ clickable?: boolean; + /** Mouse cursor to show on hover. */ cursor?: string; + /** + * If true, the marker can be dragged. + * @default false + */ draggable?: boolean; flat?: boolean; + /** + * Icon for the foreground. + * If a string is provided, it is treated as though it were an Icon with the string as url. + * @type {(string|Icon|Symbol)} + */ icon?: any; + /** + * Map on which to display Marker. + * @type {(Map|StreetViewPanorama)} + */ map?: any; + /** + * Optimization renders many markers as a single static element. + * Optimized rendering is enabled by default. + * Disable optimized rendering for animated GIFs or PNGs, or when each marker must be rendered + * as a separate DOM element (advanced usage only). + */ optimized?: boolean; + /** + * Marker position. Required. + */ position?: LatLng; raiseOnDrag?: boolean; shadow?: any; + /** Image map region definition used for drag/click. */ shape?: MarkerShape; + /** Rollover text. */ title?: string; + /** If true, the marker is visible. */ visible?: boolean; + /** + * All markers are displayed on the map in order of their zIndex, + * with higher values displaying in front of markers with lower values. + * By default, markers are displayed according to their vertical position on screen, + * with lower markers appearing in front of markers further up the screen. + */ zIndex?: number; } + export interface Icon { + /** + * The position at which to anchor an image in correspondence to the location of the marker on the map. + * By default, the anchor is located along the center point of the bottom of the image. + */ + anchor?: Point; + /** + * The position of the image within a sprite, if any. + * By default, the origin is located at the top left corner of the image (0, 0). + */ + origin?: Point; + /** + * The size of the entire image after scaling, if any. + * Use this property to stretch/ shrink an image or a sprite. + */ + scaledSize?: Size; + /** + * The display size of the sprite or image. + * When using sprites, you must specify the sprite size. + * If the size is not provided, it will be set when the image loads. + */ + size?: Size; + /** The URL of the image or sprite sheet. */ + url?: string; + } + export class MarkerImage { constructor (url: string, size?: Size, origin?: Point, anchor?: Point, scaledSize?: Size); anchor: Point; @@ -429,22 +492,68 @@ declare module google.maps { } export interface Symbol { + /** + * The position of the symbol relative to the marker or polyline. + * The coordinates of the symbol's path are translated left and up by the anchor's x and y coordinates respectively. + * By default, a symbol is anchored at (0, 0). + * The position is expressed in the same coordinate system as the symbol's path. + */ anchor?: Point; + /** + * The symbol's fill color. + * All CSS3 colors are supported except for extended named colors. For symbol markers, this defaults to 'black'. + * For symbols on polylines, this defaults to the stroke color of the corresponding polyline. + */ fillColor?: string; + /** + * The symbol's fill opacity. + * @default 0 + */ fillOpacity?: number; + /** + * The symbol's path, which is a built-in symbol path, or a custom path expressed using SVG path notation. Required. + * @type {(SymbolPath|string)} + */ path?: any; + /** + * The angle by which to rotate the symbol, expressed clockwise in degrees. + * Defaults to 0. + * A symbol in an IconSequence where fixedRotation is false is rotated relative to the angle of the edge on which it lies. + */ rotation?: number; + /** + * The amount by which the symbol is scaled in size. + * For symbol markers, this defaults to 1; after scaling, the symbol may be of any size. + * For symbols on a polyline, this defaults to the stroke weight of the polyline; + * after scaling, the symbol must lie inside a square 22 pixels in size centered at the symbol's anchor. + */ scale?: number; + /** + * The symbol's stroke color. All CSS3 colors are supported except for extended named colors. + * For symbol markers, this defaults to 'black'. + * For symbols on a polyline, this defaults to the stroke color of the polyline. + */ strokeColor?: string; + /** + * The symbol's stroke opacity. For symbol markers, this defaults to 1. + * For symbols on a polyline, this defaults to the stroke opacity of the polyline. + */ strokeOpacity?: number; + /** The symbol's stroke weight. Defaults to the scale of the symbol.v*/ strokeWeight?: number; } + /** Built-in symbol paths. */ export enum SymbolPath { + /** A backward-pointing closed arrow. */ BACKWARD_CLOSED_ARROW, + /** A backward-pointing open arrow. */ BACKWARD_OPEN_ARROW, + /** A circle. */ CIRCLE, + /** A forward-pointing closed arrow. */ FORWARD_CLOSED_ARROW, + /** A forward-pointing open arrow. */ FORWARD_OPEN_ARROW } @@ -453,13 +562,33 @@ declare module google.maps { DROP } + /** + * An overlay that looks like a bubble and is often connected to a marker. + * This class extends MVCObject. + */ export class InfoWindow extends MVCObject { - constructor (opts?: InfoWindowOptions); + /** + * Creates an info window with the given options. + * An InfoWindow can be placed on a map at a particular position or above a marker, + * depending on what is specified in the options. + * Unless auto-pan is disabled, an InfoWindow will pan the map to make itself visible when it is opened. + * After constructing an InfoWindow, you must call open to display it on the map. + * The user can click the close button on the InfoWindow to remove it from the map, or the developer can call close() for the same effect. + */ + constructor(opts?: InfoWindowOptions); + /** Closes this InfoWindow by removing it from the DOM structure. */ close(): void; getContent(): any; // string or Element getPosition(): LatLng; getZIndex(): number; open(map?: Map, anchor?: MVCObject): void; + /** + * Opens this InfoWindow on the given map. Optionally, an InfoWindow can be associated with an anchor. + * In the core API, the only anchor is the Marker class. + * However, an anchor can be any MVCObject that exposes a LatLng position property and optionally + * a Point anchorPoint property for calculating the pixelOffset (see InfoWindowOptions). + * The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow. + */ open(map?: StreetViewPanorama, anchor?: MVCObject): void; setContent(content: Node): void; setContent(content: string): void; @@ -469,11 +598,40 @@ declare module google.maps { } export interface InfoWindowOptions { + /** + * Content to display in the InfoWindow. This can be an HTML element, a plain-text string, or a string containing HTML. + * The InfoWindow will be sized according to the content. + * To set an explicit size for the content, set content to be a HTML element with that size. + * @type {(string|Node)} + */ content?: any; + /** + * Disable auto-pan on open. By default, the info window will pan the map so that it is fully visible when it opens. + */ disableAutoPan?: boolean; + /** + * Maximum width of the infowindow, regardless of content's width. + * This value is only considered if it is set before a call to open. + * To change the maximum width when changing content, call close, setOptions, and then open. + */ maxWidth?: number; + /** + * The offset, in pixels, of the tip of the info window from the point on the map + * at whose geographical coordinates the info window is anchored. + * If an InfoWindow is opened with an anchor, the pixelOffset will be calculated from the anchor's anchorPoint property. + */ pixelOffset?: Size; + /** + * The LatLng at which to display this InfoWindow. If the InfoWindow is opened with an anchor, the anchor's position will be used instead. + */ position?: LatLng; + /** + * All InfoWindows are displayed on the map in order of their zIndex, + * with higher values displaying in front of InfoWindows with lower values. + * By default, InfoWindows are displayed according to their latitude, + * with InfoWindows of lower latitudes appearing in front of InfoWindows at higher latitudes. + * InfoWindows are always displayed in front of markers. + */ zIndex?: number; } @@ -1356,15 +1514,43 @@ declare module google.maps { latLng: LatLng; } - /***** Base *****/ - export class LatLng { - constructor (lat: number, lng: number, noWrap?: boolean); - equals(other: LatLng): boolean; - lat(): number; - lng(): number; - toString(): string; - toUrlValue(precision?: number): string; + /* **** Base **** */ + /** + * A LatLng is a point in geographical coordinates: latitude and longitude. + * + * * Latitude ranges between -90 and 90 degrees, inclusive. + * Values above or below this range will be clamped to the range [-90, 90]. + * This means that if the value specified is less than -90, it will be set to -90. + * And if the value is greater than 90, it will be set to 90. + * * Longitude ranges between -180 and 180 degrees, inclusive. + * Values above or below this range will be wrapped so that they fall within the range. + * For example, a value of -190 will be converted to 170. A value of 190 will be converted to -170. + * This reflects the fact that longitudes wrap around the globe. + * + * Although the default map projection associates longitude with the x-coordinate of the map, and latitude with the y-coordinate, + * the latitude coordinate is always written first, followed by the longitude. + * Notice that you cannot modify the coordinates of a LatLng. If you want to compute another point, you have to create a new one. + */ + export class LatLng { + /** + * Creates a LatLng object representing a geographic point. + * Note the ordering of latitude and longitude. + * @param lat Latitude is specified in degrees within the range [-90, 90]. + * @param lng Longitude is specified in degrees within the range [-180, 180]. + * @param noWrap Set noWrap to true to enable values outside of this range. + */ + constructor(lat: number, lng: number, noWrap?: boolean); + /** Comparison function. */ + equals(other: LatLng): boolean; + /** Returns the latitude in degrees. */ + lat(): number; + /** Returns the longitude in degrees. */ + lng(): number; + /** Converts to string representation. */ + toString(): string; + /** Returns a string of the form "lat,lng". We round the lat/lng values to 6 decimal places by default. */ + toUrlValue(precision?: number): string; } export class LatLngBounds { @@ -1383,11 +1569,17 @@ declare module google.maps { union(other: LatLngBounds): LatLngBounds; } + export class Point { - constructor (x: number, y: number); + /** A point on a two-dimensional plane. */ + constructor(x: number, y: number); + /** The X coordinate */ x: number; + /** The Y coordinate */ y: number; + /** Compares two Points */ equals(other: Point): boolean; + /** Returns a string representation of this Point. */ toString(): string; } From 923432817762816801e7312f2813529ef9731020 Mon Sep 17 00:00:00 2001 From: Josh Petersen Date: Wed, 3 Jun 2015 14:25:05 -0400 Subject: [PATCH 24/48] minor fix. sheet_to_json only accepts worksheet as a parameter. --- xlsx/xlsx.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlsx/xlsx.d.ts b/xlsx/xlsx.d.ts index 16df800dda..cdc75349be 100644 --- a/xlsx/xlsx.d.ts +++ b/xlsx/xlsx.d.ts @@ -128,7 +128,7 @@ declare module 'xlsx' { } export interface IUtils { - sheet_to_json(worksheet:IWorkSheet|IWorkBook):T[]; + sheet_to_json(worksheet:IWorkSheet):T[]; sheet_to_csv(worksheet:IWorkSheet):any; sheet_to_formulae(worksheet:IWorkSheet):any; } From bf09efb39f0ec78dec18134bae3546239ff07328 Mon Sep 17 00:00:00 2001 From: Robert Baker Date: Wed, 3 Jun 2015 16:51:31 -0700 Subject: [PATCH 25/48] Added Numbro typedefs (taken from NumeralJS and renamed). Numbro is a maintained fork of the now unmaintained numeraljs. --- numbro/numbro-commonjs-tests.ts | 44 ++++++++++++++++++++++++++++++ numbro/numbro-tests.ts | 43 +++++++++++++++++++++++++++++ numbro/numbro.d.ts | 48 +++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+) create mode 100644 numbro/numbro-commonjs-tests.ts create mode 100644 numbro/numbro-tests.ts create mode 100644 numbro/numbro.d.ts diff --git a/numbro/numbro-commonjs-tests.ts b/numbro/numbro-commonjs-tests.ts new file mode 100644 index 0000000000..c428a475e8 --- /dev/null +++ b/numbro/numbro-commonjs-tests.ts @@ -0,0 +1,44 @@ +/// +import numbro = require("numbro"); + +var valueFormat: string = numbro(1000).format('0,0'); +// '1,000' + +var valueUnformat: number = numbro().unformat('($10,000.00)'); +// '-10000' + +var value3: Numbro = numbro(1000); +var added: Numbro = value3.add(10); +// 1010 + +var value4: Numbro = numbro(1000); +var formatValue4a: string = value4.format('0,0'); +// '1,000' +var formatValue4b: number = value4.value(); +// 1000 + +var value5: Numbro = numbro(); +value5.set(1000); +var value5Num: number = value5.value(); +// 1000 + +var value6: Numbro = numbro(1000); +var value: number = 100; +var difference = value6.difference(value); +// 900 + +var value7: Numbro = numbro(0); +numbro.zeroFormat('N/A'); +var zeroString: string = value7.format('0.0'); +// 'N/A' + +var a: Numbro = numbro(1000); +var b: Numbro = numbro(a); +var c: Numbro = a.clone(); + +var aVal: number = a.set(2000).value(); +// 2000 +var bVal: number = b.value(); +// 1000 +var cVal: number = c.add(10).value(); +// 1010 diff --git a/numbro/numbro-tests.ts b/numbro/numbro-tests.ts new file mode 100644 index 0000000000..0b18e898dd --- /dev/null +++ b/numbro/numbro-tests.ts @@ -0,0 +1,43 @@ +/// + +var valueFormat: string = numbro(1000).format('0,0'); +// '1,000' + +var valueUnformat: number = numbro().unformat('($10,000.00)'); +// '-10000' + +var value3: Numbro = numbro(1000); +var added: Numbro = value3.add(10); +// 1010 + +var value4: Numbro = numbro(1000); +var formatValue4a: string = value4.format('0,0'); +// '1,000' +var formatValue4b: number = value4.value(); +// 1000 + +var value5: Numbro = numbro(); +value5.set(1000); +var value5Num: number = value5.value(); +// 1000 + +var value6: Numbro = numbro(1000); +var value: number = 100; +var difference = value6.difference(value); +// 900 + +var value7: Numbro = numbro(0); +numbro.zeroFormat('N/A'); +var zeroString: string = value7.format('0.0'); +// 'N/A' + +var a: Numbro = numbro(1000); +var b: Numbro = numbro(a); +var c: Numbro = a.clone(); + +var aVal: number = a.set(2000).value(); +// 2000 +var bVal: number = b.value(); +// 1000 +var cVal: number = c.add(10).value(); +// 1010 diff --git a/numbro/numbro.d.ts b/numbro/numbro.d.ts new file mode 100644 index 0000000000..a2c1f8d7a7 --- /dev/null +++ b/numbro/numbro.d.ts @@ -0,0 +1,48 @@ +// Type definitions for Numbro.js +// Project: https://github.com/foretagsplatsen/numbro +// Definitions by: Vincent Bortone +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface NumbroLanguage { + delimiters: { + thousands: string; + decimal: string; + }; + abbreviations: { + thousand: string; + million: string; + billion: string; + trillion: string; + }; + ordinal(num: number): string; + currency: { + symbol: string; + }; +} + +interface Numbro { + (value?: any): Numbro; + version: string; + isNumbro: boolean; + language(key: string, values?: NumbroLanguage): Numbro; + zeroFormat(format: string): string; + clone(): Numbro; + format(inputString: string): string; + unformat(inputString: string): number; + value(): number; + valueOf(): number; + set (value: any): Numbro; + add(value: any): Numbro; + subtract(value: any): Numbro; + multiply(value: any): Numbro; + divide(value: any): Numbro; + difference(value: any): number; +} + +declare var numbro: Numbro; + +declare module "numbro" { + + export = numbro; + +} From 5a7baf8191c735673ed3c4db783379ecd98af0be Mon Sep 17 00:00:00 2001 From: Sam Herrmann Date: Wed, 3 Jun 2015 22:06:25 -0400 Subject: [PATCH 26/48] Add missing "parent" property to angular-ui-router state configuration object As documented here: http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$stateProvider --- angular-ui-router/angular-ui-router-tests.ts | 11 ++++++++++- angular-ui-router/angular-ui-router.d.ts | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/angular-ui-router/angular-ui-router-tests.ts b/angular-ui-router/angular-ui-router-tests.ts index c31bb16889..a43f9e9bca 100644 --- a/angular-ui-router/angular-ui-router-tests.ts +++ b/angular-ui-router/angular-ui-router-tests.ts @@ -64,7 +64,16 @@ myApp.config(( controller: function ($scope: MyAppScope) { $scope.things = ["A", "Set", "Of", "Things"]; } - }).state('index', { + }) + .state('list', { + parent: 'state3', + url: "/list", + templateUrl: "partials/state3.list.html", + controller: function ($scope: MyAppScope) { + $scope.things = ["A", "Set", "Of", "Things"]; + } + }) + .state('index', { url: "", views: { "viewA": { template: "index.viewA" }, diff --git a/angular-ui-router/angular-ui-router.d.ts b/angular-ui-router/angular-ui-router.d.ts index bfec95156e..acc9342d92 100644 --- a/angular-ui-router/angular-ui-router.d.ts +++ b/angular-ui-router/angular-ui-router.d.ts @@ -30,6 +30,13 @@ declare module angular.ui { * Function (injectable), returns the actual controller function or string. */ controllerProvider?: Function; + + /** + * Specifies the parent state of this state + */ + parent?: string | IState + + resolve?: {}; /** * A url with optional parameters. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed. From 08fee9265fb493ba6a308f009677696ee063a5d0 Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Thu, 4 Jun 2015 00:18:28 -0400 Subject: [PATCH 27/48] remove IDayOfWeekMonth in favor of a tuple of [number, number] with refactor --- node-calendar/node-calendar-tests.ts | 3 +-- node-calendar/node-calendar.d.ts | 14 +++----------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/node-calendar/node-calendar-tests.ts b/node-calendar/node-calendar-tests.ts index 5a4a40a466..6de5d6cc48 100644 --- a/node-calendar/node-calendar-tests.ts +++ b/node-calendar/node-calendar-tests.ts @@ -1,5 +1,4 @@ /// -/// import node_calendar = require('node-calendar'); @@ -97,7 +96,7 @@ function assertIsNumber(n: number) { assert(typeof n == 'number', 'Should be a number'); } -function assertDayOfWeekMonth(d: IDayOfWeekMonth) { +function assertDayOfWeekMonth(d: [number, number]) { assert(d instanceof Array, 'Day of weak/month should be an array'); assert(d.length == 2, 'Day of weak/month array should contain 2 items'); assert(typeof d[0] == 'number', 'Day of month should be a number'); diff --git a/node-calendar/node-calendar.d.ts b/node-calendar/node-calendar.d.ts index a1c3f0500a..3839d65410 100755 --- a/node-calendar/node-calendar.d.ts +++ b/node-calendar/node-calendar.d.ts @@ -3,14 +3,6 @@ // Definitions by: Luzian Zagadinow // Definitions: https://github.com/borisyankov/DefinitelyTyped -interface IDayOfWeekMonth extends Array { - /** dayOfMonth */ - 0: number; - - /** dayOfWeek */ - 1: number; -} - interface IWeekRow extends Array { [dayIndex: number]: T; } @@ -183,7 +175,7 @@ declare module 'node-calendar' { * @param {number} month * Month for which the calendar should be generated. */ - itermonthdays2(year: number, month: number): IDayOfWeekMonth[]; + itermonthdays2(year: number, month: number): [number, number][]; /** * A matrix (array of array) representing a month's calendar. @@ -217,7 +209,7 @@ declare module 'node-calendar' { * @param {number} month * Month for which the calendar should be generated. */ - monthdays2calendar(year: number, month: number): IMonthGrid; + monthdays2calendar(year: number, month: number): IMonthGrid<[number, number]>; /** * The specified year ready for formatting. The return value is an array @@ -254,7 +246,7 @@ declare module 'node-calendar' { * @param {number} width * The number of months to include in each row. Default: 3 */ - yeardays2calendar(year: number, width?: number): IYearGrid; + yeardays2calendar(year: number, width?: number): IYearGrid<[number, number]>; } // Undocumented From 66feb94be0a3c2f60cd2a64744f271c8fb3748a6 Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Thu, 4 Jun 2015 01:38:15 -0400 Subject: [PATCH 28/48] add missing definitions for module functions add line breaks in documentation to make readable --- node-calendar/node-calendar.d.ts | 169 ++++++++++++++++++++++++++++--- 1 file changed, 154 insertions(+), 15 deletions(-) diff --git a/node-calendar/node-calendar.d.ts b/node-calendar/node-calendar.d.ts index 3839d65410..ae4b16cad1 100755 --- a/node-calendar/node-calendar.d.ts +++ b/node-calendar/node-calendar.d.ts @@ -15,7 +15,7 @@ interface IMonthRow extends Array> { [monthColumnIndex: number]: IMonthGrid; } -interface IYearGrid extends Array>{ +interface IYearGrid extends Array> { [monthRowIndex: number]: IMonthRow; } @@ -59,7 +59,7 @@ declare module 'node-calendar' { export var MARCH: number; /** 4 */ - export var APRIL:number; + export var APRIL: number; /** 5 */ export var MAY: number; @@ -150,6 +150,7 @@ declare module 'node-calendar' { * * @param {number} year * Year for which the calendar should be generated. + * * @param {number} month * Month for which the calendar should be generated. */ @@ -161,6 +162,7 @@ declare module 'node-calendar' { * * @param {number} year * Year for which the calendar should be generated. + * * @param {number} month * Month for which the calendar should be generated. */ @@ -172,6 +174,7 @@ declare module 'node-calendar' { * * @param {number} year * Year for which the calendar should be generated. + * * @param {number} month * Month for which the calendar should be generated. */ @@ -183,6 +186,7 @@ declare module 'node-calendar' { * * @param {number} year * Year for which the calendar should be generated. + * * @param {number} month * Month for which the calendar should be generated. */ @@ -194,6 +198,7 @@ declare module 'node-calendar' { * * @param {number} year * Year for which the calendar should be generated. + * * @param {number} month * Month for which the calendar should be generated. */ @@ -206,6 +211,7 @@ declare module 'node-calendar' { * * @param {number} year * Year for which the calendar should be generated. + * * @param {number} month * Month for which the calendar should be generated. */ @@ -219,6 +225,7 @@ declare module 'node-calendar' { * * @param {number} year * Year for which the calendar should be generated. + * * @param {number} width * The number of months to include in each row. Default: 3 */ @@ -230,7 +237,8 @@ declare module 'node-calendar' { * month are zero. * * @param {number} year - * Year for which the calendar should be generated. + * Year for which the calendar should be generated + * * @param {number} width * The number of months to include in each row. Default: 3 */ @@ -242,22 +250,153 @@ declare module 'node-calendar' { * Day numbers outside this month are zero. * * @param {number} year - * Year for which the calendar should be generated. + * Year for which the calendar should be generated + * * @param {number} width * The number of months to include in each row. Default: 3 */ yeardays2calendar(year: number, width?: number): IYearGrid<[number, number]>; } - // Undocumented - //export function isleap(year: number): boolean; - //export function leapdays(beginYear: number, endYear: number): number; - //export function monthrange(year: number, month: number): number[]; - //export function weekday(year: number, month: number, day: number): number; - //export function timegm(dateParams: number[]): number; - //export function IllegalLocaleError(): Error; - //export function IllegalDayError(): Error; - //export function IllegalMonthError(): Error; - //export function IllegalTimeError(): Error; - //export function IllegalWeekdayError(): Error; + /** + * @param {number} year + * Year to test. + * + * @return {boolean} + * true for leap years, false for non-leap years. + */ + export function isleap(year: number): boolean; + + /** + * @param {number} y1 + * Beginning year in the range to test. + * + * @param {number} y2 + * Ending year in the range to test. + * + * @return {number} + * Number of leap years in range (y1...y2). Assumes y1 <= y2. + */ + export function leapdays(y1: number, y2: number): number; + + /** + * @param {number} year + * Year for which the range should be calculated. + * + * @param {number} month + * Month for which the range should be calculated. + * + * @throws {IllegalMonthError} if the provided month is invalid. + * + * @return {number[]} + * starting weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month. + */ + export function monthrange(year: number, month: number): number[]; + + /** + * Sets the locale for use in extracting month and weekday names. + * + * @param {string} locale + * Locale to set on the calendar object. Default: en_US + * + * @throws {IllegalLocaleError} if the provided locale is invalid. + */ + export function setlocale(locale?: string); + + /** + * Unrelated but handy function to calculate Unix timestamp from GMT. + * + * @param timegmt {[number, number, number, number, number, number]} + * An array containing the elements from a time structure dataset. + * Format: [tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec] + * + * @throws {IllegalMonthError} if the provided month element is invalid. + * + * @throws {IllegalDayError} if the provided day element is invalid. + * + * @throws {IllegalTimeError} if any of the the provided time elements are invalid. + * + * @return {number} + * Unix timestamp from GMT. + */ + export function timegm(timegmt: [number, number, number, number, number, number]): number; + + /** + * @param {number} year + * Year for which the weekday should be calculated. + * + * @param {number} month + * Month for which the weekday should be calculated. + * + * @param {number} day + * Day for which the weekday should be calculated. + * + * @throws {IllegalMonthError} if the provided month element is invalid. + * + * @throws {IllegalDayError} if the provided day element is invalid. + * + * @return {number} + * weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12), day (1-31). + */ + export function weekday(year: number, month: number, day: number): number; + + /** + * Error indicating a nonexistent or unsupported locale specified. + * + * @param {string} message + * Optional custom error message. + */ + export class IllegalLocaleError implements Error { + public name: string; + public message: string; + constructor(message?: string) + } + + /** + * Error indicating a day index specified outside of the valid range. + * + * @param {string} message + * Optional custom error message. + */ + export class IllegalDayError implements Error { + public name: string; + public message: string; + constructor(message?: string) + } + + /** + * Error indicating a month index specified outside of the expected range (1-12 ~ Jan-Dec). + * + * @param {string} message + * Optional custom error message. + */ + export class IllegalMonthError implements Error { + public name: string; + public message: string; + constructor(message?: string) + } + + /** + * Error indicating a time element is outside of the valid range. + * + * @param {string} message + * Optional custom error message. + */ + export class IllegalTimeError implements Error { + public name: string; + public message: string; + constructor(message?: string) + } + + /** + * Error indicating a weekday index specified outside of the expected range (0-6 ~ Mon-Sun). + * + * @param {string} message + * Optional custom error message. + */ + export class IllegalWeekdayError implements Error { + public name: string; + public message: string; + constructor(message?: string) + } } \ No newline at end of file From cc6e98cc6be9849851c2d8879ec5c9134145b988 Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Thu, 4 Jun 2015 01:46:31 -0400 Subject: [PATCH 29/48] add tests to reflect new definitions --- node-calendar/node-calendar-tests.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/node-calendar/node-calendar-tests.ts b/node-calendar/node-calendar-tests.ts index 6de5d6cc48..b57cd9f845 100644 --- a/node-calendar/node-calendar-tests.ts +++ b/node-calendar/node-calendar-tests.ts @@ -88,6 +88,25 @@ assertYearGrid(cal.yeardatescalendar(2009, 3), assertIsDate); assertYearGrid(cal.yeardays2calendar(2008, 2), assertDayOfWeekMonth); assertYearGrid(cal.yeardayscalendar(2007, 4), assertIsNumber); +node_calendar.setlocale('en_US'); + +assertIsError(new node_calendar.IllegalDayError()); +assertIsError(new node_calendar.IllegalLocaleError()); +assertIsError(new node_calendar.IllegalMonthError()); +assertIsError(new node_calendar.IllegalTimeError); +assertIsError(new node_calendar.IllegalWeekdayError()); + +assertIsBoolean(node_calendar.isleap(2000)); +assertIsNumber(node_calendar.weekday(2015, node_calendar.JULY, 7)); +assertIsNumber(node_calendar.leapdays(2000, 2010)); + +node_calendar.monthrange(2015, node_calendar.JANUARY).forEach(assertIsNumber); + +var timegmt:[number,number,number,number,number,number] = [2014, node_calendar.JULY, 7, 12, 41, 59]; +assertIsNumber(node_calendar.timegm(timegmt)); + + +// FUNCTIONS ------------------------------------------------------------------ function assertIsDate(d: Date) { assert(d instanceof Date, 'Should be a date'); } @@ -96,6 +115,10 @@ function assertIsNumber(n: number) { assert(typeof n == 'number', 'Should be a number'); } +function assertIsBoolean(b: boolean) { + assert(typeof b == 'boolean', 'Should be a boolean'); +} + function assertDayOfWeekMonth(d: [number, number]) { assert(d instanceof Array, 'Day of weak/month should be an array'); assert(d.length == 2, 'Day of weak/month array should contain 2 items'); @@ -122,4 +145,9 @@ function assertYearGrid(grid: IYearGrid, assertItemType: (item: T) => void function assert(condition: boolean, msg?: string): void { if (condition) return; throw new Error(msg); +} + +function assertIsError(error: Error) { + assert(typeof error.name == 'string', 'Error name should exist and be a string'); + assert(typeof error.message == 'string', 'Error message should exist and be a string'); } \ No newline at end of file From 7c4b699df0acd2108fccf00e7fed3e8933eb2327 Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Thu, 4 Jun 2015 01:49:16 -0400 Subject: [PATCH 30/48] specify return type of setlocal() --- node-calendar/node-calendar.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-calendar/node-calendar.d.ts b/node-calendar/node-calendar.d.ts index ae4b16cad1..6f2b7814b6 100755 --- a/node-calendar/node-calendar.d.ts +++ b/node-calendar/node-calendar.d.ts @@ -301,7 +301,7 @@ declare module 'node-calendar' { * * @throws {IllegalLocaleError} if the provided locale is invalid. */ - export function setlocale(locale?: string); + export function setlocale(locale?: string): void; /** * Unrelated but handy function to calculate Unix timestamp from GMT. From 0d8680a11b1d592d10784b94e9a23dd652b5ec65 Mon Sep 17 00:00:00 2001 From: bls Date: Thu, 4 Jun 2015 17:46:55 +1000 Subject: [PATCH 31/48] Add tls.createSecureContext to node.js typing. --- node/node-tests.ts | 11 +++++++++++ node/node.d.ts | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/node/node-tests.ts b/node/node-tests.ts index 8c381bc0ec..7c05c3a219 100644 --- a/node/node-tests.ts +++ b/node/node-tests.ts @@ -7,6 +7,7 @@ import zlib = require("zlib"); import url = require('url'); import util = require("util"); import crypto = require("crypto"); +import tls = require("tls"); import http = require("http"); import net = require("net"); import dgram = require("dgram"); @@ -143,6 +144,16 @@ function crypto_cipher_decipher_buffer_test() { assert.deepEqual(clearText2, clearText); } +//////////////////////////////////////////////////// +/// TLS tests : http://nodejs.org/api/tls.html +//////////////////////////////////////////////////// + +var ctx: tls.SecureContext = tls.createSecureContext({ + key: "NOT REALLY A KEY", + cert: "SOME CERTIFICATE", +}); +var blah = ctx.context; + //////////////////////////////////////////////////// // Make sure .listen() and .close() retuern a Server instance diff --git a/node/node.d.ts b/node/node.d.ts index 2543ccacab..f9b3a68a89 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -1236,11 +1236,27 @@ declare module "tls" { cleartext: any; } + export interface SecureContextOptions { + pfx?: any; //string | buffer + key?: any; //string | buffer + passphrase?: string; + cert?: any; // string | buffer + ca?: any; // string | buffer + crl?: any; // string | string[] + ciphers?: string; + honorCipherOrder?: boolean; + } + + export interface SecureContext { + context: any; + } + export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) =>void ): Server; export function connect(options: TlsOptions, secureConnectionListener?: () =>void ): ClearTextStream; export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + export function createSecureContext(details: SecureContextOptions): SecureContext; } declare module "crypto" { From 034379ca892327cb722466975d5baa71981a61cf Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Thu, 4 Jun 2015 14:18:34 -0400 Subject: [PATCH 32/48] change return type of monthrange to a tuple --- node-calendar/node-calendar.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-calendar/node-calendar.d.ts b/node-calendar/node-calendar.d.ts index 6f2b7814b6..e37f438fb8 100755 --- a/node-calendar/node-calendar.d.ts +++ b/node-calendar/node-calendar.d.ts @@ -288,10 +288,10 @@ declare module 'node-calendar' { * * @throws {IllegalMonthError} if the provided month is invalid. * - * @return {number[]} + * @return {[number, number]} * starting weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month. */ - export function monthrange(year: number, month: number): number[]; + export function monthrange(year: number, month: number): [number, number]; /** * Sets the locale for use in extracting month and weekday names. From e118e97028b155ef13e755bcee92afbf9425cc1a Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Thu, 4 Jun 2015 14:29:53 -0400 Subject: [PATCH 33/48] formatting: correct whitespace inconsistencies --- node-calendar/node-calendar.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/node-calendar/node-calendar.d.ts b/node-calendar/node-calendar.d.ts index e37f438fb8..6d5c12eece 100755 --- a/node-calendar/node-calendar.d.ts +++ b/node-calendar/node-calendar.d.ts @@ -348,7 +348,7 @@ declare module 'node-calendar' { */ export class IllegalLocaleError implements Error { public name: string; - public message: string; + public message: string; constructor(message?: string) } @@ -360,7 +360,7 @@ declare module 'node-calendar' { */ export class IllegalDayError implements Error { public name: string; - public message: string; + public message: string; constructor(message?: string) } @@ -372,7 +372,7 @@ declare module 'node-calendar' { */ export class IllegalMonthError implements Error { public name: string; - public message: string; + public message: string; constructor(message?: string) } @@ -384,7 +384,7 @@ declare module 'node-calendar' { */ export class IllegalTimeError implements Error { public name: string; - public message: string; + public message: string; constructor(message?: string) } @@ -396,7 +396,7 @@ declare module 'node-calendar' { */ export class IllegalWeekdayError implements Error { public name: string; - public message: string; + public message: string; constructor(message?: string) } } \ No newline at end of file From 42cb5d2749a91f518edc39cf77464149fb6d055e Mon Sep 17 00:00:00 2001 From: Luzian Zagadinow Date: Thu, 4 Jun 2015 15:07:31 -0400 Subject: [PATCH 34/48] move @param documentation from Error classes at their class level to the constructor where they belong. --- node-calendar/node-calendar.d.ts | 60 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/node-calendar/node-calendar.d.ts b/node-calendar/node-calendar.d.ts index 6d5c12eece..204ec69216 100755 --- a/node-calendar/node-calendar.d.ts +++ b/node-calendar/node-calendar.d.ts @@ -340,63 +340,63 @@ declare module 'node-calendar' { */ export function weekday(year: number, month: number, day: number): number; - /** - * Error indicating a nonexistent or unsupported locale specified. - * - * @param {string} message - * Optional custom error message. - */ + /** Error indicating a nonexistent or unsupported locale specified. */ export class IllegalLocaleError implements Error { public name: string; public message: string; + + /** + * @param {string} message + * Optional custom error message. + */ constructor(message?: string) } - /** - * Error indicating a day index specified outside of the valid range. - * - * @param {string} message - * Optional custom error message. - */ + /** Error indicating a day index specified outside of the valid range. */ export class IllegalDayError implements Error { public name: string; public message: string; + + /** + * @param {string} message + * Optional custom error message. + */ constructor(message?: string) } - /** - * Error indicating a month index specified outside of the expected range (1-12 ~ Jan-Dec). - * - * @param {string} message - * Optional custom error message. - */ + /** Error indicating a month index specified outside of the expected range (1-12 ~ Jan-Dec). */ export class IllegalMonthError implements Error { public name: string; public message: string; + + /** + * @param {string} message + * Optional custom error message. + */ constructor(message?: string) } - /** - * Error indicating a time element is outside of the valid range. - * - * @param {string} message - * Optional custom error message. - */ + /** Error indicating a time element is outside of the valid range. */ export class IllegalTimeError implements Error { public name: string; public message: string; + + /** + * @param {string} message + * Optional custom error message. + */ constructor(message?: string) } - /** - * Error indicating a weekday index specified outside of the expected range (0-6 ~ Mon-Sun). - * - * @param {string} message - * Optional custom error message. - */ + /** Error indicating a weekday index specified outside of the expected range (0-6 ~ Mon-Sun). */ export class IllegalWeekdayError implements Error { public name: string; public message: string; + + /** + * @param {string} message + * Optional custom error message. + */ constructor(message?: string) } } \ No newline at end of file From 4e5a848013335eecb13276eaa5c793c02eab3e72 Mon Sep 17 00:00:00 2001 From: Ryan McNamara Date: Thu, 4 Jun 2015 13:42:34 -0700 Subject: [PATCH 35/48] Created type definitions and tests for heap: https://www.npmjs.com/package/heap --- heap/heap-tests.ts | 96 ++++++++++++++++++++++++++++++++++++++++++++++ heap/heap.d.ts | 84 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 heap/heap-tests.ts create mode 100644 heap/heap.d.ts diff --git a/heap/heap-tests.ts b/heap/heap-tests.ts new file mode 100644 index 0000000000..605425893c --- /dev/null +++ b/heap/heap-tests.ts @@ -0,0 +1,96 @@ +/// + +var numberComparator = (a: number, b: number) => { return a.toString().length - b.toString().length; }; +var stringComparator = (a: string, b: string) => { return a.length - b.length; }; + +// Test constructor +var numberHeap: Heap = new Heap(); +numberHeap = new Heap(numberComparator); + +var stringHeap: Heap = new Heap(); +stringHeap = new Heap(stringComparator); + +// Test instance methods +numberHeap.push(0); +stringHeap.push("foo"); +numberHeap.insert(0); +stringHeap.insert("foo"); + +var numberIdentifier: number = numberHeap.pop(); +var stringIdentifier: string = stringHeap.pop(); + +numberIdentifier = numberHeap.replace(1); +stringIdentifier = stringHeap.replace("bar"); + +numberIdentifier = numberHeap.pushpop(2); +stringIdentifier = stringHeap.pushpop("bar"); + +numberHeap.heapify(); +stringHeap.heapify(); + +numberHeap.updateItem(2); +stringHeap.updateItem("bar"); + +var booleanIdentifier: boolean = numberHeap.empty(); +booleanIdentifier = stringHeap.empty(); + +numberIdentifier = numberHeap.size(); +numberIdentifier = stringHeap.size(); + +var numberArray: number[] = numberHeap.toArray(); +var stringArray: string[] = stringHeap.toArray(); + +numberHeap = numberHeap.clone(); +numberHeap = numberHeap.copy(); + +stringHeap = stringHeap.clone(); +stringHeap = stringHeap.copy(); + +// Test static methods +Heap.push(numberArray, 3); +Heap.push(numberArray, 3, numberComparator); + +Heap.push(stringArray, "foo"); +Heap.push(stringArray, "foo", stringComparator); + +numberIdentifier = Heap.pop(numberArray); +numberIdentifier = Heap.pop(numberArray, numberComparator); + +stringIdentifier = Heap.pop(stringArray); +stringIdentifier = Heap.pop(stringArray, stringComparator); + +numberIdentifier = Heap.replace(numberArray, 1); +numberIdentifier = Heap.replace(numberArray, 1, numberComparator); + +stringIdentifier = Heap.replace(stringArray, "foo"); +stringIdentifier = Heap.replace(stringArray, "foo", stringComparator); + +numberIdentifier = Heap.pushpop(numberArray, 1); +numberIdentifier = Heap.pushpop(numberArray, 1, numberComparator); + +stringIdentifier = Heap.pushpop(stringArray, "foo"); +stringIdentifier = Heap.pushpop(stringArray, "foo", stringComparator); + +Heap.heapify(numberArray); +Heap.heapify(numberArray, numberComparator); + +Heap.heapify(stringArray); +Heap.heapify(stringArray, stringComparator); + +Heap.updateItem(numberArray, 1); +Heap.updateItem(numberArray, 1, numberComparator); + +Heap.updateItem(stringArray, "foo"); +Heap.updateItem(stringArray, "foo", stringComparator); + +Heap.nlargest(numberArray, 1); +Heap.nlargest(numberArray, 1, numberComparator); + +Heap.nlargest(stringArray, 1); +Heap.nlargest(stringArray, 1, stringComparator); + +Heap.nsmallest(numberArray, 1); +Heap.nsmallest(numberArray, 1, numberComparator); + +Heap.nsmallest(stringArray, 1); +Heap.nsmallest(stringArray, 1, stringComparator); diff --git a/heap/heap.d.ts b/heap/heap.d.ts new file mode 100644 index 0000000000..3ec573d1cc --- /dev/null +++ b/heap/heap.d.ts @@ -0,0 +1,84 @@ +// Type definitions for heap 0.2.6 +// Project: https://github.com/qiao/heap.js +// Definitions by: Ryan McNamara +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare class Heap { + + // Constructor + + constructor(cmp?: (a: T, b: T) => number); + + // Instance Methods + + // Push item onto heap. + push(item: T): void; + insert(item: T): void; + + // Pop the smallest item off the heap and return it. + pop(): T; + + // Return the smallest item of the heap. + peek(): T; + top(): T; + front(): T; + + // Pop and return the current smallest value, and add the new item. + // This is more efficient than pop() followed by push(), and can be more appropriate when using a fixed size heap. + // Note that the value returned may be larger than item! + replace(item: T): T; + + // Fast version of a push followed by a pop. + pushpop(item: T): T; + + // Rebuild the heap. This method may come handy when the priority of the internal data is being modified. + heapify(): void; + + // Update the position of the given item in the heap. This function should be called every time the item is being modified. + updateItem(item: T): void; + + // Determine whether the heap is empty. + empty(): boolean; + + // Get the number of elements stored in the heap. + size(): number; + + // Return the array representation of the heap. (note: the array is a shallow copy of the heap's internal nodes) + toArray(): T[]; + + // Return a clone of the heap. (note: the internal data is a shallow copy of the original one) + clone(): Heap + copy(): Heap + + // Static Methods + + // Push item onto array, maintaining the heap invariant. + static push(array: T[], item: T, cmp?: (a: T, b: T) => number): void; + + // Pop the smallest item off the array, maintaining the heap invariant. + static pop(array: T[], cmp?: (a: T, b: T) => number): T; + + // Pop and return the current smallest value, and add the new item. + // This is more efficient than heappop() followed by heappush(), and can be more appropriate when using a fixed size heap. Note that the value returned may be larger than item! + static replace(array: T[], item: T, cmp?: (a: T, b: T) => number): T; + + // Fast version of a heappush followed by a heappop. + static pushpop(array: T[], item: T, cmp?: (a: T, b: T) => number): T; + + // Build the heap. + static heapify(array: T[], cmp?: (a: T, b: T) => number): Heap; + + // Update the position of the given item in the heap. This function should be called every time the item is being modified. + static updateItem(array: T[], item: T, cmp?: (a: T, b: T) => number): void; + + // Find the n largest elements in a dataset. + static nlargest(array: T[], n: number, cmp?: (a: T, b: T) => number): T[]; + + // Find the n smallest elements in a dataset. + static nsmallest(array: T[], n: number, cmp?: (a: T, b: T) => number): T[]; + +} + +declare module 'heap' { + export = Heap; +} From 85d9af51b40179a0e494a04e115afed54b13cc39 Mon Sep 17 00:00:00 2001 From: Igor Kriklivets Date: Fri, 5 Jun 2015 18:54:04 +0300 Subject: [PATCH 36/48] Update to 15.1.3 --- devextreme/14.2/dx.devextreme-14.2.7.d.ts | 5813 +++++++++++++++++++++ devextreme/dx.devextreme.d.ts | 1096 +++- 2 files changed, 6656 insertions(+), 253 deletions(-) create mode 100644 devextreme/14.2/dx.devextreme-14.2.7.d.ts diff --git a/devextreme/14.2/dx.devextreme-14.2.7.d.ts b/devextreme/14.2/dx.devextreme-14.2.7.d.ts new file mode 100644 index 0000000000..a1d361f540 --- /dev/null +++ b/devextreme/14.2/dx.devextreme-14.2.7.d.ts @@ -0,0 +1,5813 @@ +// 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/devextreme/dx.devextreme.d.ts b/devextreme/dx.devextreme.d.ts index a1d361f540..4825e80b2e 100644 --- a/devextreme/dx.devextreme.d.ts +++ b/devextreme/dx.devextreme.d.ts @@ -1,11 +1,11 @@ -// Type definitions for DevExtreme 14.2.7 +// Type definitions for DevExtreme 15.1.3 // Project: http://js.devexpress.com/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// -declare module DevExpress { +declare module DevExpress { /** A mixin that provides a capability to fire and subscribe to events. */ export interface EventsMixin { /** Subscribes to a specified event. */ @@ -35,7 +35,7 @@ declare module DevExpress { brokenRules: any[]; validators: IValidator[]; } - export interface GroupConfig extends EventsMixin { + export interface GroupConfig extends EventsMixin { group: any; validators: IValidator[]; validate(): ValidationGroupValidationResult; @@ -56,7 +56,7 @@ declare module DevExpress { /** 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 function registerModelForValidation(model: Object) : void; } export var hardwareBackButton: JQueryCallback; /** Processes the hardware back button click. */ @@ -86,21 +86,23 @@ declare module DevExpress { } /** 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. */ + /** Defines 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 period to wait before the animation of the next stagger item starts. */ + staggerDelay?: 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. */ + /** Specifies the initial animation state. */ from?: any; /** A function called before animation is started. */ start?: (element: JQuery, config: AnimationOptions) => void; - /** Specifies the initial widget animation state. */ + /** Specifies a final animation state. */ to?: any; /** A string value specifying the animation type. */ type?: string; @@ -108,12 +110,39 @@ declare module DevExpress { direction?: string; } /** Animates the specified element. */ - export function animate(element: HTMLElement, config: Object): Object; + export function animate(element: HTMLElement, config: AnimationOptions): 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; } + /** The manager that performs several specified animations at a time. */ + export class TransitionExecutor { + /** Deletes all the animations registered in the Transition Executor by using the enter(elements, animation) and leave(elements, animation) methods. */ + reset(): void; + /** Registers a set of elements that should be animated as "entering" using the specified animation configuration. */ + enter(elements: JQuery, animation: any): void; + /** Registers a set of elements that should be animated as "leaving" using the specified animation configuration. */ + leave(elements: JQuery, animation: any): void; + /** Starts all the animations registered using the enter(elements, animation) and leave(elements, animation) methods beforehand. */ + start(config: Object): JQueryPromise; + } + export class AnimationPresetCollection { + /** Resets all the changes made in the animation repository. */ + resetToDefaults(): void; + /** Deletes the specified animation or clears all the animation repository, if an animation name is not passed. */ + clear(name: string): void; + /** Adds the specified animation preset to the animation repository by the specified name. */ + registerPreset(name: string, config: any): void; + /** Applies the changes made in the animation repository. */ + applyChanges(): void; + /** Returns the configuration of the animation found in the animation repository by the specified name for the current device. */ + getPreset(name: string): void; + /** Registers predefined animations in the animation repository. */ + registerDefaultPresets(): void; + } + /** A repository of animations. */ + export var animationPresets: AnimationPresetCollection; /** 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. */ @@ -132,12 +161,12 @@ declare module DevExpress { 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; + /** Specifies a performance grade of the current device. */ + grade?: string; } export var orientationChanged: JQueryCallback; /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ @@ -167,6 +196,8 @@ declare module DevExpress { offset?: string; } export interface ComponentOptions { + /** A handler for the initialized event. */ + onInitialized?: Function; /** A handler for the optionChanged event. */ onOptionChanged?: Function; /** A handler for the disposing event. */ @@ -193,6 +224,10 @@ declare module DevExpress { export interface DOMComponentOptions extends ComponentOptions { /** Specifies whether or not the current component supports a right-to-left representation. */ rtlEnabled?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the width of the widget. */ + width?: any; } /** A base class for all components. */ export class DOMComponent extends Component { @@ -339,17 +374,12 @@ declare module DevExpress { /** Creates the Query object for the underlying array. */ createQuery(): Query; } - interface Promise { + 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. */ @@ -622,26 +652,19 @@ declare module DevExpress { } /** 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; + /** Specifies a shortcut key that sets focus on the widget element. */ + accessKey?: string; /** 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. */ @@ -654,6 +677,8 @@ declare module DevExpress { repaint(): void; /** Sets focus on the widget. */ focus(): void; + /** Registers a handler for pressing of the specified key. */ + registerKeyHandler(key: string, handler: Function): void; } export interface CollectionWidgetOptions extends WidgetOptions { /** A data source used to fetch data to be displayed by the widget. */ @@ -741,10 +766,10 @@ declare module DevExpress { /** 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; + /** @docid Editor */ + export class Editor extends Widget { + /** @docid EditorMethods_reset */ + reset(): void; } /** An object that serves as a namespace for methods displaying a message in an application/site. */ export var dialog: { @@ -781,7 +806,138 @@ declare module DevExpress { }; } } -declare module DevExpress.framework { +declare module DevExpress.data { + export interface XmlaStoreOptions { + /** The HTTP address to an XMLA OLAP server. */ + url?: string; + /** The name of the database associated with the Store. */ + catalog?: string; + /** The cube name. */ + cube?: string; + } + /** A Store that provides access to an OLAP cube using the XMLA standard. */ + export class XmlaStore { + constructor(options: XmlaStoreOptions); + } + export interface PivotGridField { + index?: number; + /** A boolean value specifying whether or not the field is visible in the pivot grid and the Field Chooser. */ + visible?: boolean; + /** Name of the data source field containing data for the pivot grid field. */ + dataField?: string; + /** A caption that will be displayed in the pivot grid's field chooser to identify the field. */ + caption?: string; + /** Specifies a type of field values. */ + dataType?: string; + /** Specifies how the values of the current field are combined into groups. Cannot be used for the XmlaStore store type. */ + groupInterval?: any; + /** Specifies how to aggregate field data. Cannot be used for th XmlaStore store type. */ + summaryType?: string; + /** Allows you to use a custom aggregate function to calculate the summary values. Cannot be used for the XmlaStore store type. */ + calculateCustomSummary?: (options: { + summaryProcess?: string; + value?: any; + totalValue?: any; + }) => void; + /** Specifies the function that determines how to split data from the data source into ranges for header items. Cannot be used for the XmlaStore store type. */ + selector?: (data: Object) => any; + /** Type of the area where the field is located. */ + area?: string; + /** Index among the other fields displayed within the same area. */ + areaIndex?: number; + /** The name of the folder in which the field is located. */ + displayFolder?: string; + /** The name of the group to which the field belongs. */ + groupName?: string; + /** The index of the field within a group. */ + groupIndex?: number; + /** Specifies the initial sort order of field values. */ + sortOrder?: string; + /** Specifies how field data should be sorted. Can be used for the XmlaStore store type only. */ + sortBy?: string; + /** Specifies the data field against which the header items of this field should be sorted. */ + sortBySummaryField?: string; + /** The array of field names that specify a path to column/row whose summary field is used for sorting of this field's header items. */ + sortBySummaryPath?: Array; + /** The filter values for the current field. */ + filterValues?: Array; + /** The filter type for the current field. */ + filterType?: string; + /** Indicates whether all header items of the field's header level are expanded. */ + expanded?: boolean; + /** Specifies whether the field should be treated as a Data Field. */ + isMeasure?: boolean; + /** Specifies a display format for field values. */ + format?: string; + /** Specifies a callback function that returns the text to be displayed in the cells of a field. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies a precision for formatted field values. */ + precision?: number; + /** Specifies how to sort the header items. */ + sortingMethod?: (a: Object, b: Object) => number; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies the absolute width of the field in the pivot grid. */ + width?: number; + } + export interface PivotGridDataSourceOptions { + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** Indicates whether or not the automatic field generation from data in the Store is enabled. */ + retrieveFields?: boolean; + /** Specifies data filtering conditions. */ + filter?: Object; + /** An array of pivot grid fields. */ + fields?: Array; + /** Indicates whether or not the local sorting of the XMLA data should be performed. */ + localSorting?: boolean; + /** 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?: Object) => void; + /** A handler for the fieldsPrepared event. */ + onFieldsPrepared?: (e?: Array) => void; + } + /** An object that provides access to data for the dxPivotGrid widget. */ + export class PivotGridDataSource implements EventsMixin { + constructor(options?: PivotGridDataSource); + /** Starts loading data. */ + load(): JQueryPromise; + /** Indicates whether or not the PivotGridDataSource is currently being loaded. */ + isLoading(): boolean; + /** Gets data displayed in a PivotGrid. */ + getData(): Object; + /** Gets all fields within a specified area. */ + getAreaFields(area: string, collectGroups: boolean): Array; + /** Gets all fields from the data source. */ + fields(): Array; + /** Sets the fields option. */ + fields(fields: Array): void; + /** Gets current options of a specified field. */ + field(id: number): PivotGridField; + /** Sets one or more options of a specified field. */ + field(id: number, field: PivotGridField): void; + /** Collapses a specified header item. */ + collapseHeaderItem(area: string, path: Array): void; + /** Expands a specified header item. */ + expandHeaderItem(area: string, path: Array): void; + /** Disposes of all resources associated with this PivotGridDataSource. */ + dispose(): void; + on(eventName: string, eventHandler: Function): PivotGridDataSource; + on(events: { [eventName: string]: Function; }): PivotGridDataSource; + off(eventName: string): PivotGridDataSource; + off(eventName: string, eventHandler: Function): PivotGridDataSource; + } +} +declare module DevExpress.framework { /** An object used to store information on the views displayed in an application. */ export class ViewCache { viewRemoved: JQueryCallback; @@ -804,7 +960,6 @@ declare module DevExpress.framework { 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; @@ -851,18 +1006,19 @@ declare module DevExpress.framework { } export module html { export var layoutSets: Array; + export var animationSets: { [animationSetName: string]: AnimationSet }; + export interface AnimationSet { + [animationName: string]: any + } 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 the animation presets that are used to animate different UI elements in the current application. */ + animationSet?: AnimationSet; /** 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. */ @@ -875,16 +1031,6 @@ declare module DevExpress.framework { 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. */ @@ -1058,7 +1204,7 @@ declare module DevExpress.framework { } } } -declare module DevExpress.ui { +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; @@ -1098,6 +1244,25 @@ declare module DevExpress.ui { constructor(element: JQuery, options?: dxValidationSummaryOptions); constructor(element: Element, options?: dxValidationSummaryOptions); } + /** A widget that displays required content in a resizable element. */ + export interface dxResizableOptions extends DOMComponentOptions { + /** Specifies which borders of the widget element are used as a handle. */ + handles?: string; + /** Specifies the lower width boundary for resizing. */ + minWidth?: number; + /** Specifies the upper width boundary for resizing. */ + maxWidth?: number; + /** Specifies the lower height boundary for resizing. */ + minHeight?: number; + /** Specifies the upper height boundary for resizing. */ + maxHeight?: number; + /** A handler for the resizeStart event. */ + onResizeStart?: Function; + /** A handler for the resize event. */ + onResize?: Function; + /** A handler for the resizeEnd event. */ + onResizeEnd?: Function; + } export interface dxTooltipOptions extends dxPopoverOptions { } /** A tooltip widget. */ @@ -1122,7 +1287,10 @@ declare module DevExpress.ui { valueChangeEvent?: string; /** Specifies whether or not the widget supports searching. */ searchEnabled?: boolean; - /** Specifies whether or not the widget displays items by pages. */ + /** + * Specifies whether or not the widget displays items by pages. + * @deprecated dataSource.paginate.md + */ pagingEnabled?: boolean; /** The text or HTML markup displayed by the widget if the item collection is empty. */ noDataText?: string; @@ -1210,10 +1378,8 @@ declare module DevExpress.ui { 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. */ @@ -1224,6 +1390,14 @@ declare module DevExpress.ui { focusStateEnabled?: boolean; /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ hoverStateEnabled?: boolean; + /** The editor mask, which specifies the format of the entered string. */ + mask?: string; + /** Specifies a mask placeholder character. */ + maskChar?: string; + /** Specifies custom mask rules. */ + maskRules?: Object; + /** A message displayed when the entered text does not match the specified pattern. */ + maskInvalidMessage?: string; } /** A base class for text editing widgets. */ export class dxTextEditor extends Editor { @@ -1370,7 +1544,7 @@ declare module DevExpress.ui { clientHeight(): number; /** Returns the width of the scrollable widget in pixels. */ clientWidth(): number; - /** An HTML element of the widget. */ + /** Returns an HTML element of the widget. */ content(): JQuery; /** Scrolls the widget content by the specified number of pixels. */ scrollBy(distance: number): void; @@ -1411,7 +1585,7 @@ declare module DevExpress.ui { /** 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. */ + /** A Boolean value specifying whether or not to display the title in the popup window. */ showTitle?: boolean; /** The title in the overlay window. */ title?: string; @@ -1465,6 +1639,8 @@ declare module DevExpress.ui { deferRendering?: boolean; /** Specifies whether or not an end-user can drag the widget. */ dragEnabled?: boolean; + /** Specifies whether or not an end user can resize the widget. */ + resizeEnabled?: boolean; /** The height of the widget in pixels. */ height?: any; /** A handler for the hidden event. */ @@ -1583,14 +1759,6 @@ declare module DevExpress.ui { /** 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; @@ -1638,11 +1806,12 @@ declare module DevExpress.ui { 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; + /** Specifies whether or not the widget cleans the search box when the popup window is displayed. */ + cleanSearchOnOpening?: boolean; /** 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. */ @@ -1658,6 +1827,8 @@ declare module DevExpress.ui { nextButtonText?: string; /** A handler for the pageLoading event. */ onPageLoading?: Function; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; pageLoadingAction?: Function; /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ pageLoadingText?: string; @@ -1691,7 +1862,10 @@ declare module DevExpress.ui { 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. */ + /** + * 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. + * @deprecated pageLoadMode.md + */ showNextButton?: boolean; /** The title of the lookup window. */ title?: string; @@ -1709,6 +1883,8 @@ declare module DevExpress.ui { onTitleRendered?: Function; /** Specifies whether or not the widget supports the focused state and keyboard navigation. */ focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showPopupTitle?: boolean; } /** A widget that allows a user to select predefined values from a lookup window. */ export class dxLookup extends dxDropDownList { @@ -1749,52 +1925,16 @@ declare module DevExpress.ui { 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. */ + /** The template to be used for rendering item groups. */ groupTemplate?: any; onItemDeleting?: Function; /** A handler for the itemDeleted event. */ onItemDeleted?: Function; + /** A handler for the groupRendered event. */ + onGroupRendered?: Function; itemDeleteAction?: Function; /** A handler for the itemReordered event. */ onItemReordered?: Function; @@ -1827,19 +1967,40 @@ declare module DevExpress.ui { 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; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying if the list is scrolled by content. */ + scrollByContent?: boolean; + /** A Boolean value specifying if the list is scrolled using the scrollbar. */ + scrollByThumb?: boolean; itemUnselectAction?: Function; onItemContextMenu?: Function; onItemHold?: Function; /** Specifies whether or not an end-user can collapse groups. */ collapsibleGroups?: boolean; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + /** Specifies whether or not to display controls used to select list items. */ + showSelectionControls?: boolean; + /** Specifies whether the list supports single item selection or multi-selection. */ + selectionMode?: string; + selectAllText?: string; + /** 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 holds or swipes an item. */ + menuMode?: string; + /** Specifies whether or not an end user can delete list items. */ + allowItemDeleting?: boolean; + /** Specifies the way a user can delete items from the list. */ + itemDeleteMode?: string; + /** Specifies whether or not an end user can reorder list items. */ + allowItemReordering?: boolean; + /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ + indicateLoading?: boolean; } /** A list widget. */ export class dxList extends CollectionWidget { @@ -1855,11 +2016,6 @@ declare module DevExpress.ui { 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. */ @@ -1886,11 +2042,6 @@ declare module DevExpress.ui { 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. */ @@ -1917,6 +2068,12 @@ declare module DevExpress.ui { slideshowDelay?: number; /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ swipeEnabled?: boolean; + /** Specifies whether or not to display parts of previous and next images along the sides of the current image. */ + wrapAround?: boolean; + /** Specifies if the widget stretches images to fit the total gallery width. */ + stretchImages?: boolean; + /** Specifies the width of an area used to display a single image. */ + initialItemWidth?: number; } /** An image gallery widget. */ export class dxGallery extends CollectionWidget { @@ -1960,6 +2117,10 @@ declare module DevExpress.ui { open(): void; /** Resets the widget's value to null. */ reset(): void; + /** Returns an <input> element of the widget. */ + field(): JQuery; + /** Returns an HTML element of the popup window content. */ + content(): JQuery; } export interface dxDateBoxOptions extends dxTextEditorOptions { /** A format used to display date/time information. */ @@ -1972,14 +2133,24 @@ declare module DevExpress.ui { 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. */ + /** + * Specifies whether or not a user can pick out a date using the drop-down calendar. + * @deprecated Use 'pickerType' option instead. + */ 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. */ + /** + * Specifies whether or not the widget uses the native HTML input element. + * @deprecated Use 'pickerType' option instead. + */ useNative?: boolean; /** Specifies the interval between neighboring values in the popup list in minutes. */ interval?: number; + /** Specifies the maximum zoom level of a calendar, which is used to pick the date. */ + maxZoomLevel?: string; + /** Specifies the type of date/time picker. */ + pickerType?: string; } /** A date box widget. */ export class dxDateBox extends dxDropDownEditor { @@ -1987,7 +2158,6 @@ declare module DevExpress.ui { 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. */ @@ -2007,6 +2177,16 @@ declare module DevExpress.ui { max?: Date; /** The earliest date the widget allows to select. */ min?: Date; + /** Specifies whether or not the widget displays a button that selects the current date. */ + showTodayButton?: boolean; + /** Specifies the current calendar zoom level. */ + zoomLevel?: string; + /** Specifies the maximum zoom level of the calendar. */ + maxZoomLevel?: string; + /** Specifies the minimum zoom level of the calendar. */ + minZoomLevel?: string; + /** The template to be used for rendering calendar cells. */ + cellTemplate?: any; } /** A calendar widget. */ export class dxCalendar extends Editor { @@ -2014,12 +2194,13 @@ declare module DevExpress.ui { constructor(element: Element, options?: dxCalendarOptions); } export interface dxButtonOptions extends WidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; /** 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; @@ -2044,7 +2225,7 @@ declare module DevExpress.ui { /** A container widget used to arrange inner elements. */ export class dxBox extends CollectionWidget { constructor(element: JQuery, options?: dxBoxOptions); - constructor(element: Element, 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. */ @@ -2114,8 +2295,11 @@ declare module DevExpress.ui { 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; + /** The text displayed on the button that opens the file browser. */ + selectButtonText?: string; + /** The text displayed on the button that starts uploading. */ + uploadButtonText?: 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. */ @@ -2124,6 +2308,22 @@ declare module DevExpress.ui { multiple?: boolean; /** Specifies a file type or several types accepted by the widget. */ accept?: string; + /** Specifies a target Url for the upload request. */ + uploadUrl?: string; + /** Specifies if an end user can remove a just uploaded file. */ + allowCanceling?: boolean; + /** Specifies whether or not the widget displays the list of selected files. */ + showFileList?: boolean; + /** Gets the current progress in percentages. */ + progress?: number; + /** The message displayed by the widget when it is ready to upload the specified files. */ + readyToUploadMessage?: string; + /** The message displayed by the widget when uploading is finished. */ + uploadedMessage?: string; + /** The message displayed by the widget on uploading failure. */ + uploadFailedMessage?: string; + /** Specifies how the widget uploads files. */ + uploadMode?: string; } /** A widget used to select and upload a file or multiple files. */ export class dxFileUploader extends Editor { @@ -2163,6 +2363,8 @@ declare module DevExpress.ui { value?: number; /** Specifies whether or not to highlight a range selected within the widget. */ showRange?: boolean; + /** Specifies the size of a step by which a slider handle is moved when a user uses the Page up or Page down keyboard shortcuts. */ + keyStep?: number; /** Specifies options for the slider tooltip. */ tooltip?: { /** Specifies whether or not the tooltip is enabled. */ @@ -2201,6 +2403,8 @@ declare module DevExpress.ui { constructor(element: Element, options?: dxRangeSliderOptions); } export interface dxTileViewOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; /** Specifies the height of the base tile view item. */ baseItemHeight?: number; /** Specifies the width of the base tile view item. */ @@ -2209,7 +2413,6 @@ declare module DevExpress.ui { 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; } @@ -2233,6 +2436,31 @@ declare module DevExpress.ui { constructor(element: JQuery, options?: dxSwitchOptions); constructor(element: Element, options?: dxSwitchOptions); } + export interface dxSlideOutViewOptions extends WidgetOptions { + /** Specifies whether or not the menu panel is visible. */ + menuVisible?: boolean; + /** Specifies whether or not the menu is shown when a user swipes the widget content. */ + swipeEnabled?: boolean; + /** A template to be used for rendering menu panel content. */ + menuTemplate?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal a custom menu. */ + export class dxSlideOutView extends Widget { + constructor(element: JQuery, options?: dxSlideOutViewOptions); + constructor(element: Element, options?: dxSlideOutViewOptions); + /** Returns an HTML element of the widget menu block. */ + menuContent(): JQuery; + /** Returns an HTML element of the widget content block. */ + content(): JQuery; + /** Displays the widget's menu block. */ + showMenu(): JQueryPromise; + /** Hides the widget's menu block. */ + hideMenu(): JQueryPromise; + /** Toggles the visibility of the widget's menu block. */ + toggleMenuVisibility(): JQueryPromise; + } export interface dxSlideOutOptions extends CollectionWidgetOptions { /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ activeStateEnabled?: boolean; @@ -2244,6 +2472,10 @@ declare module DevExpress.ui { menuItemRender?: any; /** The template used to render menu items. */ menuItemTemplate?: any; + /** A handler for the menuGroupRendered event. */ + onMenuGroupRendered?: Function; + /** A handler for the menuItemRendered event. */ + onMenuItemRendered?: Function; /** 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. */ @@ -2265,6 +2497,8 @@ declare module DevExpress.ui { export interface dxPivotOptions extends CollectionWidgetOptions { /** The index of the currently active pivot item. */ selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; /** A template to be used for rendering widget content. */ contentTemplate?: any; } @@ -2299,7 +2533,6 @@ declare module DevExpress.ui { 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; @@ -2364,6 +2597,68 @@ declare module DevExpress.ui { /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ toggle(showing: boolean): JQueryPromise; } + export interface dxSchedulerOptions extends WidgetOptions { + /** Specifies a date displayed on the current scheduler view by default. */ + currentDate?: Date; + /** Specifies the view used in the scheduler by default. */ + currentView?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The template to be used for rendering appointments. */ + appointmentTemplate?: any; + /** Lists the views to be available within the scheduler's View Selector. */ + views?: Array; + /** Specifies the resource kinds by which the scheduler's appointments are grouped in a timetable. */ + groups?: Array; + /** Specifies a start hour in the scheduler view's time interval. */ + startDayHour?: number; + /** Specifies an end hour in the scheduler view's time interval. */ + endDayHour?: number; + /** Specifies an array of resources available in the scheduler. */ + resources?: Array<{ + /** Indicates whether or not several resources of this kind can be assigned to an appointment. */ + allowMultiple?: boolean; + /** Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. */ + mainColor?: boolean; + /** A data source used to fetch resources to be available in the scheduler. */ + dataSource?: any; + /** Specifies the resource object field whose value is displayed by the Resource editor in the Appointment popup window. */ + displayExpr?: any; + /** Specifies the resource object field that is used as a value of the Resource editor in the Appointment popup window. */ + valueExpr?: any; + /** The name of the appointment object field that specifies a resource of this kind. */ + field?: string; + /** Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind. */ + label?: string; + }>; + /** A handler for the AppoinmentAdding event. */ + onAppointmentAdding?: Function; + /** A handler for the appointmentAdded event. */ + onAppointmentAdded?: Function; + /** A handler for the AppoinmentUpdating event. */ + onAppointmentUpdating?: Function; + /** A handler for the appointmentUpdated event. */ + onAppointmentUpdated?: Function; + /** A handler for the AppoinmentDeleting event. */ + onAppointmentDeleting?: Function; + /** A handler for the appointmentDeleted event. */ + onAppointmentDeleted?: Function; + /** A handler for the appointmentRendered event. */ + onAppointmentRendered?: Function; + } + /** A widget that displays scheduled data using different views and provides the capability to load, add and edit appointments. */ + export class dxScheduler extends Widget { + constructor(element: JQuery, options?: dxSchedulerOptions); + constructor(element: Element, options?: dxSchedulerOptions); + /** Add the appointment defined by the object passed as a parameter to the data associated with the widget. */ + addAppointment(appointment: Object): void; + /** Updates the appointment specified by the first method parameter by the appointment object specified by the second method parameter in the the data associated with the widget. */ + updateAppointment(target: Object, appointment: Object): void; + /** Deletes the appointment defined by the parameter from the the data associated with the widget. */ + deleteAppointment(appointment: Object): void; + } export interface dxColorBoxOptions extends dxDropDownEditorOptions { /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ applyButtonText?: string; @@ -2372,6 +2667,8 @@ declare module DevExpress.ui { cancelButtonText?: string; /** Specifies whether or not the widget value includes the alpha channel component. */ editAlphaChannel?: boolean; + /** Specifies the size of a step by which a handle is moved using a keyboard shortcut. */ + keyStep?: number; } /** A widget used to specify a color value. */ export class dxColorBox extends dxDropDownEditor { @@ -2388,6 +2685,8 @@ declare module DevExpress.ui { constructor(element: Element, options?: dxColorPickerOptions); } export interface dxTreeViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate item collapsing and expanding. */ + animationEnabled?: boolean; /** 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. */ @@ -2417,7 +2716,14 @@ declare module DevExpress.ui { itemsExpr?: any; /** Specifies the name of the data source item field that holds the key of the parent item. */ parentIdExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is disabled. */ disabledExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node includes child nodes. */ + hasItemsExpr?: any; + /** Specifies if the virtual mode is enabled. */ + virtualModeEnabled?: boolean; + /** Specifies the parent ID value of the root item. */ + rootValue?: any; /** A string value specifying available scrolling directions. */ scrollDirection?: string; /** A handler for the itemSelected event. */ @@ -2461,8 +2767,18 @@ declare module DevExpress.ui { selectionByClick?: boolean; /** Specifies the selection mode supported by the menu. */ selectionMode?: string; - /** Specifies the user interaction by which submenus are shown. */ - showSubmenuMode?: string; + /** Specifies options of submenu showing and hiding. */ + showSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu show and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ hoverStateEnabled?: boolean; } @@ -2475,12 +2791,22 @@ declare module DevExpress.ui { unselectItem(itemElement: any): void; } export interface dxMenuOptions extends dxMenuBaseOptions { - firstSubMenuDirection?: string; + /** Specifies whether or not the submenu is hidden when the mouse pointer leaves it. */ + hideSubmenuOnMouseLeave?: boolean; /** 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 options for showing and hiding the first level submenu. */ + showFirstSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu showing and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; /** Specifies the direction at which the submenus are displayed. */ submenuDirection?: string; /** A handler for the submenuHidden event. */ @@ -2502,11 +2828,13 @@ declare module DevExpress.ui { 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; + /** Holds an object that specifies options of alternative menu invocation. */ + alternativeInvocationMode?: { + /** Specifies whether or not the standard context menu invocation (on a right mouse click or on a long tap) is disabled. */ + enabled?: Boolean; + /** Specifies the element used to invoke the context menu. */ + invokingElement?: any; + }; /** A handler for the hidden event. */ onHidden?: Function; /** A handler for the hiding event. */ @@ -2519,9 +2847,6 @@ declare module DevExpress.ui { 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. */ @@ -2553,8 +2878,12 @@ declare module DevExpress.ui { 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. */ + /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ allowFiltering?: boolean; + /** Specifies whether or not the column can be anchored to a grid edge by end users. Setting this option makes sense only when the columnFixing | enabled option is set to true. */ + allowFixing?: boolean; + /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ + allowSearch?: 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. */ @@ -2577,8 +2906,10 @@ declare module DevExpress.ui { 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 determines values for column cells to be used for grouping. */ + calculateGroupValue?: any; + /** Specifies a callback function that returns a value or the name of the field to be used for sorting column cells. */ + calculateSortValue?: any; /** 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. */ @@ -2595,6 +2926,14 @@ declare module DevExpress.ui { filterOperations?: Array; /** Specifies a filter value for a column. */ filterValue?: any; + /** Specifies initial filter values for the column's header filter. */ + filterValues?: Array; + /** Specifies whether to include or exclude the records with the values selected in the column's header filter. */ + filterType?: string; + /** Indicates whether the column takes part in horizontal grid scrolling or is anchored to a grid edge. */ + fixed?: boolean; + /** Specifies the grid edge to which the column is anchored. */ + fixedPosition?: string; /** Specifies a format for the values displayed in a column. */ format?: string; /** Specifies a custom template for the group cell of a grid column. */ @@ -2650,6 +2989,8 @@ Specifies the data source providing data for a lookup column. errorRowEnabled?: boolean; /** A handler for the rowValidating event. */ onRowValidating?: (e: Object) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; initNewRow?: (e: { data: Object }) => void; /** A handler for the initNewRow event. */ onInitNewRow?: (e: { data: Object }) => void; @@ -2701,6 +3042,40 @@ Specifies the data source providing data for a lookup column. /** Specifies the width of the column chooser panel. */ width?: number; }; + /** Specifies options for column fixing. */ + columnFixing?: { + /** Indicates if column fixing is enabled. */ + enabled?: boolean; + /** Contains options that specify texts for column-fixing related commands in the column header's context menu. */ + texts?: { + /** Specifies text for a context menu item that fixes the column for which the context menu is invoked. */ + fix?: string; + /** Specifies text for a context menu item that unfixes the column for which the context menu is invoked. */ + unfix?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the left grid edge. */ + leftPosition?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the right grid edge. */ + rightPosition?: string; + }; + }; + /** Specifies options for filtering using a column header filter. */ + headerFilter?: { + /** Indicates whether or not the column header filter button is visible. */ + visible?: boolean; + /** Specifies the height of the dropdown menu invoked when using a column header filter. */ + height?: number; + /** Specifies the width of the dropdown menu invoked when using a column header filter. */ + width?: number; + /** Contains options that specify texts for the dropdown menu invoked when you use a column header filter. */ + texts?: { + /** Specifies text for the item specifying an empty value in the column header filter's dropdown menu. */ + emptyValue?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu and applies specified filtering. */ + ok?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu without applying performed selection. */ + cancel?: string; + } + }; /** An array of grid columns. */ @@ -2759,11 +3134,6 @@ An array of grid columns. 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. */ @@ -2913,6 +3283,32 @@ Specifies the message displayed in a group row when the corresponding group cont /** Specifies the template for detail sections. */ template?: any; }; + /** Specifies options for exporting grid data. */ + export?: { + /** Indicates if the export feature is enabled in the grid. */ + enabled?: boolean; + /** Specifies a default name for the file to which grid data is exported. */ + fileName?: string; + /** Specifies whether to enable Excel filtering for the exported data in the resulting XLSX file. */ + excelFilterEnabled?: boolean; + /** Specifies whether to enable word wrapping for the exported data in the resulting XLSX file. */ + excelWrapTextEnabled?: boolean; + /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ + proxyUrl?: string; + /** Indicates whether to allow end users to export not only the data displayed in the grid, but the selected rows only. */ + allowExportSelectedData?: boolean; + /** Contains options that specify texts for the export-related commands and hints. */ + texts?: { + /** Specifies text for the Export button when this button invokes a dropdown menu so you can choose the required export format. */ + exportTo?: string; + /** Specifies text for the Export button when this button exports to the XSLX format. */ + exportToExcel?: string; + /** Specifies text for the item in the Export dropdown menu that exports grid data to Excel. */ + excelFormat?: string; + /** Specifies text for the option in the Export dropdown menu that allows you to choose whether to export all the grid data or the selected rows only. */ + selectedRows?: string; + } + }; /** Specifies the keys of the records that must appear selected initially. */ selectedRowKeys?: Array; /** Specifies options of runtime selection. */ @@ -2937,6 +3333,22 @@ Specifies the message displayed in a group row when the corresponding group cont selectedRowKeys: Array; selectedRowsData: Array; }) => void; + /** A handler for the exporting event. */ + onExporting?: (e: { + fileName: string; + format: string; + cancel: boolean; + }) => void; + /** A handler for the exported event. */ + onExported?: (e: Object) => void; + /** A handler for the rowExpanding event. */ + onRowExpanding?: (e: Object) => void; + /** A handler for the rowExpanded event. */ + onRowExpanded?: (e: Object) => void; + /** A handler for the rowCollapsing event. */ + onRowCollapsing?: (e: Object) => void; + /** A handler for the rowCollapsed event. */ + onRowCollapsed?: (e: Object) => 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. */ @@ -3009,7 +3421,9 @@ Specifies the message displayed in a group row when the corresponding group cont 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. */ + /** Indicates whether to display group summary items in brackets of the group row header or to align them by the corresponding columns within the group row. */ + alignByColumn?: boolean; + /** Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row. */ showInColumn?: string; /** Specifies how to aggregate data for a summary item. */ summaryType?: string; @@ -3080,7 +3494,7 @@ Specifies the message displayed in a group row when the corresponding group cont beginCustomLoading(messageText: string): void; /** Discards changes made in a grid. */ cancelEditData(): void; - /** Clears the filter applied to grid records from code. */ + /** Clears all the filters applied to grid records. */ clearFilter(): void; /** Deselects all grid records. */ clearSelection(): void; @@ -3112,8 +3526,12 @@ Specifies the message displayed in a group row when the corresponding group cont 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; + /** Applies a filter to the grid's data source. */ + filter(filterExpr?: any): void; + /** Returns a filter expression applied to the grid's data source using the filter(filterExpr) method. */ + filter(): any; + /** Returns a filter expression applied to the grid using all possible scenarious. */ + getCombinedFilter(): any; /** Gets the keys of currently selected grid records. */ getSelectedRowKeys(): Array; /** Gets the data objects of currently selected grid records. */ @@ -3132,11 +3550,6 @@ Specifies the message displayed in a group row when the corresponding group cont 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. */ @@ -3149,6 +3562,7 @@ Searches grid records by a search string. searchByText(text: string): void; /** Selects all grid records. */ selectAll(): void; + /** Deselects the rows that are currently selected within the applied filter. */ deselectAll(): void; /** Selects specific grid records. */ selectRows(keys: Array, preserve: boolean): void; @@ -3169,9 +3583,140 @@ Searches grid records by a search string. byKey(key: any): JQueryPromise; /** Gets the value of a total summary item. */ getTotalSummaryValue(summaryItemName: string): any; + /** Exports grid data to Excel. */ + exportToExcel(selectionOnly: boolean): void; + /** Updates the grid to the size of its content. */ + updateDimensions(): void; + /** Focuses the specified cell element in the grid. */ + focus(element?: JQuery): void; + } + export interface dxPivotGridOptions extends WidgetOptions { + /** Specifies a data source for the pivot grid. */ + dataSource?: any; + useNativeScrolling?: any; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies whether to display the Total rows. */ + showRowTotals?: boolean; + /** Specifies whether to display the Grand Total row. */ + showRowGrandTotals?: boolean; + /** Specifies whether to display the Total columns. */ + showColumnTotals?: boolean; + /** Specifies whether to display the Grand Total column. */ + showColumnGrandTotals?: boolean; + /** The Field Chooser configuration options. */ + fieldChooser?: { + /** Enables or disables the field chooser. */ + enabled?: boolean; + /** Specifies the field chooser layout. */ + layout?: number; + /** Specifies the text to display as a title of the field chooser popup window. */ + title?: string; + /** Specifies the field chooser width. */ + width?: number; + /** Specifies the field chooser height. */ + height?: number; + /** Strings that can be changed or localized in the pivot grid's integrated Field Chooser. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** Strings that can be changed or localized in the dxPivotGrid widget. */ + texts?: { + /** The string to display as a header of the Grand Total row and column. */ + grandTotal?: string; + /** The string to display as a header of the Total row and column. */ + total?: string; + /** Specifies the text displayed when a pivot grid does not contain any fields. */ + noData?: string; + /** The string to display as a Show Field Chooser context menu item. */ + showFieldChooser?: string; + /** The string to display as an Expand All context menu item. */ + expandAll?: string; + /** The string to display as a Collapse All context menu item. */ + collapseAll?: string; + /** The string to display as a Sort Column by Summary Value context menu item. */ + sortColumnBySummary?: string; + /** The string to display as a Sort Row by Summary Value context menu item. */ + sortRowBySummary?: string; + /** The string to display as a Remove All Sorting context menu item. */ + removeAllSorting?: string; + }; + /** The Load panel configuration options. */ + loadPanel?: { + /** Enables or disables the load panel. */ + enabled?: boolean; + /** Specifies the height of the load panel. */ + height?: number; + /** Specifies the URL pointing to an image that will be used as a load indicator. */ + indicatorSrc?: string; + /** Specifies whether or not to show a load indicator. */ + showIndicator?: boolean; + /** Specifies whether or not to show load panel background. */ + showPane?: boolean; + /** Specifies the text to display inside a load panel. */ + text?: string; + /** Specifies the width of the load panel. */ + width?: number; + }; + /** A handler for the cellClick event. */ + onCellClick?: (e: any) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: any) => void; + } + /** A data summarization widget for multi-dimensional data analysis and data mining. */ + export class dxPivotGrid extends Widget { + constructor(element: JQuery, options?: dxPivotGridOptions); + constructor(element: Element, options?: dxPivotGridOptions); + /** Gets the PivotGridDataSource instance. */ + getDataSource(): DevExpress.data.PivotGridDataSource; + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + } + export interface dxPivotGridFieldChooserOptions extends WidgetOptions { + /** Specifies the field chooser layout. */ + layout?: number; + /** The data source of a dxPivotGrid widget. */ + dataSource?: DevExpress.data.PivotGridDataSource; + onContentReady?: Function; + /** Strings that can be changed or localized in the dxPivotGridFieldChooser widget. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** A complementary widget for dxPivotGrid that allows you to manage data displayed in the dxPivotGrid. */ + export class dxPivotGridFieldChooser extends Widget { + constructor(element: JQuery, options?: dxPivotGridFieldChooserOptions); + constructor(element: Element, options?: dxPivotGridFieldChooserOptions); + /** Updates the widget to the size of its content. */ + updateDimensions(): void; } } -declare module DevExpress.viz.charts { +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. */ @@ -3180,7 +3725,9 @@ declare module DevExpress.viz.charts { type: string; /** Unselects all the selected points of the series. The points are displayed in an initial style. */ clearSelection(): void; - /** + /** Gets the color of a particular series. */ + getColor(): string; + /** * Gets a point from the series point collection based on the specified argument. * @deprecated getPointsByArg(pointArg).md */ @@ -3239,7 +3786,7 @@ declare module DevExpress.viz.charts { name: string; /** Returns the tag of the series. */ tag: string; - /** Hides a particular series. */ + /** Hides a series. */ hide(): void; /** Provides information about the hover state of a series. */ isHovered(): any; @@ -3307,7 +3854,7 @@ declare module DevExpress.viz.charts { name: string; /** Returns the tag of the series. */ tag: string; - /** Hides a particular series. */ + /** Hides a series. */ hide(): void; /** Provides information about the hover state of a series. */ isHovered(): any; @@ -3469,59 +4016,59 @@ declare module DevExpress.viz.charts { }; } 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. */ + /** Specifies border options for points in the line and area series. */ border?: viz.core.Border; - /** Sets a color for a point when it is hovered over. */ + /** Specifies the points color. */ color?: string; - /** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */ + /** 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 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; + /** 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; - }; + /** 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 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 { @@ -3904,17 +4451,17 @@ declare module DevExpress.viz.charts { 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. */ + /** 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. */ + /** 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. */ + /** Specifies a format for the text displayed by axis labels. */ format?: string; - /** Specifies a precision for the formatted value displayed in the axis labels. */ + /** 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 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; @@ -3930,7 +4477,7 @@ declare module DevExpress.viz.charts { value?: any; } export interface PolarConstantLine extends PolarCommonConstantLineStyle { - /** An object defining constant line label options. */ + /** An object defining constant line label options. */ label?: PolarConstantLineLabel; /** Specifies a value to be displayed by a constant line. */ value?: any; @@ -3983,7 +4530,7 @@ declare module DevExpress.viz.charts { /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ hoverMode?: string; } - export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { } + export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis {} export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { /** Specifies a start angle for the argument axis in degrees. */ startAngle?: number; @@ -3999,7 +4546,7 @@ declare module DevExpress.viz.charts { 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; @@ -4106,8 +4653,6 @@ declare module DevExpress.viz.charts { 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. */ @@ -4157,7 +4702,7 @@ declare module DevExpress.viz.charts { asyncSeriesRendering?: boolean; }): void; } - export interface AdvancedLegend extends core.BaseLegend { + 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.

              */ @@ -4198,7 +4743,7 @@ declare module DevExpress.viz.charts { /** 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; + resolveLabelOverlapping?: string; } export interface Legend extends AdvancedLegend { /** Specifies whether the legend is located outside or inside the chart's plot. */ @@ -4263,7 +4808,7 @@ declare module DevExpress.viz.charts { maxBubbleSize?: number; /** Specifies the diameter of the smallest bubble measured in pixels. */ minBubbleSize?: number; - /** Defines the dxChart widget's pane(s). */ + /** 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; @@ -4393,7 +4938,7 @@ declare module DevExpress.viz.charts { onLegendClick?: any; legendClick?: any; /** Specifies how the chart must behave when series point labels overlap. */ - resolveLabelOverlapping?: string; + resolveLabelOverlapping?: string; } /** A circular chart widget for HTML JS applications. */ export class dxPieChart extends BaseChart { @@ -4403,7 +4948,7 @@ declare module DevExpress.viz.charts { getSeries(): PieSeries; } } -declare module DevExpress.viz.core { +declare module DevExpress.viz.core { export interface Border { /** Sets a border color for a selected series. */ color?: string; @@ -4465,8 +5010,7 @@ declare module DevExpress.viz.core { border?: viz.core.DashedBorderWithOpacity; /** Specifies a color for the tooltip. */ color?: string; - customizeText?: Function; - /** Specifies text and appearance of a particular set of tooltips. */ + /** Specifies text and appearance of a set of tooltips. */ customizeTooltip?: (arg: Object) => { color?: string; text?: string }; /** Specifies whether or not the tooltip is enabled. */ enabled?: boolean; @@ -4527,8 +5071,6 @@ declare module DevExpress.viz.core { 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. */ @@ -4573,21 +5115,23 @@ declare module DevExpress.viz.core { }) => 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; - } + 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; + /** Sets the name of the theme to be used in the widget. */ + theme?: string; } /** This section describes options and methods that are common to all widgets. */ export class BaseWidget extends DOMComponent { @@ -4595,7 +5139,7 @@ declare module DevExpress.viz.core { svg(): string; } } -declare module DevExpress.viz.gauges { +declare module DevExpress.viz.gauges { export interface BaseRangeContainer { /** Specifies a range container's background color. */ backgroundColor?: string; @@ -4726,8 +5270,6 @@ declare module DevExpress.viz.gauges { /** 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. */ @@ -4905,7 +5447,7 @@ declare module DevExpress.viz.gauges { values(values: Array): void; } } -declare module DevExpress.viz.map { +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. */ @@ -4916,6 +5458,8 @@ declare module DevExpress.viz.map { selected(): boolean; /** Sets a new selection state for an area. */ selected(state: boolean): void; + /** Applies the area settings specified as a parameter and updates the area appearance. */ + applySettings(settings: any): void; } /** This section describes the fields and methods that can be used in code to manipulate the Markers object. */ export interface Marker { @@ -4937,6 +5481,8 @@ declare module DevExpress.viz.map { selected(): boolean; /** Sets a new selection state for a marker. */ selected(state: boolean): void; + /** Applies the marker settings specified as a parameter and updates the marker appearance. */ + applySettings(settings: any): void; } export interface AreaSettings { /** Specifies the width of the area border in pixels. */ @@ -5065,6 +5611,8 @@ declare module DevExpress.viz.map { horizontalAlignment?: string; /** Specifies the position of the control bar. */ verticalAlignment?: string; + /** Specifies the opacity of the Control_Bar. */ + opacity?: number; }; /** Specifies the appearance of the loading indicator. */ loadingIndicator?: viz.core.LoadingIndicator; @@ -5076,8 +5624,6 @@ declare module DevExpress.viz.map { 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. */ @@ -5099,6 +5645,8 @@ declare module DevExpress.viz.map { }) => void; /** Specifies a number that is used to zoom a map initially. */ zoomFactor?: number; + /** Specifies a map's maximum zoom factor. */ + maxZoomFactor?: number; zoomFactorChanged?: (zoomFactor: number) => void; /** A handler for the zoomFactorChanged event. */ onZoomFactorChanged?: (e: { @@ -5172,7 +5720,7 @@ declare module DevExpress.viz.map { zoomFactor(zoomFactor: number): void; } } -declare module DevExpress.viz.rangeSelector { +declare module DevExpress.viz.rangeSelector { export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { /** Specifies the options for the range selector's background. */ background?: { @@ -5346,6 +5894,15 @@ Specifies an interval between minor ticks. /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ endValue?: any; }; + /** Specifies the color of the selected range. */ + selectedRangeColor?: string; + /** Range selector's indent options. */ + indent?: { + /** Specifies range selector's left indent. */ + left?: number; + /** Specifies range selector's right indent. */ + right?: number; + }; selectedRangeChanged?: (selectedRange: { startValue: any; endValue: any; }) => void; /** A handler for the selectedRangeChanged event. */ onSelectedRangeChanged?: (e: { @@ -5354,7 +5911,7 @@ Specifies an interval between minor ticks. component: dxRangeSelector; element: Element; }) => void; - /** Specifies the options of the range selector's shutters. */ + /** Specifies range selector shutter options. */ shutter?: { /** Specifies shutter color. */ color?: string; @@ -5384,9 +5941,21 @@ Specifies an interval between minor ticks. 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. */ + /** + * Specifies the empty space between the marker's border and the marker’s text. + * @deprecated Use the 'paddingTopBottom' and 'paddingLeftRight' options instead + */ padding?: number; - /** Specifies in pixels the height and width of the space reserved for the range selector slider markers. */ + /** Specifies the empty space between the marker's top and bottom borders and the marker's text. */ + paddingTopBottom?: number; + /** Specifies the empty space between the marker's left and right borders and the marker's text. */ + paddingLeftRight?: number; + /** Specifies the placeholder height of the slider marker. */ + placeholderHeight?: number; + /** + * Specifies in pixels the height and width of the space reserved for the range selector slider markers. + * @deprecated Use the 'placeholderHeight' and 'indent' options instead + */ placeholderSize?: { /** Specifies the height of the placeholder for the left and right slider markers. */ height?: number; @@ -5403,8 +5972,6 @@ Specifies an interval between minor ticks. /** 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 { @@ -5422,11 +5989,17 @@ Specifies an interval between minor ticks. setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; } } -declare module DevExpress.viz.sparklines { +declare module DevExpress.viz.sparklines { export interface SparklineTooltip extends viz.core.Tooltip { - /** Specifies how a tooltip is horizontally aligned relative to the graph. */ + /** + * Specifies how a tooltip is horizontally aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ horizontalAlignment?: string; - /** Specifies how a tooltip is vertically aligned relative to the graph. */ + /** + * Specifies how a tooltip is vertically aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ verticalAlignment?: string; } export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { @@ -5434,8 +6007,6 @@ declare module DevExpress.viz.sparklines { 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; } @@ -5510,6 +6081,10 @@ declare module DevExpress.viz.sparklines { winColor?: string; /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ winlossThreshold?: number; + /** Specifies the minimum value of the sparkline value axis. */ + minValue?: number; + /** Specifies the maximum value of the sparkline's value axis. */ + maxValue?: number; } /** A sparkline widget. */ export class dxSparkline extends BaseSparkline { @@ -5517,7 +6092,7 @@ declare module DevExpress.viz.sparklines { constructor(element: Element, options?: dxSparklineOptions); } } -interface JQuery { +interface JQuery { dxProgressBar(): JQuery; dxProgressBar(options: "instance"): DevExpress.ui.dxProgressBar; dxProgressBar(options: string): any; @@ -5780,6 +6355,21 @@ interface JQuery { dxDataGrid(options: string): any; dxDataGrid(options: string, ...params: any[]): any; dxDataGrid(options: DevExpress.ui.dxDataGridOptions): JQuery; + dxPivotGrid(): JQuery; + dxPivotGrid(options: "instance"): DevExpress.ui.dxPivotGrid; + dxPivotGrid(options: string): any; + dxPivotGrid(options: string, ...params: any[]): any; + dxPivotGrid(options: DevExpress.ui.dxPivotGridOptions): JQuery; + dxPivotGridFieldChooser(): JQuery; + dxPivotGridFieldChooser(options: "instance"): DevExpress.ui.dxPivotGridFieldChooser; + dxPivotGridFieldChooser(options: string): any; + dxPivotGridFieldChooser(options: string, ...params: any[]): any; + dxPivotGridFieldChooser(options: DevExpress.ui.dxPivotGridFieldChooserOptions): JQuery; + dxScheduler(): JQuery; + dxScheduler(options: "instance"): DevExpress.ui.dxScheduler; + dxScheduler(options: string): any; + dxScheduler(options: string, ...params: any[]): any; + dxScheduler(options: DevExpress.ui.dxSchedulerOptions): JQuery; dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; dxChart(methodName: string, ...params: any[]): any; dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; From 48df6f8dd4ebd0a09bb980a5bcd2acbc41217c31 Mon Sep 17 00:00:00 2001 From: Igor Kriklivets Date: Fri, 5 Jun 2015 18:57:28 +0300 Subject: [PATCH 37/48] Path to jQuery.d.ts changed --- devextreme/14.2/dx.devextreme-14.2.7.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devextreme/14.2/dx.devextreme-14.2.7.d.ts b/devextreme/14.2/dx.devextreme-14.2.7.d.ts index a1d361f540..c8827de9cd 100644 --- a/devextreme/14.2/dx.devextreme-14.2.7.d.ts +++ b/devextreme/14.2/dx.devextreme-14.2.7.d.ts @@ -1,9 +1,9 @@ -// Type definitions for DevExtreme 14.2.7 +// 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. */ From 279425d25fbe4e7a3a3ae5ff429c0c0124c23473 Mon Sep 17 00:00:00 2001 From: Lucy He Date: Fri, 5 Jun 2015 18:04:26 -0400 Subject: [PATCH 38/48] Add typing for addResources. Export i18next-client module. --- i18next/i18next-tests.ts | 18 ++++++++++++++++++ i18next/i18next.d.ts | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/i18next/i18next-tests.ts b/i18next/i18next-tests.ts index b1732de119..741f129823 100644 --- a/i18next/i18next-tests.ts +++ b/i18next/i18next-tests.ts @@ -665,6 +665,24 @@ describe('i18next', function () { }); + describe('adding resources after initialisation', function () { + + var frResource = { 'simple_fr': 'ok_from_fr' }; + var enResource = { 'simple_en': 'ok_from_en' }; + + beforeEach(function (done) { + i18n.init({ resStore: {} }, + function (t) { done(); }); + }); + + it('it should use resources for translation added after initialisation', function () { + i18n.addResources('fr', 'translation', frResource); + i18n.addResources('en', 'translation', enResource); + expect(i18n.t('simple_fr', { lng: 'fr' })).to.be('ok_from_fr'); + expect(i18n.t('simple_en', { lng: 'en' })).to.be('ok_from_en'); + }); + + }); }); describe('translation functionality', function () { diff --git a/i18next/i18next.d.ts b/i18next/i18next.d.ts index 3463f24262..4d7d5945bd 100644 --- a/i18next/i18next.d.ts +++ b/i18next/i18next.d.ts @@ -66,6 +66,7 @@ interface I18nextOptions { interface I18nextStatic { + addResources(language: string, namespace: string, resources: IResourceStoreKey): void; addPostProcessor(name: string, fn: (value: any, key: string, options: any) => string): void; detectLanguage(): string; functions: { @@ -130,4 +131,8 @@ declare var i18n: I18nextStatic; declare module 'i18next' { export = i18n; +} + +declare module 'i18next-client' { + export = i18n; } \ No newline at end of file From f3797dc8504128fba6810be381c2983e7cfc05e8 Mon Sep 17 00:00:00 2001 From: Lucy He Date: Fri, 5 Jun 2015 18:10:15 -0400 Subject: [PATCH 39/48] Move function so typings are alphabetical. --- i18next/i18next.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18next/i18next.d.ts b/i18next/i18next.d.ts index 4d7d5945bd..f390954591 100644 --- a/i18next/i18next.d.ts +++ b/i18next/i18next.d.ts @@ -66,8 +66,8 @@ interface I18nextOptions { interface I18nextStatic { - addResources(language: string, namespace: string, resources: IResourceStoreKey): void; addPostProcessor(name: string, fn: (value: any, key: string, options: any) => string): void; + addResources(language: string, namespace: string, resources: IResourceStoreKey): void; detectLanguage(): string; functions: { extend(target: any, ...objs: any[]): Object; From ed5be30e622dbfd9a302a310e5322dbee759cfc9 Mon Sep 17 00:00:00 2001 From: Kenneth Kolstad Date: Fri, 5 Jun 2015 15:48:45 -0700 Subject: [PATCH 40/48] lodash: add generic _.remove --- lodash/lodash-tests.ts | 1 + lodash/lodash.d.ts | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 2017252ffd..f45f2fb04a 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -270,6 +270,7 @@ result = _.range(0); result = _.remove([1, 2, 3, 4, 5, 6], function (num: number) { return num % 2 == 0; }); result = _.remove(foodsOrganic, 'organic'); result = _.remove(foodsType, { 'type': 'vegetable' }); +var typedResult: IFoodType[] = _.remove([ { name: 'apple' }, { name: 'orange' }], { name: 'orange' }); result = _.sortedIndex([20, 30, 50], 40); result = _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index dfa5e2e6a0..a3523fe9ff 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1296,6 +1296,14 @@ declare module _ { remove( array: List, wherealue?: Dictionary): any[]; + + /** + * @see _.remove + * @param item The item to remove + **/ + remove( + array:Array, + item:T): T[]; } //_.rest From 40b0c2661875cf6fcb3765f9a4325395b903b105 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 5 Jun 2015 15:58:51 -0700 Subject: [PATCH 41/48] Update angular2.d.ts for alpha.26 --- angular2/angular2-tests.ts | 5 +- angular2/angular2.d.ts | 5556 +++++++++++++++++++++++++++++++++--- 2 files changed, 5144 insertions(+), 417 deletions(-) diff --git a/angular2/angular2-tests.ts b/angular2/angular2-tests.ts index bdd2628e56..80c7e3cd92 100644 --- a/angular2/angular2-tests.ts +++ b/angular2/angular2-tests.ts @@ -2,7 +2,6 @@ // Use Typescript 1.4 style imports import ng = require("angular2/angular2"); -import di = require("angular2/di"); class Service { @@ -17,11 +16,11 @@ class Cmp { Cmp.annotations = [ ng.Component({ selector: 'cmp', - injectables: [Service, di.bind(Service2).toValue(null)] + injectables: [Service, ng.bind(Service2).toValue(null)] }), ng.View({ template: '{{greeting}} world!', - directives: [ng.For, ng.If] + directives: [ng.NgFor, ng.NgIf] }) ]; diff --git a/angular2/angular2.d.ts b/angular2/angular2.d.ts index fa3cc77889..b70c4577da 100644 --- a/angular2/angular2.d.ts +++ b/angular2/angular2.d.ts @@ -1,299 +1,1839 @@ -// Type definitions for Angular v2.0.0-alpha.22 +// Type definitions for Angular v2.0.0-alpha.26 // Project: http://angular.io/ // Definitions by: angular team // Definitions: https://github.com/borisyankov/DefinitelyTyped -/****************** - * This is a minimal type definition for the Angular2 quickstart. - * We plan to publish a complete definition soon. - ******************/ +// *********************************************************** +// This file is generated by the Angular build process. +// Please do not create manual edits or send pull requests +// modifying this file. +// *********************************************************** + +// Angular depends transitively on these libraries. +// If you don't have them installed you can run +// $ tsd query es6-promise rx rx-lite --action install --save +/// +/// interface List extends Array {} +interface Map {} +interface StringMap extends Map {} interface Type {} -interface _ComponentArg { - /** - * The CSS selector that triggers the instantiation of a directive. - * - * Angular only allows directives to trigger on CSS selectors that do not cross element boundaries. - * - * `selector` may be declared as one of the following: - * - * - `element-name`: select by element name. - * - `.class`: select by class name. - * - `[attribute]`: select by attribute name. - * - `[attribute=value]`: select by attribute name and value. - * - `:not(sub_selector)`: select only if the element does not match the `sub_selector`. - * - `selector1, selector2`: select if either `selector1` or `selector2` matches. - * - * - * ## Example - * - * Suppose we have a directive with an `input[type=text]` selector. - * - * And the following HTML: - * - * ```html - *
              - * - * - * - * ``` - * - * The directive would only be instantiated on the `` element. - * - */ - selector: string; +declare module "angular2/angular2" { + type SetterFn = typeof Function; + type int = number; + + // See https://github.com/Microsoft/TypeScript/issues/1168 + class BaseException /* extends Error */ { + message: any; + stack: any; + toString(): string; + } +} + + +declare module "angular2/angular2" { + class AbstractChangeDetector extends ChangeDetector { + addChild(cd: ChangeDetector): any; + addShadowDomChild(cd: ChangeDetector): any; + callOnAllChangesDone(): any; + checkNoChanges(): any; + detectChanges(): any; + detectChangesInRecords(throwOnChange: boolean): any; + lightDomChildren: List; + markAsCheckOnce(): any; + markPathToRootAsCheckOnce(): any; + mode: string; + parent: ChangeDetector; + ref: ChangeDetectorRef; + remove(): any; + removeChild(cd: ChangeDetector): any; + removeShadowDomChild(cd: ChangeDetector): any; + shadowDomChildren: List; + } + class ProtoRecord { + args: List; + bindingRecord: BindingRecord; + contextIndex: number; + directiveIndex: DirectiveIndex; + expressionAsString: string; + fixedArgs: List; + funcOrValue: any; + isLifeCycleRecord(): boolean; + isPipeRecord(): boolean; + isPureFunction(): boolean; + lastInBinding: boolean; + lastInDirective: boolean; + mode: number; + name: string; + selfIndex: number; + } + + /** - * Enumerates the set of properties that accept data binding for a directive. - * - * The `properties` property defines a set of `directiveProperty` to `bindingProperty` - * key-value pairs: - * - * - `directiveProperty` specifies the component property where the value is written. - * - `bindingProperty` specifies the DOM property where the value is read from. - * - * You can include a {@link Pipe} when specifying a `bindingProperty` to allow for data transformation and structural - * change detection of the value. These pipes will be evaluated in the context of this component. - * - * - * ## Syntax - * + * Directives allow you to attach behavior to elements in the DOM. + * + * Directives with an embedded view are called Components. + * + * A directive consists of a single directive annotation and a controller class. When the + * directive's `selector` matches + * elements in the DOM, the following steps occur: + * + * 1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor + * arguments. + * 2. Angular instantiates directives for each matched element using `ElementInjector` in a + * depth-first order, + * as declared in the HTML. + * + * ## Understanding How Injection Works + * + * There are three stages of injection resolution. + * - *Pre-existing Injectors*: + * - The terminal Injector cannot resolve dependencies. It either throws an error or, if + * the dependency was + * specified as `@Optional`, returns `null`. + * - The platform injector resolves browser singleton resources, such as: cookies, title, + * location, and others. + * - *Component Injectors*: Each component instance has its own Injector, and they follow + * the same parent-child hierarchy + * as the component instances in the DOM. + * - *Element Injectors*: Each component instance has a Shadow DOM. Within the Shadow DOM each + * element has an `ElementInjector` + * which follow the same parent-child hierarchy as the DOM elements themselves. + * + * When a template is instantiated, it also must instantiate the corresponding directives in a + * depth-first order. The + * current `ElementInjector` resolves the constructor dependencies for each directive. + * + * Angular then resolves dependencies as follows, according to the order in which they appear in the + * View: + * + * 1. Dependencies on the current element + * 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary + * 3. Dependencies on component injectors and their parents until it encounters the root component + * 4. Dependencies on pre-existing injectors + * + * + * The `ElementInjector` can inject other directives, element-specific special objects, or it can + * delegate to the parent + * injector. + * + * To inject other directives, declare the constructor parameter as: + * - `directive:DirectiveType`: a directive on the current element only + * - `@Ancestor() directive:DirectiveType`: any directive that matches the type between the current + * element and the + * Shadow DOM root. Current element is not included in the resolution, therefore even if it could + * resolve it, it will + * be ignored. + * - `@Parent() directive:DirectiveType`: any directive that matches the type on a direct parent + * element only. + * - `@Query(DirectiveType) query:QueryList`: A live collection of direct child + * directives. + * - `@QueryDescendants(DirectiveType) query:QueryList`: A live collection of any + * child directives. + * + * To inject element-specific special objects, declare the constructor parameter as: + * - `element: ElementRef` to obtain a reference to logical element in the view. + * - `viewContainer: ViewContainerRef` to control child template instantiation, for + * Directive directives only + * - `bindingPropagation: BindingPropagation` to control change detection in a more granular way. + * + * ## Example + * + * The following example demonstrates how dependency injection resolves constructor arguments in + * practice. + * + * + * Assume this HTML template: + * * ``` + *
              + *
              + *
              + *
              + *
              + *
              + *
              + *
              + *
              + *
              + * ``` + * + * With the following `dependency` decorator and `SomeService` injectable class. + * + * ``` + * @Injectable() + * class SomeService { + * } + * * @Directive({ - * properties: { - * 'directiveProperty1': 'bindingProperty1', - * 'directiveProperty2': 'bindingProperty2 | pipe1 | ...', - * ... + * selector: '[dependency]', + * properties: [ + * 'id: dependency' + * ] + * }) + * class Dependency { + * id:string; + * } + * ``` + * + * Let's step through the different ways in which `MyDirective` could be declared... + * + * + * ### No injection + * + * Here the constructor is declared with no arguments, therefore nothing is injected into + * `MyDirective`. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor() { * } * } * ``` - * - * - * ## Basic Property Binding - * - * We can easily build a simple `Tooltip` directive that exposes a `tooltip` property, which can be used in templates - * with standard Angular syntax. For example: - * + * + * This directive would be instantiated with no dependencies. + * + * + * ### Component-level injection + * + * Directives can inject any injectable instance from the closest component injector or any of its + * parents. + * + * Here, the constructor declares a parameter, `someService`, and injects the `SomeService` type + * from the parent + * component's injector. + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(someService: SomeService) { + * } + * } + * ``` + * + * This directive would be instantiated with a dependency on `SomeService`. + * + * + * ### Injecting a directive from the current element + * + * Directives can inject other directives declared on the current element. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(dependency: Dependency) { + * expect(dependency.id).toEqual(3); + * } + * } + * ``` + * This directive would be instantiated with `Dependency` declared at the same element, in this case + * `dependency="3"`. + * + * + * ### Injecting a directive from a direct parent element + * + * Directives can inject other directives declared on a direct parent element. By definition, a + * directive with a + * `@Parent` annotation does not attempt to resolve dependencies for the current element, even if + * this would satisfy + * the dependency. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Parent() dependency: Dependency) { + * expect(dependency.id).toEqual(2); + * } + * } + * ``` + * This directive would be instantiated with `Dependency` declared at the parent element, in this + * case `dependency="2"`. + * + * + * ### Injecting a directive from any ancestor elements + * + * Directives can inject other directives declared on any ancestor element (in the current Shadow + * DOM), i.e. on the + * parent element and its parents. By definition, a directive with an `@Ancestor` annotation does + * not attempt to + * resolve dependencies for the current element, even if this would satisfy the dependency. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Ancestor() dependency: Dependency) { + * expect(dependency.id).toEqual(2); + * } + * } + * ``` + * + * Unlike the `@Parent` which only checks the parent, `@Ancestor` checks the parent, as well as its + * parents recursively. If `dependency="2"` didn't exist on the direct parent, this injection would + * have returned + * `dependency="1"`. + * + * + * ### Injecting a live collection of direct child directives + * + * + * A directive can also query for other child directives. Since parent directives are instantiated + * before child directives, a directive can't simply inject the list of child directives. Instead, + * the directive injects a QueryList, which updates its contents as children are added, + * removed, or moved by a directive that uses a ViewContainerRef such as a `ng-for`, an + * `ng-if`, or an `ng-switch`. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Query(Dependency) dependencies:QueryList) { + * } + * } + * ``` + * + * This directive would be instantiated with a QueryList which contains `Dependency` 4 and + * 6. Here, `Dependency` 5 would not be included, because it is not a direct child. + * + * ### Injecting a live collection of descendant directives + * + * Note: This is will be implemented in later release. () + * + * Similar to `@Query` above, but also includes the children of the child elements. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@QueryDescendents(Dependency) dependencies:QueryList) { + * } + * } + * ``` + * + * This directive would be instantiated with a Query which would contain `Dependency` 4, 5 and 6. + * + * ### Optional injection + * + * The normal behavior of directives is to return an error when a specified dependency cannot be + * resolved. If you + * would like to inject `null` on unresolved dependency instead, you can annotate that dependency + * with `@Optional()`. + * This explicitly permits the author of a template to treat some of the surrounding directives as + * optional. + * + * ``` + * @Directive({ selector: '[my-directive]' }) + * class MyDirective { + * constructor(@Optional() dependency:Dependency) { + * } + * } + * ``` + * + * This directive would be instantiated with a `Dependency` directive found on the current element. + * If none can be + * found, the injector supplies `null` instead of throwing an error. + * + * ## Example + * + * Here we use a decorator directive to simply define basic tool-tip behavior. + * * ``` * @Directive({ * selector: '[tooltip]', - * properties: { - * 'text': 'tooltip' - * } - * }) - * class Tooltip { - * set text(text) { - * // This will get called every time the 'tooltip' binding changes with the new value. - * } - * } - * ``` - * - * We can then bind to the `tooltip' property as either an expression (`someExpression`) or as a string literal, as - * shown in the HTML template below: - * - * ```html - *
              ...
              - *
              ...
              - * ``` - * - * Whenever the `someExpression` expression changes, the `properties` declaration instructs - * Angular to update the `Tooltip`'s `text` property. - * - * - * - * ## Bindings With Pipes - * - * You can also use pipes when writing binding definitions for a directive. - * - * For example, we could write a binding that updates the directive on structural changes, rather than on reference - * changes, as normally occurs in change detection. - * - * See {@link Pipe} and {@link keyValDiff} documentation for more details. - * - * ``` - * @Directive({ - * selector: '[class-set]', - * properties: { - * 'classChanges': 'classSet | keyValDiff' - * } - * }) - * class ClassSet { - * set classChanges(changes:KeyValueChanges) { - * // This will get called every time the `class-set` expressions changes its structure. - * } - * } - * ``` - * - * The template that this directive is used in may also contain its own pipes. For example: - * - * ```html - *
              - * ``` - * - * In this case, the two pipes compose as if they were inlined: `someExpression | somePipe | keyValDiff`. - * - */ - properties?: Object; - - /** - * Specifies which DOM hostListeners a directive listens to. - * - * The `hostListeners` property defines a set of `event` to `method` key-value pairs: - * - * - `event1`: the DOM event that the directive listens to. - * - `statement`: the statement to execute when the event occurs. - * If the evalutation of the statement returns `false`, then `preventDefault`is applied on the DOM event. - * - * To listen to global events, a target must be added to the event name. - * The target can be `window`, `document` or `body`. - * - * When writing a directive event binding, you can also refer to the following local variables: - * - `$event`: Current event object which triggered the event. - * - `$target`: The source of the event. This will be either a DOM element or an Angular directive. - * (will be implemented in later release) - * - * - * ## Syntax - * - * ``` - * @Directive({ + * properties: [ + * 'text: tooltip' + * ], * hostListeners: { - * 'event1': 'onMethod1(arguments)', - * 'target:event2': 'onMethod2(arguments)', - * ... - * } - * } - * ``` - * - * ## Basic Event Binding: - * - * Suppose you want to write a directive that triggers on `change` events in the DOM and on `resize` events in window. - * You would define the event binding as follows: - * - * ``` - * @Directive({ - * selector: 'input', - * hostListeners: { - * 'change': 'onChange($event)', - * 'window:resize': 'onResize($event)' + * 'onmouseenter': 'onMouseEnter()', + * 'onmouseleave': 'onMouseLeave()' * } * }) - * class InputDirective { - * onChange(event:Event) { + * class Tooltip{ + * text:string; + * overlay:Overlay; // NOT YET IMPLEMENTED + * overlayManager:OverlayManager; // NOT YET IMPLEMENTED + * + * constructor(overlayManager:OverlayManager) { + * this.overlay = overlay; * } - * onResize(event:Event) { + * + * onMouseEnter() { + * // exact signature to be determined + * this.overlay = this.overlayManager.open(text, ...); + * } + * + * onMouseLeave() { + * this.overlay.close(); + * this.overlay = null; * } * } * ``` - * - * Here the `onChange` method of `InputDirective` is invoked whenever the DOM element fires the 'change' event. - * + * In our HTML template, we can then add this behavior to a `
              ` or any other element with the + * `tooltip` selector, + * like so: + * + * ``` + *
              + * ``` + * + * Directives can also control the instantiation, destruction, and positioning of inline template + * elements: + * + * A directive uses a ViewContainerRef to instantiate, insert, move, and destroy views at + * runtime. + * The ViewContainerRef is created as a result of `